ecl_units.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 Equinor ASA, Norway.
3
4 The file 'ecl_units.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ECL_UNITS_H
20#define ECL_UNITS_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#define ECL_UNITS_CUBIC(x) ((x)*(x)*(x))
27#define ECL_UNITS_MILLI(x) ((x)*0.001)
28#define ECL_UNITS_MEGA(x) ((x)*1000000)
29
30#define ECL_UNITS_LENGTH_INCH 0.0254
31#define ECL_UNITS_LENGTH_FEET 12 * ECL_UNITS_LENGTH_INCH
32
33#define ECL_UNITS_VOLUME_GALLON 231 * ECL_UNITS_CUBIC( ECL_UNITS_LENGTH_INCH )
34#define ECL_UNITS_VOLUME_BARREL ECL_UNITS_VOLUME_GALLON * 42
35#define ECL_UNITS_VOLUME_LITER 0.001
36#define ECL_UNITS_VOLUME_MILLI_LITER ECL_UNITS_MILLI( ECL_UNITS_VOLUME_LITER )
37#define ECL_UNITS_VOLUME_GAS_FIELD ECL_UNITS_MEGA( ECL_UNITS_CUBIC( ECL_UNITS_LENGTH_FEET ) )
38
39#define ECL_UNITS_TIME_HOUR 3600
40#define ECL_UNITS_TIME_DAY 24 * ECL_UNITS_TIME_HOUR
41
42
43#ifdef __cplusplus
44}
45#endif
46#endif