Crack growth curves¶
See the Paris and Walker chapter for material-curve evaluation and the crack growth chapter for propagation under a tensile load history.
a. Definition of multiple Paris' laws¶
Note
In this example we define four Paris curves for free corrosion as per DNVGL-RP-C203 and plot them using matplotlib and ECharts. We additionally define a random Gaussian stress range-cycles history to plot against the curves defined.
# Paris' laws constants
SIF = np.linspace(1,2500, 300)
SLOPE_1 = np.array([2.88, 8.16])
INTERCEPT_1 = np.array([1.21E-16, 3.98E-29])
SLOPE_2 = np.array([8.16, 2.88])
INTERCEPT_2 = np.array([1.21E-26, 3.98E-13])
SLOPE_3 = 8.16
INTERCEPT_3 = 1.21E-26
THRESHOLD = 75.
CRITICAL = 2000.
# Paris' curves definition
pc_1 = pf.ParisCurve(slope=SLOPE_1, intercept=INTERCEPT_1, norm="The norm",
environment="Environment", curve="nr. 1")
pc_2 = pf.ParisCurve(slope=SLOPE_1, intercept=INTERCEPT_1,threshold=THRESHOLD,
critical=CRITICAL, norm="The norm",
environment="Environment", curve="nr. 2")
pc_3 = pf.ParisCurve(slope=SLOPE_3, intercept=INTERCEPT_3, norm="The norm",
environment="Environment", curve="nr. 3")
pc_4 = pf.ParisCurve(slope=SLOPE_2, intercept=INTERCEPT_2,threshold=THRESHOLD,
critical=CRITICAL, norm="The norm",
environment="Environment", curve="nr. 4")
# Plotting
fig, axs = plt.subplots(1,2, figsize=(12, 8))
pc_1.plot(fig=fig, ax=axs[0],)
pc_3.plot(fig=fig, ax=axs[0],)
pc_2.plot(fig=fig, ax=axs[1],)
pc_4.plot(fig=fig, ax=axs[1],)
axs[0].legend()
axs[1].legend()
plt.show()

To explore both panels interactively, render the figure in ECharts.
from py_fatigue.plotting import to_echarts
to_echarts(fig).render("paris-curves.html")
b. Mean stress effect on Paris' law¶
Note
This function has been added from version 1.2.0.
In the following years there have been many attempts to generalize Paris' law, mainly to account for mean stress effect, crack closure and near threshold/near failure modelling. The simplest model of Paris' law for mean stress effect has been proposed in 1970 by Walker:
With \(\gamma\) being Walker exponent, \(R\) the load ratio, and \(C_0\) being the intercept at \(R=0\).
Input:
# Paris's law with Walker correction constants
SLOPE = 4.
INTERCEPT = 1.21E-16
WALKER_EXPONENT = 0.5
LOAD_RATIOS = [0, 0.1, 0.5, 0.7]
THRESHOLDS = 75. * (1 - np.array(LOAD_RATIOS)) ** (1 - WALKER_EXPONENT)
CRITICAL = 2000. * (1 - np.array(LOAD_RATIOS)) ** (1 - WALKER_EXPONENT)
# Walker's curve definition
walker_curves = [pf.WalkerCurve(slope=SLOPE, intercept=INTERCEPT,
walker_exponent=WALKER_EXPONENT,
threshold=t, critical=c, load_ratio=l,
norm="The norm", environment="Environment",
curve=f"load_ratio={l}")
for l, t, c in zip(LOAD_RATIOS, THRESHOLDS, CRITICAL)]
# Plotting
fig, ax = plt.subplots(1,1, figsize=(6, 4))
for pc in walker_curves:
pc.plot(fig=fig, ax=ax)
ax.legend()
plt.show()
The effective Paris coefficient at load ratio \(R\) is \(C(R) = C_0 / (1-R)^{m(1-\gamma)}\).
Output:

c. Paris' law curve interpolation¶
Note
This function has been added from version 1.2.0.
It is now possible to build a piecewise Paris' law curve by interpolating between a set of \"knee points\". The class method :pypyfatigue.crack.ParisCurve.from_knee_points will enforce the piecewise curve to pass through the given points.
Warning
The function does not perform a curve fit, but rather enforces the curve to pass through the given points. Therefore, the number of knee points should be at least equal to the number of segments plus one.
in log-coordinate system, the equation becomes
directly retrieving the well-known linear equation \(Y = M \cdot X + Q\), where \(M=m\) and \(Q=\log C\).
Input:
knee_points = """
29, 6.93e-14
30, 8.64e-13
35, 4.98e-12
50, 2.50e-11
72, 1.44e-10
800, 1.18e-6
1_200, 1.87e-5
1_300, 3.10e-4
"""
# Convert the string data to a list of lists
knee_points_list = [list(map(float, line.split(',')))
for line in knee_points.strip().split('\n')]
knee_points_list = np.array(knee_points_list)
c_fkp = pf.ParisCurve.from_knee_points(knee_sif=knee_points_list[:,0],
knee_growth_rate=knee_points_list[:,1],
norm="Simil-NASGRO",
environment="N/A", curve="Interpolated")
# Plotting
fig, ax = plt.subplots(1,1)
c_fkp.plot(fig=fig, ax=ax)
ax.legend(prop={'size': 8})
plt.show()
Output:

Applying the Walker correction to the interpolated curve:
# SLOPE = 4.
# INTERCEPT = 1.21E-16
SLOPES = c_fkp.slope
INTERCEPTS = c_fkp.intercept
THRESHOLD = c_fkp.threshold
CRITICAL = c_fkp.critical
WALKER_EXPONENT = 0.5
LOAD_RATIOS = [0, 0.1, 0.5, 0.7]
THRESHOLDS = THRESHOLD * (1 - np.array(LOAD_RATIOS)) ** (1 - WALKER_EXPONENT)
CRITICALS = CRITICAL * (1 - np.array(LOAD_RATIOS)) ** (1 - WALKER_EXPONENT)
# Walker's curve definition
walker_curves = [pf.WalkerCurve(slope=SLOPES, intercept=INTERCEPTS,
walker_exponent=WALKER_EXPONENT,
threshold=t, critical=c, load_ratio=l,
norm="The norm", environment="Environment",
curve=f"load_ratio={l}")
for l, t, c in zip(LOAD_RATIOS, THRESHOLDS, CRITICALS)]
# Plotting
fig, ax = plt.subplots(1,1)
for pc in walker_curves:
pc.plot(fig=fig, ax=ax)
ax.legend(prop={'size': 8})
plt.show()
Output:
