The helpers module

Small helper functions for fatigue analysis

class pylife.strength.helpers.StressRelations[source]

Namespace for simple relations of stress / amplitude / R-ratio

Refer to: Haibach (2006), p. 21

static get_max_stress_from_amplitude(amplitude, R)[source]
static get_mean_stress_from_amplitude(amplitude, R)[source]
pylife.strength.helpers.irregularity_factor(rainflow_matrix, residuals=array([], dtype=float64), decision_bin=None)[source]

Calculate the irregularity factor of a turning point sequence based on a rainflow matrix and its residuals.

Two sided irregularity factor:

..math:: I = N_{mean crossings} / N_{turning points}
Parameters:
  • rainflow_matrix (np.ndarray[int, int]) – 2D-rainflow matrix (must be square shaped)
  • residuals (np.ndarray[int], Optional) – 1D array of residuals to consider for accurate calculation. Consecutive duplicates are removed beforehand. Residuals must be provided as bin numbers. Hint: Transformation from physical to binned values possible via np.digitize.
  • decision_bin (int, Optional) – Bin number that equals the mean (two-sided). If not provided the decision_bin is inferred by the matrix entries as the mean value based on the turning points and will be broadcasted to int-type.

Todo

Future version may provide the one-sided irregularity factor as a second option. Formula would be:

One sided irregularity factor:

\[\]

I = N_{zero bin upwards crossing} / N_{peaks}

N_{zero bin upwards crossings} equals positive_mean_bin_crossing if decision_bin is set to the bin of physical 0. Inferring exact amount of peaks from rainflow-matrix and residuals is left to be done.

pylife.strength.helpers.solidity_fkm(collective, k)[source]

Compute solidity according to the FKM guideline (2012)

Refer to: FKM-Richtlinie - 6. Auflage (2012) - S.58 - Gl. (2.4.55) + Gl. (2.4.55)

Parameters:collective (np.ndarray) –

numpy array of shape (:, 2) where “:” depends on the number of classes defined for the rainflow counting

  1. column: class values in ascending order
  2. column: accumulated number of cycles first entry is the total number of cycles then in a descending manner till the number of cycles of the highest stress class k : float slope of the S/N curve
Returns:V – Völligkeitswert (solidity)
Return type:np.ndarray
pylife.strength.helpers.solidity_haibach(collective, k)[source]

Compute solidity according to Haibach

Refer to: Haibach - Betriebsfestigkeit - 3. Auflage (2005) - S.271

Parameters:
  • collective (np.ndarray) –

    numpy array of shape (:, 2) where “:” depends on the number of classes defined for the rainflow counting

    1. column: class values in ascending order
    2. column: accumulated number of cycles first entry is the total number of cycles then in a descending manner till the number of cycles of the highest stress class
  • k (float) – slope of the S/N curve
Returns:

V – Völligkeitswert (solidity)

Return type:

np.ndarray (1,)