From 904353367dbba582561dd5f1e3f2c297433b35f5 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Fri, 8 May 2020 19:29:20 +0200 Subject: [PATCH] compute initial volume fractions on the well copies also --- opm/simulators/wells/MultisegmentWell_impl.hpp | 4 +--- opm/simulators/wells/StandardWell_impl.hpp | 10 +--------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 6504f686a..5062641cd 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -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); diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 7251c6419..d1c463599 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -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 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);