Opm::ECLUnits::Convert::GasFVF Class Reference

#include <ECLPropertyUnitConversion.hpp>

Inheritance diagram for Opm::ECLUnits::Convert::GasFVF:
Inheritance graph

Public Member Functions

void appliedTo (std::vector< double > &Bg) const override
 
PhysicalQuantityfrom (const UnitSystem &usys)
 
PhysicalQuantityto (const UnitSystem &usys)
 

Protected Member Functions

const UnitSystemfrom () const
 
const UnitSystemto () const
 

Detailed Description

Facility for converting gas phase formation volume factor values between user-selected units of measure.

Member Function Documentation

◆ appliedTo()

void Opm::ECLUnits::Convert::GasFVF::appliedTo ( std::vector< double > &  Bg) const
overridevirtual

Convert a sequence of formation volume factor values for the gas/vapour phase from its input unit of measure to its output unit of measure.

Will throw an exception of type

std::invalid_argument

unless both of the input and output unit system conventions have been previously specified.

Example: Compute the dynamic gas formation volume factor value in cell 57721 on restart step 314 and report it in Field units.

const auto rset = ResultSet("Case.EGRID");
const auto init = ECLInitFileData{ rset.initFile() };
const auto G = ECLGraph.load(rset.gridFile(), init);
const auto rstrt = ECLRestartData{ rset.restartFile(10) };
const auto si = internalUnitConvention();
const auto field = fieldUnitConvention();
rstrt.selectReportStep(314);
const auto press = G.linearisedCellData<double>
(rstrt, "PRESSURE", &UnitSystem::pressure);
const auto rv = G.linearisedCellData<double>
const auto pvtCC = ECLPvtCurveCollection(G, init);
auto Bg = pvtCC.getDynamicProperty(RawCurve::FVF,
std::vector<double>{ press[57721] },
std::vector<double>{ rv.empty() ? 0.0 : rv[57721] });
Convert::GasFVF().to(*field).from(*si).appliedTo(Bg);
Definition: ECLGraph.hpp:52
static ECLGraph load(const boost::filesystem::path &gridFile, const ECLInitFileData &init)
Definition: ECLResultData.hpp:177
Definition: ECLResultData.hpp:57
@ GasFVF
Definition: custom-opm-common/opm-common/opm/output/eclipse/VectorItems/well.hpp:153
std::vector< double > init(const std::string &kewyord, const TableManager &tables, const Phases &phases, const std::vector< double > &cell_depth, const std::vector< int > &num, const std::vector< int > &endnum)
virtual double pressure() const =0
double vaporisedOilGasRat() const
Parameters
[in,out]BgOn input, a sequence of formation volume factor values for the gas phase assumed to be defined in the input unit specified through
from(usys)
const UnitSystem * from() const
. On output, the same seqeuence of gas FVF values converted to the output unit of measure specified through
to(usys)
.

Implements Opm::ECLUnits::Convert::PhysicalQuantity.

◆ from() [1/2]

const UnitSystem * Opm::ECLUnits::Convert::PhysicalQuantity::from ( ) const
protectedinherited

Retrieve input unit system.

Exists for the benefit of derived classes.

Returns
Input unit system. Null if not specified by caller.

◆ from() [2/2]

PhysicalQuantity & Opm::ECLUnits::Convert::PhysicalQuantity::from ( const UnitSystem usys)
inherited

Specify collection of units of measure of the inputs.

Parameters
[in]usysCollection of units of measure of inputs.
Returns
*this
.

◆ to() [1/2]

const UnitSystem * Opm::ECLUnits::Convert::PhysicalQuantity::to ( ) const
protectedinherited

Retrieve output unit system.

Exists for the benefit of derived classes.

Returns
Output unit system. Null if not specified by caller.

◆ to() [2/2]

PhysicalQuantity & Opm::ECLUnits::Convert::PhysicalQuantity::to ( const UnitSystem usys)
inherited

Specify collection of units of measure of the output.

Parameters
[in]usysCollection of units of measure of outputs.
Returns
*this
.

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