mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Only compute well potential if needed
A boolen user parameter is added to controll the computation of well potential. This is a temporary fix to assure that no extra computation time is used on well potential calculation if it is not needed. The long term fix will require a more thorough revising of the well group implementation.
This commit is contained in:
@@ -222,12 +222,13 @@ namespace Opm
|
||||
// Increment timer, remember well state.
|
||||
++timer;
|
||||
prev_well_state = well_state;
|
||||
// Compute Well potentials (only used to determine default guide rates for group controlled wells)
|
||||
// TODO: add some logic to avoid unnecessary calulations of well potentials.
|
||||
asImpl().computeWellPotentials(wells, state, well_state, well_potentials);
|
||||
// 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 ) ) {
|
||||
asImpl().computeWellPotentials(wells, state, well_state, well_potentials);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Write final simulation state.
|
||||
output_writer_.writeTimeStep( timer, state, prev_well_state );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user