make sure zero production rates are obtained for the following wells

1. stopped production wells
2. production wells under zero rate control

We guarantee the objective through enforce zero values for the WQTotal
primary variable during the initialization and update process during the
Newton solution.
This commit is contained in:
Kai Bao
2023-03-22 15:10:00 +01:00
parent 8858d725a8
commit 2c5a4398c9
17 changed files with 166 additions and 77 deletions

View File

@@ -156,7 +156,8 @@ namespace Opm
/// using the solution x to recover the solution xw for wells and applying
/// xw to update Well State
void recoverWellSolutionAndUpdateWellState(const BVector& x,
void recoverWellSolutionAndUpdateWellState(const SummaryState& summary_state,
const BVector& x,
WellState& well_state,
DeferredLogger& deferred_logger) override;
@@ -166,9 +167,13 @@ namespace Opm
std::vector<double>& well_potentials,
DeferredLogger& deferred_logger) /* const */ override;
void updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_logger) override;
void updatePrimaryVariables(const SummaryState& summary_state,
const WellState& well_state,
DeferredLogger& deferred_logger) override;
virtual void solveEqAndUpdateWellState(WellState& well_state, DeferredLogger& deferred_logger) override;
void solveEqAndUpdateWellState(const SummaryState& summary_state,
WellState& well_state,
DeferredLogger& deferred_logger);
virtual void calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& well_state,
@@ -252,7 +257,8 @@ namespace Opm
bool regularize_;
// updating the well_state based on well solution dwells
void updateWellState(const BVectorWell& dwells,
void updateWellState(const SummaryState& summary_state,
const BVectorWell& dwells,
WellState& well_state,
DeferredLogger& deferred_logger);
@@ -359,7 +365,7 @@ namespace Opm
DeferredLogger& deferred_logger) const;
void updatePrimaryVariablesNewton(const BVectorWell& dwells,
const WellState& well_state,
const bool zero_rate_target,
DeferredLogger& deferred_logger);
void updateWellStateFromPrimaryVariables(WellState& well_state, DeferredLogger& deferred_logger) const;