22 #ifndef OPM_MULTISEGMENTWELL_SEGMENTS_HEADER_INCLUDED 23 #define OPM_MULTISEGMENTWELL_SEGMENTS_HEADER_INCLUDED 25 #include <opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp> 26 #include <opm/simulators/wells/ParallelWellInfo.hpp> 43 template<
typename Flu
idSystem,
typename Indices>
47 using Scalar =
typename FluidSystem::Scalar;
48 using EvalWell =
typename PrimaryVariables::EvalWell;
49 using IndexTraits =
typename FluidSystem::IndexTraitsType;
56 void computeFluidProperties(
const EvalWell& temperature,
57 const EvalWell& saltConcentration,
64 EvalWell getHydroPressureLoss(
const int seg,
65 const int seg_side)
const;
69 const int local_perf_index)
const;
71 EvalWell getSurfaceVolume(
const EvalWell& temperature,
72 const EvalWell& saltConcentration,
77 EvalWell getFrictionPressureLoss(
const int seg,
78 const bool extra_reverse_flow_derivatives =
false)
const;
81 EvalWell pressureDropSpiralICD(
const int seg,
82 const bool extra_reverse_flow_derivatives =
false)
const;
85 EvalWell pressureDropAutoICD(
const int seg,
86 const UnitSystem& unit_system,
87 const bool extra_reverse_flow_derivatives =
false)
const;
90 EvalWell pressureDropValve(
const int seg,
91 const SummaryState& st,
92 const bool extra_reverse_flow_derivatives =
false)
const;
95 EvalWell accelerationPressureLossContribution(
const int seg,
97 const bool extra_reverse_flow_derivatives =
false)
const;
99 const std::vector<std::vector<int>>& inlets()
const 104 const std::vector<int>& inlets(
const int seg)
const 109 const std::vector<std::vector<int>>& perforations()
const 111 return perforations_;
114 int upwinding_segment(
const int seg)
const 116 return upwinding_segments_[seg];
119 Scalar getRefDensity()
const 121 return densities_[0].value();
124 const EvalWell& density(
const int seg)
const 126 return densities_[seg];
129 Scalar local_perforation_depth_diff(
const int local_perf_index)
const 131 return local_perforation_depth_diffs_[local_perf_index];
146 std::vector<std::vector<int>> perforations_;
154 std::vector<Scalar> local_perforation_depth_diffs_;
157 std::vector<std::vector<int>> inlets_;
159 std::vector<Scalar> depth_diffs_;
161 std::vector<Scalar> surface_densities_;
165 std::vector<EvalWell> densities_;
168 std::vector<EvalWell> mass_rates_;
171 std::vector<EvalWell> viscosities_;
174 std::vector<int> upwinding_segments_;
176 std::vector<std::vector<EvalWell>> phase_densities_;
177 std::vector<std::vector<EvalWell>> phase_fractions_;
178 std::vector<std::vector<EvalWell>> phase_viscosities_;
182 void copyPhaseDensities(
const unsigned phaseIdx,
183 const std::size_t stride,
186 Scalar mixtureDensity(
const int seg)
const;
187 Scalar mixtureDensityWithExponents(
const int seg)
const;
188 Scalar mixtureDensityWithExponents(
const AutoICD& aicd,
const int seg)
const;
191 struct PhaseCalcResult {
192 explicit PhaseCalcResult(
const std::size_t num_quantities)
193 : b(num_quantities, 0.0)
194 , mix(num_quantities, 0.0)
195 , mix_s(num_quantities, 0.0)
196 , phase_viscosities(num_quantities, 0.0)
197 , phase_densities(num_quantities, 0.0)
202 std::vector<EvalWell> b;
203 std::vector<EvalWell> mix;
204 std::vector<EvalWell> mix_s;
205 std::vector<EvalWell> phase_viscosities;
206 std::vector<EvalWell> phase_densities;
207 EvalWell vol_ratio{0.};
210 void calculatePhaseProperties(PhaseCalcResult& result,
211 const EvalWell& temperature,
212 const EvalWell& saltConcentration,
215 bool update_visc_and_den,
221 #endif // OPM_MULTISEGMENTWELL_SEGMENTS_HEADER_INCLUDED Scalar getPressureDiffSegLocalPerf(const int seg, const int local_perf_index) const
Pressure difference between segment and perforation.
Definition: MultisegmentWellSegments.cpp:248
void updateUpwindingSegments(const PrimaryVariables &primary_variables)
Update upwinding segments.
Definition: MultisegmentWellSegments.cpp:213
Definition: MultisegmentWellAssemble.hpp:35
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Class encapsulating some information about parallel wells.
Definition: MSWellHelpers.hpp:34
Definition: DeferredLogger.hpp:56
Definition: MultisegmentWellSegments.hpp:44
Definition: BlackoilWellModelGeneric.hpp:75
Definition: MultisegmentWellSegments.hpp:34