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,
89 Well::InjectorCMode activeInjectionConstraint(
const SingleWellState& ws,
90 const SummaryState& summaryState,
93 Well::ProducerCMode activeProductionConstraint(
const SingleWellState& ws,
94 const SummaryState& summaryState,
97 std::pair<bool, double> checkGroupConstraintsInj(
const Group& group,
100 const double efficiencyFactor,
101 const Schedule& schedule,
102 const SummaryState& summaryState,
105 std::pair<bool, double> checkGroupConstraintsProd(
const Group& group,
108 const double efficiencyFactor,
109 const Schedule& schedule,
110 const SummaryState& summaryState,
113 bool checkGroupConstraints(
WellState& well_state,
115 const Schedule& schedule,
116 const SummaryState& summaryState,
119 bool checkConstraints(
WellState& well_state,
121 const Schedule& schedule,
122 const SummaryState& summaryState,
125 bool checkRateEconLimits(
const WellEconProductionLimits& econ_production_limits,
126 const double* rates_or_potentials,
130 bool ratio_limit_violated =
false;
131 int worst_offending_completion = INVALIDCOMPLETION;
132 double violation_extent = 0.0;
135 void checkMaxWaterCutLimit(
const WellEconProductionLimits& econ_production_limits,
139 void checkMaxGORLimit(
const WellEconProductionLimits& econ_production_limits,
143 void checkMaxWGRLimit(
const WellEconProductionLimits& econ_production_limits,
147 void checkRatioEconLimits(
const WellEconProductionLimits& econ_production_limits,
153 const double simulation_time,
154 const bool write_message_to_opmlog,
155 WellTestState& well_test_state,
158 std::optional<double>
159 getGroupInjectionTargetRate(
const Group& group,
162 const Schedule& schedule,
163 const SummaryState& summaryState,
164 const InjectorType& injectorType,
165 double efficiencyFactor,
169 getGroupProductionTargetRate(
const Group& group,
172 const Schedule& schedule,
173 const SummaryState& summaryState,
174 double efficiencyFactor)
const;
180 template <
typename RatioFunc>
182 const double max_ratio_limit,
183 const RatioFunc& ratioFunc,
186 template<
typename RatioFunc>
188 const double max_ratio_limit,
189 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:38
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:27
Definition: WellInterfaceFluidSystem.hpp:129