mean_stress#

The mean_stress module contains all the functions and classes related to the mean stress, such as mean stress correction.

MeanStress#

py_fatigue.mean_stress.mean_stress#

alias of <module ‘py_fatigue.mean_stress.mean_stress’ from ‘/home/runner/work/py_fatigue/py_fatigue/py_fatigue/mean_stress/mean_stress.py’>

corrections#

The py_fatigue.msc.corrections module collects all the mean stress corrections implemented in py_fatigue. classes.

py_fatigue.mean_stress.corrections.dnvgl_mean_stress_correction(mean_stress: ndarray, stress_amplitude: ndarray, detail_factor: float | int = 0.8, plot: bool = False) ndarray#

Calculates the mean stress correction according to par. 2.5 of`DNVGL-RP-C203 <https://bit.ly/3dUZ1OY>`_ which includes an attenuation factor \(p\) for the stress ranges if the following cases:

  • base material without significant residual stresses \(\rightarrow p = 0.6\). This option neglects fully compressive cycles.

  • welded connections without significant residual stresses \(\rightarrow p = 0.8\). This option multiplies the stress range of fully compressive cycles by p.

Given that the stress ranges are \(\Delta \sigma\), the corrected stress ranges are:

\[\Delta \sigma_{corr} = f_m \cdot \Delta \sigma\]

where:

\[f_m = \frac{\sigma_{max} + p \cdot \vert \sigma_{min} \vert}{\sigma_{max} + \vert\sigma_{min} \vert}\]

with:

\[\frac{\sigma_a}{\vert \sigma_m \vert} \leq 1, \quad \sigma_a = \frac{\sigma_{max} - \sigma_{min}}{2} \,\land \, \sigma_m = \frac{\sigma_{max} + \sigma_{min}}{2}\]
Parameters:
  • mean_stress (np.ndarray) – The mean stress of the fatigue test (\(\sigma_m\)).

  • stress_amplitude (np.ndarray) – The stress amplitude of the fatigue test (\(\sigma_a\)).

  • detail_factor (float, optional) – mean stress attenuation factor (\(p\)), defaults to 0.8 in welded connections without significant residual stresses.

  • plot (bool, optional) – If True, the mean stress correction is plotted, defaults to False.

Returns:

The mean stress corrected ranges (\(\Delta \sigma_{corr}\)).

Return type:

np.ndarray

py_fatigue.mean_stress.corrections.walker_mean_stress_correction(mean_stress: ndarray, stress_amplitude: ndarray, gamma: float = 0.5, plot: bool = False) ndarray#

Calculates the mean stress correction according to Walker model.

The correction is given by:

\[\Delta \sigma_{corr} = {\sigma_{max}} ^ {(1 - \gamma)} \, \sigma_{alt} ^ {\gamma}\]

with:

\[\sigma_{max} = \sigma_{mean} + \sigma_{alt}\]
Parameters:
  • mean_stress (np.ndarray) – The mean stress of the fatigue test (\(\sigma_{mean}\)).

  • stress_amplitude (np.ndarray) – The stress amplitude of the fatigue test (\(\sigma_{alt}\)).

  • gamma (float, optional) – The gamma Walker exponent (\(\gamma\)), defaults to 0.5.

  • plot (bool, optional) – If True, the mean stress correction is plotted, defaults to False.

Returns:

The mean stress corrected ranges (\(\Delta \sigma_{corr}\)).

Return type:

np.ndarray

py_fatigue.mean_stress.corrections.swt_mean_stress_correction(mean_stress: ndarray, stress_amplitude: ndarray, plot: bool = False) ndarray#

Calculates the mean stress correction according to Smith-Watson-Topper model. It is equivalent to the Walker model with gamma = 0.5.

The correction is given by:

\[\Delta \sigma_{corr} = \sqrt{\sigma_{max} \, \sigma_{alt}}\]

with:

\[\sigma_{max} = \sigma_{mean} + \sigma_{alt}\]
Parameters:
  • mean_stress (np.ndarray) – The mean stress of the fatigue test (\(\sigma_{mean}\)).

  • stress_amplitude (np.ndarray) – The stress amplitude of the fatigue test (\(\sigma_{alt}\)).

  • plot (bool, optional) – If True, the mean stress correction is plotted, defaults to False.

Returns:

The mean stress corrected ranges (\(\Delta \sigma_{corr}\)).

Return type:

np.ndarray