mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-07-29 18:57:56 -05:00
add the glue code required for temperature dependent viscosity
This commit is contained in:
@@ -129,6 +129,11 @@ namespace Opm
|
|||||||
std::shared_ptr<PvtConstCompr> pvtw(new PvtConstCompr);
|
std::shared_ptr<PvtConstCompr> pvtw(new PvtConstCompr);
|
||||||
pvtw->initFromWater(deck->getKeyword("PVTW"));
|
pvtw->initFromWater(deck->getKeyword("PVTW"));
|
||||||
|
|
||||||
|
if (!eclState->getWatvisctTables().empty()) {
|
||||||
|
pvtw->setWatvisctTables(eclState->getWatvisctTables(),
|
||||||
|
deck->getKeyword("VISCREF"));
|
||||||
|
}
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Aqua]] = pvtw;
|
props_[phase_usage_.phase_pos[Aqua]] = pvtw;
|
||||||
}
|
}
|
||||||
// Oil PVT
|
// Oil PVT
|
||||||
@@ -139,20 +144,43 @@ namespace Opm
|
|||||||
const auto& pvtoTables = eclState->getPvtoTables();
|
const auto& pvtoTables = eclState->getPvtoTables();
|
||||||
if (!pvdoTables.empty()) {
|
if (!pvdoTables.empty()) {
|
||||||
if (numSamples > 0) {
|
if (numSamples > 0) {
|
||||||
auto splinePvt = std::shared_ptr<PvtDeadSpline>(new PvtDeadSpline);
|
auto splinePvdo = std::shared_ptr<PvtDeadSpline>(new PvtDeadSpline);
|
||||||
splinePvt->initFromOil(pvdoTables, numSamples);
|
splinePvdo->initFromOil(pvdoTables, numSamples);
|
||||||
props_[phase_usage_.phase_pos[Liquid]] = splinePvt;
|
|
||||||
|
if (!eclState->getOilvisctTables().empty()) {
|
||||||
|
splinePvdo->setOilvisctTables(eclState->getOilvisctTables(),
|
||||||
|
deck->getKeyword("VISCREF"));
|
||||||
|
}
|
||||||
|
|
||||||
|
props_[phase_usage_.phase_pos[Liquid]] = splinePvdo;
|
||||||
} else {
|
} else {
|
||||||
auto deadPvt = std::shared_ptr<PvtDead>(new PvtDead);
|
auto pvdo = std::shared_ptr<PvtDead>(new PvtDead);
|
||||||
deadPvt->initFromOil(pvdoTables);
|
pvdo->initFromOil(pvdoTables);
|
||||||
props_[phase_usage_.phase_pos[Liquid]] = deadPvt;
|
|
||||||
|
if (!eclState->getOilvisctTables().empty()) {
|
||||||
|
pvdo->setOilvisctTables(eclState->getOilvisctTables(),
|
||||||
|
deck->getKeyword("VISCREF"));
|
||||||
|
}
|
||||||
|
|
||||||
|
props_[phase_usage_.phase_pos[Liquid]] = pvdo;
|
||||||
}
|
}
|
||||||
} else if (!pvtoTables.empty()) {
|
} else if (!pvtoTables.empty()) {
|
||||||
props_[phase_usage_.phase_pos[Liquid]].reset(new PvtLiveOil(pvtoTables));
|
std::shared_ptr<PvtLiveOil> pvto(new PvtLiveOil(pvtoTables));
|
||||||
|
props_[phase_usage_.phase_pos[Liquid]] = pvto;
|
||||||
|
|
||||||
|
if (!eclState->getOilvisctTables().empty()) {
|
||||||
|
pvto->setOilvisctTables(eclState->getOilvisctTables(),
|
||||||
|
deck->getKeyword("VISCREF"));
|
||||||
|
}
|
||||||
} else if (deck->hasKeyword("PVCDO")) {
|
} else if (deck->hasKeyword("PVCDO")) {
|
||||||
std::shared_ptr<PvtConstCompr> pvcdo(new PvtConstCompr);
|
std::shared_ptr<PvtConstCompr> pvcdo(new PvtConstCompr);
|
||||||
pvcdo->initFromOil(deck->getKeyword("PVCDO"));
|
pvcdo->initFromOil(deck->getKeyword("PVCDO"));
|
||||||
|
|
||||||
|
if (!eclState->getOilvisctTables().empty()) {
|
||||||
|
pvcdo->setOilvisctTables(eclState->getOilvisctTables(),
|
||||||
|
deck->getKeyword("VISCREF"));
|
||||||
|
}
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Liquid]] = pvcdo;
|
props_[phase_usage_.phase_pos[Liquid]] = pvcdo;
|
||||||
} else {
|
} else {
|
||||||
OPM_THROW(std::runtime_error, "Input is missing PVDO, PVCDO or PVTO\n");
|
OPM_THROW(std::runtime_error, "Input is missing PVDO, PVCDO or PVTO\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user