Goodman–Haigh¶
For each cycle use the mean stress \(M\) and stress amplitude \(A=\Delta\sigma/2\). The extrema are \(\sigma_{\max}=M+A\) and \(\sigma_{\min}=M-A\). The load ratio is \(R=(M-A)/(M+A)\) when \(M+A\ne0\). For \(R\ne1\), \(M=A(1+R)/(1-R)\). Use the same stress units for all inputs.
For an ultimate tensile strength \(S_u\) and exponent \(h\), translate a cycle to the fully reversed condition (\(R=-1\)) by calculating
The linear Goodman line uses \(h=1\), and the Gerber parabola uses \(h=2\).
The CycleCount selectors "soderberg" and "morrow" use the linear
form with yield strength and true fracture strength, respectively, passed
as ult_s. Use "haigh" with correction_exponent=h for a fitted
exponent.
Use a calibrated exponent and a mean-stress domain where the denominator
is positive and the power is real. The low-level routine returns
amplitudes and means. The CycleCount interface stores twice the
amplitude as the corrected range.
Transform to another load ratio¶
For a fixed reference strength \(S\) and exponent \(h\), equal-life cycles share a fully reversed amplitude \(A_{-1}\). For input amplitude \(A_i\) and mean \(M_i\), and output amplitude \(A_o\) and mean \(M_o\),
With \(R_o=-1\), \(k_o=0\) and \(A_o=A_{-1}\). For \(h=1\), substitute \(M_o\) and solve explicitly. For general \(h\), solve the scalar residual below.
For Gerber (\(h=2\)), this is a quadratic in \(A_o\). The general API path
uses the native numerical solver. Work in a domain where the powers
are real and the constant-life denominator is positive. The example
uses tensile maxima and \(-1\le R_o<1\). A nonlinear transform bypasses
the root solve for a nonpositive input maximum. For a single corrected
spectrum, pass a single ratio to mean_stress_correction. The lower-level
function accepts several ratios and returns arrays with one row per
supplied ratio and one column per cycle. Recover the range and extrema
from \(\Delta\sigma_o=2A_o\) and \(M_o\pm A_o\).
The outlined yellow markers identify the three input cycles. The dots at zero mean are the fully reversed amplitudes. To transform a cycle to another load ratio, follow its curve to the target mean-to-amplitude ratio.
Worked example¶
These four rows represent 50 cycles in an already resolved spectrum. The example uses MPa for ranges, means, and strength.
import matplotlib.pyplot as plt
import numpy as np
from py_fatigue import CycleCount
spectrum = CycleCount(
count_cycle=np.array([10.0, 20.0, 10.0, 10.0]),
stress_range=np.array([30.0, 60.0, 50.0, 60.0]),
mean_stress=np.array([-10.0, -10.0, 30.0, 65.0]),
lffd_solved=True,
)
corrected = spectrum.mean_stress_correction("goodman", ult_s=400.0, r_out=-1.0)
fig, ax = plt.subplots()
ax.scatter(spectrum.mean_stress, spectrum.stress_range, label="Original")
ax.scatter(corrected.mean_stress, corrected.stress_range, label="Corrected")
ax.set(xlabel="Mean stress (MPa)", ylabel="Stress ordinate (MPa)")
ax.legend()
All corrected means are zero at the fully reversed reference ratio.
Inverse example¶
from py_fatigue.mean_stress.corrections import goodman_haigh_mean_stress_correction
amplitude, mean = goodman_haigh_mean_stress_correction(
[35.0, 60.0, 80.0], [45.0, 80.0, 100.0], [-1.0, 0.2], 400.0, 2.0
)
print(2 * amplitude, mean)
The notebook applies the corrections to a combined spectrum and compares Miner damage and equivalent loads. Its Haigh plots sweep the target ratio from −1 to 0.995. The outlined yellow points mark the input cycles.