The stresssignal module#
Validate stress tensor signals stored in Voigt notation.
The module provides the voigt DataFrame accessor for symmetric Cauchy
stress tensors given by the six components S11, S22, S33, S12, S13, S23
in MPa, as they are written by finite-element solvers and consumed by the
equivalent stress and fatigue strength modules of pyLife.
- class pylife.stress.stresssignal.StressTensorVoigt(pandas_obj)[source]#
Represent a stress tensor stored in Voigt notation.
The accessor validates a
pandas.DataFramethat stores one symmetric Cauchy stress tensor per row. The mandatory columns define the tensor in Voigt notationS11, S22, S33, S12, S13, S23:S11: Normal stress component in direction 1 in MPa.S22: Normal stress component in direction 2 in MPa.S33: Normal stress component in direction 3 in MPa.S12: Shear stress component in the 1-2 plane in MPa.S13: Shear stress component in the 1-3 plane in MPa.S23: Shear stress component in the 2-3 plane in MPa.
All components are interpreted as engineering stress components of a symmetric tensor,
\[\begin{split}\sigma = \begin{pmatrix} S11 & S12 & S13\\ S12 & S22 & S23\\ S13 & S23 & S33 \end{pmatrix}.\end{split}\]- Parameters:
pandas_obj (pandas.DataFrame) – DataFrame containing the mandatory Voigt stress tensor component columns.
See also
pylife.stress.equistress.StressTensorEquistressCalculate equivalent stresses from a Voigt stress tensor DataFrame.
Notes
Accessing
df.voigtraises anAttributeErrorif any mandatory component column is missing. Subclasses, for exampleStressTensorEquistress, build on this contract to calculate derived stress quantities.Examples
>>> import pylife.stress.stresssignal >>> df = pd.DataFrame({'S11': [1.0], 'S22': [0.0], 'S33': [0.0], ... 'S12': [0.0], 'S13': [0.0], 'S23': [0.0]}) >>> df.voigt.to_pandas() S11 S22 S33 S12 S13 S23 0 1.0 0.0 0.0 0.0 0.0 0.0