41class BlackoilWellModelGasLiftGeneric
44 using GLiftOptWells = std::map<std::string, std::unique_ptr<GasLiftSingleWellGeneric<Scalar, IndexTraits>>>;
45 using GLiftProdWells = std::map<std::string, const WellInterfaceGeneric<Scalar, IndexTraits>*>;
46 using GLiftWellStateMap = std::map<std::string, std::unique_ptr<GasLiftWellState<Scalar>>>;
47 using GLiftEclWells =
typename GasLiftGroupInfo<Scalar, IndexTraits>::GLiftEclWells;
48 using GLiftSyncGroups =
typename GasLiftSingleWellGeneric<Scalar, IndexTraits>::GLiftSyncGroups;
50 explicit BlackoilWellModelGasLiftGeneric(
bool terminal_output)
51 : terminal_output_(terminal_output)
54 static constexpr bool glift_debug =
false;
56 void gliftDebug(
const std::string& msg,
59 bool terminalOutput()
const {
return terminal_output_; }
61 template<
class Serializer>
62 void serializeOp(Serializer& serializer)
64 serializer(last_glift_opt_time_);
67 bool operator==(
const BlackoilWellModelGasLiftGeneric& that)
const
68 {
return this->last_glift_opt_time_ == that.last_glift_opt_time_; }
75 void gasLiftOptimizationStage2(
const Parallel::Communication& comm,
76 const Schedule& schedule,
77 const SummaryState& summaryState,
80 GLiftProdWells& prod_wells,
81 GLiftOptWells& glift_wells,
83 GLiftWellStateMap& map,
84 const int episodeIndex,
87 bool terminal_output_;
88 double last_glift_opt_time_ = -1.0;
93class BlackoilWellModelGasLift :
94 public BlackoilWellModelGasLiftGeneric<GetPropType<TypeTag, Properties::Scalar>,
95 typename GetPropType<TypeTag, Properties::FluidSystem>::IndexTraitsType>
100 using IndexTraits =
typename FluidSystem::IndexTraitsType;
101 using Base = BlackoilWellModelGasLiftGeneric<Scalar, IndexTraits>;
102 using Base::glift_debug;
103 using GLiftEclWells =
typename GasLiftGroupInfo<Scalar, IndexTraits>::GLiftEclWells;
104 using GLiftOptWells =
typename Base::GLiftOptWells;
105 using GLiftProdWells =
typename Base::GLiftProdWells;
106 using GLiftSyncGroups =
typename GasLiftSingleWellGeneric<Scalar, IndexTraits>::GLiftSyncGroups;
107 using GLiftWellStateMap =
typename Base::GLiftWellStateMap;
109 using WellInterfacePtr = std::unique_ptr<WellInterface<TypeTag>>;
112 explicit BlackoilWellModelGasLift(
bool terminal_output)
113 : Base(terminal_output)
116 static void initGliftEclWellMap(
const std::vector<WellInterfacePtr>& well_container,
117 GLiftEclWells& ecl_well_map);
119 bool maybeDoGasLiftOptimize(
const Simulator& simulator,
120 const std::vector<WellInterfacePtr>& well_container,
121 const std::map<std::string, Scalar>& node_pressures,
122 const bool updatePotentials,
123 WellStateType& wellState,
128 void gasLiftOptimizationStage1(
const Simulator& simulator,
129 const std::vector<WellInterfacePtr>& well_container,
130 WellStateType& wellState,
132 GLiftProdWells& prod_wells,
133 GLiftOptWells& glift_wells,
135 GLiftWellStateMap& state_map,
140 const Simulator& simulator,
141 WellStateType& wellState,
143 GLiftProdWells& prod_wells,
144 GLiftOptWells& glift_wells,
146 GLiftWellStateMap& state_map,
147 GLiftSyncGroups& groups_to_sync,
150 void updateWellPotentials(
const Simulator& simulator,
151 const std::vector<WellInterfacePtr>& well_container,
152 const std::map<std::string, Scalar>& node_pressures,
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:233