#include <BlackoilPropsAdFromDeck.hpp>
|
| BlackoilPropsAdFromDeck (Opm::DeckConstPtr deck, Opm::EclipseStateConstPtr eclState, std::shared_ptr< MaterialLawManager > materialLawManager, const UnstructuredGrid &grid, const bool init_rock=true) |
|
| BlackoilPropsAdFromDeck (Opm::DeckConstPtr deck, Opm::EclipseStateConstPtr eclState, const UnstructuredGrid &grid, const bool init_rock=true) |
|
| BlackoilPropsAdFromDeck (const BlackoilPropsAdFromDeck &props, const int number_of_cells) |
| Constructor to create properties for a subgrid. More...
|
|
int | numDimensions () const |
|
int | numCells () const |
|
virtual const int * | cellPvtRegionIndex () const |
|
const double * | porosity () const |
|
const double * | permeability () const |
|
int | numPhases () const |
|
PhaseUsage | phaseUsage () const |
|
const double * | surfaceDensity (const int cellIdx=0) const |
|
ADB | muWat (const ADB &pw, const ADB &T, const Cells &cells) const |
|
ADB | muOil (const ADB &po, const ADB &T, const ADB &rs, const std::vector< PhasePresence > &cond, const Cells &cells) const |
|
ADB | muGas (const ADB &pg, const ADB &T, const ADB &rv, const std::vector< PhasePresence > &cond, const Cells &cells) const |
|
ADB | bWat (const ADB &pw, const ADB &T, const Cells &cells) const |
|
ADB | bOil (const ADB &po, const ADB &T, const ADB &rs, const std::vector< PhasePresence > &cond, const Cells &cells) const |
|
ADB | bGas (const ADB &pg, const ADB &T, const ADB &rv, const std::vector< PhasePresence > &cond, const Cells &cells) const |
|
V | rsSat (const V &po, const Cells &cells) const |
|
V | rsSat (const V &po, const V &so, const Cells &cells) const |
|
ADB | rsSat (const ADB &po, const Cells &cells) const |
|
ADB | rsSat (const ADB &po, const ADB &so, const Cells &cells) const |
|
ADB | rvSat (const ADB &po, const Cells &cells) const |
|
ADB | rvSat (const ADB &po, const ADB &so, const Cells &cells) const |
|
std::vector< ADB > | relperm (const ADB &sw, const ADB &so, const ADB &sg, const Cells &cells) const |
|
std::vector< ADB > | capPress (const ADB &sw, const ADB &so, const ADB &sg, const Cells &cells) const |
|
void | updateSatHyst (const std::vector< double > &saturation, const std::vector< int > &cells) |
|
void | updateSatOilMax (const std::vector< double > &saturation) |
| Update for max oil saturation. More...
|
|
void | setSwatInitScaling (const std::vector< double > &saturation, const std::vector< double > &pc) |
|
This class implements the AD-adapted fluid interface for three-phase black-oil. It requires an input deck from which it reads all relevant property data.
Most methods are available in two overloaded versions, one taking a constant vector and returning the same, and one taking an AD type and returning the same. Derivatives are not returned separately by any method, only implicitly with the AD version of the methods.
Canonical named indices for each phase.
Enumerator |
---|
Water |
|
Oil |
|
Gas |
|
Aqua |
|
Liquid |
|
Vapour |
|
MaxNumPhases |
|
Opm::BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck |
( |
Opm::DeckConstPtr |
deck, |
|
|
Opm::EclipseStateConstPtr |
eclState, |
|
|
std::shared_ptr< MaterialLawManager > |
materialLawManager, |
|
|
const UnstructuredGrid & |
grid, |
|
|
const bool |
init_rock = true |
|
) |
| |
Constructor to create a blackoil properties from an ECL deck.
The materialLawManager parameter represents the object from opm-material which handles the creating and updating parameter objects for the capillary pressure/relperm relations for each grid cell. This object is created internally for the constructors below, but if it is already available externally some performance can be gained by creating it only once.
- Parameters
-
deck | The unprocessed ECL deck from opm-parser |
eclState | The processed ECL deck from opm-parser |
materialLawManager | The container for the material law parameter objects |
grid | The grid upon which the simulation is run on. |
init_rock | If true the rock properties (rock compressibility and reference pressure) are read from the deck |
Opm::BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck |
( |
Opm::DeckConstPtr |
deck, |
|
|
Opm::EclipseStateConstPtr |
eclState, |
|
|
const UnstructuredGrid & |
grid, |
|
|
const bool |
init_rock = true |
|
) |
| |
Constructor to create a blackoil properties from an ECL deck.
- Parameters
-
deck | The unprocessed ECL deck from opm-parser |
eclState | The processed ECL deck from opm-parser |
grid | The grid upon which the simulation is run on. |
init_rock | If true the rock properties (rock compressibility and reference pressure) are read from the deck |
Opm::BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck |
( |
const BlackoilPropsAdFromDeck & |
props, |
|
|
const int |
number_of_cells |
|
) |
| |
Constructor to create properties for a subgrid.
This copies all properties that are not dependant on the grid size from an existing properties object and the number of cells. All properties that do not depend on the grid dimension will be copied. For the rest will have the correct size but the values will be undefined.
- Parameters
-
props | The property object to copy from. number_of_cells The number of cells of the subgrid. |
ADB Opm::BlackoilPropsAdFromDeck::bGas |
( |
const ADB & |
pg, |
|
|
const ADB & |
T, |
|
|
const ADB & |
rv, |
|
|
const std::vector< PhasePresence > & |
cond, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Gas formation volume factor. - Parameters
-
[in] | pg | Array of n gas pressure values. |
[in] | T | Array of n temperature values. |
[in] | rv | Array of n vapor oil/gas ratio |
[in] | cond | Array of n objects, each specifying which phases are present with non-zero saturation in a cell. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n formation volume factor values.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::bOil |
( |
const ADB & |
po, |
|
|
const ADB & |
T, |
|
|
const ADB & |
rs, |
|
|
const std::vector< PhasePresence > & |
cond, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Oil formation volume factor. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | T | Array of n temperature values. |
[in] | rs | Array of n gas solution factor values. |
[in] | cond | Array of n objects, each specifying which phases are present with non-zero saturation in a cell. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n formation volume factor values.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::bWat |
( |
const ADB & |
pw, |
|
|
const ADB & |
T, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Water formation volume factor. - Parameters
-
[in] | pw | Array of n water pressure values. |
[in] | T | Array of n temperature values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n formation volume factor values.
Implements Opm::BlackoilPropsAdInterface.
std::vector<ADB> Opm::BlackoilPropsAdFromDeck::capPress |
( |
const ADB & |
sw, |
|
|
const ADB & |
so, |
|
|
const ADB & |
sg, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Capillary pressure for all phases. - Parameters
-
[in] | sw | Array of n water saturation values. |
[in] | so | Array of n oil saturation values. |
[in] | sg | Array of n gas saturation values. |
[in] | cells | Array of n cell indices to be associated with the saturation values. |
- Returns
- An std::vector with 3 elements, each an array of n capillary pressure values, containing the offsets for each p_g, p_o, p_w. The capillary pressure between two arbitrary phases alpha and beta is then given as p_alpha - p_beta.
Implements Opm::BlackoilPropsAdInterface.
virtual const int* Opm::BlackoilPropsAdFromDeck::cellPvtRegionIndex |
( |
| ) |
const |
|
inlinevirtual |
Return an array containing the PVT table index for each grid cell
ADB Opm::BlackoilPropsAdFromDeck::muGas |
( |
const ADB & |
pg, |
|
|
const ADB & |
T, |
|
|
const ADB & |
rv, |
|
|
const std::vector< PhasePresence > & |
cond, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Gas viscosity. - Parameters
-
[in] | pg | Array of n gas pressure values. |
[in] | T | Array of n temperature values. |
[in] | rv | Array of n vapor oil/gas ratios. |
[in] | cond | Array of n objects, each specifying which phases are present with non-zero saturation in a cell. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n viscosity values.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::muOil |
( |
const ADB & |
po, |
|
|
const ADB & |
T, |
|
|
const ADB & |
rs, |
|
|
const std::vector< PhasePresence > & |
cond, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Oil viscosity. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | T | Array of n temperature values. |
[in] | rs | Array of n gas solution factor values. |
[in] | cond | Array of n objects, each specifying which phases are present with non-zero saturation in a cell. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n viscosity values.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::muWat |
( |
const ADB & |
pw, |
|
|
const ADB & |
T, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Water viscosity. - Parameters
-
[in] | pw | Array of n water pressure values. |
[in] | T | Array of n temperature values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n viscosity values.
Implements Opm::BlackoilPropsAdInterface.
int Opm::BlackoilPropsAdFromDeck::numCells |
( |
| ) |
const |
|
virtual |
int Opm::BlackoilPropsAdFromDeck::numDimensions |
( |
| ) |
const |
|
virtual |
int Opm::BlackoilPropsAdFromDeck::numPhases |
( |
| ) |
const |
|
virtual |
const double* Opm::BlackoilPropsAdFromDeck::permeability |
( |
| ) |
const |
|
virtual |
- Returns
- Array of ND^2 permeability values. The D^2 permeability values for a cell are organized as a matrix, which is symmetric (so ordering does not matter).
Implements Opm::BlackoilPropsAdInterface.
PhaseUsage Opm::BlackoilPropsAdFromDeck::phaseUsage |
( |
| ) |
const |
|
virtual |
const double* Opm::BlackoilPropsAdFromDeck::porosity |
( |
| ) |
const |
|
virtual |
std::vector<ADB> Opm::BlackoilPropsAdFromDeck::relperm |
( |
const ADB & |
sw, |
|
|
const ADB & |
so, |
|
|
const ADB & |
sg, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Relative permeabilities for all phases. - Parameters
-
[in] | sw | Array of n water saturation values. |
[in] | so | Array of n oil saturation values. |
[in] | sg | Array of n gas saturation values. |
[in] | cells | Array of n cell indices to be associated with the saturation values. |
- Returns
- An std::vector with 3 elements, each an array of n relperm values, containing krw, kro, krg. Use PhaseIndex for indexing into the result.
Implements Opm::BlackoilPropsAdInterface.
V Opm::BlackoilPropsAdFromDeck::rsSat |
( |
const V & |
po, |
|
|
const Cells & |
cells |
|
) |
| const |
Bubble point curve for Rs as function of oil pressure. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n bubble point values for Rs.
V Opm::BlackoilPropsAdFromDeck::rsSat |
( |
const V & |
po, |
|
|
const V & |
so, |
|
|
const Cells & |
cells |
|
) |
| const |
Bubble point curve for Rs as function of oil pressure. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | so | Array of n oil saturation values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n bubble point values for Rs.
ADB Opm::BlackoilPropsAdFromDeck::rsSat |
( |
const ADB & |
po, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Bubble point curve for Rs as function of oil pressure. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n bubble point values for Rs.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::rsSat |
( |
const ADB & |
po, |
|
|
const ADB & |
so, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Bubble point curve for Rs as function of oil pressure. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | so | Array of n oil saturation values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n bubble point values for Rs.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::rvSat |
( |
const ADB & |
po, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Condensation curve for Rv as function of oil pressure. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n condensation point values for Rv.
Implements Opm::BlackoilPropsAdInterface.
ADB Opm::BlackoilPropsAdFromDeck::rvSat |
( |
const ADB & |
po, |
|
|
const ADB & |
so, |
|
|
const Cells & |
cells |
|
) |
| const |
|
virtual |
Condensation curve for Rv as function of oil pressure. - Parameters
-
[in] | po | Array of n oil pressure values. |
[in] | so | Array of n oil saturation values. |
[in] | cells | Array of n cell indices to be associated with the pressure values. |
- Returns
- Array of n condensation point values for Rv.
Implements Opm::BlackoilPropsAdInterface.
void Opm::BlackoilPropsAdFromDeck::setSwatInitScaling |
( |
const std::vector< double > & |
saturation, |
|
|
const std::vector< double > & |
pc |
|
) |
| |
Set capillary pressure scaling according to pressure diff. and initial water saturation. - Parameters
-
[in] | saturation | Array of n*numPhases saturation values. |
[in] | pc | Array of n*numPhases capillary pressure values. |
const double* Opm::BlackoilPropsAdFromDeck::surfaceDensity |
( |
const int |
cellIdx = 0 | ) |
const |
|
virtual |
void Opm::BlackoilPropsAdFromDeck::updateSatHyst |
( |
const std::vector< double > & |
saturation, |
|
|
const std::vector< int > & |
cells |
|
) |
| |
|
virtual |
Saturation update for hysteresis behavior. - Parameters
-
[in] | cells | Array of n cell indices to be associated with the saturation values. |
Implements Opm::BlackoilPropsAdInterface.
void Opm::BlackoilPropsAdFromDeck::updateSatOilMax |
( |
const std::vector< double > & |
saturation | ) |
|
|
virtual |
friend class BlackoilPropsDataHandle |
|
friend |
The documentation for this class was generated from the following file:
|