checking LIFTOPT active before trying to optimizing alq

in gliftBeginTimeStepWellTestIterateWellEquations.

otherwise, if the increment is 0 (inactive), the function
gliftBeginTimeStepWellTestIterateWellEquations
might return undesired results or enter endless loop.
This commit is contained in:
Kai Bao
2023-10-25 23:00:54 +02:00
parent 2b97c3fe1d
commit beda7a0b35

View File

@@ -730,8 +730,8 @@ namespace Opm
const auto& schedule = ebos_simulator.vanguard().schedule(); const auto& schedule = ebos_simulator.vanguard().schedule();
auto report_step_idx = ebos_simulator.episodeIndex(); auto report_step_idx = ebos_simulator.episodeIndex();
const auto& glo = schedule.glo(report_step_idx); const auto& glo = schedule.glo(report_step_idx);
if(glo.has_well(well_name)) { if(glo.active() && glo.has_well(well_name)) {
auto increment = glo.gaslift_increment(); const auto increment = glo.gaslift_increment();
auto alq = well_state.getALQ(well_name); auto alq = well_state.getALQ(well_name);
bool converged; bool converged;
while (alq > 0) { while (alq > 0) {