Opm::BlackOilLocalResidualTPFA< TypeTag > Class Template Reference

Calculates the local residual of the black oil model. More...

#include <blackoillocalresidualtpfa.hh>

Inheritance diagram for Opm::BlackOilLocalResidualTPFA< TypeTag >:
Inheritance graph

Classes

struct  ResidualNBInfo
 

Public Member Functions

template<class LhsEval >
void computeStorage (Dune::FieldVector< LhsEval, numEq > &storage, const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx) const
 Evaluate the amount all conservation quantities (e.g. phase mass) within a finite sub-control volume. More...
 
void computeSource (RateVector &source, const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx) const
 Calculate the source term of the equation. More...
 

Static Public Member Functions

template<class LhsEval >
static void computeStorage (Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants)
 
static void computeFlux (RateVector &flux, RateVector &darcy, const unsigned globalIndexIn, const unsigned globalIndexEx, const IntensiveQuantities &intQuantsIn, const IntensiveQuantities &intQuantsEx, const ResidualNBInfo &nbInfo)
 
static void computeFlux (RateVector &flux, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
 
static void calculateFluxes_ (RateVector &flux, RateVector &darcy, const IntensiveQuantities &intQuantsIn, const IntensiveQuantities &intQuantsEx, const unsigned &globalIndexIn, const unsigned &globalIndexEx, const ResidualNBInfo &nbInfo)
 
template<class BoundaryConditionData >
static void computeBoundaryFlux (RateVector &bdyFlux, const Problem &problem, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx)
 
template<class BoundaryConditionData >
static void computeBoundaryFluxRate (RateVector &bdyFlux, const BoundaryConditionData &bdyInfo)
 
template<class BoundaryConditionData >
static void computeBoundaryFluxFree (const Problem &problem, RateVector &bdyFlux, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx)
 
template<class BoundaryConditionData >
static void computeBoundaryThermal (const Problem &problem, RateVector &bdyFlux, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx)
 
static void computeSource (RateVector &source, const Problem &problem, unsigned globalSpaceIdex, unsigned timeIdx)
 
static void computeSourceDense (RateVector &source, const Problem &problem, unsigned globalSpaceIdex, unsigned timeIdx)
 
template<class UpEval , class FluidState >
static void evalPhaseFluxes_ (RateVector &flux, unsigned phaseIdx, unsigned pvtRegionIdx, const ExtensiveQuantities &extQuants, const FluidState &upFs)
 
template<class UpEval , class Eval , class FluidState >
static void evalPhaseFluxes_ (RateVector &flux, unsigned phaseIdx, unsigned pvtRegionIdx, const Eval &surfaceVolumeFlux, const FluidState &upFs)
 Helper function to calculate the flux of mass in terms of conservation quantities via specific fluid phase over a face. More...
 
template<class Scalar >
static void adaptMassConservationQuantities_ (Dune::FieldVector< Scalar, numEq > &container, unsigned pvtRegionIdx)
 Helper function to convert the mass-related parts of a Dune::FieldVector that stores conservation quantities in terms of "surface-volume" to the conservation quantities used by the model. More...
 
static FaceDir::DirEnum faceDirFromDirId (const int dirId)
 

Detailed Description

template<class TypeTag>
class Opm::BlackOilLocalResidualTPFA< TypeTag >

Calculates the local residual of the black oil model.

Member Function Documentation

◆ adaptMassConservationQuantities_()

template<class TypeTag >
template<class Scalar >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::adaptMassConservationQuantities_ ( Dune::FieldVector< Scalar, numEq > &  container,
unsigned  pvtRegionIdx 
)
inlinestatic

Helper function to convert the mass-related parts of a Dune::FieldVector that stores conservation quantities in terms of "surface-volume" to the conservation quantities used by the model.

Depending on the value of the BlackoilConserveSurfaceVolume property, the model either conserves mass by means of "surface volume" of the components or mass directly. In the former case, this method is a no-op; in the latter, the values passed are multiplied by their respective pure component's density at surface conditions.

Referenced by Opm::BlackOilLocalResidualTPFA< TypeTag >::computeBoundaryFluxFree(), and Opm::BlackOilLocalResidualTPFA< TypeTag >::computeStorage().

◆ calculateFluxes_()

◆ computeBoundaryFlux()

template<class TypeTag >
template<class BoundaryConditionData >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeBoundaryFlux ( RateVector &  bdyFlux,
const Problem &  problem,
const BoundaryConditionData &  bdyInfo,
const IntensiveQuantities &  insideIntQuants,
unsigned  globalSpaceIdx 
)
inlinestatic

◆ computeBoundaryFluxFree()

template<class TypeTag >
template<class BoundaryConditionData >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeBoundaryFluxFree ( const Problem &  problem,
RateVector &  bdyFlux,
const BoundaryConditionData &  bdyInfo,
const IntensiveQuantities &  insideIntQuants,
unsigned  globalSpaceIdx 
)
inlinestatic

◆ computeBoundaryFluxRate()

template<class TypeTag >
template<class BoundaryConditionData >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeBoundaryFluxRate ( RateVector &  bdyFlux,
const BoundaryConditionData &  bdyInfo 
)
inlinestatic

◆ computeBoundaryThermal()

template<class TypeTag >
template<class BoundaryConditionData >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeBoundaryThermal ( const Problem &  problem,
RateVector &  bdyFlux,
const BoundaryConditionData &  bdyInfo,
const IntensiveQuantities &  insideIntQuants,
unsigned  globalSpaceIdx 
)
inlinestatic

◆ computeFlux() [1/2]

template<class TypeTag >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeFlux ( RateVector &  flux,
const ElementContext &  elemCtx,
unsigned  scvfIdx,
unsigned  timeIdx 
)
inlinestatic

◆ computeFlux() [2/2]

template<class TypeTag >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeFlux ( RateVector &  flux,
RateVector &  darcy,
const unsigned  globalIndexIn,
const unsigned  globalIndexEx,
const IntensiveQuantities &  intQuantsIn,
const IntensiveQuantities &  intQuantsEx,
const ResidualNBInfo nbInfo 
)
inlinestatic

This function works like the ElementContext-based version with one main difference: The darcy flux is calculated here, not read from the extensive quantities of the element context.

References Opm::BlackOilLocalResidualTPFA< TypeTag >::calculateFluxes_(), and Opm::BlackOilLocalResidualTPFA< TypeTag >::computeFlux().

Referenced by Opm::BlackOilLocalResidualTPFA< TypeTag >::computeFlux().

◆ computeSource() [1/2]

template<class TypeTag >
void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeSource ( RateVector &  source,
const ElementContext &  elemCtx,
unsigned  dofIdx,
unsigned  timeIdx 
) const
inline

Calculate the source term of the equation.

Parameters
sourceThe values of the source term.

References Opm::BlackOilMICPModule< TypeTag, enableMICPV >::addSource(), and Opm::BlackOilLocalResidualTPFA< TypeTag >::computeSource().

◆ computeSource() [2/2]

template<class TypeTag >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeSource ( RateVector &  source,
const Problem &  problem,
unsigned  globalSpaceIdex,
unsigned  timeIdx 
)
inlinestatic

◆ computeSourceDense()

template<class TypeTag >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeSourceDense ( RateVector &  source,
const Problem &  problem,
unsigned  globalSpaceIdex,
unsigned  timeIdx 
)
inlinestatic

◆ computeStorage() [1/2]

template<class TypeTag >
template<class LhsEval >
void Opm::BlackOilLocalResidualTPFA< TypeTag >::computeStorage ( Dune::FieldVector< LhsEval, numEq > &  storage,
const ElementContext &  elemCtx,
unsigned  dofIdx,
unsigned  timeIdx 
) const
inline

Evaluate the amount all conservation quantities (e.g. phase mass) within a finite sub-control volume.

Parameters
storageStores the total amount of each conserved quantity inside the domain.

References Opm::BlackOilLocalResidualTPFA< TypeTag >::computeStorage().

Referenced by Opm::BlackOilLocalResidualTPFA< TypeTag >::computeStorage().

◆ computeStorage() [2/2]

◆ evalPhaseFluxes_() [1/2]

template<class TypeTag >
template<class UpEval , class Eval , class FluidState >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::evalPhaseFluxes_ ( RateVector &  flux,
unsigned  phaseIdx,
unsigned  pvtRegionIdx,
const Eval &  surfaceVolumeFlux,
const FluidState &  upFs 
)
inlinestatic

Helper function to calculate the flux of mass in terms of conservation quantities via specific fluid phase over a face.

◆ evalPhaseFluxes_() [2/2]

template<class TypeTag >
template<class UpEval , class FluidState >
static void Opm::BlackOilLocalResidualTPFA< TypeTag >::evalPhaseFluxes_ ( RateVector &  flux,
unsigned  phaseIdx,
unsigned  pvtRegionIdx,
const ExtensiveQuantities &  extQuants,
const FluidState &  upFs 
)
inlinestatic

◆ faceDirFromDirId()

template<class TypeTag >
static FaceDir::DirEnum Opm::BlackOilLocalResidualTPFA< TypeTag >::faceDirFromDirId ( const int  dirId)
inlinestatic

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