mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
Reflect Well Object's Status Flag in Well State
This commit is contained in:
parent
e2d75b608b
commit
f0c738ea34
@ -398,9 +398,15 @@ namespace Opm
|
||||
: (prod_controls.cmode == Well::ProducerCMode::GRUP);
|
||||
|
||||
const double inj_surf_rate = well.isInjector() ? inj_controls.surface_rate : 0.0; // To avoid a "maybe-uninitialized" warning.
|
||||
|
||||
const double local_pressure = well_perf_data_[w].empty() ?
|
||||
0 : cellPressures[well_perf_data_[w][0].cell_index];
|
||||
const double global_pressure = well_info.broadcastFirstPerforationValue(local_pressure);
|
||||
|
||||
if (well.getStatus() == Well::Status::OPEN) {
|
||||
this->openWell(w);
|
||||
}
|
||||
|
||||
if (well.getStatus() == Well::Status::STOP) {
|
||||
// Stopped well:
|
||||
// 1. Rates: zero well rates.
|
||||
|
@ -190,6 +190,23 @@ namespace Opm
|
||||
|
||||
perfRateBrine_.clear();
|
||||
perfRateBrine_.resize(nperf, 0.0);
|
||||
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
switch (wells_ecl[w].getStatus()) {
|
||||
case Well::Status::SHUT:
|
||||
this->shutWell(w);
|
||||
break;
|
||||
|
||||
case Well::Status::STOP:
|
||||
this->stopWell(w);
|
||||
break;
|
||||
|
||||
default:
|
||||
this->openWell(w);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// intialize wells that have been there before
|
||||
// order may change so the mapping is based on the well name
|
||||
if (prevState && !prevState->wellMap().empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user