handle unoperable wells

set potentials and rates to zero
This commit is contained in:
Tor Harald Sandve 2021-08-26 08:21:30 +02:00
parent dc4436961f
commit 9db6b2b946

View File

@ -608,11 +608,12 @@ namespace Opm
const auto& summaryState = ebos_simulator.vanguard().summaryState();
const auto& schedule = ebos_simulator.vanguard().schedule();
if (this->wellIsStopped()) {
if (this->wellIsStopped() || !this->isOperable()) {
for (int p = 0; p<np; ++p) {
ws.surface_rates[p] = 0;
ws.surface_rates[p] = 0.0;
ws.well_potentials[p] = 0.0;
}
ws.thp = 0;
ws.thp = 0.0;
return;
}