3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Modules | Files | Classes | Typedefs | Enumerations | Functions
Flux

Everything flux related in DuMux More...

Description

Everything flux related in DuMux

Modules

 Flux related to the box scheme
 Flux related to the box scheme.
 
 Flux related to the cell-centered schemes
 Flux related to the cell-centered schemes.
 
 Flux related to the cell-centered two-point flux approximation schemes
 Flux related to the cell-centered two-point flux approximation schemes.
 
 Flux related to the cell-centered multi-point flux approximation schemes
 Flux related to the cell-centered multi-point flux approximation schemes.
 
 Flux related to the pore network models
 Flux related to the pore newtwork models.
 
 Flux related to the staggered scheme
 Flux related to the staggered scheme.
 
 Flux related to the shallow water model
 Flux related to the shallow water model.
 

Files

file  flux/darcyslaw.hh
 Darcy's law specialized for different discretization schemes This file contains the data which is required to calculate volume and mass fluxes of fluid phases over a face of a finite volume by means of the Darcy approximation. Specializations are provided for the different discretization methods.
 
file  effectivestresslaw.hh
 The effective stress law specialized for different discretization schemes. This computes the stress tensor and surface forces resulting from poro-mechanical deformation.
 
file  fickiandiffusioncoefficients.hh
 Container storing the diffusion coefficients required by Fick's law. Uses the minimal possible container size and provides unified access.
 
file  flux/fickslaw.hh
 Fick's law specilized for different discretization schemes. This file contains the data which is required to calculate diffusive mass fluxes due to molecular diffusion with Fick's law.
 
file  fluxvariablesbase.hh
 Base class for the flux variables living on a sub control volume face.
 
file  fluxvariablescaching.hh
 Classes related to flux variables caching.
 
file  forchheimerslaw.hh
 Forchheimer's law specialized for different discretization schemes This file contains the data which is required to calculate volume and mass fluxes of fluid phases over a face of a finite volume by means of the Forchheimer approximation. Specializations are provided for the different discretization methods.
 
file  flux/fourierslaw.hh
 Fourier's law specialized for different discretization schemes This file contains the data which is required to calculate diffusive mass fluxes due to molecular diffusion with Fourier's law.
 
file  fourierslawnonequilibrium.hh
 This file contains the data which is required to calculate diffusive mass fluxes due to molecular diffusion with Fourier's law.
 
file  hookeslaw.hh
 Hooke's law specialized for different discretization schemes. This computes the stress tensor and surface forces resulting from mechanical deformation.
 
file  maxwellstefandiffusioncoefficients.hh
 Container storing the diffusion coefficients required by the Maxwell- Stefan diffusion law. Uses the minimal possible container size and provides unified access.
 
file  maxwellstefanslaw.hh
 This file contains the data which is required to calculate diffusive mass fluxes due to molecular diffusion with Fick's law.
 
file  referencesystemformulation.hh
 The reference frameworks and formulations available for splitting total fluxes into a advective and diffusive part.
 
file  shallowwaterflux.hh
 
file  shallowwaterviscousflux.hh
 
file  stationaryvelocityfield.hh
 Constant velocity advective law for transport models. This file contains the data which is required to calculate volume and mass fluxes of fluid phases over a face of a finite volume. A stationary velocity field is given by the user for use in tracer models.
 
file  flux/traits.hh
 Defines the flux traits.
 
file  flux/upwindscheme.hh
 Base class for the upwind scheme.
 

Classes

class  Dumux::EffectiveStressLaw< StressType, GridGeometry, dm >
 This computes the stress tensor and surface forces resulting from poro-mechanical deformation. More...
 
class  Dumux::FickianDiffusionCoefficients< Scalar, numPhases, numComponents >
 Container storing the diffusion coefficients required by Fick's law. Uses the minimal possible container size and provides unified access. More...
 
class  Dumux::FluxVariablesBase< Problem, FVElementGeometry, ElementVolumeVariables, ElementFluxVariablesCache >
 Base class for the flux variables living on a sub control volume face. More...
 
struct  Dumux::FluxVariablesCaching::EmptyAdvectionCache
 Empty caches to use in a constitutive flux law/process, e.g. Darcy's law. More...
 
class  Dumux::HookesLaw< Scalar, GridGeometry, dm >
 This computes the stress tensor and surface forces resulting from mechanical deformation. More...
 
class  Dumux::MaxwellStefanDiffusionCoefficients< Scalar, numPhases, numComponents >
 Container storing the diffusion coefficients required by the Maxwell- Stefan diffusion law. Uses the minimal possible container size and provides unified access. More...
 
class  Dumux::ShallowWaterFlux< NumEqVector >
 Computes the shallow water flux by solving a riemann problem. More...
 
class  Dumux::ShallowWaterViscousFlux< PrimaryVariables, NumEqVector, >
 Computes the shallow water viscous momentum flux due to (turbulent) viscosity by adding all surrounding shear stresses. For now implemented strictly for 2D depth-averaged models (i.e. 3 equations) More...
 
class  Dumux::StationaryVelocityField< Scalar >
 Evaluates a user given velocity field. More...
 
struct  Dumux::HasStationaryVelocityField< AdvectionType >
 Trait of an advection type stating whether it implements a stationary velocity field. More...
 
struct  Dumux::FluxTraits< FluxVariables >
 Traits of a flux variables type. More...
 

Typedefs

template<class TypeTag >
using Dumux::DarcysLaw = DarcysLawImplementation< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod >
 Evaluates the normal component of the Darcy velocity on a (sub)control volume face. More...
 
template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::FicksLaw = FicksLawImplementation< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod, referenceSystem >
 Evaluates the diffusive mass flux according to Fick's law. More...
 
template<class TypeTag >
using Dumux::ForchheimersLaw = ForchheimersLawImplementation< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod >
 Evaluates the normal component of the Forchheimer velocity on a (sub)control volume face. More...
 
template<class TypeTag >
using Dumux::FouriersLaw = FouriersLawImplementation< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod >
 Evaluates the heat conduction flux according to Fouriers's law. More...
 
template<class TypeTag >
using Dumux::FouriersLawNonEquilibrium = FouriersLawNonEquilibriumImplementation< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod >
 Evaluates the heat conduction flux according to Fouriers's law. More...
 
template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::MaxwellStefansLaw = MaxwellStefansLawImplementation< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod, referenceSystem >
 Evaluates the diffusive mass flux according to Maxwell Stafan's law. More...
 
template<class GridGeometry >
using Dumux::UpwindScheme = UpwindSchemeImpl< GridGeometry, GridGeometry::discMethod >
 The upwind scheme used for the advective fluxes. This depends on the chosen discretization method. More...
 

Enumerations

enum class  Dumux::ReferenceSystemFormulation { Dumux::ReferenceSystemFormulation::massAveraged , Dumux::ReferenceSystemFormulation::molarAveraged }
 The formulations available for Fick's law related to the reference system. More...
 

Functions

template<class VolumeVariables >
VolumeVariables::PrimaryVariables::value_type Dumux::massOrMolarDensity (const VolumeVariables &volVars, ReferenceSystemFormulation referenceSys, const int phaseIdx)
 evaluates the density to be used in Fick's law based on the reference system More...
 
template<class VolumeVariables >
VolumeVariables::PrimaryVariables::value_type Dumux::massOrMoleFraction (const VolumeVariables &volVars, ReferenceSystemFormulation referenceSys, const int phaseIdx, const int compIdx)
 returns the mass or mole fraction to be used in Fick's law based on the reference system More...
 
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
static NumEqVector Dumux::ShallowWaterFlux< NumEqVector >::flux (const Problem &problem, const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf)
 Prepares the Riemann problem for the advective flux for the 2D shallow water model. The actual model uses an exact Riemann solver after Torro and the reconstruction after Audusse and a flux limiter for small water depths. More...
 
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
static NumEqVector Dumux::ShallowWaterViscousFlux< PrimaryVariables, NumEqVector, >::flux (const Problem &problem, const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf)
 Compute the viscous momentum flux contribution from the interface shear stress. More...
 

Typedef Documentation

◆ DarcysLaw

template<class TypeTag >
using Dumux::DarcysLaw = typedef DarcysLawImplementation<TypeTag, GetPropType<TypeTag, Properties::GridGeometry>::discMethod>

Evaluates the normal component of the Darcy velocity on a (sub)control volume face.

Note
Specializations are provided for the different discretization methods. These specializations are found in the headers included below.

◆ FicksLaw

template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::FicksLaw = typedef FicksLawImplementation<TypeTag, GetPropType<TypeTag, Properties::GridGeometry>::discMethod, referenceSystem>

Evaluates the diffusive mass flux according to Fick's law.

◆ ForchheimersLaw

template<class TypeTag >
using Dumux::ForchheimersLaw = typedef ForchheimersLawImplementation<TypeTag, GetPropType<TypeTag, Properties::GridGeometry>::discMethod>

Evaluates the normal component of the Forchheimer velocity on a (sub)control volume face.

Note
Specializations are provided for the different discretization methods. These specializations are found in the headers included below.

◆ FouriersLaw

template<class TypeTag >
using Dumux::FouriersLaw = typedef FouriersLawImplementation<TypeTag, GetPropType<TypeTag, Properties::GridGeometry>::discMethod>

Evaluates the heat conduction flux according to Fouriers's law.

◆ FouriersLawNonEquilibrium

template<class TypeTag >
using Dumux::FouriersLawNonEquilibrium = typedef FouriersLawNonEquilibriumImplementation<TypeTag, GetPropType<TypeTag, Properties::GridGeometry>::discMethod>

Evaluates the heat conduction flux according to Fouriers's law.

◆ MaxwellStefansLaw

template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::MaxwellStefansLaw = typedef MaxwellStefansLawImplementation<TypeTag, GetPropType<TypeTag, Properties::GridGeometry>::discMethod, referenceSystem>

Evaluates the diffusive mass flux according to Maxwell Stafan's law.

◆ UpwindScheme

template<class GridGeometry >
using Dumux::UpwindScheme = typedef UpwindSchemeImpl<GridGeometry, GridGeometry::discMethod>

The upwind scheme used for the advective fluxes. This depends on the chosen discretization method.

Enumeration Type Documentation

◆ ReferenceSystemFormulation

The formulations available for Fick's law related to the reference system.

Note
The total flux of a component can be split into an advective and a diffusive part. In our framework, the advective part is based on a momentum balance. Standard momentum balances, e.g., the Navier-Stokes equations or Darcy's law yield mass-averaged velocities (see Multicomponent Mass Transfer, Taylor & Krishna, 1993 [65]), therefore we use the appropriate formulation of Fick's law (mass averaged formulation) per default.

This means that the diffusive fluxes are calculated with the mass fraction gradients and the unit of the fluxes is kg/s. It is also possible to use a molar-averaged reference system, which can be beneficial, e.g., when it is known that the molar-averaged advective velocity would be zero. When using a molar-averaged reference velocity, Fick's law is formulated with mole fraction gradients and the unit of the flux is moles/s. This means that depending on the reference system, the units of the fluxes need to be adapted to be used in mass or mole balances.

Enumerator
massAveraged 
molarAveraged 

Function Documentation

◆ flux() [1/2]

template<class NumEqVector >
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
static NumEqVector Dumux::ShallowWaterFlux< NumEqVector >::flux ( const Problem &  problem,
const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const typename FVElementGeometry::SubControlVolumeFace &  scvf 
)
inlinestatic

Prepares the Riemann problem for the advective flux for the 2D shallow water model. The actual model uses an exact Riemann solver after Torro and the reconstruction after Audusse and a flux limiter for small water depths.

The computed water flux of the Riemann solver is given in m^2/s, the momentum fluxes are given in m^3/s^2. The Riemann flux is multiplied by scvf.area() (given in m for a 2D domain) to get the flux over the face.

Todo:
The choice of the Riemann solver should be more flexible

◆ flux() [2/2]

template<class PrimaryVariables , class NumEqVector , typename std::enable_if_t< NumEqVector::size()==3, int > = 0>
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
static NumEqVector Dumux::ShallowWaterViscousFlux< PrimaryVariables, NumEqVector, >::flux ( const Problem &  problem,
const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const typename FVElementGeometry::SubControlVolumeFace &  scvf 
)
inlinestatic

Compute the viscous momentum flux contribution from the interface shear stress.

The viscous momentum flux

\[ \int \int_{V} \mathbf{\nabla} \cdot \nu_t h \mathbf{\nabla} \mathbf{u} dV \]

is re-written using Gauss' divergence theorem to:

\[ \int_{S_f} \nu_t h \mathbf{\nabla} \mathbf{u} \cdot \mathbf{n_f} dS \]

The vertical (Elder-like) contribution to the turbulent viscosity scales with water depth

\[ h \]

and shear velocity

\[ u_{*} \]

:

\[ \nu_t^v = c^v \frac{\kappa}{6} u_{*} h \]

The horizontal (Smagorinsky-like) contribution to the turbulent viscosity scales with the water depth (squared) and the magnitude of the stress (rate-of-strain) tensor:

\[ nu_t^h = (c^h h)^2 \sqrt{ 2\left(\frac{\partial u}{\partial x}\right)^2 + \left(\frac{\partial u}{\partial y} + \frac{\partial v}{\partial x}\right)^2 + 2\left(\frac{\partial v}{\partial y}\right)^2 } \]

However, based on the velocity vectors in the direct neighbours of the volume face, it is not possible to compute all components of the stress tensor. Only the gradients of u and v in the direction of the vector between the cell centres is available. To avoid the reconstruction of the full velocity gradient tensor based on a larger stencil, the horizontal contribution to the eddy viscosity (in the mixing-length model) is computed using only the velocity gradients normal to the face:

\[ \frac{\partial u}{\partial n} , \frac{\partial v}{\partial n} \]

In other words, the present approximation of the horizontal contribution to the turbulent viscosity reduces to:

\[ nu_t^h = (c^h h)^2 \sqrt{ 2\left(\frac{\partial u}{\partial n}\right)^2 + 2\left(\frac{\partial v}{\partial n}\right)^2 } \]

It should be noted that this simplified approach is formally inconsistent and will result in a turbulent viscosity that is dependent on the grid (orientation).

◆ massOrMolarDensity()

template<class VolumeVariables >
VolumeVariables::PrimaryVariables::value_type Dumux::massOrMolarDensity ( const VolumeVariables &  volVars,
ReferenceSystemFormulation  referenceSys,
const int  phaseIdx 
)

evaluates the density to be used in Fick's law based on the reference system

◆ massOrMoleFraction()

template<class VolumeVariables >
VolumeVariables::PrimaryVariables::value_type Dumux::massOrMoleFraction ( const VolumeVariables &  volVars,
ReferenceSystemFormulation  referenceSys,
const int  phaseIdx,
const int  compIdx 
)

returns the mass or mole fraction to be used in Fick's law based on the reference system