mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-02 05:49:09 -06:00
Merge pull request #2600 from totto82/improve_msw_convergence_clean
compute initial volume fractions on the well copies
This commit is contained in:
commit
e786c713fb
@ -778,9 +778,7 @@ namespace Opm
|
||||
well_state_copy.currentProductionControls()[index_of_well_] = Well::ProducerCMode::BHP;
|
||||
}
|
||||
well_state_copy.bhp()[well_copy.index_of_well_] = bhp;
|
||||
|
||||
well_copy.updatePrimaryVariables(well_state_copy, deferred_logger);
|
||||
well_copy.initPrimaryVariablesEvaluation();
|
||||
well_copy.calculateExplicitQuantities(ebosSimulator, well_state_copy, deferred_logger);
|
||||
const double dt = ebosSimulator.timeStepSize();
|
||||
// iterate to get a solution at the given bhp.
|
||||
well_copy.iterateWellEquations(ebosSimulator, B_avg, dt, inj_controls, prod_controls, well_state_copy, deferred_logger);
|
||||
|
@ -2535,13 +2535,7 @@ namespace Opm
|
||||
// creating a copy of the well itself, to avoid messing up the explicit informations
|
||||
// during this copy, the only information not copied properly is the well controls
|
||||
StandardWell<TypeTag> well(*this);
|
||||
|
||||
well.updatePrimaryVariables(well_state, deferred_logger);
|
||||
well.computeWellConnectionPressures(ebosSimulator, well_state);
|
||||
|
||||
// initialize the primary variables in Evaluation, which is used in computePerfRate for computeWellPotentials
|
||||
// TODO: for computeWellPotentials, no derivative is required actually
|
||||
well.initPrimaryVariablesEvaluation();
|
||||
well.calculateExplicitQuantities(ebosSimulator, well_state, deferred_logger);
|
||||
|
||||
// does the well have a THP related constraint?
|
||||
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
||||
@ -3006,8 +3000,6 @@ namespace Opm
|
||||
updateWellStateWithTarget(ebos_simulator, well_state_copy, deferred_logger);
|
||||
|
||||
calculateExplicitQuantities(ebos_simulator, well_state_copy, deferred_logger);
|
||||
updatePrimaryVariables(well_state_copy, deferred_logger);
|
||||
initPrimaryVariablesEvaluation();
|
||||
|
||||
const bool converged = this->solveWellEqUntilConverged(ebos_simulator, B_avg, well_state_copy, deferred_logger);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user