22 #ifndef OPM_BLACKOILWELLMODEL_GASLIFT_HEADER_INCLUDED 23 #define OPM_BLACKOILWELLMODEL_GASLIFT_HEADER_INCLUDED 27 #include <opm/simulators/wells/GasLiftSingleWellGeneric.hpp> 36 template<
class Scalar>
class GroupState;
37 template<
typename Scalar,
typename IndexTraits>
class WellState;
40 template<
typename Scalar,
typename IndexTraits>
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;
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_);
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;
92 template<
typename TypeTag>
95 typename GetPropType<TypeTag, Properties::FluidSystem>::IndexTraitsType>
100 using IndexTraits =
typename FluidSystem::IndexTraitsType;
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>>;
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,
128 void gasLiftOptimizationStage1(
const Simulator& simulator,
129 const std::vector<WellInterfacePtr>& well_container,
132 GLiftProdWells& prod_wells,
133 GLiftOptWells& glift_wells,
135 GLiftWellStateMap& state_map,
140 const Simulator& simulator,
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,
160 #include "BlackoilWellModelGasLift_impl.hpp" 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
Definition: BlackoilWellModelConstraints.hpp:34
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
A fully-implicit black-oil flow model.
Definition: BlackoilWellModelGasLift.hpp:38
Definition: BlackoilWellModelGeneric.hpp:65
Class for handling the gaslift in the blackoil well model.
Definition: BlackoilWellModelGasLift.hpp:93
Definition: DeferredLogger.hpp:56
Definition: BlackoilWellModelGasLift.hpp:41
Definition: BlackoilWellModelGeneric.hpp:75
Defines a type tags and some fundamental properties all models.
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: TemperatureModel.hpp:61