porepy.numerics.fv.tpfa module

The module contains an implementation of the finite volume two-point flux approximation scheme. The implementation resides in the class Tpfa.

class Tpfa(keyword)[source]

Bases: FVElliptic

Discretize elliptic equations by a two-point flux approximation.

Attributes:

keywordstr

Which keyword is the solver intended flow. Will determine which data will be accessed (e.g. flow specific, or conductivity / heat-related). See Data class for more details. Defaults to flow.

Parameters

keyword (str) –

discretize(sd, data)[source]

Discretize the second order elliptic equation using two-point flux approximation.

The method computes fluxes over faces in terms of pressures in adjacent cells (defined as the two cells sharing the face).

We assume the following two sub-dictionaries to be present in the data dictionary:

parameter_dictionary, storing all parameters.

Stored in data[pp.PARAMETERS][self.keyword].

matrix_dictionary, for storage of discretization matrices.

Stored in data[pp.DISCRETIZATION_MATRICES][self.keyword]

parameter_dictionary contains the entries:
second_order_tensor(SecondOrderTensor) Permeability defined

cell-wise. This is the effective permeability, any scaling by for instance apertures should be incorporated before calling this function.

bc : (BoundaryCondition) boundary conditions ambient_dimension: (int) Optional. Ambient dimension, used in the

discretization of vector source terms. Defaults to the dimension of the grid.

matrix_dictionary will be updated with the following entries:
flux: sps.csc_matrix (sd.num_faces, sd.num_cells)

flux discretization, cell center contribution

bound_flux: sps.csc_matrix (sd.num_faces, sd.num_faces)

flux discretization, face contribution

bound_pressure_cell: sps.csc_matrix (sd.num_faces, sd.num_cells)

Operator for reconstructing the pressure trace. Cell center contribution

bound_pressure_face: sps.csc_matrix (sd.num_faces, sd.num_faces)

Operator for reconstructing the pressure trace. Face contribution

vector_source: sps.csc_matrix (sd.num_faces)

discretization of flux due to vector source, e.g. gravity. Face contribution. Active only if vector_source = True, and only for 1D.

Hidden option (intended as “advanced” option that one should normally not care about):

Half transmissibility calculation according to Ivar Aavatsmark, see folk.uib.no/fciia/elliptisk.pdf. Activated by adding the entry Aavatsmark_transmissibilities: True to the data dictionary.

Parametrs:

sd (pp.Grid): Grid with geometry fields computed. data (dict): For entries, see above.

Parameters
Return type

None