Construct of stiffness tensor from a (6,6) matrix.
The input matrix must be symmetric, otherwise an error is thrown (except if check_symmetry==False, see below)
Parameters:
M (np.ndarray) – (6,6) matrix corresponding to the stiffness tensor, written using the Voigt notation, or array of shape
(3,3,3,3).
phase_name (str, default None) – Name to display
symmetry (str, default Triclinic) – Name of the crystal’s symmetry
check_symmetry (bool, optional) – Whether to check or not that the input matrix is symmetric.
force_symmetry (bool, optional) – If true, the major symmetry of the tensor is forces
mapping (str or MappingConvention) – mapping convention to use. Default is VoigtMapping.
Notes
The units used when building the stiffness tensor are up to the user (GPa, MPa, psi etc.). Therefor, the
results you will get when performing operations (Young’s modulus, “product” with strain tensor etc.) will be
consistent with these units. For instance, if the stiffness tensor is defined in GPa, the computed stress will
be given in GPa as well.
Compute the (Voigt-Reuss-)Hill average of the stiffness tensor. If the tensor contains no orientation, we assume
isotropic behaviour. Otherwise, the mean is computed over all orientations.
Parameters:
axis (int, optional) – If provided, axis to compute the average along with. If none, the average is computed on the flattened array
Compute the Reuss average of the stiffness tensor. If the tensor contains no orientation, we assume isotropic
behaviour. Otherwise, the mean is computed over all orientations.
Parameters:
axis (int, optional) – If provided, axis to compute the average along with. If none, the average is computed on the flattened array
Create an isotropic stiffness tensor from two elasticity coefficients, namely: E, nu, G, lame1, or lame2.
Exactly two of these coefficients must be provided. Note that lame2 is just an alias for G.
Parameters:
E (float, None) – Young modulus
nu (float, None) – Poisson ratio
G (float, None) – Shear modulus
lame1 (float, None) – First Lamé coefficient
lame2 (float, None) – Second Lamé coefficient (alias for G)
The units you use when passing the elastic moduli must be consistent with that of the stress tensor. For
instance, if you expect to work in MPa, the Young’s modulus and the Lamé’s coefficient must be given in MPa as
well.
Examples
On can check that the shear modulus for steel is around 82 GPa:
Create a fourth-order tensor from monoclinic symmetry. It automatically detects whether the components are given
according to the Y or Z diad, depending on the input arguments.
For Diad || y, S15, S25, S35 and S46 must be provided.
For Diad || z, S16, S26, S36 and S45 must be provided.
Parameters:
S11 (float) – Components of the tensor, using the Voigt notation
S12 (float) – Components of the tensor, using the Voigt notation
S13 (float) – Components of the tensor, using the Voigt notation
S22 (float) – Components of the tensor, using the Voigt notation
S23 (float) – Components of the tensor, using the Voigt notation
S33 (float) – Components of the tensor, using the Voigt notation
S44 (float) – Components of the tensor, using the Voigt notation
S55 (float) – Components of the tensor, using the Voigt notation
S66 (float) – Components of the tensor, using the Voigt notation
S15 (float, optional) – S15 component of the tensor (if Diad || y)
S25 (float, optional) – S25 component of the tensor (if Diad || y)
S35 (float, optional) – S35 component of the tensor (if Diad || y)
S46 (float, optional) – S46 component of the tensor (if Diad || y)
S16 (float, optional) – S16 component of the tensor (if Diad || z)
S26 (float, optional) – S26 component of the tensor (if Diad || z)
S36 (float, optional) – S36 component of the tensor (if Diad || z)
S45 (float, optional) – S45 component of the tensor (if Diad || z)
where \(\varepsilon_{jj}\) denotes the (compressive) longitudinal strain along the j-th direction. If
\(E_x\) and \(E_y\) are the Young moduli along x and y, we have:
where \(\varepsilon_{jj}\) denotes the (compressive) longitudinal strain along the j-th direction. If
\(E_x\) and \(E_y\) are the Young moduli along x and y, we have:
Class for manipulating fourth-order stiffness tensors.
Construct of stiffness tensor from a (6,6) matrix.
The input matrix must be symmetric, otherwise an error is thrown (except if check_symmetry==False, see below)
Parameters:
M (np.ndarray) – (6,6) matrix corresponding to the stiffness tensor, written using the Voigt notation, or array of shape
(3,3,3,3).
phase_name (str, default None) – Name to display
symmetry (str, default Triclinic) – Name of the crystal’s symmetry
check_symmetry (bool, optional) – Whether to check or not that the input matrix is symmetric.
force_symmetry (bool, optional) – If true, the major symmetry of the tensor is forces
mapping (str or MappingConvention) – mapping convention to use. Default is VoigtMapping.
Notes
The units used when building the stiffness tensor are up to the user (GPa, MPa, psi etc.). Therefor, the
results you will get when performing operations (Young’s modulus, “product” with strain tensor etc.) will be
consistent with these units. For instance, if the stiffness tensor is defined in GPa, the computed stress will
be given in GPa as well.
Compute the (Voigt-Reuss-)Hill average of the stiffness tensor. If the tensor contains no orientation, we assume
isotropic behaviour. Otherwise, the mean is computed over all orientations.
Parameters:
axis (int, optional) – If provided, axis to compute the average along with. If none, the average is computed on the flattened array
Compute the Reuss average of the stiffness tensor. If the tensor contains no orientation, we assume isotropic
behaviour. Otherwise, the mean is computed over all orientations.
Parameters:
axis (int, optional) – If provided, axis to compute the average along with. If none, the average is computed on the flattened array
Compute the Zener ratio (Z). Only valid for cubic symmetry.
This function first checks that the tensor has cubic symmetry within a given tolerance. If not, an error is
raised.
Parameters:
tol (float, optional) – Tolerance to consider that the material has cubic symmetry
Returns:
Zener ratio (NaN is the symmetry is not cubic)
Return type:
float
Notes
If the tensor is written in canonical base with Voigt mapping, the Zener ratio is defined as:
\[Z=\frac{ 2C_{44} }{C_{11} - C_{12}}\]
The present implementation takes advantage of eigenstiffness to compute the Zener ratio in any base, i.e. even
if the tensor is not given in canonical base (e.g. if rotated).
Create a fourth-order tensor from limited number of components, taking advantage of crystallographic symmetries
Parameters:
symmetry (str, default Triclinic) – Name of the crystallographic symmetry
point_group (str) – Point group of the considered crystal. Only used (and mandatory) for tetragonal and trigonal symmetries.
diad (str {'x', 'y'}, default 'x') – Alignment convention. Sets whether x||a or y||b. Only used for monoclinic symmetry.
phase_name (str, default None) – Name to use when printing the tensor
prefix (str, default None) – Define the prefix to use when providing the components. By default, it is ‘C’ for stiffness tensors, ‘S’ for
compliance.
kwargs – Keywords describing all the necessary components, depending on the crystal’s symmetry and the type of tensor.
For Stiffness, they should be named as ‘Cij’ (e.g. C11=…, C12=…).
For Comliance, they should be named as ‘Sij’ (e.g. S11=…, S12=…).
See examples below. The behaviour can be overriten with the prefix option (see above)
Import stiffness tensor(s) from the Materials Project API, given their material ids.
You need to register to https://materialsproject.org first to get an API key. This key can be explicitly
passed as an argument (see below), or provided as an environment variable named MP_API_KEY.
Parameters:
ids (str or list of str) – ID(s) of the material to import (e.g. “mp-1048”)
api_key (str, optional) – API key to the Materials Project API. If not provided, it should be available as the API_KEY environment
variable.
Returns:
If one of the requested material ids was not found, the corresponding value in the list will be None.
Check that the tensor corresponds to cubic symmetry, within a given tolerance.
The method relies on the multiplicity of eigenstiffnesses.
Parameters:
tol (float, optional) – Absolute tolerance to consider multiplicity of eigenstiffnesses
Returns:
If the tensor is single, the returned value is boolean.
If the object is a tensor array, the returned value is an array of bools, the same shape as the tensor array.
Check that the tensor corresponds to isotropic symmetry, within a given tolerance.
The method relies on the multiplicity of eigenstiffnesses
Parameters:
tol (float) – Absolute tolerance to consider multiplicity of eigenstiffnesses
Returns:
If the tensor is single, the returned value is boolean.
If the object is a tensor array, the returned value is an array of bools, the same shape as the tensor array.
Check that the tensor corresponds to tetragonal symmetry, within a given tolerance.
The method relies on the multiplicity of eigenstiffnesses.
Parameters:
tol (float) – Absolute tolerance to consider multiplicity of eigenstiffnesses
Returns:
If the tensor is single, the returned value is boolean.
If the object is a tensor array, the returned value is an array of bools, the same shape as the tensor array.
Create an isotropic stiffness tensor from two elasticity coefficients, namely: E, nu, G, lame1, or lame2.
Exactly two of these coefficients must be provided. Note that lame2 is just an alias for G.
Parameters:
E (float, None) – Young modulus
nu (float, None) – Poisson ratio
G (float, None) – Shear modulus
lame1 (float, None) – First Lamé coefficient
lame2 (float, None) – Second Lamé coefficient (alias for G)
The units you use when passing the elastic moduli must be consistent with that of the stress tensor. For
instance, if you expect to work in MPa, the Young’s modulus and the Lamé’s coefficient must be given in MPa as
well.
Examples
On can check that the shear modulus for steel is around 82 GPa:
Create a fourth-order tensor from monoclinic symmetry. It automatically detects whether the components are given
according to the Y or Z diad, depending on the input arguments.
For Diad || y, C15, C25, C35 and C46 must be provided.
For Diad || z, C16, C26, C36 and C45 must be provided.
Parameters:
C11 (float) – Components of the tensor, using the Voigt notation
C12 (float) – Components of the tensor, using the Voigt notation
C13 (float) – Components of the tensor, using the Voigt notation
C22 (float) – Components of the tensor, using the Voigt notation
C23 (float) – Components of the tensor, using the Voigt notation
C33 (float) – Components of the tensor, using the Voigt notation
C44 (float) – Components of the tensor, using the Voigt notation
C55 (float) – Components of the tensor, using the Voigt notation
C66 (float) – Components of the tensor, using the Voigt notation
C15 (float, optional) – C15 component of the tensor (if Diad || y)
C25 (float, optional) – C25 component of the tensor (if Diad || y)
C35 (float, optional) – C35 component of the tensor (if Diad || y)
C46 (float, optional) – C46 component of the tensor (if Diad || y)
C16 (float, optional) – C16 component of the tensor (if Diad || z)
C26 (float, optional) – C26 component of the tensor (if Diad || z)
C36 (float, optional) – C36 component of the tensor (if Diad || z)
C45 (float, optional) – C45 component of the tensor (if Diad || z)
where \(\varepsilon_{jj}\) denotes the (compressive) longitudinal strain along the j-th direction. If
\(E_x\) and \(E_y\) are the Young moduli along x and y, we have:
where \(\varepsilon_{jj}\) denotes the (compressive) longitudinal strain along the j-th direction. If
\(E_x\) and \(E_y\) are the Young moduli along x and y, we have:
Computes the Christoffel tensor along a given direction
Returns:
c_p (SphericalFunction) – Velocity of the primary (compressive) wave
c_s1 (SphericalFunction) – Velocity of the fast secondary (shear) wave
c_s2 (SphericalFunction) – Velocity of the slow secondary (shear) wave
Notes
The estimation of the wave velocities is made by finding the eigenvalues of the Christoffel tensor [2].
One should double-check the units. The table below provides hints about the unit you get, depending on the units
you use for stiffness and the mass density: