Opm::ECLSaturationFunc Class Reference

#include <ECLSaturationFunc.hpp>

Classes

struct  RawCurve
 
struct  SatFuncScaling
 

Public Member Functions

 ECLSaturationFunc (const ECLGraph &G, const ECLInitFileData &init)
 
 ~ECLSaturationFunc ()
 Destructor. More...
 
 ECLSaturationFunc (ECLSaturationFunc &&rhs)
 
 ECLSaturationFunc (const ECLSaturationFunc &rhs)
 
ECLSaturationFuncoperator= (ECLSaturationFunc &&rhs)
 
ECLSaturationFuncoperator= (const ECLSaturationFunc &rhs)
 
void setOutputUnits (std::unique_ptr< const ECLUnits::UnitSystem > usys)
 
std::vector< double > relperm (const ECLGraph &G, const ECLRestartData &rstrt, const ECLPhaseIndex p) const
 
std::vector< FlowDiagnostics::GraphgetSatFuncCurve (const std::vector< RawCurve > &func, const int activeCell, const bool useEPS=true) const
 
std::vector< FlowDiagnostics::GraphgetSatFuncCurve (const std::vector< RawCurve > &func, const int activeCell, const SatFuncScaling &scaling) const
 

Detailed Description

Gateway to engine for computing relative permeability values based on tabulated saturation functions in ECL output.

Constructor & Destructor Documentation

◆ ECLSaturationFunc() [1/3]

Opm::ECLSaturationFunc::ECLSaturationFunc ( const ECLGraph G,
const ECLInitFileData init 
)

Constructor

Parameters
[in]GConnected topology of current model's active cells. Needed to linearise region mapping (e.g., SATNUM) that is distributed on local grids to all of the model's active cells (
member function G.rawLinearisedCellData()
std::function< double(double, double)> function
Definition: Operate.hpp:28
).
[in]initContainer of tabulated saturation functions and saturation table end points, if applicable, for all active cells in the model G.

◆ ~ECLSaturationFunc()

Opm::ECLSaturationFunc::~ECLSaturationFunc ( )

Destructor.

◆ ECLSaturationFunc() [2/3]

Opm::ECLSaturationFunc::ECLSaturationFunc ( ECLSaturationFunc &&  rhs)

Move constructor.

Subsumes the implementation of an existing object.

Parameters
[in]rhsExisting engine for saturation function evaluation. Does not have a valid implementation when the constructor completes.

◆ ECLSaturationFunc() [3/3]

Opm::ECLSaturationFunc::ECLSaturationFunc ( const ECLSaturationFunc rhs)

Copy constructor.

Parameters
[in]rhsExisting engine for saturation function evaluation.

Member Function Documentation

◆ getSatFuncCurve() [1/2]

std::vector< FlowDiagnostics::Graph > Opm::ECLSaturationFunc::getSatFuncCurve ( const std::vector< RawCurve > &  func,
const int  activeCell,
const bool  useEPS = true 
) const

Retrieve 2D graph representations of sequence of effective saturation functions in a single cell.

Parameters
[in]funcSequence of saturation function descriptions.
[in]activeCellIndex of active cell from which to derive the effective saturation function. Use member function
int activeCell(const std::array< int, 3 > &ijk, const std::string &gridID="") const
to translate a global cell (I,J,K) tuple–relative to a model grid–to a linear active cell ID.
[in]useEPSWhether or not to include effects of saturation end-point scaling. No effect if the INIT result set from which the object was constructed does not actually include saturation end-point scaling data. Otherwise, enables turning EPS off even if associate data is present in the INIT result set.

Default value (true) means that effects of EPS are included if requisite data is present in the INIT result.

Returns
Sequence of 2D graphs for all saturation function requests represented by func. In particular, the i-th element of the result corresponds to input request
func[i]
. Abscissas are stored in
graph[i].first
and ordinates are stored in
graph[i].second
. If a particular request is semantically invalid, such as when requesting the water relative permeability in the oil-gas system, then the corresponding graph in the result is empty.

Example: Retrieve relative permeability curves for oil in active cell 2718 in both the oil-gas and oil-water sub-systems while excluding effects of end-point scaling. This effectively retrieves the "raw" tabulated saturation functions in the INIT result set.

auto func = std::vector<RC>{};
func.reserve(2);
// Request krog (oil rel-perm in oil-gas system)
func.push_back(RC{
RC::Function::RelPerm,
RC::SubSystem::OilGas,
});
// Request krow (oil rel-perm in oil-water system)
func.push_back(RC{
RC::Function::RelPerm,
RC::SubSystem::OilWater,
});
const auto graph =
sfunc.getSatFuncCurve(func, 2718, false);
RawCurve
Definition: ECLPvtCommon.hpp:293

◆ getSatFuncCurve() [2/2]

std::vector< FlowDiagnostics::Graph > Opm::ECLSaturationFunc::getSatFuncCurve ( const std::vector< RawCurve > &  func,
const int  activeCell,
const SatFuncScaling scaling 
) const

Retrieve 2D graph representations of sequence of effective saturation functions in a single cell.

Parameters
[in]funcSequence of saturation function descriptions.
[in]activeCellIndex of active cell from which to derive the effective saturation function. Use member function to translate a global cell (I,J,K) tuple–relative to a model grid–to a linear active cell ID.
[in]scalingWhich type of saturation function scaling to apply. No effect if the INIT result set from which the object was constructed does not actually include saturation end-point scaling or function value scaling data. Otherwise, enables turning various scaling effects on or off even if associate data is present in the INIT result set.
Returns
Sequence of 2D graphs for all saturation function requests represented by func. In particular, the i-th element of the result corresponds to input request
func[i]
. Abscissas are stored in
graph[i].first
and ordinates are stored in
graph[i].second
. If a particular request is semantically invalid, such as when requesting the water relative permeability in the oil-gas system, then the corresponding graph in the result is empty.

Example: Retrieve relative permeability curves for oil in active cell 2718 in both the oil-gas and oil-water sub-systems including effects of vertical scaling only.

auto func = std::vector<RC>{};
func.reserve(2);
// Request krog (oil rel-perm in oil-gas system)
func.push_back(RC{
RC::Function::RelPerm,
RC::SubSystem::OilGas,
});
// Request krow (oil rel-perm in oil-water system)
func.push_back(RC{
RC::Function::RelPerm,
RC::SubSystem::OilWater,
});
auto scaling = SatFuncScaling{};
scaling.enable = static_cast<unsigned char>(0);
scaling.enable |= SatFuncScaling::Type::Vertical;
const auto graph =
sfunc.getSatFuncCurve(func, 2718, scaling);

◆ operator=() [1/2]

ECLSaturationFunc & Opm::ECLSaturationFunc::operator= ( const ECLSaturationFunc rhs)

Assignment operator.

Parameters
[in]rhsExisting engine for saturation function evaluation.
Returns
*this
.

◆ operator=() [2/2]

ECLSaturationFunc & Opm::ECLSaturationFunc::operator= ( ECLSaturationFunc &&  rhs)

Move assignment operator.

Subsumes the implementation of an existing object.

Parameters
[in]rhsExisting engine for saturation function evaluation. Does not have a valid implementation when the constructor completes.
Returns
*this
.

◆ relperm()

std::vector< double > Opm::ECLSaturationFunc::relperm ( const ECLGraph G,
const ECLRestartData rstrt,
const ECLPhaseIndex  p 
) const

Compute relative permeability values in all active cells for a single phase.

Parameters
[in]GConnected topology of current model's active cells. Needed to linearise phase saturations (e.g., SOIL) that are distributed on local grids to all of the model's active cells (
member function G.rawLinearisedCellData()
).
[in]rstrtECLIPSE restart vectors. Result set view assumed to be positioned at a particular report step of interest.
[in]pPhase for which to compute relative permeability values.
Returns
Derived relative permeability values of active phase p for all active cells in model G. Empty if phase p is not actually active in the current result set.

◆ setOutputUnits()

void Opm::ECLSaturationFunc::setOutputUnits ( std::unique_ptr< const ECLUnits::UnitSystem usys)

Define a collection of units of measure for output purposes.

Capillary pressure curves produced by getSatFuncCurve() will be reported in the pressure units of this system. If this function is never called (or called with null pointer), then the output units are implicitly set to the flow-diagnostics module's internal units of measurement (meaning all properties and curves will be reported in strict SI units).

Parameters
[in]usysCollection of units of measure for output purposes. Typically the return value from one of the
*UnitConvention()
functions of the
ECLUnits
namespace.

The documentation for this class was generated from the following file: