mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
making the computeWellPotentials calculate potential for each well
Not store the well potentials to WellState anymore.
This commit is contained in:
@@ -199,8 +199,6 @@ public:
|
||||
desiredRestoreStep );
|
||||
}
|
||||
|
||||
bool is_well_potentials_computed = param_.getDefault("compute_well_potentials", false );
|
||||
std::vector<double> well_potentials;
|
||||
DynamicListEconLimited dynamic_list_econ_limited;
|
||||
SimulatorReport report;
|
||||
SimulatorReport stepReport;
|
||||
@@ -229,6 +227,9 @@ public:
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
|
||||
// TODO: not used at all, keeping it for interface purpose.
|
||||
|
||||
std::vector<double> well_potentials;
|
||||
// Create wells and well state.
|
||||
WellsManager wells_manager(eclState(),
|
||||
timer.currentStepNum(),
|
||||
@@ -395,11 +396,6 @@ public:
|
||||
report.output_write_time += perfTimer.stop();
|
||||
|
||||
prev_well_state = well_state;
|
||||
// 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 ) {
|
||||
computeWellPotentials(wells, well_state, well_potentials);
|
||||
}
|
||||
|
||||
updateListEconLimited(solver, eclState().getSchedule(), timer.currentStepNum(), wells,
|
||||
well_state, dynamic_list_econ_limited);
|
||||
@@ -605,23 +601,6 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
void computeWellPotentials(const Wells* wells,
|
||||
const WellState& xw,
|
||||
std::vector<double>& well_potentials)
|
||||
{
|
||||
const int nw = wells->number_of_wells;
|
||||
const int np = wells->number_of_phases;
|
||||
well_potentials.clear();
|
||||
well_potentials.resize(nw*np,0.0);
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
for (int perf = wells->well_connpos[w]; perf < wells->well_connpos[w + 1]; ++perf) {
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
well_potentials[w*np + phase] += xw.wellPotentials()[perf*np + phase];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void updateListEconLimited(const std::unique_ptr<Solver>& solver,
|
||||
const Schedule& schedule,
|
||||
|
||||
Reference in New Issue
Block a user