Merge pull request #2600 from totto82/improve_msw_convergence_clean

compute initial volume fractions on the well copies
This commit is contained in:
Bård Skaflestad 2020-05-11 17:45:37 +02:00 committed by GitHub
commit e786c713fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -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);

View File

@ -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);