mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 08:51:55 -06:00
Merge pull request #3816 from totto82/control_well_testing
Set well control to thp or bhp in well testing
This commit is contained in:
commit
8cfbe1d791
@ -418,6 +418,13 @@ namespace Opm
|
|||||||
// keep a copy of the original well state
|
// keep a copy of the original well state
|
||||||
const WellState well_state0 = well_state;
|
const WellState well_state0 = well_state;
|
||||||
const double dt = ebosSimulator.timeStepSize();
|
const double dt = ebosSimulator.timeStepSize();
|
||||||
|
const auto& summary_state = ebosSimulator.vanguard().summaryState();
|
||||||
|
const bool has_thp_limit = this->wellHasTHPConstraints(summary_state);
|
||||||
|
if (has_thp_limit)
|
||||||
|
well_state.well(this->indexOfWell()).production_cmode = Well::ProducerCMode::THP;
|
||||||
|
else
|
||||||
|
well_state.well(this->indexOfWell()).production_cmode = Well::ProducerCMode::BHP;
|
||||||
|
|
||||||
const bool converged = iterateWellEquations(ebosSimulator, dt, well_state, group_state, deferred_logger);
|
const bool converged = iterateWellEquations(ebosSimulator, dt, well_state, group_state, deferred_logger);
|
||||||
if (converged) {
|
if (converged) {
|
||||||
deferred_logger.debug("WellTest: Well equation for well " + this->name() + " converged");
|
deferred_logger.debug("WellTest: Well equation for well " + this->name() + " converged");
|
||||||
|
Loading…
Reference in New Issue
Block a user