mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-12 01:11:55 -06:00
move loadRestartGroupData into BlackoilWellModelRestart
This commit is contained in:
parent
0f853a8566
commit
ffeddfe280
@ -415,33 +415,6 @@ getWellEcl(const std::string& well_name) const
|
||||
return *well_ecl;
|
||||
}
|
||||
|
||||
void
|
||||
BlackoilWellModelGeneric::
|
||||
loadRestartGroupData(const std::string& group,
|
||||
const data::GroupData& value)
|
||||
{
|
||||
using GPMode = Group::ProductionCMode;
|
||||
using GIMode = Group::InjectionCMode;
|
||||
|
||||
const auto cpc = value.currentControl.currentProdConstraint;
|
||||
const auto cgi = value.currentControl.currentGasInjectionConstraint;
|
||||
const auto cwi = value.currentControl.currentWaterInjectionConstraint;
|
||||
|
||||
auto& grpState = this->groupState();
|
||||
|
||||
if (cpc != GPMode::NONE) {
|
||||
grpState.production_control(group, cpc);
|
||||
}
|
||||
|
||||
if (cgi != GIMode::NONE) {
|
||||
grpState.injection_control(group, Phase::GAS, cgi);
|
||||
}
|
||||
|
||||
if (cwi != GIMode::NONE) {
|
||||
grpState.injection_control(group, Phase::WATER, cwi);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BlackoilWellModelGeneric::
|
||||
loadRestartGuideRates(const int report_step,
|
||||
@ -519,7 +492,7 @@ loadRestartData(const data::Wells& rst_wells,
|
||||
}
|
||||
|
||||
for (const auto& [group, value] : grpNwrkValues.groupData) {
|
||||
this->loadRestartGroupData(group, value);
|
||||
BlackoilWellModelRestart(*this).loadRestartGroupData(group, value, this->groupState());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,9 +286,6 @@ protected:
|
||||
std::map<std::string, data::GroupData>& gvalues) const;
|
||||
void assignNodeValues(std::map<std::string, data::NodeData>& nodevalues) const;
|
||||
|
||||
void loadRestartGroupData(const std::string& group,
|
||||
const data::GroupData& value);
|
||||
|
||||
void loadRestartGuideRates(const int report_step,
|
||||
const GuideRateModel::Target target,
|
||||
const data::Wells& rst_wells);
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <config.h>
|
||||
#include <opm/simulators/wells/BlackoilWellModelRestart.hpp>
|
||||
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
|
||||
#include <opm/simulators/wells/BlackoilWellModelGeneric.hpp>
|
||||
#include <opm/simulators/wells/PerforationData.hpp>
|
||||
#include <opm/simulators/wells/SingleWellState.hpp>
|
||||
@ -117,5 +119,31 @@ loadRestartWellData(const std::string& well_name,
|
||||
}
|
||||
}
|
||||
|
||||
void BlackoilWellModelRestart::
|
||||
loadRestartGroupData(const std::string& group,
|
||||
const data::GroupData& value,
|
||||
GroupState& grpState) const
|
||||
{
|
||||
using GPMode = Group::ProductionCMode;
|
||||
using GIMode = Group::InjectionCMode;
|
||||
|
||||
const auto cpc = value.currentControl.currentProdConstraint;
|
||||
const auto cgi = value.currentControl.currentGasInjectionConstraint;
|
||||
const auto cwi = value.currentControl.currentWaterInjectionConstraint;
|
||||
|
||||
if (cpc != GPMode::NONE) {
|
||||
grpState.production_control(group, cpc);
|
||||
}
|
||||
|
||||
if (cgi != GIMode::NONE) {
|
||||
grpState.injection_control(group, Phase::GAS, cgi);
|
||||
}
|
||||
|
||||
if (cwi != GIMode::NONE) {
|
||||
grpState.injection_control(group, Phase::WATER, cwi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -30,6 +30,10 @@
|
||||
namespace Opm {
|
||||
|
||||
class BlackoilWellModelGeneric;
|
||||
namespace data {
|
||||
class GroupData;
|
||||
}
|
||||
class GroupState;
|
||||
struct PerforationData;
|
||||
class SingleWellState;
|
||||
|
||||
@ -50,6 +54,11 @@ public:
|
||||
const std::vector<PerforationData>& old_perf_data,
|
||||
SingleWellState& ws) const;
|
||||
|
||||
//! \brief Loads per-group data from restart structures.
|
||||
void loadRestartGroupData(const std::string& group,
|
||||
const data::GroupData& value,
|
||||
GroupState& grpState) const;
|
||||
|
||||
private:
|
||||
//! \brief Loads per-connection data from restart structures.
|
||||
void loadRestartConnectionData(const std::vector<data::Rates::opt>& phs,
|
||||
|
Loading…
Reference in New Issue
Block a user