Opm::MultisegmentWellEval< FluidSystem, Indices > Class Template Reference

#include <MultisegmentWellEval.hpp>

Inheritance diagram for Opm::MultisegmentWellEval< FluidSystem, Indices >:
Inheritance graph

Public Member Functions

const EquationslinSys () const
 Returns a const reference to equation system. More...
 
const WellSegments & segmentSet () const
 
int segmentNumberToIndex (const int segment_number) const
 
int numberOfSegments () const
 number of segments for this well More...
 

Protected Types

using Scalar = typename FluidSystem::Scalar
 
using PrimaryVariables = MultisegmentWellPrimaryVariables< FluidSystem, Indices >
 
using Equations = MultisegmentWellEquations< Scalar, numWellEq, Indices::numEq >
 
using MSWSegments = MultisegmentWellSegments< FluidSystem, Indices >
 
using BVector = typename Equations::BVector
 
using BVectorWell = typename Equations::BVectorWell
 
using EvalWell = typename PrimaryVariables::EvalWell
 
using Eval = DenseAd::Evaluation< Scalar, Indices::numEq >
 

Protected Member Functions

 MultisegmentWellEval (WellInterfaceIndices< FluidSystem, Indices > &baseif)
 
void initMatrixAndVectors (const int num_cells)
 
void assembleDefaultPressureEq (const int seg, WellState< Scalar > &well_state, const bool use_average_density)
 
void assembleICDPressureEq (const int seg, const UnitSystem &unit_system, WellState< Scalar > &well_state, const SummaryState &summary_state, const bool use_average_density, DeferredLogger &deferred_logger)
 
void assembleAccelerationAndHydroPressureLosses (const int seg, WellState< Scalar > &well_state, const bool use_average_density)
 
void assemblePressureEq (const int seg, const UnitSystem &unit_system, WellState< Scalar > &well_state, const SummaryState &summary_state, const bool use_average_density, DeferredLogger &deferred_logger)
 
ConvergenceReport getWellConvergence (const WellState< Scalar > &well_state, const std::vector< double > &B_avg, DeferredLogger &deferred_logger, const double max_residual_allowed, const double tolerance_wells, const double relaxed_inner_tolerance_flow_ms_well, const double tolerance_pressure_ms_wells, const double relaxed_inner_tolerance_pressure_ms_well, const bool relax_tolerance, const bool well_is_stopped) const
 check whether the well equations get converged for this well More...
 
std::pair< bool, std::vector< Scalar > > getFiniteWellResiduals (const std::vector< Scalar > &B_avg, DeferredLogger &deferred_logger) const
 
double getControlTolerance (const WellState< Scalar > &well_state, const double tolerance_wells, const double tolerance_pressure_ms_wells, DeferredLogger &deferred_logger) const
 
double getResidualMeasureValue (const WellState< Scalar > &well_state, const std::vector< double > &residuals, const double tolerance_wells, const double tolerance_pressure_ms_wells, DeferredLogger &deferred_logger) const
 
void assembleAccelerationPressureLoss (const int seg, WellState< Scalar > &well_state)
 
EvalWell pressureDropAutoICD (const int seg, const UnitSystem &unit_system) const
 
EvalWell extendEval (const Eval &in) const
 
void scaleSegmentRatesWithWellRates (const std::vector< std::vector< int > > &segment_inlets, const std::vector< std::vector< int > > &segment_perforations, WellState< FluidSystem::Scalar > &well_state) const
 
void scaleSegmentPressuresWithBhp (WellState< FluidSystem::Scalar > &well_state) const
 
WellSegmentCompPressureDrop compPressureDrop () const
 
void detectOscillations (const std::vector< double > &measure_history, bool &oscillate, bool &stagnate) const
 Detect oscillation or stagnation based on the residual measure history. More...
 
bool accelerationalPressureLossConsidered () const
 
bool frictionalPressureLossConsidered () const
 
double getSegmentDp (const int seg, const double density, const std::vector< double > &seg_dp) const
 

Protected Attributes

const WellInterfaceIndices< FluidSystem, Indices > & baseif_
 
Equations linSys_
 The equation system. More...
 
PrimaryVariables primary_variables_
 The primary variables. More...
 
MSWSegments segments_
 Segment properties. More...
 
std::vector< double > cell_perforation_depth_diffs_
 
std::vector< double > cell_perforation_pressure_diffs_
 

Static Protected Attributes

static constexpr int numWellEq = PrimaryVariables::numWellEq
 
static constexpr int SPres = PrimaryVariables::SPres
 
static constexpr int WQTotal = PrimaryVariables::WQTotal
 

Member Typedef Documentation

◆ BVector

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::BVector = typename Equations::BVector
protected

◆ BVectorWell

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::BVectorWell = typename Equations::BVectorWell
protected

◆ Equations

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::Equations = MultisegmentWellEquations<Scalar,numWellEq,Indices::numEq>
protected

◆ Eval

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::Eval = DenseAd::Evaluation<Scalar, Indices::numEq>
protected

◆ EvalWell

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::EvalWell = typename PrimaryVariables::EvalWell
protected

◆ MSWSegments

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::MSWSegments = MultisegmentWellSegments<FluidSystem,Indices>
protected

◆ PrimaryVariables

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::PrimaryVariables = MultisegmentWellPrimaryVariables<FluidSystem,Indices>
protected

◆ Scalar

template<typename FluidSystem , typename Indices >
using Opm::MultisegmentWellEval< FluidSystem, Indices >::Scalar = typename FluidSystem::Scalar
protected

Constructor & Destructor Documentation

◆ MultisegmentWellEval()

template<typename FluidSystem , typename Indices >
Opm::MultisegmentWellEval< FluidSystem, Indices >::MultisegmentWellEval ( WellInterfaceIndices< FluidSystem, Indices > &  baseif)
protected

Member Function Documentation

◆ accelerationalPressureLossConsidered()

bool Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::accelerationalPressureLossConsidered ( ) const
protectedinherited

◆ assembleAccelerationAndHydroPressureLosses()

template<typename FluidSystem , typename Indices >
void Opm::MultisegmentWellEval< FluidSystem, Indices >::assembleAccelerationAndHydroPressureLosses ( const int  seg,
WellState< Scalar > &  well_state,
const bool  use_average_density 
)
protected

◆ assembleAccelerationPressureLoss()

template<typename FluidSystem , typename Indices >
void Opm::MultisegmentWellEval< FluidSystem, Indices >::assembleAccelerationPressureLoss ( const int  seg,
WellState< Scalar > &  well_state 
)
protected

◆ assembleDefaultPressureEq()

template<typename FluidSystem , typename Indices >
void Opm::MultisegmentWellEval< FluidSystem, Indices >::assembleDefaultPressureEq ( const int  seg,
WellState< Scalar > &  well_state,
const bool  use_average_density 
)
protected

◆ assembleICDPressureEq()

template<typename FluidSystem , typename Indices >
void Opm::MultisegmentWellEval< FluidSystem, Indices >::assembleICDPressureEq ( const int  seg,
const UnitSystem &  unit_system,
WellState< Scalar > &  well_state,
const SummaryState &  summary_state,
const bool  use_average_density,
DeferredLogger deferred_logger 
)
protected

◆ assemblePressureEq()

template<typename FluidSystem , typename Indices >
void Opm::MultisegmentWellEval< FluidSystem, Indices >::assemblePressureEq ( const int  seg,
const UnitSystem &  unit_system,
WellState< Scalar > &  well_state,
const SummaryState &  summary_state,
const bool  use_average_density,
DeferredLogger deferred_logger 
)
protected

◆ compPressureDrop()

WellSegmentCompPressureDrop Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::compPressureDrop ( ) const
protectedinherited

◆ detectOscillations()

void Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::detectOscillations ( const std::vector< double > &  measure_history,
bool &  oscillate,
bool &  stagnate 
) const
protectedinherited

Detect oscillation or stagnation based on the residual measure history.

◆ extendEval()

template<typename FluidSystem , typename Indices >
EvalWell Opm::MultisegmentWellEval< FluidSystem, Indices >::extendEval ( const Eval in) const
protected

◆ frictionalPressureLossConsidered()

bool Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::frictionalPressureLossConsidered ( ) const
protectedinherited

◆ getControlTolerance()

template<typename FluidSystem , typename Indices >
double Opm::MultisegmentWellEval< FluidSystem, Indices >::getControlTolerance ( const WellState< Scalar > &  well_state,
const double  tolerance_wells,
const double  tolerance_pressure_ms_wells,
DeferredLogger deferred_logger 
) const
protected

◆ getFiniteWellResiduals()

template<typename FluidSystem , typename Indices >
std::pair< bool, std::vector< Scalar > > Opm::MultisegmentWellEval< FluidSystem, Indices >::getFiniteWellResiduals ( const std::vector< Scalar > &  B_avg,
DeferredLogger deferred_logger 
) const
protected

◆ getResidualMeasureValue()

template<typename FluidSystem , typename Indices >
double Opm::MultisegmentWellEval< FluidSystem, Indices >::getResidualMeasureValue ( const WellState< Scalar > &  well_state,
const std::vector< double > &  residuals,
const double  tolerance_wells,
const double  tolerance_pressure_ms_wells,
DeferredLogger deferred_logger 
) const
protected

◆ getSegmentDp()

double Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::getSegmentDp ( const int  seg,
const double  density,
const std::vector< double > &  seg_dp 
) const
protectedinherited

◆ getWellConvergence()

template<typename FluidSystem , typename Indices >
ConvergenceReport Opm::MultisegmentWellEval< FluidSystem, Indices >::getWellConvergence ( const WellState< Scalar > &  well_state,
const std::vector< double > &  B_avg,
DeferredLogger deferred_logger,
const double  max_residual_allowed,
const double  tolerance_wells,
const double  relaxed_inner_tolerance_flow_ms_well,
const double  tolerance_pressure_ms_wells,
const double  relaxed_inner_tolerance_pressure_ms_well,
const bool  relax_tolerance,
const bool  well_is_stopped 
) const
protected

check whether the well equations get converged for this well

◆ initMatrixAndVectors()

template<typename FluidSystem , typename Indices >
void Opm::MultisegmentWellEval< FluidSystem, Indices >::initMatrixAndVectors ( const int  num_cells)
protected

◆ linSys()

template<typename FluidSystem , typename Indices >
const Equations & Opm::MultisegmentWellEval< FluidSystem, Indices >::linSys ( ) const
inline

Returns a const reference to equation system.

References Opm::MultisegmentWellEval< FluidSystem, Indices >::linSys_.

◆ numberOfSegments()

int Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::numberOfSegments ( ) const
inherited

number of segments for this well

◆ pressureDropAutoICD()

template<typename FluidSystem , typename Indices >
EvalWell Opm::MultisegmentWellEval< FluidSystem, Indices >::pressureDropAutoICD ( const int  seg,
const UnitSystem &  unit_system 
) const
protected

◆ scaleSegmentPressuresWithBhp()

void Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::scaleSegmentPressuresWithBhp ( WellState< FluidSystem::Scalar > &  well_state) const
protectedinherited

◆ scaleSegmentRatesWithWellRates()

void Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::scaleSegmentRatesWithWellRates ( const std::vector< std::vector< int > > &  segment_inlets,
const std::vector< std::vector< int > > &  segment_perforations,
WellState< FluidSystem::Scalar > &  well_state 
) const
protectedinherited

◆ segmentNumberToIndex()

int Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::segmentNumberToIndex ( const int  segment_number) const
inherited

◆ segmentSet()

const WellSegments & Opm::MultisegmentWellGeneric< FluidSystem::Scalar >::segmentSet ( ) const
inherited

Member Data Documentation

◆ baseif_

template<typename FluidSystem , typename Indices >
const WellInterfaceIndices<FluidSystem,Indices>& Opm::MultisegmentWellEval< FluidSystem, Indices >::baseif_
protected

◆ cell_perforation_depth_diffs_

template<typename FluidSystem , typename Indices >
std::vector<double> Opm::MultisegmentWellEval< FluidSystem, Indices >::cell_perforation_depth_diffs_
protected

◆ cell_perforation_pressure_diffs_

template<typename FluidSystem , typename Indices >
std::vector<double> Opm::MultisegmentWellEval< FluidSystem, Indices >::cell_perforation_pressure_diffs_
protected

◆ linSys_

template<typename FluidSystem , typename Indices >
Equations Opm::MultisegmentWellEval< FluidSystem, Indices >::linSys_
protected

◆ numWellEq

template<typename FluidSystem , typename Indices >
constexpr int Opm::MultisegmentWellEval< FluidSystem, Indices >::numWellEq = PrimaryVariables::numWellEq
staticconstexprprotected

◆ primary_variables_

template<typename FluidSystem , typename Indices >
PrimaryVariables Opm::MultisegmentWellEval< FluidSystem, Indices >::primary_variables_
protected

◆ segments_

template<typename FluidSystem , typename Indices >
MSWSegments Opm::MultisegmentWellEval< FluidSystem, Indices >::segments_
protected

Segment properties.

◆ SPres

template<typename FluidSystem , typename Indices >
constexpr int Opm::MultisegmentWellEval< FluidSystem, Indices >::SPres = PrimaryVariables::SPres
staticconstexprprotected

◆ WQTotal

template<typename FluidSystem , typename Indices >
constexpr int Opm::MultisegmentWellEval< FluidSystem, Indices >::WQTotal = PrimaryVariables::WQTotal
staticconstexprprotected

The documentation for this class was generated from the following file: