mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
Only calculate well potentials for cases with well groups
This commit is contained in:
parent
bd81bda57b
commit
e4b52a457f
@ -222,8 +222,11 @@ 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)
|
||||
if (schedule->numGroups() > 0 ) {
|
||||
asImpl().computeWellPotentials(timer.currentStepNum(), wells, state, well_state, well_potentials);
|
||||
}
|
||||
}
|
||||
|
||||
// Write final simulation state.
|
||||
output_writer_.writeTimeStep( timer, state, prev_well_state );
|
||||
@ -396,8 +399,6 @@ namespace Opm
|
||||
const int np = wells->number_of_phases;
|
||||
well_potentials.clear();
|
||||
well_potentials.resize(nw*np,0.0);
|
||||
if( ! xw.wellMap().empty() )
|
||||
{
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
for (int perf = wells->well_connpos[w]; perf < wells->well_connpos[w + 1]; ++perf) {
|
||||
const double well_cell_pressure = x.pressure()[wells->well_cells[perf]];
|
||||
@ -423,7 +424,6 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class Implementation>
|
||||
void SimulatorBase<Implementation>::computeRESV(const std::size_t step,
|
||||
|
Loading…
Reference in New Issue
Block a user