porepy.params.tensor module
The tensor module contains classes for second and fourth order tensors, intended e.g. for representation of permeability and stiffness, respectively.
- class FourthOrderTensor(mu, lmbda, phi=None)[source]
Bases:
object
Cell-wise representation of fourth order tensor, represented by (3^2, 3^2 ,Nc)-array, where Nc denotes the number of cells, i.e. the tensor values are stored discretely.
For each cell, there are dim^4 degrees of freedom, stored in a 3^2 * 3^2 matrix (exactly how to convert between 2D and 4D matrix is not clear to me a the moment, but in practise there is sufficient symmetry in the tensors for the question to be irrelevant).
The only constructor available for the moment is based on the Lame parameters, e.g. using two degrees of freedom. A third parameter phi is also present, but this has never been used.
Primary usage for the class is for mpsa discretizations. Other applications have not been tested.
- Parameters
mu (np.ndarray) –
lmbda (np.ndarray) –
phi (Optional[np.ndarray]) –
- values
dimensions (3^2, 3^2, nc), cell-wise representation of the stiffness matrix.
- Type
- lmbda
Nc array of first Lame parameter
- Type
np.ndarray
- mu
Nc array of second Lame parameter
- Type
np.ndarray
- class SecondOrderTensor(kxx, kyy=None, kzz=None, kxy=None, kxz=None, kyz=None)[source]
Bases:
object
Cell-wise permeability represented by (3, 3, Nc)-array, where Nc denotes the number of cells, i.e. the tensor values are stored discretely.
The permeability is always 3-dimensional (since the geometry is always 3D), however, 1D and 2D problems are accommodated by assigning unit values to kzz and kyy, and no cross terms.
- Parameters
kxx (np.ndarray) –
kyy (Optional[np.ndarray]) –
kzz (Optional[np.ndarray]) –
kxy (Optional[np.ndarray]) –
kxz (Optional[np.ndarray]) –
kyz (Optional[np.ndarray]) –