mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pass bool flag rst to Tracer initialization
This commit is contained in:
@@ -149,7 +149,7 @@ name(int tracerIdx) const
|
|||||||
|
|
||||||
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
doInit(bool enabled, size_t numGridDof,
|
doInit(bool enabled, bool rst, size_t numGridDof,
|
||||||
size_t gasPhaseIdx, size_t oilPhaseIdx, size_t waterPhaseIdx)
|
size_t gasPhaseIdx, size_t oilPhaseIdx, size_t waterPhaseIdx)
|
||||||
{
|
{
|
||||||
const auto& tracers = eclState_.tracer();
|
const auto& tracers = eclState_.tracer();
|
||||||
@@ -187,6 +187,9 @@ doInit(bool enabled, size_t numGridDof,
|
|||||||
tracerConcentration_[tracerIdx].resize(numGridDof);
|
tracerConcentration_[tracerIdx].resize(numGridDof);
|
||||||
storageOfTimeIndex1_[tracerIdx].resize(numGridDof);
|
storageOfTimeIndex1_[tracerIdx].resize(numGridDof);
|
||||||
|
|
||||||
|
if (rst)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
//TBLK keyword
|
//TBLK keyword
|
||||||
if (tracer.free_concentration.has_value()){
|
if (tracer.free_concentration.has_value()){
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ protected:
|
|||||||
* \brief Initialize all internal data structures needed by the tracer module
|
* \brief Initialize all internal data structures needed by the tracer module
|
||||||
*/
|
*/
|
||||||
void doInit(bool enabled,
|
void doInit(bool enabled,
|
||||||
|
bool rst,
|
||||||
size_t numGridDof,
|
size_t numGridDof,
|
||||||
size_t gasPhaseIdx,
|
size_t gasPhaseIdx,
|
||||||
size_t oilPhaseIdx,
|
size_t oilPhaseIdx,
|
||||||
|
|||||||
@@ -875,6 +875,7 @@ public:
|
|||||||
transmissibilities_.finishInit();
|
transmissibilities_.finishInit();
|
||||||
|
|
||||||
const auto& initconfig = eclState.getInitConfig();
|
const auto& initconfig = eclState.getInitConfig();
|
||||||
|
tracerModel_.init(initconfig.restartRequested());
|
||||||
if (initconfig.restartRequested())
|
if (initconfig.restartRequested())
|
||||||
readEclRestartSolution_();
|
readEclRestartSolution_();
|
||||||
else
|
else
|
||||||
@@ -889,8 +890,6 @@ public:
|
|||||||
this->maxPolymerAdsorption_.resize(numElements, 0.0);
|
this->maxPolymerAdsorption_.resize(numElements, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
tracerModel_.init();
|
|
||||||
|
|
||||||
readBoundaryConditions_();
|
readBoundaryConditions_();
|
||||||
|
|
||||||
if (enableDriftCompensation_) {
|
if (enableDriftCompensation_) {
|
||||||
@@ -2478,11 +2477,6 @@ private:
|
|||||||
for (size_t pvtRegionIdx = 0; pvtRegionIdx < this->maxDRv_.size(); ++pvtRegionIdx)
|
for (size_t pvtRegionIdx = 0; pvtRegionIdx < this->maxDRv_.size(); ++pvtRegionIdx)
|
||||||
this->maxDRv_[pvtRegionIdx] = oilVaporizationControl.getMaxDRVDT(pvtRegionIdx)*simulator.timeStepSize();
|
this->maxDRv_[pvtRegionIdx] = oilVaporizationControl.getMaxDRVDT(pvtRegionIdx)*simulator.timeStepSize();
|
||||||
|
|
||||||
if (tracerModel().numTracers() > 0 && this->gridView().comm().rank() == 0)
|
|
||||||
std::cout << "Warning: Restart is not implemented for the tracer model, it will initialize itself "
|
|
||||||
<< "with the initial tracer concentration.\n"
|
|
||||||
<< std::flush;
|
|
||||||
|
|
||||||
// assign the restart solution to the current solution. note that we still need
|
// assign the restart solution to the current solution. note that we still need
|
||||||
// to compute real initial solution after this because the initial fluid states
|
// to compute real initial solution after this because the initial fluid states
|
||||||
// need to be correct for stuff like boundary conditions.
|
// need to be correct for stuff like boundary conditions.
|
||||||
|
|||||||
@@ -103,10 +103,10 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Initialize all internal data structures needed by the tracer module
|
* \brief Initialize all internal data structures needed by the tracer module
|
||||||
*/
|
*/
|
||||||
void init()
|
void init(bool rst)
|
||||||
{
|
{
|
||||||
bool enabled = EWOMS_GET_PARAM(TypeTag, bool, EnableTracerModel);
|
bool enabled = EWOMS_GET_PARAM(TypeTag, bool, EnableTracerModel);
|
||||||
this->doInit(enabled, simulator_.model().numGridDof(),
|
this->doInit(enabled, rst, simulator_.model().numGridDof(),
|
||||||
gasPhaseIdx, oilPhaseIdx, waterPhaseIdx);
|
gasPhaseIdx, oilPhaseIdx, waterPhaseIdx);
|
||||||
|
|
||||||
prepareTracerBatches();
|
prepareTracerBatches();
|
||||||
|
|||||||
Reference in New Issue
Block a user