3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Member Functions | List of all members
Dumux::RichardsLocalResidual< TypeTag > Class Template Reference

Element-wise calculation of the Jacobian matrix for problems using the Richards fully implicit models. More...

#include <dumux/porousmediumflow/richards/localresidual.hh>

Inheritance diagram for Dumux::RichardsLocalResidual< TypeTag >:

Description

template<class TypeTag>
class Dumux::RichardsLocalResidual< TypeTag >

Element-wise calculation of the Jacobian matrix for problems using the Richards fully implicit models.

Public Member Functions

NumEqVector computeStorage (const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
 Evaluates the rate of change of all conservation quantites (e.g. phase mass) within a sub-control volume of a finite volume element for the immiscible models. More...
 
NumEqVector computeFlux (const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache) const
 Evaluates the mass flux over a face of a sub control volume. More...
 
template<class PartialDerivativeMatrix >
void addStorageDerivatives (PartialDerivativeMatrix &partialDerivatives, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const VolumeVariables &curVolVars, const SubControlVolume &scv) const
 Adds the storage derivative. More...
 
template<class PartialDerivativeMatrix >
void addSourceDerivatives (PartialDerivativeMatrix &partialDerivatives, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const VolumeVariables &curVolVars, const SubControlVolume &scv) const
 Adds source derivatives for wetting and nonwetting phase. More...
 
template<class PartialDerivativeMatrices , class T = TypeTag>
std::enable_if_t< GetPropType< T, Properties::GridGeometry >::discMethod==DiscretizationMethods::cctpfa, void > addFluxDerivatives (PartialDerivativeMatrices &derivativeMatrices, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &curElemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
 Adds flux derivatives for wetting and nonwetting phase for cell-centered FVM using TPFA. More...
 
template<class JacobianMatrix , class T = TypeTag>
std::enable_if_t< GetPropType< T, Properties::GridGeometry >::discMethod==DiscretizationMethods::box, void > addFluxDerivatives (JacobianMatrix &A, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &curElemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
 Adds flux derivatives for box method. More...
 
template<class PartialDerivativeMatrices >
void addCCDirichletFluxDerivatives (PartialDerivativeMatrices &derivativeMatrices, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &curElemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
 Adds cell-centered Dirichlet flux derivatives for wetting and nonwetting phase. More...
 
template<class PartialDerivativeMatrices >
void addRobinFluxDerivatives (PartialDerivativeMatrices &derivativeMatrices, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &curElemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
 Adds Robin flux derivatives for wetting and nonwetting phase. More...
 

Member Function Documentation

◆ addCCDirichletFluxDerivatives()

template<class TypeTag >
template<class PartialDerivativeMatrices >
void Dumux::RichardsLocalResidual< TypeTag >::addCCDirichletFluxDerivatives ( PartialDerivativeMatrices &  derivativeMatrices,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline

Adds cell-centered Dirichlet flux derivatives for wetting and nonwetting phase.

Compute derivatives for the wetting and the nonwetting phase flux with respect to \(p_w\) and \(S_n\).

Parameters
derivativeMatricesThe matrices containing the derivatives
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curElemVolVarsThe current element volume variables
elemFluxVarsCacheThe element flux variables cache
scvfThe sub control volume face

◆ addFluxDerivatives() [1/2]

template<class TypeTag >
template<class JacobianMatrix , class T = TypeTag>
std::enable_if_t< GetPropType< T, Properties::GridGeometry >::discMethod==DiscretizationMethods::box, void > Dumux::RichardsLocalResidual< TypeTag >::addFluxDerivatives ( JacobianMatrix &  A,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline

Adds flux derivatives for box method.

Parameters
AThe Jacobian Matrix
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curElemVolVarsThe current element volume variables
elemFluxVarsCacheThe element flux variables cache
scvfThe sub control volume face

◆ addFluxDerivatives() [2/2]

template<class TypeTag >
template<class PartialDerivativeMatrices , class T = TypeTag>
std::enable_if_t< GetPropType< T, Properties::GridGeometry >::discMethod==DiscretizationMethods::cctpfa, void > Dumux::RichardsLocalResidual< TypeTag >::addFluxDerivatives ( PartialDerivativeMatrices &  derivativeMatrices,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline

Adds flux derivatives for wetting and nonwetting phase for cell-centered FVM using TPFA.

Compute derivatives for the wetting and the nonwetting phase flux with respect to \(p_w\) and \(S_n\).

Parameters
derivativeMatricesThe partial derivatives
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curElemVolVarsThe current element volume variables
elemFluxVarsCacheThe element flux variables cache
scvfThe sub control volume face

◆ addRobinFluxDerivatives()

template<class TypeTag >
template<class PartialDerivativeMatrices >
void Dumux::RichardsLocalResidual< TypeTag >::addRobinFluxDerivatives ( PartialDerivativeMatrices &  derivativeMatrices,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline

Adds Robin flux derivatives for wetting and nonwetting phase.

Parameters
derivativeMatricesThe matrices containing the derivatives
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curElemVolVarsThe current element volume variables
elemFluxVarsCacheThe element flux variables cache
scvfThe sub control volume face

◆ addSourceDerivatives()

template<class TypeTag >
template<class PartialDerivativeMatrix >
void Dumux::RichardsLocalResidual< TypeTag >::addSourceDerivatives ( PartialDerivativeMatrix &  partialDerivatives,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const VolumeVariables &  curVolVars,
const SubControlVolume &  scv 
) const
inline

Adds source derivatives for wetting and nonwetting phase.

Parameters
partialDerivativesThe partial derivatives
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curVolVarsThe current volume variables
scvThe sub control volume
Todo:
Maybe forward to problem for the user to implement the source derivatives?

◆ addStorageDerivatives()

template<class TypeTag >
template<class PartialDerivativeMatrix >
void Dumux::RichardsLocalResidual< TypeTag >::addStorageDerivatives ( PartialDerivativeMatrix &  partialDerivatives,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const VolumeVariables &  curVolVars,
const SubControlVolume &  scv 
) const
inline

Adds the storage derivative.

Parameters
partialDerivativesThe partial derivatives
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curVolVarsThe current volume variables
scvThe sub control volume

◆ computeFlux()

template<class TypeTag >
NumEqVector Dumux::RichardsLocalResidual< TypeTag >::computeFlux ( const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const SubControlVolumeFace &  scvf,
const ElementFluxVariablesCache &  elemFluxVarsCache 
) const
inline

Evaluates the mass flux over a face of a sub control volume.

Parameters
problemThe problem
elementThe current element.
fvGeometryThe finite-volume geometry
elemVolVarsThe volume variables of the current element
scvfThe sub control volume face to compute the flux on
elemFluxVarsCacheThe cache related to flux compuation

Add advective phase energy fluxes for the water phase only. For isothermal model the contribution is zero.

Add diffusive energy fluxes. For isothermal model the contribution is zero. The effective lambda is averaged over both fluid phases and the solid phase

◆ computeStorage()

template<class TypeTag >
NumEqVector Dumux::RichardsLocalResidual< TypeTag >::computeStorage ( const Problem &  problem,
const SubControlVolume &  scv,
const VolumeVariables &  volVars 
) const
inline

Evaluates the rate of change of all conservation quantites (e.g. phase mass) within a sub-control volume of a finite volume element for the immiscible models.

Parameters
problemThe problem
scvThe sub control volume
volVarsThe current or previous volVars
Note
This function should not include the source and sink terms.
The volVars can be different to allow computing the implicit euler time derivative here

The energy storage in the water, air and solid phase


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