wells under zero injection target are also treated as stopped well

when formulating the well control equations
This commit is contained in:
Kai Bao
2023-03-28 13:14:33 +02:00
parent b4b8e7aff1
commit f4e0a996b9
10 changed files with 53 additions and 33 deletions

View File

@@ -116,7 +116,7 @@ assembleControlEq(const WellState& well_state,
return rates;
};
if (well_.wellIsStopped()) {
if (well_.wellUnderZeroRateControl(summaryState, well_state)) {
control_eq = primary_variables.eval(PrimaryVariables::WQTotal);
} else if (well_.isInjector()) {
// Find injection rate.
@@ -143,9 +143,6 @@ assembleControlEq(const WellState& well_state,
bhp_from_thp,
control_eq,
deferred_logger);
} else if (wellhelpers::rateControlWithZeroTarget(well_state.well(well_.indexOfWell()).production_cmode, prod_controls)) {
// Production mode, zero target. Treat as STOP.
control_eq = primary_variables.eval(PrimaryVariables::WQTotal);
} else {
// Find rates.
const auto rates = getRates();