The equistress module#
Calculate 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
- class pylife.stress.equistress.StressTensorEquistress(pandas_obj)[source]#
Accessor for equivalent stresses of a Voigt stress tensor.
- Parameters:
pandas_obj (pandas.DataFrame) – The Voigt stress tensor with the columns
S11,S22,S33,S12,S13,S23.
- abs_max_principal()[source]#
Calculate the absolute maximum principal stress.
- Returns:
The absolute maximum principal stress for each row.
- Return type:
- max_principal()[source]#
Calculate the maximum principal stress.
- Returns:
The maximum principal stress for each row.
- Return type:
- min_principal()[source]#
Calculate the minimum principal stress.
- Returns:
The minimum principal stress for each row.
- Return type:
- mises()[source]#
Calculate the von Mises equivalent stress.
- Returns:
The equivalent stress for each row.
- Return type:
- principals()[source]#
Calculate the principal stresses.
- Returns:
The principal stresses for each row.
- Return type:
- signed_mises_abs_max_principal()[source]#
Calculate the principal-signed von Mises equivalent stress.
- Returns:
The equivalent stress for each row.
- Return type:
- signed_mises_trace()[source]#
Calculate the trace-signed von Mises equivalent stress.
- Returns:
The equivalent stress for each row.
- Return type:
- signed_tresca_abs_max_principal()[source]#
Calculate the principal-signed Tresca equivalent stress.
- Returns:
The equivalent stress for each row.
- Return type:
- signed_tresca_trace()[source]#
Calculate the trace-signed Tresca equivalent stress.
- Returns:
The equivalent stress for each row.
- Return type:
- pylife.stress.equistress.abs_max_principal(s11, s22, s33, s12, s13, s23)[source]#
Calculate absolute maximum principal stress.
This is the maximum of the 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:
ValueError – 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 von Mises equivalent stress signed by the principal stress.
The sign is that 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 von Mises equivalent stress signed by the trace.
The sign is that 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 Tresca equivalent stress signed by the principal stress.
The sign is that 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 Tresca equivalent stress signed by the trace.
The sign is that 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: