mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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);
|
: (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 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() ?
|
const double local_pressure = well_perf_data_[w].empty() ?
|
||||||
0 : cellPressures[well_perf_data_[w][0].cell_index];
|
0 : cellPressures[well_perf_data_[w][0].cell_index];
|
||||||
const double global_pressure = well_info.broadcastFirstPerforationValue(local_pressure);
|
const double global_pressure = well_info.broadcastFirstPerforationValue(local_pressure);
|
||||||
|
|
||||||
|
if (well.getStatus() == Well::Status::OPEN) {
|
||||||
|
this->openWell(w);
|
||||||
|
}
|
||||||
|
|
||||||
if (well.getStatus() == Well::Status::STOP) {
|
if (well.getStatus() == Well::Status::STOP) {
|
||||||
// Stopped well:
|
// Stopped well:
|
||||||
// 1. Rates: zero well rates.
|
// 1. Rates: zero well rates.
|
||||||
|
@ -190,6 +190,23 @@ namespace Opm
|
|||||||
|
|
||||||
perfRateBrine_.clear();
|
perfRateBrine_.clear();
|
||||||
perfRateBrine_.resize(nperf, 0.0);
|
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
|
// intialize wells that have been there before
|
||||||
// order may change so the mapping is based on the well name
|
// order may change so the mapping is based on the well name
|
||||||
if (prevState && !prevState->wellMap().empty()) {
|
if (prevState && !prevState->wellMap().empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user