My Project
|
Definition of various units. More...
Namespaces | |
namespace | convert |
Unit conversion routines. | |
Functions | |
Common powers | |
constexpr double | square (double v) |
constexpr double | cubic (double v) |
Variables | |
constexpr const double | mol = 1 |
constexpr const double | ppm = 1. / prefix::mega |
Length | |
constexpr const double | meter = 1 |
constexpr const double | inch = 2.54 * prefix::centi*meter |
constexpr const double | feet = 12 * inch |
Time | |
constexpr const double | second = 1 |
constexpr const double | minute = 60 * second |
constexpr const double | hour = 60 * minute |
constexpr const double | day = 24 * hour |
constexpr const double | year = 365 * day |
constexpr const double | ecl_year = 365.25 * day |
Volume | |
constexpr const double | gallon = 231 * cubic(inch) |
constexpr const double | stb = 42 * gallon |
constexpr const double | liter = 1 * cubic(prefix::deci*meter) |
Mass | |
constexpr const double | kilogram = 1 |
constexpr const double | gram = 1.0e-3 * kilogram |
constexpr const double | pound = 0.45359237 * kilogram |
Energy | |
constexpr const double | joule = 1 |
constexpr const double | btu = 1054.3503*joule |
Standardised constant | |
constexpr const double | gravity = 9.80665 * meter/square(second) |
Force | |
constexpr const double | Newton = kilogram*meter / square(second) |
constexpr const double | dyne = 1e-5*Newton |
constexpr const double | lbf = pound * gravity |
Pressure | |
constexpr const double | Pascal = Newton / square(meter) |
constexpr const double | barsa = 100000 * Pascal |
constexpr const double | atm = 101325 * Pascal |
constexpr const double | psia = lbf / square(inch) |
Temperature. This one is more complicated | |
because the unit systems used by Eclipse (i.e. degrees Celsius and degrees Fahrenheit require to add or subtract an offset for the conversion between from/to Kelvin | |
constexpr const double | degCelsius = 1.0 |
constexpr const double | degCelsiusOffset = 273.15 |
constexpr const double | degFahrenheit = 5.0/9.0 |
constexpr const double | degFahrenheitOffset = 459.67*degFahrenheit |
Viscosity | |
constexpr const double | Pas = Pascal * second |
constexpr const double | Poise = prefix::deci*Pas |
Permeability | |
A porous medium with a permeability of 1 darcy permits a flow (flux) of | |
constexpr const double | darcy = perm_details::darcy |
Definition of various units.
All the units are defined in terms of international standard units (SI). Example of use: We define a variable k
which gives a permeability. We want to set k
to
We can also use one of the prefixes defined in Opm::prefix