mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4575 from totto82/wgrupcon_no
Support WGRUPCON item 2 = no
This commit is contained in:
commit
fcb6eeb0ea
@ -131,6 +131,10 @@ checkGroupConstraints(WellState& well_state,
|
||||
const SummaryState& summaryState,
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
|
||||
if (!this->wellEcl().isAvailableForGroupControl())
|
||||
return false;
|
||||
|
||||
auto rCoeff = [this, &group_state](const RegionId id, const int region, const std::optional<std::string>& prod_gname, std::vector<double>& coeff)
|
||||
{
|
||||
if (prod_gname)
|
||||
|
@ -302,11 +302,19 @@ void WellState::init(const std::vector<double>& cellPressures,
|
||||
auto& ws = this->well(w);
|
||||
if (wells_ecl[w].isProducer()) {
|
||||
const auto controls = wells_ecl[w].productionControls(summary_state);
|
||||
ws.production_cmode = controls.cmode;
|
||||
if (controls.cmode == Well::ProducerCMode::GRUP && !wells_ecl[w].isAvailableForGroupControl()) {
|
||||
ws.production_cmode = Well::ProducerCMode::BHP; // wells always has a BHP control
|
||||
} else {
|
||||
ws.production_cmode = controls.cmode;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const auto controls = wells_ecl[w].injectionControls(summary_state);
|
||||
ws.injection_cmode = controls.cmode;
|
||||
if (controls.cmode == Well::InjectorCMode::GRUP && !wells_ecl[w].isAvailableForGroupControl()) {
|
||||
ws.injection_cmode = Well::InjectorCMode::BHP; // wells always has a BHP control
|
||||
} else {
|
||||
ws.injection_cmode = controls.cmode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user