24 #ifndef OPM_WELLINTERFACE_FLUID_SYSTEM_HEADER_INCLUDED
25 #define OPM_WELLINTERFACE_FLUID_SYSTEM_HEADER_INCLUDED
27 #include <opm/simulators/wells/WellInterfaceGeneric.hpp>
28 #include <opm/core/props/BlackoilPhases.hpp>
34 namespace RateConverter
36 template <
class Flu
idSystem,
class Region>
class SurfaceToReservoirVoidage;
43 class SingleWellState;
45 template<
class Flu
idSystem>
49 SurfaceToReservoirVoidage<FluidSystem, std::vector<int>>;
51 static constexpr
int INVALIDCOMPLETION = std::numeric_limits<int>::max();
55 const double& simulationTime,
56 const bool& writeMessageToOPMLog,
57 WellTestState& wellTestState,
60 int flowPhaseToEbosPhaseIdx(
const int phaseIdx)
const;
62 static constexpr
int Water = BlackoilPhases::Aqua;
63 static constexpr
int Oil = BlackoilPhases::Liquid;
64 static constexpr
int Gas = BlackoilPhases::Vapour;
68 return rateConverter_;
76 const int pvtRegionIdx,
77 const int num_components,
79 const int index_of_well,
80 const std::vector<PerforationData>& perf_data);
86 const SummaryState& summaryState)
const;
88 Well::InjectorCMode activeInjectionConstraint(
const SingleWellState& ws,
89 const SummaryState& summaryState)
const;
91 Well::ProducerCMode activeProductionConstraint(
const SingleWellState& ws,
92 const SummaryState& summaryState)
const;
94 std::pair<bool, double> checkGroupConstraintsInj(
const Group& group,
97 const double efficiencyFactor,
98 const Schedule& schedule,
99 const SummaryState& summaryState,
102 std::pair<bool, double> checkGroupConstraintsProd(
const Group& group,
105 const double efficiencyFactor,
106 const Schedule& schedule,
107 const SummaryState& summaryState,
110 bool checkGroupConstraints(
WellState& well_state,
112 const Schedule& schedule,
113 const SummaryState& summaryState,
116 bool checkConstraints(
WellState& well_state,
118 const Schedule& schedule,
119 const SummaryState& summaryState,
122 bool checkRateEconLimits(
const WellEconProductionLimits& econ_production_limits,
123 const double* rates_or_potentials,
127 bool ratio_limit_violated =
false;
128 int worst_offending_completion = INVALIDCOMPLETION;
129 double violation_extent = 0.0;
132 void checkMaxWaterCutLimit(
const WellEconProductionLimits& econ_production_limits,
136 void checkMaxGORLimit(
const WellEconProductionLimits& econ_production_limits,
140 void checkMaxWGRLimit(
const WellEconProductionLimits& econ_production_limits,
144 void checkRatioEconLimits(
const WellEconProductionLimits& econ_production_limits,
150 const double simulation_time,
151 const bool write_message_to_opmlog,
152 WellTestState& well_test_state,
155 std::optional<double>
156 getGroupInjectionTargetRate(
const Group& group,
159 const Schedule& schedule,
160 const SummaryState& summaryState,
161 const InjectorType& injectorType,
162 double efficiencyFactor,
166 getGroupProductionTargetRate(
const Group& group,
169 const Schedule& schedule,
170 const SummaryState& summaryState,
171 double efficiencyFactor)
const;
177 template <
typename RatioFunc>
179 const double max_ratio_limit,
180 const RatioFunc& ratioFunc,
183 template<
typename RatioFunc>
185 const double max_ratio_limit,
186 const RatioFunc& ratioFunc)
const;
Definition: DeferredLogger.hpp:57
Definition: GroupState.hpp:34
Class encapsulating some information about parallel wells.
Definition: ParallelWellInfo.hpp:252
Convert component rates at surface conditions to phase (voidage) rates at reservoir conditions.
Definition: RateConverter.hpp:68
Definition: SingleWellState.hpp:34
Definition: WellInterfaceFluidSystem.hpp:46
Definition: WellInterfaceGeneric.hpp:51
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: WellState.hpp:56
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:26
Definition: WellInterfaceFluidSystem.hpp:126