add glue code needed for thermal gas PVT

This commit is contained in:
Andreas Lauser 2015-03-17 12:40:32 +01:00
parent 924818f445
commit f0c3a6f892

View File

@ -33,6 +33,7 @@
#include <opm/core/props/pvt/PvtLiveGas.hpp>
#include <opm/core/props/pvt/ThermalWaterPvtWrapper.hpp>
#include <opm/core/props/pvt/ThermalOilPvtWrapper.hpp>
#include <opm/core/props/pvt/ThermalGasPvtWrapper.hpp>
#include <opm/core/utility/ErrorMacros.hpp>
#include <opm/core/utility/Units.hpp>
@ -204,12 +205,10 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
if (numSamples > 0) {
std::shared_ptr<PvtDeadSpline> splinePvt(new PvtDeadSpline);
splinePvt->initFromGas(pvdgTables, numSamples);
props_[phase_usage_.phase_pos[Vapour]] = splinePvt;
} else {
std::shared_ptr<PvtDead> deadPvt(new PvtDead);
deadPvt->initFromGas(pvdgTables);
props_[phase_usage_.phase_pos[Vapour]] = deadPvt;
}
} else if (!pvtgTables.empty()) {
@ -217,6 +216,14 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
} else {
OPM_THROW(std::runtime_error, "Input is missing PVDG or PVTG\n");
}
// handle temperature dependence of the gas phase
if (!eclState->getGasvisctTables().empty() || deck->hasKeyword("TREF")) {
std::shared_ptr<ThermalGasPvtWrapper> gasNiPvt(new ThermalGasPvtWrapper);
gasNiPvt->initFromDeck(props_[phase_usage_.phase_pos[Vapour]], deck, eclState);
props_[phase_usage_.phase_pos[Vapour]] = gasNiPvt;
}
}
// Oil vaporization controls (kw VAPPARS)
vap1_ = vap2_ = 0.0;