Opm::unit Namespace Reference

Namespaces

 convert
 
 perm_details
 

Functions

Common powers
double square (double v)
 
double cubic (double v)
 

Variables

Length
const double meter = 1
 
const double inch = 2.54 * prefix::centi*meter
 
const double feet = 12 * inch
 
Time
const double second = 1
 
const double minute = 60 * second
 
const double hour = 60 * minute
 
const double day = 24 * hour
 
const double year = 365 * day
 
Volume
const double gallon = 231 * cubic(inch)
 
const double stb = 42 * gallon
 
const double liter = 1 * cubic(prefix::deci*meter)
 
Mass
const double kilogram = 1
 
const double pound = 0.45359237 * kilogram
 
Standardised constant
const double gravity = 9.80665 * meter/square(second)
 
Force
const double Newton = kilogram*meter / square(second)
 
const double lbf = pound * gravity
 
Pressure
const double Pascal = Newton / square(meter)
 
const double barsa = 100000 * Pascal
 
const double atm = 101325 * Pascal
 
const double psia = lbf / square(inch)
 
Viscosity
const double Pas = Pascal * second
 
const double 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 darcy = perm_details::darcy
 

Detailed Description

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 $1\,mD$.

using namespace Opm::unit
double k = 0.001*darcy;

We can also use one of the prefixes defined in Opm::prefix

using namespace Opm::unit
using namespace Opm::prefix
double k = 1.0*milli*darcy;

Function Documentation

double Opm::unit::cubic ( double  v)
inline
double Opm::unit::square ( double  v)
inline

Variable Documentation

const double Opm::unit::atm = 101325 * Pascal
const double Opm::unit::barsa = 100000 * Pascal

Referenced by Opm::initStateBasic().

const double Opm::unit::darcy = perm_details::darcy
const double Opm::unit::day = 24 * hour
const double Opm::unit::feet = 12 * inch
const double Opm::unit::gallon = 231 * cubic(inch)
const double Opm::unit::gravity = 9.80665 * meter/square(second)

Referenced by Opm::initStateBasic().

const double Opm::unit::hour = 60 * minute
const double Opm::unit::inch = 2.54 * prefix::centi*meter
const double Opm::unit::kilogram = 1
const double Opm::unit::lbf = pound * gravity
const double Opm::unit::liter = 1 * cubic(prefix::deci*meter)
const double Opm::unit::meter = 1
const double Opm::unit::minute = 60 * second
const double Opm::unit::Newton = kilogram*meter / square(second)
const double Opm::unit::Pas = Pascal * second
const double Opm::unit::Pascal = Newton / square(meter)
const double Opm::unit::Poise = prefix::deci*Pas
const double Opm::unit::pound = 0.45359237 * kilogram
const double Opm::unit::psia = lbf / square(inch)
const double Opm::unit::second = 1
const double Opm::unit::stb = 42 * gallon
const double Opm::unit::year = 365 * day