3.5-git
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  darcyslaw_fwd.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  dispersionflux.hh
 Dispersion flux for different discretization schemes.
 
file  dispersionflux_fwd.hh
 Dispersion flux for different discretization schemes.
 
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  effectivestresslaw_fwd.hh
 The effective stress law specialized for different discretization schemes. This computes the stress tensor and surface forces resulting from poro-mechanical deformation.
 
file  facetensoraverage.hh
 A free function to average a Tensor at an interface.
 
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  fickslaw_fwd.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  forchheimerslaw_fwd.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  forchheimervelocity.hh
 Forchheimer's law This file contains the calculation of the Forchheimer velocity for a given Darcy velocity.
 
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  fourierslaw_fwd.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  fourierslawnonequilibrium_fwd.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  hookeslaw_fwd.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 Maxwell-Stefan's law.
 
file  maxwellstefanslaw_fwd.hh
 This file contains the data which is required to calculate diffusive mass fluxes due to molecular diffusion with Maxwell-Stefan'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, DiscretizationMethod >
 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::ForchheimerVelocity< Scalar, GridGeometry, FluxVariables >
 Forchheimer's law This file contains the calculation of the Forchheimer velocity for a given Darcy velocity. More...
 
class  Dumux::HookesLaw< Scalar, GridGeometry, DiscretizationMethod >
 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< 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, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod >
 Evaluates the normal component of the Darcy velocity on a (sub)control volume face. More...
 
template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::DiffusiveDispersionFlux = DispersionFluxImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod, referenceSystem >
 Evaluates the dispersive flux. More...
 
template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::FicksLaw = FicksLawImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod, referenceSystem >
 Evaluates the diffusive mass flux according to Fick's law. More...
 
template<class TypeTag >
using Dumux::ForchheimersLaw = ForchheimersLawImplementation< TypeTag, ForchheimerVelocity< GetPropType< TypeTag, Properties::Scalar >, GetPropType< TypeTag, Properties::GridGeometry >, GetPropType< TypeTag, Properties::FluxVariables > >, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod >
 Evaluates the normal component of the Forchheimer velocity on a (sub)control volume face. More...
 
template<class TypeTag >
using Dumux::FouriersLaw = FouriersLawImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod >
 Evaluates the heat conduction flux according to Fouriers's law. More...
 
template<class TypeTag >
using Dumux::FouriersLawNonEquilibrium = FouriersLawNonEquilibriumImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod >
 Evaluates the heat conduction flux according to Fouriers's law. More...
 
template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::MaxwellStefansLaw = MaxwellStefansLawImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod, referenceSystem >
 Evaluates the diffusive mass flux according to Maxwell Stefan's law. More...
 
template<class GridGeometry >
using Dumux::UpwindScheme = UpwindSchemeImpl< GridGeometry, typename GridGeometry::DiscretizationMethod >
 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< 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, typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod>

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.

◆ DiffusiveDispersionFlux

template<class TypeTag , ReferenceSystemFormulation referenceSystem = ReferenceSystemFormulation::massAveraged>
using Dumux::DiffusiveDispersionFlux = typedef DispersionFluxImplementation<TypeTag, typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, referenceSystem>

Evaluates the dispersive flux.

◆ FicksLaw

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

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

◆ ForchheimersLaw

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, typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod>

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

◆ FouriersLawNonEquilibrium

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

◆ MaxwellStefansLaw

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

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

◆ UpwindScheme

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

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 [67]), 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 NumEqVector , typename std::enable_if_t< NumEqVector::size()==3, int > = 0>
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
static NumEqVector Dumux::ShallowWaterViscousFlux< 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