A cell-centered finite volume scheme with two-point flux approximation. More...
We continue from the introduction to Cell-centered Finite Volume Methods using as an example the following scalar elliptic problem for the unknown \(u\),
\begin{equation} \begin{aligned} \nabla \cdot \left( - \boldsymbol{\Lambda} \nabla u \right) &= q &&\mathrm{in} \, \Omega \\ \left( - \boldsymbol{\Lambda} \nabla u \right) \cdot \boldsymbol{n} &= v_N &&\mathrm{on} \, \Gamma_N \\ u &= u_D &&\mathrm{on} \, \Gamma_D, \label{eq:elliptic} \end{aligned} \end{equation}
and recall that after integration of the governing equation over a control volume \(K\) and application of the divergence theorem, we replace exact fluxes by numerical approximations \(F_{K, \sigma} \approx \int_{\sigma} \left( - \boldsymbol{\Lambda}_K \nabla u \right) \cdot \boldsymbol{n} \mathrm{d} \Gamma\).
The linear two-point flux approximation is a simple but robust cell-centered finite-volume scheme, which is commonly used in commercial software. The scheme can be derived by using the co-normal decomposition, which reads
\begin{equation} \boldsymbol{\Lambda}_K \boldsymbol{n}_{K, \sigma} = t_{K,\sigma} \boldsymbol{d}_{K,\sigma} + \boldsymbol{d}^{\bot}_{K,\sigma}, \quad t_{K,\sigma} = \frac{\boldsymbol{n}_{K, \sigma}^T \boldsymbol{\Lambda}_K \boldsymbol{d}_{K,\sigma} }{\boldsymbol{d}_{K,\sigma}^T \boldsymbol{d}_{K,\sigma}}, \; \boldsymbol{d}^{\bot}_{K,\sigma} = \boldsymbol{\Lambda}_K \boldsymbol{n}_{K, \sigma} - t_{K,\sigma} \boldsymbol{d}_{K,\sigma}, \label{eq:conormalDecTpfa} \end{equation}
with the tensor \(\boldsymbol{\Lambda}_K\) associated with control volume \(K\), the distance vector \(\boldsymbol{d}_{K,\sigma} := \boldsymbol{x}_\sigma - \boldsymbol{x}_K\) and \(\boldsymbol{d}_{K,\sigma}^T \boldsymbol{d}^{\bot}_{K,\sigma} = 0\) (orthogonality). The same can be done for the conormal \(\boldsymbol{\Lambda}_L \boldsymbol{n}_{L, \sigma}\). The \(t_{K,\sigma}\) and \(t_{L,\sigma}\) are the transmissibilities associated with the face \(\sigma\). These transmissibilities are calculated in DuMux with the free function Dumux::computeTpfaTransmissibility.
With the introduced notation, it follows that for each cell \(K\) and face \(\sigma\)
\begin{equation} \nabla u \cdot \boldsymbol{\Lambda}_K \boldsymbol{n}_{K, \sigma} = t_{K,\sigma} \nabla u \cdot \boldsymbol{d}_{K,\sigma} + \nabla u \cdot \boldsymbol{d}^{\bot}_{K,\sigma}. \end{equation}
For the Tpfa scheme, the second part in the above equation is neglected. By using the fact that \(\nabla u \cdot \boldsymbol{d}_{K,\sigma} \approx u_\sigma - u_K\), the discrete fluxes for face \(\sigma\) are given by
\begin{equation} F_{K,\sigma} = -\vert{\sigma}\vert t_{K,\sigma} (u_\sigma - u_K), \qquad F_{L,\sigma} = -\vert{\sigma}\vert t_{L,\sigma} (u_\sigma - u_L). \end{equation}
Enforcing local flux conservation, i.e. \(F_{K,\sigma}+F_{L,\sigma}=0\), results in
\begin{equation} u_\sigma = \frac{t_{K,\sigma} u_K + t_{L,\sigma} u_L}{t_{K,\sigma} + t_{L,\sigma}}. \end{equation}
With this, the fluxes \(F_{K,\sigma}\) are rewritten as
\begin{equation} F_{K,\sigma} = \vert{\sigma}\vert \frac{t_{K,\sigma} t_{L,\sigma}}{t_{K,\sigma} + t_{L,\sigma}} (u_K - u_L), \quad F_{L,\sigma} = \vert{\sigma}\vert \frac{t_{K,\sigma} t_{L,\sigma}}{t_{K,\sigma} + t_{L,\sigma}} (u_L - u_K). \label{eq:TPFAFlux} \end{equation}
By neglecting the orthogonal term, the consistency of the scheme is lost for general grids, where \(\nabla u \cdot \boldsymbol{d}^{\bot}_{K,\sigma} \not = 0\). The consistency is achieved only for so-called K-orthogonal grids for which \(\boldsymbol{d}^{\bot}_{K,\sigma} = 0\). For such grids we deduce that
\begin{equation} \frac{t_{K,\sigma} t_{L,\sigma}}{t_{K,\sigma} + t_{L,\sigma}} = \frac{\tau_{K,\sigma} \tau_{L,\sigma}}{\tau_{K,\sigma} d_{L,\sigma} + \tau_{L,\sigma} d_{K,\sigma}}, \end{equation}
with \(\tau_{K,\sigma} := \boldsymbol{n}_{K, \sigma} \boldsymbol{\Lambda}_K\boldsymbol{n}_{K, \sigma}, \tau_{L,\sigma} := \boldsymbol{n}_{L, \sigma} \boldsymbol{\Lambda}_L\boldsymbol{n}_{L, \sigma}\), \(d_{K,\sigma}:= \boldsymbol{n}_{K, \sigma} \cdot \boldsymbol{d}_{K, \sigma}\), and \(d_{L,\sigma}:= \boldsymbol{n}_{L, \sigma} \cdot \boldsymbol{d}_{L, \sigma}\). This reduces, for the case of scalar permeability, to a distance weighted harmonic averaging of permeabilities.
Files | |
file | tpfa/computetransmissibility.hh |
Free functions to evaluate the transmissibilities associated with flux evaluations across sub-control volume faces in the context of the cell-centered TPFA scheme. | |
file | discretization/cellcentered/tpfa/elementfluxvariablescache.hh |
The flux variables caches for an element. | |
file | cellcentered/tpfa/elementvolumevariables.hh |
The local (stencil) volume variables class for cell centered tpfa models. | |
file | discretization/cellcentered/tpfa/fvelementgeometry.hh |
Stencil-local finite volume geometry (scvs and scvfs) for cell-centered TPFA models This builds up the sub control volumes and sub control volume faces for each element in the local scope we are restricting to, e.g. stencil or element. | |
file | discretization/cellcentered/tpfa/fvgridgeometry.hh |
The finite volume geometry (scvs and scvfs) for cell-centered TPFA models on a grid view This builds up the sub control volumes and sub control volume faces for each element of the grid partition. | |
file | discretization/cellcentered/tpfa/gridfluxvariablescache.hh |
Flux variable caches on a gridview. | |
file | cellcentered/tpfa/gridvolumevariables.hh |
The grid volume variables class for cell centered tpfa models. | |
file | discretization/cellcentered/tpfa/subcontrolvolumeface.hh |
The sub control volume face. | |
Classes | |
class | Dumux::CCTpfaElementFluxVariablesCache< GFVC, cachingEnabled > |
The flux variables caches for an element. More... | |
class | Dumux::CCTpfaElementFluxVariablesCache< GFVC, true > |
The flux variables caches for an element with caching enabled. More... | |
class | Dumux::CCTpfaElementFluxVariablesCache< GFVC, false > |
The flux variables caches for an element with caching disabled. More... | |
class | Dumux::CCTpfaElementVolumeVariables< GVV, cachingEnabled > |
The local (stencil) volume variables class for cell centered tpfa models. More... | |
class | Dumux::CCTpfaElementVolumeVariables< GVV, true > |
The local (stencil) volume variables class for cell centered tpfa models with caching. More... | |
class | Dumux::CCTpfaElementVolumeVariables< GVV, false > |
The local (stencil) volume variables class for cell centered tpfa models with caching. More... | |
class | Dumux::CCTpfaFVElementGeometry< GG, enableGridGeometryCache > |
Stencil-local finite volume geometry (scvs and scvfs) for cell-centered TPFA models This builds up the sub control volumes and sub control volume faces for each element in the local scope we are restricting to, e.g. stencil or element. More... | |
class | Dumux::CCTpfaFVElementGeometry< GG, true > |
Stencil-local finite volume geometry (scvs and scvfs) for cell-centered TPFA models Specialization for grid caching enabled. More... | |
class | Dumux::CCTpfaFVElementGeometry< GG, false > |
Stencil-local finite volume geometry (scvs and scvfs) for cell-centered TPFA models Specialization for grid caching disabled. More... | |
struct | Dumux::CCTpfaDefaultGridGeometryTraits< GridView, MapperTraits > |
The default traits for the tpfa finite volume grid geometry Defines the scv and scvf types and the mapper types. More... | |
class | Dumux::CCTpfaFVGridGeometry< GridView, enableGridGeometryCache, Traits > |
The finite volume geometry (scvs and scvfs) for cell-centered TPFA models on a grid view This builds up the sub control volumes and sub control volume faces. More... | |
class | Dumux::CCTpfaFVGridGeometry< GV, true, Traits > |
The finite volume geometry (scvs and scvfs) for cell-centered TPFA models on a grid view This builds up the sub control volumes and sub control volume faces. More... | |
class | Dumux::CCTpfaFVGridGeometry< GV, false, Traits > |
The finite volume geometry (scvs and scvfs) for cell-centered TPFA models on a grid view This builds up the sub control volumes and sub control volume faces. More... | |
struct | Dumux::CCTpfaDefaultGridFVCTraits< P, FVC, FVCF > |
Flux variable caches traits. More... | |
class | Dumux::CCTpfaGridFluxVariablesCache< Problem, FluxVariablesCache, FluxVariablesCacheFiller, EnableGridFluxVariablesCache, Traits > |
Flux variable caches on a gridview. More... | |
class | Dumux::CCTpfaGridFluxVariablesCache< P, FVC, FVCF, true, TheTraits > |
Flux variable caches on a gridview with grid caching enabled. More... | |
class | Dumux::CCTpfaGridFluxVariablesCache< P, FVC, FVCF, false, TheTraits > |
Flux variable caches on a gridview with grid caching disabled. More... | |
class | Dumux::CCTpfaGridVolumeVariables< Problem, VolumeVariables, cachingEnabled, Traits > |
Base class for the grid volume variables. More... | |
struct | Dumux::CCTpfaDefaultScvfGeometryTraits< GridView > |
Default traits class to be used for the sub-control volume faces for the cell-centered finite volume scheme using TPFA. More... | |
class | Dumux::CCTpfaSubControlVolumeFace< GV, T > |
The sub control volume face. More... | |
Functions | |
template<class FVElementGeometry , class Tensor > | |
Tensor::field_type | Dumux::computeTpfaTransmissibility (const FVElementGeometry &fvGeometry, const typename FVElementGeometry::SubControlVolumeFace &scvf, const typename FVElementGeometry::SubControlVolume &scv, const Tensor &T, typename FVElementGeometry::SubControlVolume::Traits::Scalar extrusionFactor) |
Free function to evaluate the Tpfa transmissibility associated with the flux (in the form of flux = T*gradU) across a sub-control volume face stemming from a given sub-control volume with corresponding tensor T. More... | |
template<class FVElementGeometry , class Tensor , typename std::enable_if_t< Dune::IsNumber< Tensor >::value, int > = 0> | |
Tensor | Dumux::computeTpfaTransmissibility (const FVElementGeometry &fvGeometry, const typename FVElementGeometry::SubControlVolumeFace &scvf, const typename FVElementGeometry::SubControlVolume &scv, Tensor t, typename FVElementGeometry::SubControlVolumeFace::Traits::Scalar extrusionFactor) |
Free function to evaluate the Tpfa transmissibility associated with the flux (in the form of flux = T*gradU) across a sub-control volume face stemming from a given sub-control volume for the case where T is just a scalar. More... | |
Tensor::field_type Dumux::computeTpfaTransmissibility | ( | const FVElementGeometry & | fvGeometry, |
const typename FVElementGeometry::SubControlVolumeFace & | scvf, | ||
const typename FVElementGeometry::SubControlVolume & | scv, | ||
const Tensor & | T, | ||
typename FVElementGeometry::SubControlVolume::Traits::Scalar | extrusionFactor | ||
) |
fvGeometry | The element-centered control volume geometry |
scvf | The sub-control volume face |
scv | The neighboring sub-control volume |
T | The tensor living in the neighboring scv |
extrusionFactor | The extrusion factor of the scv |
Tensor Dumux::computeTpfaTransmissibility | ( | const FVElementGeometry & | fvGeometry, |
const typename FVElementGeometry::SubControlVolumeFace & | scvf, | ||
const typename FVElementGeometry::SubControlVolume & | scv, | ||
Tensor | t, | ||
typename FVElementGeometry::SubControlVolumeFace::Traits::Scalar | extrusionFactor | ||
) |
fvGeometry | The element-centered control volume geometry |
scvf | The sub-control volume face |
scv | The neighboring sub-control volume |
t | The scalar quantity living in the neighboring scv |
extrusionFactor | The extrusion factor of the scv |