#2192 RelPerm Plot: Utilize new functionality in opm-flowdiagnostics-applications to show the pressure in case-units

This commit is contained in:
sigurdp 2017-12-11 11:45:32 +01:00
parent 5641ecc1c2
commit 56febb9e92

View File

@ -135,21 +135,29 @@ public:
try try
{ {
m_eclPvtCurveCollection.reset(new Opm::ECLPVT::ECLPvtCurveCollection(*m_eclGraph, initData)); m_eclPvtCurveCollection.reset(new Opm::ECLPVT::ECLPvtCurveCollection(*m_eclGraph, initData));
// Try and set output unit system to the same system as the eclipse case system
std::unique_ptr<const Opm::ECLUnits::UnitSystem> eclUnitSystem;
if (caseUnitSystem == RiaEclipseUnitTools::UNITS_METRIC) eclUnitSystem = Opm::ECLUnits::metricUnitConventions();
else if (caseUnitSystem == RiaEclipseUnitTools::UNITS_FIELD) eclUnitSystem = Opm::ECLUnits::fieldUnitConventions();
else if (caseUnitSystem == RiaEclipseUnitTools::UNITS_LAB) eclUnitSystem = Opm::ECLUnits::labUnitConventions();
if (eclUnitSystem)
{
m_eclPvtCurveCollection->setOutputUnits(eclUnitSystem->clone());
}
} }
catch (...) catch (...)
{ {
RiaLogging::warning("Unsupported PVT table format. Could not initialize PVT plotting functionality."); RiaLogging::warning("Unsupported PVT table format. Could not initialize PVT plotting functionality.");
} }
// Try and set output unit system to the same system as the eclipse case system
std::unique_ptr<const Opm::ECLUnits::UnitSystem> eclUnitSystem;
if (caseUnitSystem == RiaEclipseUnitTools::UNITS_METRIC) eclUnitSystem = Opm::ECLUnits::metricUnitConventions();
else if (caseUnitSystem == RiaEclipseUnitTools::UNITS_FIELD) eclUnitSystem = Opm::ECLUnits::fieldUnitConventions();
else if (caseUnitSystem == RiaEclipseUnitTools::UNITS_LAB) eclUnitSystem = Opm::ECLUnits::labUnitConventions();
if (eclUnitSystem)
{
if (m_eclSaturationFunc)
{
m_eclSaturationFunc->setOutputUnits(eclUnitSystem->clone());
}
if (m_eclPvtCurveCollection)
{
m_eclPvtCurveCollection->setOutputUnits(eclUnitSystem->clone());
}
}
} }
public: public: