The Fatigue class#

class pylife.strength.Fatigue(pandas_obj)[source]#

Represent a Wöhler curve for fatigue damage calculations.

Fatigue is registered as the .fatigue accessor on pandas.Series and pandas.DataFrame objects. It uses the Wöhler curve signal contract of pylife.materiallaws.WoehlerCurve and therefore expects the following keys:

  • k_1: Mandatory finite-life slope above the knee point, dimensionless.

  • ND: Mandatory number of cycles at the knee point, in cycles.

  • SD: Mandatory stress or load amplitude at the knee point, in a consistent unit such as MPa or N.

  • k_2: Optional slope below the knee point, dimensionless. Default is numpy.inf for Miner original behavior.

  • TN: Optional scatter range in cycle direction, N_90 / N_10. Default is 1.0 or is derived from TS ** k_1.

  • TS: Optional scatter range in load direction, SD_90 / SD_10. Default is 1.0 or is derived from TN ** (1 / k_1).

  • failure_probability: Optional failure probability represented by the stored curve. Default is 0.5.

The accessor expects load collectives that expose amplitude and cycles through pylife.stress.collective. Load amplitudes must use the same unit as SD.

Parameters:

pandas_obj (pandas.Series or pandas.DataFrame) – Pandas object containing Wöhler curve parameters.

See also

pylife.materiallaws.WoehlerCurve

Represent and transform Wöhler curves.

pylife.stress.collective.LoadCollective

Represent counted load collectives.

Examples

>>> import pandas as pd
>>> import pylife.strength.fatigue
>>> import pylife.stress.collective
>>> woehler = pd.Series({"k_1": 7.0, "ND": 2e6, "SD": 300.0,
...                      "TN": 3.4, "TS": 1.234})
>>> collective = pd.DataFrame({"range": [1200.0, 1600.0],
...                            "mean": [0.0, 0.0],
...                            "cycles": [10.0, 5.0]}).load_collective
>>> round(float(woehler.fatigue.damage(collective).sum()), 6)
0.003037
>>> round(float(woehler.fatigue.miner_elementary().damage(collective).sum()), 6)
0.003037
>>> round(float(woehler.fatigue.miner_haibach().damage(collective).sum()), 6)
0.003037
damage(load_collective)[source]#

Calculate fatigue damage for a load collective.

Parameters:

load_collective (pandas.DataFrame or pylife.stress.collective.LoadCollective) – Load collective containing cycle counts and stress or load amplitudes in the same unit as SD.

Returns:

Damage contribution for each collective row, dimensionless. The index is the broadcast index of the Wöhler curve parameters and load_collective.

Return type:

pandas.Series

Notes

Damage is calculated by Palmgren-Miner linear accumulation for each load level, using the current Wöhler curve and its selected k_2 branch:

\[D_i = \frac{n_i}{N_i}.\]

D_i is dimensionless; a sum of 1.0 conventionally means failure.

security_cycles(load_distribution, allowed_failure_probability)[source]#

Calculate the cycle-direction safety factor for a load distribution.

Parameters:
  • load_distribution (pandas.DataFrame or pylife.stress.collective.LoadCollective) – Load distribution containing cycle counts and stress or load amplitudes in the same unit as SD.

  • allowed_failure_probability (float or array_like) – Target failure probability, dimensionless, used to transform the Wöhler curve before calculating the allowed cycle count.

Returns:

Safety factor in cycle direction, dimensionless. Values greater than 1.0 indicate that the allowable number of cycles exceeds the applied number of cycles. The index is the broadcast index of the Wöhler curve and load data.

Return type:

pandas.Series

security_load(load_distribution, allowed_failure_probability)[source]#

Calculate the load-direction safety factor for a load distribution.

Parameters:
  • load_distribution (pandas.DataFrame or pylife.stress.collective.LoadCollective) – Load distribution containing cycle counts and stress or load amplitudes in the same unit as SD.

  • allowed_failure_probability (float or array_like) – Target failure probability, dimensionless, used to transform the Wöhler curve before calculating the allowed load.

Returns:

Safety factor in load direction, dimensionless. Values greater than 1.0 indicate that the allowed amplitude exceeds the applied amplitude. The index is the broadcast index of the Wöhler curve and load data.

Return type:

pandas.Series