TransTpfa_impl.hpp File Reference
Include dependency graph for TransTpfa_impl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Dune
 
 Opm
 
 Opm::UgGridHelpers
 

Functions

int Opm::UgGridHelpers::dimensions (const Dune::CpGrid &)
 
double Opm::UgGridHelpers::faceArea (const Dune::CpGrid &, int)
 
template<class Grid >
void tpfa_htrans_compute (const Grid *G, const double *perm, double *htrans)
 
template<class Grid >
void tpfa_trans_compute (const Grid *G, const double *htrans, double *trans)
 
template<class Grid >
void tpfa_eff_trans_compute (const Grid *G, const double *totmob, const double *htrans, double *trans)
 

Function Documentation

template<class Grid >
void tpfa_eff_trans_compute ( const Grid *  G,
const double *  totmob,
const double *  htrans,
double *  trans 
)

Calculate effective two-point transmissibilities from one-sided, total mobility weighted, transmissibilities.

Specifically, compute the following product

\[ \mathsf{T}_f = \big(\frac{1}{\lambda_1t_1} + \frac{1}{\lambda_2t_2}\big)^{-1} = \lambda_1\lambda_2 \frac{t_1t_2}{t_1 + t_2} \]

in which $t_1$ and $t_2$ are the one-sided, static transmissibility values connecting the cells of face f and $\lambda_1$ and $\lambda_2$ denote the total mobilities of the respective cells.

Parameters
[in]GGrid.
[in]totmobTotal mobilities. One positive scalar value for each cell.
[in]htransOne-sided transmissibilities as defined by function tpfa_htrans_compute().
[out]transEffective, two-point transmissibilities. Array of size at least numFaces(G).

References Opm::UgGridHelpers::cell2Faces(), Opm::UgGridHelpers::numCells(), and Opm::UgGridHelpers::numFaces().

template<class Grid >
void tpfa_htrans_compute ( const Grid *  G,
const double *  perm,
double *  htrans 
)

Calculate static, one-sided transmissibilities for use in the two-point flux approximation method.

The one-sided transmissibilities are defined by the formula

\[ t_i = \frac{\vec{n}_f \mathsf{K}_c \vec{c}_c}{\lVert \vec{c}_c \rVert^2} \]

in which i is the half-face index corresponding to the cell-face index pair (c,f) and $\vec{c}_{cf} = \Bar{x}_f - \Bar{x}_c$ is the centroid difference vector.

Parameters
[in]GGrid.
[in]permPermeability. One symmetric, positive definite tensor per grid cell.
[out]htransOne-sided transmissibilities. Array of size at least G->cell_facepos[ G->number_of_cells ].

References Opm::UgGridHelpers::beginCellCentroids(), Opm::UgGridHelpers::cell2Faces(), dgemv_(), Opm::UgGridHelpers::dimensions(), Opm::UgGridHelpers::faceCells(), Opm::UgGridHelpers::faceCentroid(), Opm::UgGridHelpers::faceNormal(), Opm::UgGridHelpers::getCoordinate(), Opm::UgGridHelpers::increment(), MAT_SIZE_T, and Opm::UgGridHelpers::numCells().

template<class Grid >
void tpfa_trans_compute ( const Grid *  G,
const double *  htrans,
double *  trans 
)

Compute two-point transmissibilities from one-sided transmissibilities.

The two-point transmissibilities are given by the simple, near-harmonic average (save a factor of two)

\[ \mathsf{T}_f = \big(\frac{1}{t_1} + \frac{1}{t_2}\big)^{-1} = \frac{t_1t_2}{t_1 + t_2} \]

in which $t_1$ and $t_2$ are the one-sided transmissibilities that connect the neighbouring cells of face f.

Parameters
[in]GGrid.
[in]htransOne-sided transmissibilities as defined by function tpfa_htrans_compute().
[out]transInterface, two-point transmissibilities. Array of size at least numFaces(G).

References Opm::UgGridHelpers::cell2Faces(), Opm::UgGridHelpers::numCells(), and Opm::UgGridHelpers::numFaces().