mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
set bhp control explicilty for well potential calculations
This commit is contained in:
parent
e340f25c42
commit
7a0ff52bbc
@ -2810,6 +2810,14 @@ namespace Opm
|
|||||||
// to replace the original one
|
// to replace the original one
|
||||||
WellState well_state_copy = ebosSimulator.problem().wellModel().wellState();
|
WellState well_state_copy = ebosSimulator.problem().wellModel().wellState();
|
||||||
|
|
||||||
|
// Set current control to bhp, and bhp value in state, modify bhp limit in control object.
|
||||||
|
if (well_ecl_.isInjector()) {
|
||||||
|
well_state_copy.currentInjectionControls()[index_of_well_] = Well::InjectorCMode::BHP;
|
||||||
|
} else {
|
||||||
|
well_state_copy.currentProductionControls()[index_of_well_] = Well::ProducerCMode::BHP;
|
||||||
|
}
|
||||||
|
well_state_copy.bhp()[index_of_well_] = bhp;
|
||||||
|
|
||||||
bool converged = this->solveWellEqUntilConverged(ebosSimulator, B_avg, well_state_copy, deferred_logger);
|
bool converged = this->solveWellEqUntilConverged(ebosSimulator, B_avg, well_state_copy, deferred_logger);
|
||||||
|
|
||||||
if (!converged) {
|
if (!converged) {
|
||||||
|
Loading…
Reference in New Issue
Block a user