49class 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;
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,
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,
89 const SummaryState& summaryState,
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_;