move getHydroPressureLoss to MultisegmentWellSegments

This commit is contained in:
Arne Morten Kvarving
2022-12-19 14:20:55 +01:00
parent 40adc0ddbd
commit 9c19120855
4 changed files with 12 additions and 10 deletions

View File

@@ -355,14 +355,6 @@ computeSegmentFluidProperties(const EvalWell& temperature,
}
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
getHydroPressureLoss(const int seg) const
{
return segments_.densities_[seg] * baseif_.gravity() * segments_.depth_diffs_[seg];
}
template<typename FluidSystem, typename Indices, typename Scalar>
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
@@ -797,7 +789,7 @@ assembleDefaultPressureEq(const int seg,
// we only consider the hydrostatic pressure loss first
// TODO: we might be able to add member variables to store these values, then we update well state
// after converged
const auto hydro_pressure_drop = getHydroPressureLoss(seg);
const auto hydro_pressure_drop = segments_.getHydroPressureLoss(seg);
auto& ws = well_state.well(baseif_.indexOfWell());
auto& segments = ws.segments;
segments.pressure_drop_hydrostatic[seg] = hydro_pressure_drop.value();

View File

@@ -113,7 +113,6 @@ protected:
DeferredLogger& deferred_logger);
EvalWell getFrictionPressureLoss(const int seg) const;
EvalWell getHydroPressureLoss(const int seg) const;
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
const EvalWell& saltConcentration,
const int pvt_region_index,

View File

@@ -108,6 +108,14 @@ MultisegmentWellSegments(const int numSegments,
}
}
template<class FluidSystem, class Indices, class Scalar>
typename MultisegmentWellSegments<FluidSystem,Indices,Scalar>::EvalWell
MultisegmentWellSegments<FluidSystem,Indices,Scalar>::
getHydroPressureLoss(const int seg) const
{
return densities_[seg] * well_.gravity() * depth_diffs_[seg];
}
#define INSTANCE(...) \
template class MultisegmentWellSegments<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;

View File

@@ -41,6 +41,9 @@ public:
MultisegmentWellSegments(const int numSegments,
WellInterfaceGeneric& well);
EvalWell getHydroPressureLoss(const int seg) const;
// TODO: trying to use the information from the Well opm-parser as much
// as possible, it will possibly be re-implemented later for efficiency reason.