My Project
Loading...
Searching...
No Matches
Opm::MultisegmentWellPrimaryVariables< FluidSystem, Indices > Class Template Reference

Public Types

using Scalar = typename FluidSystem::Scalar
 
using EvalWell = DenseAd::Evaluation<Scalar, Indices::numEq + numWellEq>
 
using Equations = MultisegmentWellEquations<Scalar,numWellEq,Indices::numEq>
 
using BVectorWell = typename Equations::BVectorWell
 

Public Member Functions

 MultisegmentWellPrimaryVariables (const WellInterfaceIndices< FluidSystem, Indices > &well)
 
void resize (const int numSegments)
 Resize values and evaluations.
 
void init ()
 Initialize evaluations from values.
 
void update (const WellState< Scalar > &well_state, const bool stop_or_zero_rate_target)
 Copy values from well state.
 
void updateNewton (const BVectorWell &dwells, const Scalar relaxation_factor, const Scalar DFLimit, const bool stop_or_zero_rate_target, const Scalar max_pressure_change)
 Update values from newton update vector.
 
void copyToWellState (const MultisegmentWellGeneric< Scalar > &mswell, const Scalar rho, WellState< Scalar > &well_state, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 Copy values to well state.
 
EvalWell volumeFractionScaled (const int seg, const int compIdx) const
 Returns scaled volume fraction for a component in a segment.
 
EvalWell surfaceVolumeFraction (const int seg, const int compIdx) const
 Returns surface volume fraction for a component in a segment.
 
EvalWell getSegmentRateUpwinding (const int seg, const int seg_upwind, const std::size_t comp_idx) const
 Returns upwinding rate for a component in a segment.
 
EvalWell getBhp () const
 Get bottomhole pressure.
 
EvalWell getSegmentPressure (const int seg) const
 Get pressure for a segment.
 
EvalWell getSegmentRate (const int seg, const int comp_idx) const
 Get rate for a component in a segment.
 
EvalWell getQs (const int comp_idx) const
 Returns scaled rate for a component.
 
EvalWell getWQTotal () const
 Get WQTotal.
 
const std::array< EvalWell, numWellEq > & eval (const int idx) const
 Returns a const ref to an array of evaluations.
 
const std::array< Scalar, numWellEq > & value (const int idx) const
 Returns a value array.
 
void setValue (const int idx, const std::array< Scalar, numWellEq > &val)
 Set a value array. Note that this does not also set the corresponding evaluation.
 
void outputLowLimitPressureSegments (DeferredLogger &deferred_logger) const
 output the segments with pressure close to lower pressure limit for debugging purpose
 

Static Public Attributes

static constexpr bool has_water = (Indices::waterSwitchIdx >= 0)
 
static constexpr bool has_gas = (Indices::compositionSwitchIdx >= 0)
 
static constexpr bool has_oil = (Indices::numPhases - has_gas - has_water) > 0
 
static constexpr bool has_wfrac_variable = has_water && Indices::numPhases > 1
 
static constexpr bool has_gfrac_variable = has_gas && has_oil
 
static constexpr int WQTotal = 0
 
static constexpr int WFrac = has_wfrac_variable ? 1 : -1000
 
static constexpr int GFrac = has_gfrac_variable ? has_wfrac_variable + 1 : -1000
 
static constexpr int SPres = has_wfrac_variable + has_gfrac_variable + 1
 
static constexpr int numWellEq = Indices::numPhases + 1
 

Member Function Documentation

◆ surfaceVolumeFraction()

template<class FluidSystem , class Indices >
MultisegmentWellPrimaryVariables< FluidSystem, Indices >::EvalWell Opm::MultisegmentWellPrimaryVariables< FluidSystem, Indices >::surfaceVolumeFraction ( const int seg,
const int compIdx ) const

Returns surface volume fraction for a component in a segment.

basically Q_p / \sigma_p Q_p

◆ volumeFractionScaled()

template<class FluidSystem , class Indices >
MultisegmentWellPrimaryVariables< FluidSystem, Indices >::EvalWell Opm::MultisegmentWellPrimaryVariables< FluidSystem, Indices >::volumeFractionScaled ( const int seg,
const int compIdx ) const

Returns scaled volume fraction for a component in a segment.

F_p / g_p, the basic usage of this value is because Q_p = G_t * F_p / G_p


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