mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
output drsdtcon values to restart files
This commit is contained in:
parent
412cf1d6cd
commit
4fd0c24661
@ -693,6 +693,7 @@ assignToSolution(data::Solution& sol)
|
|||||||
{"SALTP", UnitSystem::measure::identity, data::TargetType::RESTART_AUXILIARY, pSalt_},
|
{"SALTP", UnitSystem::measure::identity, data::TargetType::RESTART_AUXILIARY, pSalt_},
|
||||||
{"PERMFACT", UnitSystem::measure::identity, data::TargetType::RESTART_AUXILIARY, permFact_},
|
{"PERMFACT", UnitSystem::measure::identity, data::TargetType::RESTART_AUXILIARY, permFact_},
|
||||||
{"SOMAX", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, soMax_},
|
{"SOMAX", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, soMax_},
|
||||||
|
{"DRSDTCON", UnitSystem::measure::gas_oil_ratio_rate, data::TargetType::RESTART_AUXILIARY, drsdtcon_},
|
||||||
{"SSOLVENT", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, sSol_},
|
{"SSOLVENT", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, sSol_},
|
||||||
{"SS_X", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, extboX_},
|
{"SS_X", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, extboX_},
|
||||||
{"SS_Y", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, extboY_},
|
{"SS_Y", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, extboY_},
|
||||||
@ -992,6 +993,9 @@ doAllocBuffers(unsigned bufferSize,
|
|||||||
rvw_.resize(bufferSize, 0.0);
|
rvw_.resize(bufferSize, 0.0);
|
||||||
rstKeywords["RVW"] = 0;
|
rstKeywords["RVW"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (schedule_[reportStepNum].oilvap().drsdtConvective())
|
||||||
|
drsdtcon_.resize(bufferSize, 0.0);
|
||||||
if (enableSolvent_)
|
if (enableSolvent_)
|
||||||
sSol_.resize(bufferSize, 0.0);
|
sSol_.resize(bufferSize, 0.0);
|
||||||
if (enablePolymer_)
|
if (enablePolymer_)
|
||||||
|
@ -418,6 +418,7 @@ protected:
|
|||||||
ScalarBuffer rvw_;
|
ScalarBuffer rvw_;
|
||||||
ScalarBuffer overburdenPressure_;
|
ScalarBuffer overburdenPressure_;
|
||||||
ScalarBuffer oilSaturationPressure_;
|
ScalarBuffer oilSaturationPressure_;
|
||||||
|
ScalarBuffer drsdtcon_;
|
||||||
ScalarBuffer sSol_;
|
ScalarBuffer sSol_;
|
||||||
ScalarBuffer cPolymer_;
|
ScalarBuffer cPolymer_;
|
||||||
ScalarBuffer cFoam_;
|
ScalarBuffer cFoam_;
|
||||||
|
@ -572,6 +572,21 @@ solventSaturation(unsigned elemIdx) const
|
|||||||
return solventSaturation_[elemIdx];
|
return solventSaturation_[elemIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class GridView, class FluidSystem, class Scalar>
|
||||||
|
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||||
|
drsdtcon(unsigned elemIdx, int episodeIdx) const
|
||||||
|
{
|
||||||
|
if (convectiveDrs_.empty())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// The episode index is set to -1 in the initialization phase.
|
||||||
|
// Output drsdt value for index 0
|
||||||
|
episodeIdx = std::max(episodeIdx, 0);
|
||||||
|
const auto& oilVaporizationControl = schedule_[episodeIdx].oilvap();
|
||||||
|
int pvtRegionIdx = pvtRegionIndex(elemIdx);
|
||||||
|
return oilVaporizationControl.getMaxDRSDT(pvtRegionIdx)*convectiveDrs_[elemIdx];
|
||||||
|
}
|
||||||
|
|
||||||
template<class GridView, class FluidSystem, class Scalar>
|
template<class GridView, class FluidSystem, class Scalar>
|
||||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||||
polymerConcentration(unsigned elemIdx) const
|
polymerConcentration(unsigned elemIdx) const
|
||||||
|
@ -134,6 +134,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
Scalar solventSaturation(unsigned elemIdx) const;
|
Scalar solventSaturation(unsigned elemIdx) const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Returns the dynamic drsdt convective mixing value
|
||||||
|
*/
|
||||||
|
Scalar drsdtcon(unsigned elemIdx, int episodeIdx) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the initial polymer concentration for a given a cell index
|
* \brief Returns the initial polymer concentration for a given a cell index
|
||||||
*/
|
*/
|
||||||
|
@ -340,6 +340,10 @@ public:
|
|||||||
Valgrind::CheckDefined(this->relativePermeability_[phaseIdx][globalDofIdx]);
|
Valgrind::CheckDefined(this->relativePermeability_[phaseIdx][globalDofIdx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this->drsdtcon_.empty()) {
|
||||||
|
this->drsdtcon_[globalDofIdx] = problem.drsdtcon(globalDofIdx, elemCtx.simulator().episodeIndex());
|
||||||
|
}
|
||||||
|
|
||||||
if (!this->sSol_.empty()) {
|
if (!this->sSol_.empty()) {
|
||||||
this->sSol_[globalDofIdx] = intQuants.solventSaturation().value();
|
this->sSol_[globalDofIdx] = intQuants.solventSaturation().value();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user