From 7b2b31013120aa5d2747ac639940e9aea09132a1 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 4 Jan 2016 15:32:55 +0100 Subject: [PATCH] adapt to the recent blackoil API changes of opm-material --- examples/problems/reservoirproblem.hh | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/examples/problems/reservoirproblem.hh b/examples/problems/reservoirproblem.hh index 68fea5c95..65df42f5d 100644 --- a/examples/problems/reservoirproblem.hh +++ b/examples/problems/reservoirproblem.hh @@ -258,7 +258,7 @@ public: Opm::GasPvtMultiplexer *gasPvt = new Opm::GasPvtMultiplexer; gasPvt->setApproach(Opm::GasPvtMultiplexer::DryGasPvt); - auto& dryGasPvt = gasPvt->template getRealGasPvt::DryGasPvt>(); + auto& dryGasPvt = gasPvt->template getRealPvt::DryGasPvt>(); dryGasPvt.setNumRegions(/*numPvtRegion=*/1); dryGasPvt.setReferenceDensities(/*regionIdx=*/0, rhoRefO, rhoRefG, rhoRefW); dryGasPvt.setGasFormationVolumeFactor(/*regionIdx=*/0, Bg); @@ -266,7 +266,7 @@ public: Opm::OilPvtMultiplexer *oilPvt = new Opm::OilPvtMultiplexer; oilPvt->setApproach(Opm::OilPvtMultiplexer::LiveOilPvt); - auto& liveOilPvt = oilPvt->template getRealOilPvt::LiveOilPvt>(); + auto& liveOilPvt = oilPvt->template getRealPvt::LiveOilPvt>(); liveOilPvt.setNumRegions(/*numPvtRegion=*/1); liveOilPvt.setReferenceDensities(/*regionIdx=*/0, rhoRefO, rhoRefG, rhoRefW); liveOilPvt.setSaturatedOilGasDissolutionFactor(/*regionIdx=*/0, Rs); @@ -275,14 +275,14 @@ public: Opm::WaterPvtMultiplexer *waterPvt = new Opm::WaterPvtMultiplexer; waterPvt->setApproach(Opm::WaterPvtMultiplexer::ConstantCompressibilityWaterPvt); - auto& ccWaterPvt = waterPvt->template getRealWaterPvt::ConstantCompressibilityWaterPvt>(); + auto& ccWaterPvt = waterPvt->template getRealPvt::ConstantCompressibilityWaterPvt>(); ccWaterPvt.setNumRegions(/*numPvtRegions=*/1); ccWaterPvt.setReferenceDensities(/*regionIdx=*/0, rhoRefO, rhoRefG, rhoRefW); ccWaterPvt.setViscosity(/*regionIdx=*/0, 9.6e-4); ccWaterPvt.setCompressibility(/*regionIdx=*/0, 1.450377e-10); - gasPvt->initEnd(oilPvt); - oilPvt->initEnd(gasPvt); + gasPvt->initEnd(); + oilPvt->initEnd(); waterPvt->initEnd(); typedef std::shared_ptr > GasPvtSharedPtr; @@ -296,13 +296,6 @@ public: FluidSystem::initEnd(); - Scalar MO = FluidSystem::molarMass(oilCompIdx); - Scalar MG = FluidSystem::molarMass(gasCompIdx); - Scalar MW = FluidSystem::molarMass(waterCompIdx); - liveOilPvt.setMolarMasses(/*regionIdx=*/0, MO, MG, MW); - dryGasPvt.setMolarMasses(/*regionIdx=*/0, MO, MG, MW); - //ccWaterPvt.setMolarMasses(/*regionIdx=*/0, MO, MG, MW); - pReservoir_ = 330e5; layerBottom_ = 22.0; @@ -604,10 +597,12 @@ private: ////// // set composition of the oil phase ////// - Scalar xoG = 0.95*FluidSystem::saturatedOilGasMoleFraction(temperature_, - fs.pressure(oilPhaseIdx), - /*pvtRegionIdx=*/0); - Scalar xoO = 1 - xoG; + Scalar RsSat = + FluidSystem::saturatedDissolutionFactor(fs, oilPhaseIdx, /*pvtRegionIdx=*/0); + Scalar XoGSat = FluidSystem::convertRsToXoG(RsSat, /*pvtRegionIdx=*/0); + Scalar xoGSat = FluidSystem::convertXoGToxoG(XoGSat, /*pvtRegionIdx=*/0); + Scalar xoG = 0.95*xoGSat; + Scalar xoO = 1.0 - xoG; // finally set the oil-phase composition fs.setMoleFraction(oilPhaseIdx, gasCompIdx, xoG);