version 3.10-dev
Dumux::TwoPIncompressibleLocalResidual< TypeTag > Class Template Reference

Element-wise calculation of the residual and its derivatives for a two-phase, incompressible test problem.

#include <dumux/porousmediumflow/2p/incompressiblelocalresidual.hh>

Inheritance diagram for Dumux::TwoPIncompressibleLocalResidual< TypeTag >:

Public Member Functions

template<class PartialDerivativeMatrix >
void addStorageDerivatives (PartialDerivativeMatrix &partialDerivatives, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const VolumeVariables &curVolVars, const SubControlVolume &scv) const
 Adds storage derivatives for wetting and nonwetting phase. 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 wetting and nonwetting phase 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...
 
NumEqVector computeStorage (const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
 Evaluate 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
 Evaluate the mass flux over a face of a sub control volume. More...
 

Member Function Documentation

◆ addCCDirichletFluxDerivatives()

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

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::TwoPIncompressibleLocalResidual< TypeTag >::addFluxDerivatives ( JacobianMatrix &  A,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline

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

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::TwoPIncompressibleLocalResidual< TypeTag >::addFluxDerivatives ( PartialDerivativeMatrices &  derivativeMatrices,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline

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::TwoPIncompressibleLocalResidual< TypeTag >::addRobinFluxDerivatives ( PartialDerivativeMatrices &  derivativeMatrices,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  curElemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace &  scvf 
) const
inline
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::TwoPIncompressibleLocalResidual< TypeTag >::addSourceDerivatives ( PartialDerivativeMatrix &  partialDerivatives,
const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const VolumeVariables &  curVolVars,
const SubControlVolume &  scv 
) const
inline
Parameters
partialDerivativesThe partial derivatives
problemThe problem
elementThe element
fvGeometryThe finite volume element geometry
curVolVarsThe current volume variables
scvThe sub control volume

◆ addStorageDerivatives()

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

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

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::ImmiscibleLocalResidual< TypeTag >::computeFlux ( const Problem &  problem,
const Element &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const SubControlVolumeFace &  scvf,
const ElementFluxVariablesCache &  elemFluxVarsCache 
) const
inlineinherited
Parameters
problemThe problem
elementThe element
fvGeometryThe finite volume geometry context
elemVolVarsThe volume variables for all flux stencil elements
scvfThe sub control volume face to compute the flux on
elemFluxVarsCacheThe cache related to flux computation

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

Add diffusive energy fluxes. For isothermal model the contribution is zero.

◆ computeStorage()

template<class TypeTag >
NumEqVector Dumux::ImmiscibleLocalResidual< TypeTag >::computeStorage ( const Problem &  problem,
const SubControlVolume &  scv,
const VolumeVariables &  volVars 
) const
inlineinherited
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 fluid phase with index phaseIdx

The energy storage in the solid matrix


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