mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Query the compute_well_potential parameter only once
-- and fix some comments
This commit is contained in:
parent
e9b097cbf4
commit
18434e54ad
@ -1750,7 +1750,7 @@ namespace detail {
|
||||
wells(), w, vfp_properties_.getInj()->getTable(vfp)->getDatumDepth(),
|
||||
stdWells().wellPerforationDensities(), gravity);
|
||||
const double bhp = vfp_properties_.getInj()->bhp(vfp, aqua, liquid, vapour, thp) - dp;
|
||||
// apply the strictes of the bhp controlls i.e. smallest bhp for injectors
|
||||
// apply the strictest of the bhp controlls i.e. smallest bhp for injectors
|
||||
if ( bhp < bhps[w]) {
|
||||
bhps[w] = bhp;
|
||||
}
|
||||
@ -1761,7 +1761,7 @@ namespace detail {
|
||||
stdWells().wellPerforationDensities(), gravity);
|
||||
|
||||
const double bhp = vfp_properties_.getProd()->bhp(vfp, aqua, liquid, vapour, thp, alq) - dp;
|
||||
// apply the strictes of the bhp controlls i.e. largest bhp for injectors
|
||||
// apply the strictest of the bhp controlls i.e. largest bhp for producers
|
||||
if ( bhp > bhps[w]) {
|
||||
bhps[w] = bhp;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ namespace Opm
|
||||
|
||||
unsigned int totalNonlinearIterations = 0;
|
||||
unsigned int totalLinearIterations = 0;
|
||||
|
||||
bool is_well_potentials_computed = param_.getDefault("compute_well_potentials", false );
|
||||
std::vector<double> well_potentials;
|
||||
|
||||
// Main simulation loop.
|
||||
@ -222,9 +222,9 @@ namespace Opm
|
||||
// Increment timer, remember well state.
|
||||
++timer;
|
||||
prev_well_state = well_state;
|
||||
// Compute Well potentials if they are needed
|
||||
// Only used to determine default guide rates for group controlled wells
|
||||
if ( param_.getDefault("compute_well_potentials", false ) ) {
|
||||
// The well potentials are only computed if they are needed
|
||||
// For now thay are only used to determine default guide rates for group controlled wells
|
||||
if ( is_well_potentials_computed ) {
|
||||
asImpl().computeWellPotentials(wells, state, well_state, well_potentials);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user