mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
removing the well potential from WellsManager constructor.
This commit is contained in:
parent
1aff98c4f4
commit
8d96d835b3
@ -642,7 +642,6 @@ namespace Opm
|
|||||||
// as we get the following error otherwise
|
// as we get the following error otherwise
|
||||||
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
||||||
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
|
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
|
||||||
std::vector<double>(),
|
|
||||||
std::unordered_set<std::string>());
|
std::unordered_set<std::string>());
|
||||||
|
|
||||||
const Wells* wells = wells_manager.c_wells();
|
const Wells* wells = wells_manager.c_wells();
|
||||||
|
@ -175,9 +175,6 @@ namespace Opm
|
|||||||
void
|
void
|
||||||
outputFluidInPlace(const std::vector<double>& oip, const std::vector<double>& cip, const UnitSystem& units, const int reg);
|
outputFluidInPlace(const std::vector<double>& oip, const std::vector<double>& cip, const UnitSystem& units, const int reg);
|
||||||
|
|
||||||
void computeWellPotentials(const Wells* wells,
|
|
||||||
const WellState& xw,
|
|
||||||
std::vector<double>& well_potentials);
|
|
||||||
|
|
||||||
void updateListEconLimited(const std::unique_ptr<Solver>& solver,
|
void updateListEconLimited(const std::unique_ptr<Solver>& solver,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
|
@ -138,8 +138,6 @@ namespace Opm
|
|||||||
desiredRestoreStep );
|
desiredRestoreStep );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_well_potentials_computed = param_.getDefault("compute_well_potentials", false );
|
|
||||||
std::vector<double> well_potentials;
|
|
||||||
DynamicListEconLimited dynamic_list_econ_limited;
|
DynamicListEconLimited dynamic_list_econ_limited;
|
||||||
SimulatorReport report;
|
SimulatorReport report;
|
||||||
SimulatorReport stepReport;
|
SimulatorReport stepReport;
|
||||||
@ -178,7 +176,6 @@ namespace Opm
|
|||||||
Opm::UgGridHelpers::beginFaceCentroids(grid_),
|
Opm::UgGridHelpers::beginFaceCentroids(grid_),
|
||||||
dynamic_list_econ_limited,
|
dynamic_list_econ_limited,
|
||||||
is_parallel_run_,
|
is_parallel_run_,
|
||||||
well_potentials,
|
|
||||||
defunct_well_names_);
|
defunct_well_names_);
|
||||||
const Wells* wells = wells_manager.c_wells();
|
const Wells* wells = wells_manager.c_wells();
|
||||||
WellState well_state;
|
WellState well_state;
|
||||||
@ -328,11 +325,6 @@ namespace Opm
|
|||||||
report.output_write_time += perfTimer.stop();
|
report.output_write_time += perfTimer.stop();
|
||||||
|
|
||||||
prev_well_state = well_state;
|
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 ) {
|
|
||||||
asImpl().computeWellPotentials(wells, well_state, well_potentials);
|
|
||||||
}
|
|
||||||
|
|
||||||
asImpl().updateListEconLimited(solver, eclipse_state_->getSchedule(), timer.currentStepNum(), wells,
|
asImpl().updateListEconLimited(solver, eclipse_state_->getSchedule(), timer.currentStepNum(), wells,
|
||||||
well_state, dynamic_list_econ_limited);
|
well_state, dynamic_list_econ_limited);
|
||||||
@ -491,23 +483,6 @@ namespace Opm
|
|||||||
return std::unique_ptr<Solver>(new Solver(solver_param_, std::move(model)));
|
return std::unique_ptr<Solver>(new Solver(solver_param_, std::move(model)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Implementation>
|
|
||||||
void SimulatorBase<Implementation>::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];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Implementation>
|
template <class Implementation>
|
||||||
void SimulatorBase<Implementation>::computeRESV(const std::size_t step,
|
void SimulatorBase<Implementation>::computeRESV(const std::size_t step,
|
||||||
|
@ -227,9 +227,6 @@ public:
|
|||||||
OpmLog::note(ss.str());
|
OpmLog::note(ss.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: not used at all, keeping it for interface purpose.
|
|
||||||
|
|
||||||
std::vector<double> well_potentials;
|
|
||||||
// Create wells and well state.
|
// Create wells and well state.
|
||||||
WellsManager wells_manager(eclState(),
|
WellsManager wells_manager(eclState(),
|
||||||
timer.currentStepNum(),
|
timer.currentStepNum(),
|
||||||
@ -241,7 +238,6 @@ public:
|
|||||||
Opm::UgGridHelpers::beginFaceCentroids(grid()),
|
Opm::UgGridHelpers::beginFaceCentroids(grid()),
|
||||||
dynamic_list_econ_limited,
|
dynamic_list_econ_limited,
|
||||||
is_parallel_run_,
|
is_parallel_run_,
|
||||||
well_potentials,
|
|
||||||
defunct_well_names_ );
|
defunct_well_names_ );
|
||||||
const Wells* wells = wells_manager.c_wells();
|
const Wells* wells = wells_manager.c_wells();
|
||||||
WellState well_state;
|
WellState well_state;
|
||||||
|
@ -126,7 +126,6 @@ namespace Opm
|
|||||||
// as we get the following error otherwise
|
// as we get the following error otherwise
|
||||||
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
||||||
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
|
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
|
||||||
std::vector<double>(), // null well_potentials
|
|
||||||
Base::defunct_well_names_);
|
Base::defunct_well_names_);
|
||||||
const Wells* wells = wells_manager.c_wells();
|
const Wells* wells = wells_manager.c_wells();
|
||||||
WellState well_state;
|
WellState well_state;
|
||||||
|
@ -445,7 +445,6 @@ namespace Opm
|
|||||||
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
||||||
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructo
|
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructo
|
||||||
, false,
|
, false,
|
||||||
std::vector<double>(),
|
|
||||||
std::unordered_set<std::string>());
|
std::unordered_set<std::string>());
|
||||||
|
|
||||||
const Wells* wells = wellsmanager.c_wells();
|
const Wells* wells = wellsmanager.c_wells();
|
||||||
|
@ -107,12 +107,11 @@ struct SetupMSW {
|
|||||||
Opm::UgGridHelpers::cell2Faces(grid),
|
Opm::UgGridHelpers::cell2Faces(grid),
|
||||||
Opm::UgGridHelpers::beginFaceCentroids(grid),
|
Opm::UgGridHelpers::beginFaceCentroids(grid),
|
||||||
dummy_dynamic_list,
|
dummy_dynamic_list,
|
||||||
false
|
false,
|
||||||
// We need to pass the optionaly arguments
|
// We need to pass the optionaly arguments
|
||||||
// as we get the following error otherwise
|
// as we get the following error otherwise
|
||||||
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
|
||||||
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
|
// converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
|
||||||
, std::vector<double>(), // null well_potentials
|
|
||||||
std::unordered_set<std::string>());
|
std::unordered_set<std::string>());
|
||||||
|
|
||||||
const Wells* wells = wells_manager.c_wells();
|
const Wells* wells = wells_manager.c_wells();
|
||||||
|
Loading…
Reference in New Issue
Block a user