The equistress
module
Equivalent Stresses
Library to calculate the equivalent stress values of a FEM stress tensor.
By now the following calculation methods are implemented:
Principal stresses
Maximum principal stress
Minimum principal stress
Absolute maximum principal stress
Von Mises
Signed von Mises, sign from trace
Signed von Mises, sign from absolute maximum principal stress
Tresca
Signed Tresca, sign from trace
Signed Tresca, sign from absolute maximum principal stress
- pylife.stress.equistress.abs_max_principal(s11, s22, s33, s12, s13, s23)[source]
Calculate absolute maximum principal stress (maximum of absolute eigenvalues with corresponding sign).
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Absolute maximum principal stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.eigenval(s11, s22, s33, s12, s13, s23)[source]
Calculate eigenvalues of a symmetric 3D tensor.
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Array containing eigenvalues sorted in ascending order. Shape is (length of components, 3) or simply 3 if components are single values.
- Return type:
- pylife.stress.equistress.max_principal(s11, s22, s33, s12, s13, s23)[source]
Calculate maximum principal stress (maximum of eigenvalues).
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Maximum principal stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.min_principal(s11, s22, s33, s12, s13, s23)[source]
Calculate minimum principal stress (minimum of eigenvalues).
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Minimum principal stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.mises(s11, s22, s33, s12, s13, s23)[source]
Calculate equivalent stress according to von Mises.
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Von Mises equivalent stress. Shape is the same as the components.
- Return type:
- Raises:
AssertionError – Components’ shape is not consistent.
- pylife.stress.equistress.principals(s11, s22, s33, s12, s13, s23)[source]
Calculate all principal stress components (eigenvalues).
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
All principal stresses. Shape (…, 3).
- Return type:
- pylife.stress.equistress.signed_mises_abs_max_principal(s11, s22, s33, s12, s13, s23)[source]
Calculate equivalent stress according to von Mises, signed with the sign of the absolute maximum principal stress.
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Signed von Mises equivalent stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.signed_mises_trace(s11, s22, s33, s12, s13, s23)[source]
Calculate equivalent stress according to von Mises, signed with the sign of the trace (i.e s11 + s22 + s33).
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Signed von Mises equivalent stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.signed_tresca_abs_max_principal(s11, s22, s33, s12, s13, s23)[source]
Calculate equivalent stress according to Tresca, signed with the sign of the absolute maximum principal stress.
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Signed Tresca equivalent stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.signed_tresca_trace(s11, s22, s33, s12, s13, s23)[source]
Calculate equivalent stress according to Tresca, signed with the sign of the trace (i.e s11 + s22 + s33).
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Signed Tresca equivalent stress. Shape is the same as the components.
- Return type:
- pylife.stress.equistress.tresca(s11, s22, s33, s12, s13, s23)[source]
Calculate equivalent stress according to Tresca.
- Parameters:
s11 (array_like) – Component 11 of 3D tensor.
s22 (array_like) – Component 22 of 3D tensor.
s33 (array_like) – Component 33 of 3D tensor.
s12 (array_like) – Component 12 of 3D tensor.
s13 (array_like) – Component 13 of 3D tensor.
s23 (array_like) – Component 23 of 3D tensor.
- Returns:
Equivalent Tresca stress. Shape is the same as the components.
- Return type: