24 #ifndef OPM_WELLINTERFACE_FLUID_SYSTEM_HEADER_INCLUDED 25 #define OPM_WELLINTERFACE_FLUID_SYSTEM_HEADER_INCLUDED 27 #include <opm/simulators/wells/WellInterfaceGeneric.hpp> 35 namespace RateConverter
37 template <
class Flu
idSystem,
class Region>
class SurfaceToReservoirVoidage;
41 template<
class Scalar>
class GroupState;
43 struct RatioLimitCheckReport;
44 template<
typename Scalar,
typename IndexTraits>
class SingleWellState;
45 template<
typename Scalar,
typename IndexTraits>
class WellState;
46 template<
typename Scalar,
typename IndexTraits>
class GroupStateHelper;
48 template<
class Flu
idSystem>
49 class WellInterfaceFluidSystem :
public WellInterfaceGeneric<typename FluidSystem::Scalar, typename FluidSystem::IndexTraitsType>
52 using RateConverterType = RateConverter::
53 SurfaceToReservoirVoidage<FluidSystem, std::vector<int>>;
55 static constexpr
int INVALIDCOMPLETION = std::numeric_limits<int>::max();
58 using Scalar =
typename FluidSystem::Scalar;
59 using IndexTraits =
typename FluidSystem::IndexTraitsType;
60 using ModelParameters =
typename WellInterfaceGeneric<Scalar, IndexTraits>::ModelParameters;
61 using GroupStateHelperType = GroupStateHelper<Scalar, IndexTraits>;
62 using WellStateType = WellState<Scalar, IndexTraits>;
64 static constexpr
int Water = IndexTraits::waterPhaseIdx;
65 static constexpr
int Oil = IndexTraits::oilPhaseIdx;
66 static constexpr
int Gas = IndexTraits::gasPhaseIdx;
68 const RateConverterType& rateConverter()
const 70 return rateConverter_;
74 WellInterfaceFluidSystem(
const Well& well,
75 const ParallelWellInfo<Scalar>& parallel_well_info,
77 const ModelParameters& param,
78 const RateConverterType& rate_converter,
79 const int pvtRegionIdx,
80 const int num_conservation_quantities,
82 const int index_of_well,
83 const std::vector<PerforationData<Scalar>>& perf_data);
86 void calculateReservoirRates(
const bool use_well_bhp_temperature, SingleWellState<Scalar, IndexTraits>& ws)
const;
88 bool checkIndividualConstraints(SingleWellState<Scalar, IndexTraits>& ws,
89 const SummaryState& summaryState,
90 DeferredLogger& deferred_logger,
91 const std::optional<Well::InjectionControls>& inj_controls = std::nullopt,
92 const std::optional<Well::ProductionControls>& prod_controls = std::nullopt)
const;
94 bool checkGroupConstraints(
const GroupStateHelperType& groupStateHelper,
95 const Schedule& schedule,
96 const SummaryState& summaryState,
97 const bool check_guide_rate,
98 WellStateType& well_state)
const;
100 bool checkConstraints(
const GroupStateHelperType& groupStateHelper,
101 const Schedule& schedule,
102 const SummaryState& summaryState,
103 WellStateType& well_state)
const;
105 std::optional<Scalar>
106 getGroupInjectionTargetRate(
const Group& group,
107 const GroupStateHelperType& groupStateHelper,
108 const InjectorType& injectorType,
109 Scalar efficiencyFactor)
const;
112 getGroupProductionTargetRate(
const Group& group,
113 const GroupStateHelperType& groupStateHelper,
114 Scalar efficiencyFactor)
const;
116 bool zeroGroupRateTarget(
const GroupStateHelperType& groupStateHelper)
const;
119 const RateConverterType& rateConverter_;
124 #endif // OPM_WELLINTERFACE_FLUID_SYSTEM_HEADER_INCLUDED This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45