mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
only double check the current group constraint at the start of a report step
This commit is contained in:
@@ -270,6 +270,7 @@ namespace Opm {
|
|||||||
double gravity_;
|
double gravity_;
|
||||||
std::vector<double> depth_;
|
std::vector<double> depth_;
|
||||||
bool initial_step_;
|
bool initial_step_;
|
||||||
|
bool report_step_starts_;
|
||||||
|
|
||||||
std::unique_ptr<RateConverterType> rateConverter_;
|
std::unique_ptr<RateConverterType> rateConverter_;
|
||||||
std::unique_ptr<VFPProperties<VFPInjProperties,VFPProdProperties>> vfp_properties_;
|
std::unique_ptr<VFPProperties<VFPInjProperties,VFPProdProperties>> vfp_properties_;
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ namespace Opm {
|
|||||||
beginReportStep(const int timeStepIdx)
|
beginReportStep(const int timeStepIdx)
|
||||||
{
|
{
|
||||||
Opm::DeferredLogger local_deferredLogger;
|
Opm::DeferredLogger local_deferredLogger;
|
||||||
|
report_step_starts_ = true;
|
||||||
|
|
||||||
const Grid& grid = ebosSimulator_.vanguard().grid();
|
const Grid& grid = ebosSimulator_.vanguard().grid();
|
||||||
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
||||||
@@ -439,6 +440,9 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
timeStepSucceeded(const double& simulationTime, const double dt) {
|
timeStepSucceeded(const double& simulationTime, const double dt) {
|
||||||
|
|
||||||
|
// time step is finished and we are not any more at the beginning of an report step
|
||||||
|
report_step_starts_ = false;
|
||||||
|
|
||||||
Opm::DeferredLogger local_deferredLogger;
|
Opm::DeferredLogger local_deferredLogger;
|
||||||
for (const auto& well : well_container_) {
|
for (const auto& well : well_container_) {
|
||||||
if (GET_PROP_VALUE(TypeTag, EnablePolymerMW) && well->isInjector()) {
|
if (GET_PROP_VALUE(TypeTag, EnablePolymerMW) && well->isInjector()) {
|
||||||
@@ -834,10 +838,10 @@ namespace Opm {
|
|||||||
calculateExplicitQuantities(local_deferredLogger);
|
calculateExplicitQuantities(local_deferredLogger);
|
||||||
prepareTimeStep(local_deferredLogger);
|
prepareTimeStep(local_deferredLogger);
|
||||||
}
|
}
|
||||||
// also check the current group control the first two iterations. The first itertion is needed for changes in group/well controls and closing of wells etc.
|
// check the current group control in the beginning of an episode for the first two iterations. The first itertion is needed for changes in group/well controls and closing of wells etc.
|
||||||
// a second check is needed for REIN and VREP controls since they depend on results from other wells.
|
// a second check is needed for REIN and VREP controls since they depend on results from other wells.
|
||||||
// This check can probably be made more sofisticated, but this simple rule seems to work
|
// This check can probably be made more sofisticated, but this simple rule seems to work
|
||||||
bool checkCurrentGroupControls = (iterationIdx < 2);
|
bool checkCurrentGroupControls = (report_step_starts_ && iterationIdx < 2);
|
||||||
updateWellControls(local_deferredLogger, /*allow for switching to group controls*/true, checkCurrentGroupControls);
|
updateWellControls(local_deferredLogger, /*allow for switching to group controls*/true, checkCurrentGroupControls);
|
||||||
|
|
||||||
// Set the well primary variables based on the value of well solutions
|
// Set the well primary variables based on the value of well solutions
|
||||||
|
|||||||
Reference in New Issue
Block a user