mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 00:51:56 -06:00
Using TableManager to get tables.
This commit is contained in:
parent
13262f6d28
commit
9bd8d73a26
@ -157,7 +157,7 @@ namespace detail {
|
||||
, geo_ (geo)
|
||||
, rock_comp_props_(rock_comp_props)
|
||||
, wells_ (wells)
|
||||
, vfp_properties_(eclState->getVFPInjTables(), eclState->getVFPProdTables())
|
||||
, vfp_properties_(eclState->getTableManager()->getVFPInjTables(), eclState->getTableManager()->getVFPProdTables())
|
||||
, linsolver_ (linsolver)
|
||||
, active_(detail::activePhases(fluid.phaseUsage()))
|
||||
, canph_ (detail::active2Canonical(fluid.phaseUsage()))
|
||||
|
@ -121,6 +121,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
// Surface densities. Accounting for different orders in eclipse and our code.
|
||||
Opm::DeckKeywordConstPtr densityKeyword = deck->getKeyword("DENSITY");
|
||||
int numRegions = densityKeyword->size();
|
||||
auto tables = eclState->getTableManager();
|
||||
|
||||
densities_.resize(numRegions);
|
||||
for (int regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
|
||||
@ -153,7 +154,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
props_[phase_usage_.phase_pos[Aqua]] = pvtw;
|
||||
|
||||
// handle temperature dependence of the oil phase
|
||||
if (!eclState->getWatvisctTables().empty() || deck->hasKeyword("WATDENT")) {
|
||||
if (!tables->getWatvisctTables().empty() || deck->hasKeyword("WATDENT")) {
|
||||
// deal with temperature dependent properties
|
||||
std::shared_ptr<ThermalWaterPvtWrapper> waterNiPvt(new ThermalWaterPvtWrapper);
|
||||
waterNiPvt->initFromDeck(props_[phase_usage_.phase_pos[Aqua]], deck, eclState);
|
||||
@ -165,8 +166,8 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
if (phase_usage_.phase_used[Liquid]) {
|
||||
// for oil, we support the "PVDO", "PVTO" and "PVCDO"
|
||||
// keywords...
|
||||
const auto& pvdoTables = eclState->getPvdoTables();
|
||||
const auto& pvtoTables = eclState->getPvtoTables();
|
||||
const auto& pvdoTables = tables->getPvdoTables();
|
||||
const auto& pvtoTables = tables->getPvtoTables();
|
||||
if (!pvdoTables.empty()) {
|
||||
if (numSamples > 0) {
|
||||
auto splinePvdo = std::shared_ptr<PvtDeadSpline>(new PvtDeadSpline);
|
||||
@ -189,7 +190,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
}
|
||||
|
||||
// handle temperature dependence of the oil phase
|
||||
if (!eclState->getOilvisctTables().empty() || deck->hasKeyword("THERMEX1")) {
|
||||
if (!tables->getOilvisctTables().empty() || deck->hasKeyword("THERMEX1")) {
|
||||
std::shared_ptr<ThermalOilPvtWrapper> oilNiPvt(new ThermalOilPvtWrapper);
|
||||
oilNiPvt->initFromDeck(props_[phase_usage_.phase_pos[Liquid]], deck, eclState);
|
||||
|
||||
@ -199,8 +200,8 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
// Gas PVT
|
||||
if (phase_usage_.phase_used[Vapour]) {
|
||||
// gas can be specified using the "PVDG" or "PVTG" keywords...
|
||||
const auto& pvdgTables = eclState->getPvdgTables();
|
||||
const auto& pvtgTables = eclState->getPvtgTables();
|
||||
const auto& pvdgTables = tables->getPvdgTables();
|
||||
const auto& pvtgTables = tables->getPvtgTables();
|
||||
if (!pvdgTables.empty()) {
|
||||
if (numSamples > 0) {
|
||||
std::shared_ptr<PvtDeadSpline> splinePvt(new PvtDeadSpline);
|
||||
@ -218,7 +219,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
}
|
||||
|
||||
// handle temperature dependence of the gas phase
|
||||
if (!eclState->getGasvisctTables().empty() || deck->hasKeyword("TREF")) {
|
||||
if (!tables->getGasvisctTables().empty() || deck->hasKeyword("TREF")) {
|
||||
std::shared_ptr<ThermalGasPvtWrapper> gasNiPvt(new ThermalGasPvtWrapper);
|
||||
gasNiPvt->initFromDeck(props_[phase_usage_.phase_pos[Vapour]], deck, eclState);
|
||||
|
||||
|
@ -51,8 +51,9 @@ SolventPropsAdFromDeck::SolventPropsAdFromDeck(DeckConstPtr deck,
|
||||
OPM_THROW(std::runtime_error, "SDENSITY must be specified in SOLVENT runs\n");
|
||||
}
|
||||
|
||||
auto tables = eclState->getTableManager();
|
||||
// pvt
|
||||
const auto& pvdsTables = eclState->getPvdsTables();
|
||||
const auto& pvdsTables = tables->getPvdsTables();
|
||||
if (!pvdsTables.empty()) {
|
||||
|
||||
int numRegions = pvdsTables.size();
|
||||
@ -88,7 +89,7 @@ SolventPropsAdFromDeck::SolventPropsAdFromDeck(DeckConstPtr deck,
|
||||
OPM_THROW(std::runtime_error, "PVDS must be specified in SOLVENT runs\n");
|
||||
}
|
||||
|
||||
const auto& ssfnTables = eclState->getSsfnTables();
|
||||
const auto& ssfnTables = tables->getSsfnTables();
|
||||
// relative permeabilty multiplier
|
||||
if (!ssfnTables.empty()) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user