mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-13 20:15:33 -06:00
compute initial volume fractions on the well copies also
This commit is contained in:
parent
7dbbc0f2e5
commit
904353367d
@ -778,9 +778,7 @@ namespace Opm
|
|||||||
well_state_copy.currentProductionControls()[index_of_well_] = Well::ProducerCMode::BHP;
|
well_state_copy.currentProductionControls()[index_of_well_] = Well::ProducerCMode::BHP;
|
||||||
}
|
}
|
||||||
well_state_copy.bhp()[well_copy.index_of_well_] = bhp;
|
well_state_copy.bhp()[well_copy.index_of_well_] = bhp;
|
||||||
|
well_copy.calculateExplicitQuantities(ebosSimulator, well_state_copy, deferred_logger);
|
||||||
well_copy.updatePrimaryVariables(well_state_copy, deferred_logger);
|
|
||||||
well_copy.initPrimaryVariablesEvaluation();
|
|
||||||
const double dt = ebosSimulator.timeStepSize();
|
const double dt = ebosSimulator.timeStepSize();
|
||||||
// iterate to get a solution at the given bhp.
|
// 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);
|
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
|
// 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
|
// during this copy, the only information not copied properly is the well controls
|
||||||
StandardWell<TypeTag> well(*this);
|
StandardWell<TypeTag> well(*this);
|
||||||
|
well.calculateExplicitQuantities(ebosSimulator, well_state, deferred_logger);
|
||||||
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();
|
|
||||||
|
|
||||||
// does the well have a THP related constraint?
|
// does the well have a THP related constraint?
|
||||||
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
||||||
@ -3006,8 +3000,6 @@ namespace Opm
|
|||||||
updateWellStateWithTarget(ebos_simulator, well_state_copy, deferred_logger);
|
updateWellStateWithTarget(ebos_simulator, well_state_copy, deferred_logger);
|
||||||
|
|
||||||
calculateExplicitQuantities(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);
|
const bool converged = this->solveWellEqUntilConverged(ebos_simulator, B_avg, well_state_copy, deferred_logger);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user