Units.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Opm
 
 Opm::prefix
 Conversion prefix for units.
 
 Opm::unit
 
 Opm::unit::perm_details
 
 Opm::unit::convert
 

Functions

double Opm::unit::convert::from (const double q, const double unit)
 
double Opm::unit::convert::to (const double q, const double unit)
 
Common powers
double Opm::unit::square (double v)
 
double Opm::unit::cubic (double v)
 

Variables

const double Opm::prefix::micro = 1.0e-6
 
const double Opm::prefix::milli = 1.0e-3
 
const double Opm::prefix::centi = 1.0e-2
 
const double Opm::prefix::deci = 1.0e-1
 
const double Opm::prefix::kilo = 1.0e3
 
const double Opm::prefix::mega = 1.0e6
 
const double Opm::prefix::giga = 1.0e9
 
const double Opm::unit::perm_details::p_grad = atm / (prefix::centi*meter)
 
const double Opm::unit::perm_details::area = square(prefix::centi*meter)
 
const double Opm::unit::perm_details::flux = cubic (prefix::centi*meter) / second
 
const double Opm::unit::perm_details::velocity = flux / area
 
const double Opm::unit::perm_details::visc = prefix::centi*Poise
 
const double Opm::unit::perm_details::darcy = (velocity * visc) / p_grad
 
Length
const double Opm::unit::meter = 1
 
const double Opm::unit::inch = 2.54 * prefix::centi*meter
 
const double Opm::unit::feet = 12 * inch
 
Time
const double Opm::unit::second = 1
 
const double Opm::unit::minute = 60 * second
 
const double Opm::unit::hour = 60 * minute
 
const double Opm::unit::day = 24 * hour
 
const double Opm::unit::year = 365 * day
 
Volume
const double Opm::unit::gallon = 231 * cubic(inch)
 
const double Opm::unit::stb = 42 * gallon
 
const double Opm::unit::liter = 1 * cubic(prefix::deci*meter)
 
Mass
const double Opm::unit::kilogram = 1
 
const double Opm::unit::pound = 0.45359237 * kilogram
 
Standardised constant
const double Opm::unit::gravity = 9.80665 * meter/square(second)
 
Force
const double Opm::unit::Newton = kilogram*meter / square(second)
 
const double Opm::unit::lbf = pound * gravity
 
Pressure
const double Opm::unit::Pascal = Newton / square(meter)
 
const double Opm::unit::barsa = 100000 * Pascal
 
const double Opm::unit::atm = 101325 * Pascal
 
const double Opm::unit::psia = lbf / square(inch)
 
Viscosity
const double Opm::unit::Pas = Pascal * second
 
const double Opm::unit::Poise = prefix::deci*Pas
 
Permeability

A porous medium with a permeability of 1 darcy permits a flow (flux) of $1\,\mathit{cm}^3/s$ of a fluid with viscosity $1\,\mathit{cP}$ ( $1\,mPa\cdot s$) under a pressure gradient of $1\,\mathit{atm}/\mathit{cm}$ acting across an area of $1\,\mathit{cm}^2$.

const double Opm::unit::darcy = perm_details::darcy
 

Detailed Description

Constants and routines to assist in handling units of measurement. These are geared towards handling common units in reservoir descriptions.