calculate well potentials based on requireWellPotentials()

from well_colllection. Not based on command line paramters anymore.
This commit is contained in:
Kai Bao 2017-04-07 11:00:51 +02:00
parent 181112491b
commit 4ed95fcbf0
2 changed files with 18 additions and 17 deletions

View File

@ -2560,7 +2560,7 @@ typedef Eigen::Array<double,
setupGroupControl(const ReservoirState& reservoir_state,
WellState& well_state)
{
if (param_.compute_well_potentials_) {
if (asImpl().wellModel().wellCollection()->requireWellPotentials()) {
SolutionState state = asImpl().variableState(reservoir_state, well_state);
asImpl().makeConstantState(state);
asImpl().wellModel().computeWellConnectionPressures(state, well_state);
@ -2601,6 +2601,8 @@ typedef Eigen::Array<double,
asImpl().wellModel().computeWellPotentials(mob_perfcells, b_perfcells, well_state, state, well_potentials);
asImpl().wellModel().wellCollection()->setGuideRatesWithPotentials(asImpl().wellModel().wellsPointer(),
fluid_.phaseUsage(), well_potentials);
} // end of if
applyVREPGroupControl(reservoir_state, well_state);
if (asImpl().wellModel().wellCollection()->groupControlApplied()) {
@ -2618,7 +2620,6 @@ typedef Eigen::Array<double,
}
}
} // end of else
} // end of if (param_.compute_well_potentials_)
}
} // namespace Opm

View File

@ -1823,7 +1823,7 @@ namespace Opm {
if (well_collection_->groupControlActive()) {
// calculate the well potentials
if (param_.compute_well_potentials_) {
if (well_collection_->requireWellPotentials()) {
setWellVariables(well_state);
computeWellConnectionPressures(ebos_simulator, well_state);