ImageD11.stress module#
- class ImageD11.stress.EpsSigSolver(name='default', symmetry=None, stress_unit='GPa', UBI_list=[], unitcell=None, c11=None, c12=None, c13=None, c14=None, c15=None, c16=None, c22=None, c23=None, c24=None, c25=None, c26=None, c33=None, c34=None, c35=None, c36=None, c44=None, c45=None, c46=None, c55=None, c56=None, c66=None)#
Bases:
objectA class to handle strain and stress computations on a list of ubis.
- compute_Deformation_Gradient_Tensors()#
compute the deformation gradient tensor F for all ubis
- Return type:
New instance F_list added to EpsSiSolver, containing a list of F tensors
- compute_principal_components(dname)#
compute principal components resulting from eigen decomposition of the strain / stress tensor for selected data column
dname (str) : name of the input data column
- Returns:
New instances dname+’_eigvals’ , dname+’_eigvecs’ added to EpsSigSolver, containing respectively a list of eigenvalues and eigenvectors
eigvals (1x3 array) (Principal components in decreasing order from the largest positive to largest negative) – for strain : ε1 > ε2 > ε3 (positive strain = elongation) for stress σ3 > σ2 > σ1 (positive stress = tension)
eigvecs (3x3 array) (Normalized principal component vectors by columns sorted accordingly to eigvals)
- convert_tensors_to_vecs(output_format='voigt', debug=0)#
convert strain and stress tensors to 6-component vectors in different possible formats
output_format (str) : select one of the output formats below:
default : e11, e22, e33, e23, e13, e12 | s11, s22, s33, s23, s13, s12 xfab : e11, e12, e13, e22, e23, e33 | s11, s12, s13, s22, s23, s33 mandel : e11, e22, e33, √2.e22, √2.e23, √2.e33 | s11, s22, s33, √2.s22, √2.s23, √2.s33 voigt : e11, e22, e33, 2.e23, 2.e13, 2.e12 | s11, s22, s33, s23, s13, s12
- Returns:
New instances ‘eps_xx_fmt’ and ‘sigma_xx_fmt’ added to EpsSigSolver, containing respectively strain and stress as 6-component vectors
instances names refer explicitely to the format specified in output_format, e.g. esp_Ref_voigt, etc.
- deviatoric_tensors(debug=0)#
compute deviatoric component for all strain and stress tensors lists
- Return type:
New instances ‘eps_xx_d’ and ‘sigma_xx_d’ added to EpsSigSolver, containing lists of deviatoric 3x3 tensors
- form_stiffness_tensor()#
Form the Voigt 6x6 stiffness tensor (Cij) from elastic constants (cij), using the symmetry specified in self.symmetry. By definition, this is only valid for strain in grain coordinates, which must be provided as a 6-component vector in voigt notation (e11, e22, e33, 2.e23, 2.e13, 2.e12). Stress in lab coordinates can be obtained by rotating the 3x3 stress tensor from the grain to the lab coordinate system (see strain2stress_lab for details).
- Returns:
Cij
- Return type:
6x6 matrix containing the elastic components
- invariant_props(dname)#
compute invariant properties for selected data column compute invariant properties for selected data column: volumetric strain / pressure (-I1/3) and von mises strain /stress (√3.J2)
dname (str) : name of the input data column. Must be a non-deviatoric 3x3 tensors
- Returns:
New instances added to EpsSigSolver, containing list of floats
if strain tensor in input
dname+’_vol’ (volumetric strain)
dname+’_vM’ (von Mises strain (√2.J2))
if stress tensor in input
dname+’_P_hyd’ (hydrostatic Pressure (if stress tensor in input))
dname+’_vM’ (von Mises stress (√3.J2))
- loadmap(filename)#
- loadpars(filename=None)#
- property nUBIs#
- savepars(filename=None)#
- strain2stress_Lab(m=1, debug=0)#
Compute elastic strain and stress in Lab coordinates for all ubis, using the stiffness matrix in self.Cij. Computation is done first in the grain coordinate system, and then stress in lab coordinates is obtained by rotating the 3x3 stress tensor from the grain to the lab coordinate system using the following transormation σ’ = RT.σ.R where R is the rotation matrix yielded by the polar decomposition of the finite deformation gradient tensor F.
Returns strain and stress as two lists of 3x3 symmetric tensors ‘eps_Lab’ and ‘sigma_Lab’.
- Parameters:
(float) (m)
detail (for more)
- Return type:
New instances ‘eps_Lab’ and ‘sigma_Lab’ added to EpsSigSolver, containing respectively strain and stress as lists of 3x3 tensors
- strain2stress_Ref(m=1)#
Compute elastic strain and stress in grain reference coordinates for all ubis, using the stiffness matrix in self.Cij. Returns strain and stress as two lists of 3x3 symmetric tensors ‘eps_Ref’ and ‘sigma_Ref’
- Parameters:
(float) (m)
detail (for more)
- Return type:
New instances ‘eps_Ref’ and ‘sigma_Ref’ added to EpsSigSolver, containing respectively strain and stress as lists of 3x3 tensors
- updateparameters()#
- ImageD11.stress.build_6x6_rot_mat(R, tol)#
Return 6x6 transormation matrix corresponding to rotation R for a Voigt 6x6 stiffness tensor
- Parameters:
(array_like) (R)
(float) (tol)
- Returns:
K (array_like) (6x6 transformation matrix for the 6x6 stiffness tensor)
NOTE (K is not a rotation matrix, and unlike R it does not satisfy K.KT = I)
- ImageD11.stress.deviatoric(T, return_iso=False)#
Decompose the strain / stress tensor into an isotropic and a deviatoric component : T = H + D, where H = tr(T) / 3
- Parameters:
(array_like) (T)
(bool) (return_iso)
- Returns:
pi (float) (Hydrostatic strain / stress. Hydrostatic pressure then equals to -Pi)
D (array_like) (3x3 deviatoric tensor.)
- ImageD11.stress.eigen_decomposition(T)#
Compute the norm and orientation of principal components resulting from eigen decomposition of a strain / stress tensor
- Parameters:
(array_like) (T)
- Returns:
eigvals_s (1x3 array) (Principal components values in decreasing order)
eigvecs_s (3x3 array) (Normalized principal component vectors by columns sorted accordingly to eigenvalues)
- ImageD11.stress.full_3x3_to_vector(T, output_format='default', is_strain=True)#
Form a 6 component strain or stress vector from a 3x3 tensor, using specified convention
- Parameters:
(array_like) (T) – [e12 e22 e23] [e13 e23 e33]
(bool) (is_strain)
(str) (output_format)
default (e11, e22, e33, e23, e13, e12 | s11, s22, s33, s23, s13, s12)
xfab (e11, e12, e13, e22, e23, e33 | s11, s12, s13, s22, s23, s33)
mandel (e11, e22, e33, √2.e22, √2.e23, √2.e33 | s11, s22, s33, √2.s22, √2.s23, √2.s33)
voigt (e11, e22, e33, 2.e23, 2.e13, 2.e12 | s11, s22, s33, s23, s13, s12)
- ImageD11.stress.invariants(T)#
Returns the three invariants I1, I2, I3 of a 3x3 tensor
- ImageD11.stress.rotate_3x3_tensor(S, R, tol=1e-06)#
Return 3x3 matrix in rotated coordinate system
- Parameters:
(array_like) (R)
(array_like)
(float) (tol)
- Returns:
S’ (array_like)
- Return type:
S in rotated coordinate system
- ImageD11.stress.vector_to_full_3x3(vec, input_format='default', is_strain=True)#
Reconstruct a 3x3 strain or stress tensor from a 6-component vector, using specified convention
- Parameters:
(array_like) (vec)
(bool) (is_strain)
(str) (input_format)
default (e11, e22, e33, e23, e13, e12 | s11, s22, s33, s23, s13, s12)
xfab (e11, e12, e13, e22, e23, e33 | s11, s12, s13, s22, s23, s33)
mandel (e11, e22, e33, √2.e22, √2.e23, √2.e33 | s11, s22, s33, √2.s22, √2.s23, √2.s33)
voigt (e11, e22, e33, 2.e23, 2.e13, 2.e12 | s11, s22, s33, s23, s13, s12)