3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation > Class Template Reference

The base class for spatial parameters of porous-medium-flow problems. More...

#include <dumux/porousmediumflow/fvspatialparams.hh>

Inheritance diagram for Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >:

Description

template<class GridGeometry, class Scalar, class Implementation>
class Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >

The base class for spatial parameters of porous-medium-flow problems.

Public Member Functions

 FVPorousMediumFlowSpatialParams (std::shared_ptr< const GridGeometry > gridGeometry)
 
Scalar harmonicMean (const Scalar T1, const Scalar T2, const GlobalPosition &normal) const
 Harmonic average of a discontinuous scalar field at discontinuity interface (for compatibility reasons with the function below) More...
 
DimWorldMatrix harmonicMean (const DimWorldMatrix &T1, const DimWorldMatrix &T2, const GlobalPosition &normal) const
 Harmonic average of a discontinuous tensorial field at discontinuity interface. More...
 
template<class ElementSolution >
decltype(auto) permeability (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
 Function for defining the (intrinsic) permeability \([m^2]\). More...
 
Scalar beaversJosephCoeffAtPos (const GlobalPosition &globalPos) const
 Function for defining the Beavers-Joseph coefficient for multidomain problems \(\mathrm{[-]}\). More...
 
Scalar forchCoeff (const SubControlVolumeFace &scvf) const
 Apply the Forchheimer coefficient for inertial forces calculation. More...
 
template<class ElementSolution >
Scalar porosity (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
 Function for defining the porosity. That is possibly solution dependent. More...
 
template<class SolidSystem , class ElementSolution , typename std::enable_if_t< SolidSystem::isInert() &&SolidSystem::numInertComponents==1 &&!decltype(isValid(Detail::hasInertVolumeFractionAtPos< GlobalPosition, SolidSystem >())(std::declval< Implementation >()))::value, int > = 0>
Scalar inertVolumeFraction (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
 Function for defining the solid volume fraction. That is possibly solution dependent. More...
 
template<class SolidSystem , class ElementSolution , typename std::enable_if_t< SolidSystem::numInertComponents==0, int > = 0>
Scalar inertVolumeFraction (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
 
template<class SolidSystem , class ElementSolution , typename std::enable_if_t<(SolidSystem::numInertComponents > 1)||((SolidSystem::numInertComponents > 0) &&(!SolidSystem::isInert()||decltype(isValid(Detail::hasInertVolumeFractionAtPos< GlobalPosition, SolidSystem >())(std::declval< Implementation >()))::value)), int > = 0>
Scalar inertVolumeFraction (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
 
template<class ElementSolution >
Scalar extrusionFactor (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
 Return how much the domain is extruded at a given sub-control volume. More...
 
Scalar extrusionFactorAtPos (const GlobalPosition &globalPos) const
 Return how much the domain is extruded at a given position. More...
 
template<class ElementSolution >
Scalar temperature (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
 Return the temperature in the given sub-control volume. More...
 
Scalar temperatureAtPos (const GlobalPosition &globalPos) const
 Return the temperature in the domain at the given position. More...
 
const GravityVector & gravity (const GlobalPosition &pos) const
 Returns the acceleration due to gravity \(\mathrm{[m/s^2]}\). More...
 
const GridGeometry & gridGeometry () const
 The finite volume grid geometry. More...
 
template<class ElementSolution >
decltype(auto) fluidMatrixInteraction (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
 Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw, etc.). More...
 
template<class FluidSystem , class ElementSolution >
int wettingPhase (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
 Function for defining which phase is to be considered as the wetting phase. More...
 
template<class FluidSystem >
int wettingPhaseAtPos (const GlobalPosition &globalPos) const
 Function for defining which phase is to be considered as the wetting phase. More...
 

Static Public Member Functions

static constexpr bool evaluatePermeabilityAtScvfIP ()
 If the permeability should be evaluated directly at the scvf integration point (for convergence tests with analytical and continuous perm functions) or is evaluated at the scvs (for permeability fields with discontinuities) -> default. More...
 

Protected Member Functions

Implementation & asImp_ ()
 Returns the implementation of the spatial parameters (static polymorphism) More...
 
const Implementation & asImp_ () const
 Returns the implementation of the spatial parameters (static polymorphism) More...
 

Constructor & Destructor Documentation

◆ FVPorousMediumFlowSpatialParams()

template<class GridGeometry , class Scalar , class Implementation >
Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::FVPorousMediumFlowSpatialParams ( std::shared_ptr< const GridGeometry >  gridGeometry)
inline

Member Function Documentation

◆ asImp_() [1/2]

template<class GridGeometry , class Scalar , class Implementation >
Implementation & Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::asImp_ ( )
inlineprotectedinherited

Returns the implementation of the spatial parameters (static polymorphism)

◆ asImp_() [2/2]

template<class GridGeometry , class Scalar , class Implementation >
const Implementation & Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::asImp_ ( ) const
inlineprotectedinherited

Returns the implementation of the spatial parameters (static polymorphism)

◆ beaversJosephCoeffAtPos()

template<class GridGeometry , class Scalar , class Implementation >
Scalar Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::beaversJosephCoeffAtPos ( const GlobalPosition &  globalPos) const
inline

Function for defining the Beavers-Joseph coefficient for multidomain problems \(\mathrm{[-]}\).

Returns
Beavers-Joseph coefficient \(\mathrm{[-]}\)
Parameters
globalPosThe global position

◆ evaluatePermeabilityAtScvfIP()

template<class GridGeometry , class Scalar , class Implementation >
static constexpr bool Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::evaluatePermeabilityAtScvfIP ( )
inlinestaticconstexpr

If the permeability should be evaluated directly at the scvf integration point (for convergence tests with analytical and continuous perm functions) or is evaluated at the scvs (for permeability fields with discontinuities) -> default.

◆ extrusionFactor()

template<class GridGeometry , class Scalar , class Implementation >
template<class ElementSolution >
Scalar Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::extrusionFactor ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol 
) const
inlineinherited

Return how much the domain is extruded at a given sub-control volume.

This means the factor by which a lower-dimensional (1D or 2D) entity needs to be expanded to get a full dimensional cell. The default is 1.0 which means that 1D problems are actually thought as pipes with a cross section of 1 m^2 and 2D problems are assumed to extend 1 m to the back.

◆ extrusionFactorAtPos()

template<class GridGeometry , class Scalar , class Implementation >
Scalar Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::extrusionFactorAtPos ( const GlobalPosition &  globalPos) const
inlineinherited

Return how much the domain is extruded at a given position.

◆ fluidMatrixInteraction()

template<class GridGeometry , class Scalar , class Implementation >
template<class ElementSolution >
decltype(auto) Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::fluidMatrixInteraction ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol 
) const
inlineinherited

Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw, etc.).

Parameters
elementThe current element
scvThe sub-control volume inside the element.
elemSolThe solution at the dofs connected to the element.

◆ forchCoeff()

template<class GridGeometry , class Scalar , class Implementation >
Scalar Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::forchCoeff ( const SubControlVolumeFace &  scvf) const
inline

Apply the Forchheimer coefficient for inertial forces calculation.

Parameters
scvfThe sub-control volume face where the intrinsic velocity ought to be calculated.

◆ gravity()

template<class GridGeometry , class Scalar , class Implementation >
const GravityVector & Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::gravity ( const GlobalPosition &  pos) const
inlineinherited

Returns the acceleration due to gravity \(\mathrm{[m/s^2]}\).

The default behaviour is a constant gravity vector; if the Problem.EnableGravity parameter is true, \(\boldsymbol{g} = ( 0,\dots,\ -9.81)^T \), else \(\boldsymbol{g} = ( 0,\dots, 0)^T \).

Parameters
posthe spatial position at which to evaulate the gravity vector

◆ gridGeometry()

template<class GridGeometry , class Scalar , class Implementation >
const GridGeometry & Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::gridGeometry ( ) const
inlineinherited

The finite volume grid geometry.

◆ harmonicMean() [1/2]

template<class GridGeometry , class Scalar , class Implementation >
DimWorldMatrix Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::harmonicMean ( const DimWorldMatrix &  T1,
const DimWorldMatrix &  T2,
const GlobalPosition &  normal 
) const
inline

Harmonic average of a discontinuous tensorial field at discontinuity interface.

Note
We do a harmonic average of the part normal to the interface (alpha*I) and an arithmetic average of the tangential part (T - alpha*I).
Returns
the averaged tensor
Parameters
T1first tensor
T2second tensor
normalThe unit normal vector of the interface

◆ harmonicMean() [2/2]

template<class GridGeometry , class Scalar , class Implementation >
Scalar Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::harmonicMean ( const Scalar  T1,
const Scalar  T2,
const GlobalPosition &  normal 
) const
inline

Harmonic average of a discontinuous scalar field at discontinuity interface (for compatibility reasons with the function below)

Returns
the averaged scalar
Parameters
T1first scalar parameter
T2second scalar parameter
normalThe unit normal vector of the interface

◆ inertVolumeFraction() [1/3]

template<class GridGeometry , class Scalar , class Implementation >
template<class SolidSystem , class ElementSolution , typename std::enable_if_t< SolidSystem::isInert() &&SolidSystem::numInertComponents==1 &&!decltype(isValid(Detail::hasInertVolumeFractionAtPos< GlobalPosition, SolidSystem >())(std::declval< Implementation >()))::value, int > = 0>
Scalar Dumux::FVPorousMediumSpatialParams< GridGeometry, Scalar, Implementation >::inertVolumeFraction ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol,
int  compIdx 
) const
inlineinherited

Function for defining the solid volume fraction. That is possibly solution dependent.

Parameters
elementThe current element
scvThe sub-control volume inside the element.
elemSolThe solution at the dofs connected to the element.
compIdxThe solid component index
Returns
the volume fraction of the inert solid component with index compIdx
Note
this overload is enable if there is only one inert solid component and the user didn't choose to implement a inertVolumeFractionAtPos overload. It then forwards to the simpler porosity interface. With more than one solid components or active solid components (i.e. dissolution) please overload the more general inertVolumeFraction/inertVolumeFractionAtPos interface.

◆ inertVolumeFraction() [2/3]

template<class GridGeometry , class Scalar , class Implementation >
template<class SolidSystem , class ElementSolution , typename std::enable_if_t< SolidSystem::numInertComponents==0, int > = 0>
Scalar Dumux::FVPorousMediumSpatialParams< GridGeometry, Scalar, Implementation >::inertVolumeFraction ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol,
int  compIdx 
) const
inlineinherited

◆ inertVolumeFraction() [3/3]

template<class GridGeometry , class Scalar , class Implementation >
template<class SolidSystem , class ElementSolution , typename std::enable_if_t<(SolidSystem::numInertComponents > 1)||((SolidSystem::numInertComponents > 0) &&(!SolidSystem::isInert()||decltype(isValid(Detail::hasInertVolumeFractionAtPos< GlobalPosition, SolidSystem >())(std::declval< Implementation >()))::value)), int > = 0>
Scalar Dumux::FVPorousMediumSpatialParams< GridGeometry, Scalar, Implementation >::inertVolumeFraction ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol,
int  compIdx 
) const
inlineinherited

◆ permeability()

template<class GridGeometry , class Scalar , class Implementation >
template<class ElementSolution >
decltype(auto) Dumux::FVPorousMediumFlowSpatialParams< GridGeometry, Scalar, Implementation >::permeability ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol 
) const
inline

Function for defining the (intrinsic) permeability \([m^2]\).

Note
It is possibly solution dependent.
Parameters
elementThe current element
scvThe sub-control volume inside the element.
elemSolThe solution at the dofs connected to the element.
Returns
permeability

◆ porosity()

template<class GridGeometry , class Scalar , class Implementation >
template<class ElementSolution >
Scalar Dumux::FVPorousMediumSpatialParams< GridGeometry, Scalar, Implementation >::porosity ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol 
) const
inlineinherited

Function for defining the porosity. That is possibly solution dependent.

Note
this can only be used for solids with one inert component (see inertVolumeFraction for the more general interface)
Parameters
elementThe current element
scvThe sub-control volume inside the element.
elemSolThe solution at the dofs connected to the element.
Returns
the porosity

◆ temperature()

template<class GridGeometry , class Scalar , class Implementation >
template<class ElementSolution >
Scalar Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::temperature ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol 
) const
inlineinherited

Return the temperature in the given sub-control volume.

◆ temperatureAtPos()

template<class GridGeometry , class Scalar , class Implementation >
Scalar Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::temperatureAtPos ( const GlobalPosition &  globalPos) const
inlineinherited

Return the temperature in the domain at the given position.

Parameters
globalPosThe position in global coordinates where the temperature should be specified.

◆ wettingPhase()

template<class GridGeometry , class Scalar , class Implementation >
template<class FluidSystem , class ElementSolution >
int Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::wettingPhase ( const Element &  element,
const SubControlVolume &  scv,
const ElementSolution &  elemSol 
) const
inlineinherited

Function for defining which phase is to be considered as the wetting phase.

Parameters
elementThe current element
scvThe sub-control volume inside the element.
elemSolThe solution at the dofs connected to the element.
Returns
the wetting phase index

◆ wettingPhaseAtPos()

template<class GridGeometry , class Scalar , class Implementation >
template<class FluidSystem >
int Dumux::FVSpatialParams< GridGeometry, Scalar, Implementation >::wettingPhaseAtPos ( const GlobalPosition &  globalPos) const
inlineinherited

Function for defining which phase is to be considered as the wetting phase.

Returns
the wetting phase index
Parameters
globalPosThe global position

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