mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3452 from joakim-hove/constraint-bug
BUG? Make sure WellState injection control is updated
This commit is contained in:
commit
6542a62cc0
@ -92,7 +92,7 @@ checkIndividualConstraints(WellState& well_state,
|
|||||||
|
|
||||||
if (well.isInjector()) {
|
if (well.isInjector()) {
|
||||||
const auto controls = well.injectionControls(summaryState);
|
const auto controls = well.injectionControls(summaryState);
|
||||||
auto currentControl = well_state.currentInjectionControl(well_index);
|
const auto currentControl = well_state.currentInjectionControl(well_index);
|
||||||
|
|
||||||
if (controls.hasControl(Well::InjectorCMode::BHP) && currentControl != Well::InjectorCMode::BHP)
|
if (controls.hasControl(Well::InjectorCMode::BHP) && currentControl != Well::InjectorCMode::BHP)
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ checkIndividualConstraints(WellState& well_state,
|
|||||||
current_rate += well_state.wellReservoirRates(well_index)[ pu.phase_pos[BlackoilPhases::Vapour] ];
|
current_rate += well_state.wellReservoirRates(well_index)[ pu.phase_pos[BlackoilPhases::Vapour] ];
|
||||||
|
|
||||||
if (controls.reservoir_rate < current_rate) {
|
if (controls.reservoir_rate < current_rate) {
|
||||||
currentControl = Well::InjectorCMode::RESV;
|
well_state.currentInjectionControl(well_index, Well::InjectorCMode::RESV);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ checkIndividualConstraints(WellState& well_state,
|
|||||||
const auto& thp = getTHPConstraint(summaryState);
|
const auto& thp = getTHPConstraint(summaryState);
|
||||||
double current_thp = well_state.thp(well_index);
|
double current_thp = well_state.thp(well_index);
|
||||||
if (thp < current_thp) {
|
if (thp < current_thp) {
|
||||||
currentControl = Well::InjectorCMode::THP;
|
well_state.currentInjectionControl(well_index, Well::InjectorCMode::THP);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user