SimPEG.utils.make_property_tensor#
- SimPEG.utils.make_property_tensor(mesh, tensor)[source]#
Construct the physical property tensor.
For a given mesh, the input parameter tensor is a
numpy.ndarray
defining the constitutive relationship (e.g. Ohm’s law) between two discrete vector quantities \(\boldsymbol{j}\) and \(\boldsymbol{e}\) living at cell centers. The function make_property_tensor constructs the property tensor \(\boldsymbol{M}\) for the entire mesh such that:>>> j = M @ e
where the Cartesian components of the discrete vector for are organized according to:
>>> e = np.r_[ex, ey, ez] >>> j = np.r_[jx, jy, jz]
- Parameters
- mesh
discretize.base.BaseMesh
A mesh
- tensor
numpy.ndarray
ora
float
Scalar: A float is entered.
Isotropic: A 1D numpy.ndarray with a property value for every cell.
Anisotropic: A (nCell, dim) numpy.ndarray where each row defines the diagonal-anisotropic property parameters for each cell. nParam = 2 for 2D meshes and nParam = 3 for 3D meshes.
Tensor: A (nCell, nParam) numpy.ndarray where each row defines the full anisotropic property parameters for each cell. nParam = 3 for 2D meshes and nParam = 6 for 3D meshes.
- mesh
- Returns
- (
dim
*n_cells
,dim
*n_cells
)scipy.sparse.coo_matrix
The property tensor.
- (
Notes
The relationship between a quantity and its response to external stimuli (e.g. Ohm’s law) in each cell can be defined by a scalar function \(\sigma\) in the isotropic case, or by a tensor \(\Sigma\) in the anisotropic case, i.e.:
\[\vec{j} = \sigma \vec{e} \;\;\;\;\;\; \textrm{or} \;\;\;\;\;\; \vec{j} = \Sigma \vec{e}\]where
\[\begin{split}\Sigma = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\ \sigma_{xy} & \sigma_{yy} & \sigma_{yz} \\ \sigma_{xz} & \sigma_{yz} & \sigma_{zz} \end{bmatrix}\end{split}\]Examples