My Project
|
A property class for incompressible two-phase flow. More...
#include <ReservoirPropertyCommon.hpp>
Public Types | |
enum | { NumberOfPhases = 2 } |
The number of phases. | |
typedef ImmutableCMatrix | PermTensor |
Tensor type for read-only access to permeability. | |
typedef OwnCMatrix | MutablePermTensor |
Tensor type to be used for holding copies of permeability tensors. | |
typedef SharedCMatrix | SharedPermTensor |
Tensor type for read and write access to permeability. | |
Public Member Functions | |
ReservoirPropertyCommon () | |
Default constructor. | |
void | init (const Opm::Deck &, const std::vector< int > &global_cell, const double perm_threshold=0.0, const std::string *rock_list_filename=0, const bool use_jfunction_scaling=true, const double sigma=1.0, const double theta=0.0) |
Initialize from a grdecl file. | |
void | init (const int num_cells, const double uniform_poro=0.2, const double uniform_perm=100.0 *Opm::prefix::milli *Opm::unit::darcy) |
Initialize a uniform reservoir. | |
void | setViscosities (double v1, double v2) |
Set viscosities of both faces. | |
void | setDensities (double d1, double d2) |
Set densitities of both faces. | |
double | viscosityFirstPhase () const |
Viscosity of first (water) phase. | |
double | viscositySecondPhase () const |
Viscosity of second (oil) phase. | |
double | densityFirstPhase () const |
Density of first (water) phase. | |
double | densitySecondPhase () const |
Density of second (oil) phase. | |
double | porosity (int cell_index) const |
Read-access to porosity. | |
double | ntg (int cell_index) const |
Read-access to ntg. | |
double | swcr (int cell_index) const |
Read-access to swcr. | |
double | sowcr (int cell_index) const |
Read-access to sowcr. | |
PermTensor | permeability (int cell_index) const |
Read-access to permeability. | |
SharedPermTensor | permeabilityModifiable (int cell_index) |
Read- and write-access to permeability. | |
template<class Vector > | |
void | phaseDensities (int, Vector &density) const |
Densities for both phases. | |
double | densityDifference () const |
Difference of densities. | |
double | cflFactor () const |
A factor useful in cfl computations. | |
double | cflFactorGravity () const |
A factor useful in gravity cfl computations. | |
double | cflFactorCapillary () const |
A factor useful in gravity cfl computations. | |
double | capillaryPressure (int cell_index, double saturation) const |
Capillary pressure. | |
double | capillaryPressureDeriv (int c, double s) const |
Derivative of Capillary pressure. | |
double | s_min (int c) const |
double | s_max (int c) const |
double | saturationFromCapillaryPressure (int cell_index, double cap_press) const |
Inverse of the capillary pressure function. | |
void | writeSintefLegacyFormat (const std::string &grid_prefix) const |
Write permeability and porosity in the Sintef legacy format. | |
Protected Attributes | |
std::vector< double > | porosity_ |
std::vector< double > | ntg_ |
std::vector< double > | swcr_ |
std::vector< double > | sowcr_ |
std::vector< double > | permeability_ |
std::vector< unsigned char > | permfield_valid_ |
double | density1_ |
double | density2_ |
double | viscosity1_ |
double | viscosity2_ |
double | cfl_factor_ |
double | cfl_factor_gravity_ |
double | cfl_factor_capillary_ |
std::vector< RockType > | rock_ |
std::vector< int > | cell_to_rock_ |
PermeabilityKind | permeability_kind_ |
A property class for incompressible two-phase flow.
dim | the dimension of the space, used for giving permeability tensors the right size. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::capillaryPressure | ( | int | cell_index, |
double | saturation | ||
) | const |
Capillary pressure.
cell_index | index of a grid cell. |
saturation | a saturation value. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::capillaryPressureDeriv | ( | int | c, |
double | s | ||
) | const |
Derivative of Capillary pressure.
cell_index | index of a grid cell. |
saturation | a saturation value. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::cflFactor | ( | ) | const |
A factor useful in cfl computations.
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::cflFactorCapillary | ( | ) | const |
A factor useful in gravity cfl computations.
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::cflFactorGravity | ( | ) | const |
A factor useful in gravity cfl computations.
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::densityDifference | ( | ) | const |
Difference of densities.
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::densityFirstPhase | ( | ) | const |
Density of first (water) phase.
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::densitySecondPhase | ( | ) | const |
Density of second (oil) phase.
void Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::init | ( | const int | num_cells, |
const double | uniform_poro = 0.2 , |
||
const double | uniform_perm = 100.0*Opm::prefix::milli*Opm::unit::darcy |
||
) |
Initialize a uniform reservoir.
num_cells | number of cells in the grid. |
uniform_poro | the uniform porosity. |
uniform_perm | the uniform (scalar) permeability. |
void Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::init | ( | const Opm::Deck & | deck, |
const std::vector< int > & | global_cell, | ||
const double | perm_threshold = 0.0 , |
||
const std::string * | rock_list_filename = 0 , |
||
const bool | use_jfunction_scaling = true , |
||
const double | sigma = 1.0 , |
||
const double | theta = 0.0 |
||
) |
Initialize from a grdecl file.
deck | the deck holding the grdecl data. |
global_cell | the mapping from cell indices to the logical cartesian indices of the grdecl file. |
perm_threshold | lower threshold for permeability. |
rock_list_filename | if non-null, the referred string gives the filename for the rock list. |
use_jfunction_scaling | if true, use j-function scaling of capillary pressure, if applicable. |
sigma | interface tension for j-scaling, if applicable. |
theta | angle for j-scaling, if applicable. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::ntg | ( | int | cell_index | ) | const |
Read-access to ntg.
cell_index | index of a grid cell. |
ReservoirPropertyCommon< dim, RPImpl, RockType >::PermTensor Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::permeability | ( | int | cell_index | ) | const |
Read-access to permeability.
cell_index | index of a grid cell. |
ReservoirPropertyCommon< dim, RPImpl, RockType >::SharedPermTensor Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::permeabilityModifiable | ( | int | cell_index | ) |
Read- and write-access to permeability.
Use with caution.
cell_index | index of a grid cell. |
void Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::phaseDensities | ( | int | , |
Vector & | density | ||
) | const |
Densities for both phases.
Vector | a class with size() and operator[]. |
cell_index | index of a grid cell (not used). | |
[out] | density | the phase densities. Expected to be of size 2 before (and after) the call. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::porosity | ( | int | cell_index | ) | const |
Read-access to porosity.
cell_index | index of a grid cell. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::s_max | ( | int | c | ) | const |
cell_index | index of a grid cell. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::s_min | ( | int | c | ) | const |
cell_index | index of a grid cell. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::saturationFromCapillaryPressure | ( | int | cell_index, |
double | cap_press | ||
) | const |
Inverse of the capillary pressure function.
cell_index | index of a grid cell. |
cap_press | a capillary pressure value. |
void Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::setDensities | ( | double | d1, |
double | d2 | ||
) |
Set densitities of both faces.
d1 | the densitity of the first (water) phase. |
d2 | the densitity of the second (oil) phase. |
void Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::setViscosities | ( | double | v1, |
double | v2 | ||
) |
Set viscosities of both faces.
v1 | the viscosity of the first (water) phase. |
v2 | the viscosity of the second (oil) phase. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::sowcr | ( | int | cell_index | ) | const |
Read-access to sowcr.
cell_index | index of a grid cell. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::swcr | ( | int | cell_index | ) | const |
Read-access to swcr.
cell_index | index of a grid cell. |
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::viscosityFirstPhase | ( | ) | const |
Viscosity of first (water) phase.
double Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::viscositySecondPhase | ( | ) | const |
Viscosity of second (oil) phase.
void Opm::ReservoirPropertyCommon< dim, RPImpl, RockType >::writeSintefLegacyFormat | ( | const std::string & | grid_prefix | ) | const |
Write permeability and porosity in the Sintef legacy format.
grid_prefix | the prefix of all files output by this function. |