mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
include thp-solve for potentials
This commit is contained in:
@@ -549,8 +549,12 @@ namespace Opm
|
||||
well_copy.calculateExplicitQuantities(ebos_simulator, well_state_copy, deferred_logger);
|
||||
const double dt = ebos_simulator.timeStepSize();
|
||||
// solve equations
|
||||
const bool converged = well_copy.iterateWellEqWithSwitching(ebos_simulator, dt, inj_controls, prod_controls, well_state_copy, group_state,
|
||||
deferred_logger);
|
||||
bool converged = false;
|
||||
if (this->well_ecl_.isProducer() && this->wellHasTHPConstraints(summary_state)) {
|
||||
converged = well_copy.solveWellWithTHPConstraint(ebos_simulator, dt, inj_controls, prod_controls, well_state_copy, group_state, deferred_logger);
|
||||
} else {
|
||||
converged = well_copy.iterateWellEqWithSwitching(ebos_simulator, dt, inj_controls, prod_controls, well_state_copy, group_state, deferred_logger);
|
||||
}
|
||||
|
||||
// fetch potentials (sign is updated on the outside).
|
||||
well_potentials.clear();
|
||||
|
||||
@@ -1611,8 +1611,12 @@ namespace Opm
|
||||
well_copy.calculateExplicitQuantities(ebos_simulator, well_state_copy, deferred_logger);
|
||||
const double dt = ebos_simulator.timeStepSize();
|
||||
// iterate to get a solution at the given bhp.
|
||||
const bool converged = well_copy.iterateWellEqWithSwitching(ebos_simulator, dt, inj_controls, prod_controls, well_state_copy, group_state,
|
||||
deferred_logger);
|
||||
bool converged = false;
|
||||
if (this->well_ecl_.isProducer() && this->wellHasTHPConstraints(summary_state)) {
|
||||
converged = well_copy.solveWellWithTHPConstraint(ebos_simulator, dt, inj_controls, prod_controls, well_state_copy, group_state, deferred_logger);
|
||||
} else {
|
||||
converged = well_copy.iterateWellEqWithSwitching(ebos_simulator, dt, inj_controls, prod_controls, well_state_copy, group_state, deferred_logger);
|
||||
}
|
||||
|
||||
// fetch potentials (sign is updated on the outside).
|
||||
well_potentials.clear();
|
||||
|
||||
Reference in New Issue
Block a user