Opm::ECLUnits::Convert::Viscosity Class Reference
Inheritance diagram for Opm::ECLUnits::Convert::Viscosity:
Detailed DescriptionFacility for converting viscosity values between user-selected units of measure. Member Function Documentation◆ appliedTo()
Convert a sequence of fluid phase viscosity values 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 viscosity value in cell 27182 on restart step 10 and report it in LAB units. const auto rset = ResultSet("Case.EGRID");
const auto si = internalUnitConvention();
const auto lab = labUnitConvention();
rstrt.selectReportStep(10);
const auto press = G.linearisedCellData<double>
(rstrt, "PRESSURE", &UnitSystem::pressure);
const auto rv = G.linearisedCellData<double>
(rstrt, "RV", &UnitSystem::vaporisedOilGasRat);
auto mu = pvtCC.getDynamicProperty(RawCurve::Viscosity,
ECLPhaseIndex::Vapour, 27182,
std::vector<double>{ press[27182] },
std::vector<double>{ rv.empty() ? 0.0 : rv[27182] });
Convert::Viscosity().to(*lab).from(*si).appliedTo(mu);
Definition: ECLGraph.hpp:52 static ECLGraph load(const boost::filesystem::path &gridFile, const ECLInitFileData &init) Definition: ECLResultData.hpp:177 Definition: ECLResultData.hpp:57 constexpr const double Viscosity Definition: custom-opm-common/opm-common/opm/parser/eclipse/Units/Units.hpp:277 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) @ Vapour virtual double pressure() const =0 double vaporisedOilGasRat() const
Implements Opm::ECLUnits::Convert::PhysicalQuantity. ◆ from() [1/2]
Retrieve input unit system. Exists for the benefit of derived classes.
◆ from() [2/2]
Specify collection of units of measure of the inputs.
◆ to() [1/2]
Retrieve output unit system. Exists for the benefit of derived classes.
◆ to() [2/2]
Specify collection of units of measure of the output.
The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||