Materials engineering bridges microstructural kinetics and structural design: how fast does supercooled austenite transform into pearlite or bainite along an isothermal TTT hold, how many thousands of hours can an Inconel 718 jet-engine turbine disk survive before high-temperature creep rupture, and how do we systematically choose among steels, titanium alloys, technical ceramics, and carbon-fiber composites when minimizing mass and cost simultaneously? In this lecture we model isothermal nucleation-and-growth sigmoids with jmak_fraction and double-logarithmic fit_avrami_exponent, derive C-curve TTT transformation noses, predict creep rupture life via larson_miller_parameter, and compute structural ashby_performance_index rankings and pareto_frontier_2d trade-offs across constants.ASHBY_MATERIALS_DB.
Learning objectives¶
Model isothermal phase transformation sigmoids via
kinetics_selection.jmak_fractionand recover by double-logarithmic Avrami regressionkinetics_selection.fit_avrami_exponent.Explain the thermodynamic–kinetic competition producing the C-shaped TTT transformation nose between equilibrium and sluggish low- diffusion.
Predict high-temperature creep rupture life and temperature derating using
kinetics_selection.larson_miller_parameterandkinetics_selection.rupture_time_from_larson_miller.Rank engineering materials across
constants.ASHBY_MATERIALS_DBwithkinetics_selection.ashby_performance_index(tie_min_mass,stiff_beam_min_mass,tie_min_cost) and extract non-dominated frontiers viakinetics_selection.pareto_frontier_2d.
Time: about 60 min
try: # use the installed package, or the copy in this repository
import engmaterials
except ImportError:
import pathlib, subprocess, sys
for _root in [pathlib.Path.cwd(), *pathlib.Path.cwd().parents]:
if (_root / "engmaterials" / "__init__.py").exists():
sys.path.insert(0, str(_root))
break
else: # on Google Colab: install from GitHub
subprocess.run([sys.executable, "-m", "pip", "install", "-q",
"git+https://github.com/ktwyw/engmaterials.git"], check=True)
import engmaterials
import inspect
import numpy as np
import matplotlib.pyplot as plt
from engmaterials import (atomistics, constants, diffraction, elasticity, kinetics_selection,
lattices, phase_field, phase_thermodynamics)
from engmaterials.plotting import label_panels, panel_label, use_style
use_style()
def show_source(obj):
"""Return the source code of a library function or class."""
return inspect.getsource(obj)
def heading(text):
print(f"\n{text}\n" + "=" * len(text))1. Principles and governing equations¶
1.1 Johnson–Mehl–Avrami–Kolmogorov (JMAK) Nucleation, Growth & Impingement¶
During an isothermal solid-state transformation (recrystallization, crystallization of metallic glass, or pearlite), if growing spheres never overlapped, their extended volume fraction would grow as . Accounting for random spatial impingement, where only the untransformed fraction can convert (), integrates to the JMAK equation (kinetics_selection.jmak_fraction):
The Avrami exponent (kinetics_selection.fit_avrami_exponent) encodes the transformation mechanism:
: Constant homogeneous nucleation rate + 3-D linear interface-controlled growth ().
: Site-saturated nucleation (all grain-boundary nuclei active at ) + 3-D linear growth.
: Constant nucleation rate + 3-D diffusion-controlled parabolic growth ().
1.2 Why Isothermal TTT Diagrams Have a C-Shaped “Nose”¶
Just below , undercooling is tiny, so the nucleation barrier is large and . At very low , atomic mobility freezes growth. Their product peaks at an intermediate TTT nose temperature where transformation time reaches a minimum.
heading("Demonstration 1: JMAK Sigmoids, Double-Log Avrami Regression & C-Curve TTT Nose Physics")
t_jmak = np.linspace(0.5, 45.0, 90)
k_true = 0.08 # [1/s]
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(11, 4.1))
for n_true, ls in [(1.5, ":"), (2.5, "--"), (3.0, "-."), (4.0, "-")]:
X_curve = kinetics_selection.jmak_fraction(t_jmak, k_rate=k_true, n_avrami=n_true)
fit = kinetics_selection.fit_avrami_exponent(t_jmak, X_curve)
print(f"True (n={n_true:.1f}, k={k_true:.3f}) -> Avrami fit n={fit['n_avrami']:.6f}, k={fit['k_rate']:.6f}, R^2={fit['r2']:.8f}")
assert np.isclose(fit["n_avrami"], n_true, rtol=1e-12) and np.isclose(fit["k_rate"], k_true, rtol=1e-12)
ax1.plot(t_jmak, X_curve, ls=ls, lw=2.1, label=f"$n = {n_true:.1f}$")
ax1.axhline(1.0 - np.exp(-1.0), color="gray", lw=0.9, ls=":", label=r"$X(1/k) = 1 - e^{-1} \approx 0.632$")
ax1.set_xlabel("Isothermal hold time $t$ [s]")
ax1.set_ylabel("Transformed fraction $X(t)$ [-]")
ax1.set_title("JMAK Sigmoids Crossing at Characteristic Time $t = 1/k$")
ax1.legend(fontsize=8)
# C-curve Time-Temperature-Transformation (TTT) diagram for eutectoid-like transformation below T_eq = 1000 K:
T_eq = 1000.0
T_ttt = np.linspace(550.0, 975.0, 120)
dT = T_eq - T_ttt
k_ttt = 2.5e5 * np.exp(-1.4e7 / (T_ttt * (dT ** 2))) * np.exp(-115_000.0 / (constants.R * T_ttt))
n_ttt = 3.0
t_01 = ((-np.log(1.0 - 0.01)) ** (1.0 / n_ttt)) / k_ttt
t_50 = ((-np.log(1.0 - 0.50)) ** (1.0 / n_ttt)) / k_ttt
t_99 = ((-np.log(1.0 - 0.99)) ** (1.0 / n_ttt)) / k_ttt
idx_nose = int(np.argmin(t_50))
print(f"\nTTT Nose located at T_nose = {T_ttt[idx_nose]:.1f} K ({T_ttt[idx_nose]-273.15:.0f} C) with minimum t_50% = {t_50[idx_nose]:.2f} s")
assert 0 < idx_nose < len(T_ttt) - 1 # Strictly interior C-curve minimum
ax2.semilogx(t_01, T_ttt, "b--", lw=1.9, label="Start ($X = 1\\%$)")
ax2.semilogx(t_50, T_ttt, "k-", lw=2.1, label="50% Transformed")
ax2.semilogx(t_99, T_ttt, "r-.", lw=1.9, label="Finish ($X = 99\\%$)")
ax2.scatter([t_50[idx_nose]], [T_ttt[idx_nose]], color="tab:orange", s=55, zorder=5, label=f"TTT Nose ({T_ttt[idx_nose]:.0f} K)")
ax2.set_xlabel("Log isothermal hold time $t$ [s]")
ax2.set_ylabel("Temperature $T$ [K]")
ax2.set_title("C-Curve TTT Diagram (Nucleation vs. Diffusion)")
ax2.legend(fontsize=8)
label_panels(fig)
plt.show()
Demonstration 1: JMAK Sigmoids, Double-Log Avrami Regression & C-Curve TTT Nose Physics
=======================================================================================
True (n=1.5, k=0.080) -> Avrami fit n=1.500000, k=0.080000, R^2=1.00000000
True (n=2.5, k=0.080) -> Avrami fit n=2.500000, k=0.080000, R^2=1.00000000
True (n=3.0, k=0.080) -> Avrami fit n=3.000000, k=0.080000, R^2=1.00000000
True (n=4.0, k=0.080) -> Avrami fit n=4.000000, k=0.080000, R^2=1.00000000
TTT Nose located at T_nose = 882.1 K (609 C) with minimum t_50% = 71.55 s

Figure 16.1. (a) JMAK curves with the same rate constant and four exponents. (b) Time–temperature–transformation curves for 1 %, 50 % and 99 % transformed, from an assumed rate law; the point is the nose.
What Demonstration 1 shows. In panel (a) every JMAK curve passes through the point at , regardless of the Avrami exponent . In panel (b), the two competing exponentials (nucleation-limited near ) and (diffusion-limited below ) give the C-curve, with its nose at for the assumed parameters: quenching past the nose faster than suppresses diffusive transformation and forms martensite.
2. High-Temperature Creep Design & Larson–Miller Time–Temperature Equivalence¶
At homologous temperatures , polycrystalline turbine blades and steam headers deform continuously under constant stress by vacancy-assisted dislocation climb (power-law / Coble / Nabarro–Herring creep), with steady-state creep rate and Monkman–Grant rupture time . Taking base-10 logarithms yields the Larson–Miller Parameter (kinetics_selection.larson_miller_parameter & rupture_time_from_larson_miller):
A short, accelerated laboratory creep-rupture test ( at elevated ) determines on the alloy master curve, predicting () service life at operating temperature .
heading("Demonstration 2: Superalloy Turbine Creep Master Curve & +25 K Over-Temperature Penalty")
# Accelerated lab creep test on Inconel-class superalloy at sigma = 250 MPa: ruptures in t_test = 180 h at T_test = 1040 K
P_lm_250 = kinetics_selection.larson_miller_parameter(T_K=1040.0, t_rupture_h=180.0, C_lm=20.0)
print(f"Measured Larson-Miller parameter at 250 MPa : P_LM = {P_lm_250:.4f}")
print(f"\n{'Service T [K]':>13s} | {'Service T [C]':>13s} | {'Predicted Rupture Life [h]':>26s} | {'Predicted Life [years]':>22s}")
print("-" * 84)
T_ops = np.array([925.0, 950.0, 975.0, 1000.0, 1025.0])
tr_ops = kinetics_selection.rupture_time_from_larson_miller(P_lm_250, T_ops, C_lm=20.0)
for tk, trh in zip(T_ops, tr_ops):
print(f"{tk:13.0f} | {tk - 273.15:13.1f} | {trh:26.1f} | {trh / 8760.0:22.2f}")
life_drop_25K = float(tr_ops[1] / tr_ops[2]) # 950 K vs 975 K
print(f"\nOverheating by just +25 K (950 K -> 975 K) slashes creep life by {life_drop_25K:.2f}x")
assert life_drop_25K > 3.5
assert np.allclose(kinetics_selection.larson_miller_parameter(T_ops, tr_ops, C_lm=20.0), P_lm_250, rtol=1e-14)
Demonstration 2: Superalloy Turbine Creep Master Curve & +25 K Over-Temperature Penalty
=======================================================================================
Measured Larson-Miller parameter at 250 MPa : P_LM = 23.1455
Service T [K] | Service T [C] | Predicted Rupture Life [h] | Predicted Life [years]
------------------------------------------------------------------------------------
925 | 651.9 | 105231.1 | 12.01
950 | 676.9 | 23102.9 | 2.64
975 | 701.9 | 5482.2 | 0.63
1000 | 726.9 | 1397.9 | 0.16
1025 | 751.9 | 381.0 | 0.04
Overheating by just +25 K (950 K -> 975 K) slashes creep life by 4.21x
What Demonstration 2 shows. Creep life is very sensitive to temperature. With the assumed test point, the predicted rupture life at () is ; at , only hotter, it is , lower by a factor of 4.21. That is why single-crystal -base turbine blades rely on internal cooling channels and zirconia thermal barrier coatings (TBCs).
3. Ashby Performance Indices & 2-D Pareto Frontier Selection¶
Michael F. Ashby’s rational materials-selection framework separates component performance into , where maximizing the material performance index (kinetics_selection.ashby_performance_index) minimizes structural mass or cost:
Minimum-mass tension tie (fixed yield load , minimize ): maximize .
Minimum-mass stiff bending beam (fixed bending stiffness with square cross-section , minimize ): maximize .
Minimum-cost tension tie (minimize material cost ): maximize .
When two objectives compete directly, such as minimizing density while maximizing yield strength , kinetics_selection.pareto_frontier_2d identifies the exact non-dominated Pareto frontier across constants.ASHBY_MATERIALS_DB.
heading("Demonstration 3: Ashby Material Rankings & 2-D Density-Strength Pareto Frontier")
for mode_key, unit_lbl in [
("tie_min_mass", "MPa / (kg/m^3)"),
("stiff_beam_min_mass", "GPa^{1/2} / (kg/m^3)"),
("tie_min_cost", "MPa / (USD/m^3)"),
]:
top3 = kinetics_selection.ashby_performance_index(constants.ASHBY_MATERIALS_DB, mode=mode_key)[:3]
top_str = ", ".join(f"{d['name']} ({d['M']:.4e})" for d in top3)
print(f"Top 3 [{mode_key:20s}]: {top_str}")
names_db = list(constants.ASHBY_MATERIALS_DB.keys())
rho_db = np.array([constants.ASHBY_MATERIALS_DB[k]["density_kg_m3"] for k in names_db])
sy_db = np.array([constants.ASHBY_MATERIALS_DB[k]["sigma_y_MPa"] for k in names_db])
pareto_idx = kinetics_selection.pareto_frontier_2d(minimize_x=rho_db, maximize_y=sy_db)
pareto_names = [names_db[i] for i in pareto_idx]
print("\nPareto-optimal materials (minimizing density rho, maximizing yield strength sigma_y):")
for idx in pareto_idx:
print(f" * {names_db[idx]:22s} | rho = {rho_db[idx]:6.0f} kg/m^3 | sigma_y = {sy_db[idx]:6.0f} MPa")
assert "CFRP Quasi-Isotropic" in pareto_names and "Maraging Steel" in pareto_names
assert "AISI 1020 Steel" not in pareto_names # Dominated by lighter AND stronger alloys (e.g. Al 7075-T6, Ti-6Al-4V)
fig, ax = plt.subplots(figsize=(7.8, 4.4))
ax.scatter(rho_db, sy_db, s=55, alpha=0.65, label="Candidate materials (`ASHBY_MATERIALS_DB`)")
ax.plot(rho_db[pareto_idx], sy_db[pareto_idx], "r-o", lw=2.2, ms=7, label="Non-dominated Pareto Frontier")
for i, nm in enumerate(names_db):
short = nm.split(" (")[0]
short = {"GFRP E-Glass/Epoxy": "GFRP", "CFRP Quasi-Isotropic": "CFRP", "AZ31B Mg Alloy": "AZ31B", "PEEK Polymer": "PEEK", "Silicon Carbide": "SiC", "AISI 1020 Steel": "AISI 1020"}.get(short, short)
off_ashby = {"Ti-6Al-4V": (6, -12), "CFRP": (-28, 4), "PEEK": (8, -3), "Al 6061-T6": (6, -11), "AISI 1020": (-46, -3), "Inconel 718": (-52, -3), "Maraging Steel": (-66, -3)}
ax.annotate(short, (rho_db[i], sy_db[i]), xytext=off_ashby.get(short, (5, 4)), textcoords="offset points", fontsize=7.5)
ax.set_xlabel("Density $\\rho$ [$\\mathrm{kg/m^3}$] (Minimize $\\leftarrow$)")
ax.set_ylabel("Yield / Failure Strength $\\sigma_y$ [MPa] (Maximize $\\uparrow$)")
ax.set_title("Ashby Property Chart & Exact $(\\rho, \\sigma_y)$ Pareto Frontier")
ax.legend(fontsize=8)
plt.show()
Demonstration 3: Ashby Material Rankings & 2-D Density-Strength Pareto Frontier
===============================================================================
Top 3 [tie_min_mass ]: CFRP Quasi-Isotropic (4.1139e-01), Maraging Steel (2.3125e-01), GFRP E-Glass/Epoxy (2.1538e-01)
Top 3 [stiff_beam_min_mass ]: Silicon Carbide (SiC) (6.4281e-03), CFRP Quasi-Isotropic (5.2953e-03), Alumina (Al2O3) (4.9984e-03)
Top 3 [tie_min_cost ]: AISI 1020 Steel (5.2454e-02), Al 7075-T6 (4.2620e-02), Al 6061-T6 (3.9316e-02)
Pareto-optimal materials (minimizing density rho, maximizing yield strength sigma_y):
* PEEK Polymer | rho = 1320 kg/m^3 | sigma_y = 98 MPa
* CFRP Quasi-Isotropic | rho = 1580 kg/m^3 | sigma_y = 650 MPa
* Ti-6Al-4V | rho = 4430 kg/m^3 | sigma_y = 880 MPa
* Maraging Steel | rho = 8000 kg/m^3 | sigma_y = 1850 MPa

Figure 16.2. Yield strength against density for the 12 materials of ASHBY_MATERIALS_DB (representative handbook-type values, assumed) and the Pareto front of low density and high strength.
What Demonstration 3 shows. The best material depends on the objective.
For an aerospace tension tie (
tie_min_mass), CFRP Quasi-Isotropic wins (), followed by Maraging Steel and GFRP.For a lightweight stiff precision mirror / beam (
stiff_beam_min_mass), Silicon Carbide () wins ( at ).For a civil-structural minimum-cost tie (
tie_min_cost), AISI 1020 Steel (0.85 USD/kg, an assumed cost) ranks first, followed by Al 7075-T6 and Al 6061-T6. Meanwhile, on the Pareto frontier, monotonic ascent in both and (PEEK PolymerCFRPTi-6Al-4VMaraging Steel) eliminates dominated candidates automatically.
4. Sensitivity to the parameters¶
On a log–log Ashby chart of vs. , iso-performance contours are parallel straight guidelines of slope :
: Tension tie / axial column (
stiff_tie_min_mass, ): Bending beam (
stiff_beam_min_mass, ): Flat bending plate (
stiff_plate_min_mass, )
We sweep to see how increasing bending geometry exponent increasingly favors low-density foams, polymers, magnesium, and composites over dense metals.
heading("Demonstration 4: Loading-Geometry Slope beta = 1 (Tie) -> 2 (Beam) -> 3 (Plate) Ranking Shift")
modes_stiff = [
("stiff_tie_min_mass", "beta=1 (E / rho)"),
("stiff_beam_min_mass", "beta=2 (E^{1/2} / rho)"),
("stiff_plate_min_mass", "beta=3 (E^{1/3} / rho)"),
]
focus_mats = ["Silicon Carbide (SiC)", "CFRP Quasi-Isotropic", "AZ31B Mg Alloy", "Al 6061-T6", "AISI 1020 Steel"]
for mode_k, desc in modes_stiff:
ranking = kinetics_selection.ashby_performance_index(constants.ASHBY_MATERIALS_DB, mode=mode_k)
rank_map = {item["name"]: r_idx + 1 for r_idx, item in enumerate(ranking)}
short = {"Silicon Carbide (SiC)": "SiC", "CFRP Quasi-Isotropic": "CFRP", "AZ31B Mg Alloy": "AZ31B", "Al 6061-T6": "Al 6061", "AISI 1020 Steel": "AISI 1020"}
summary = " | ".join(f"{short[m]}: #{rank_map[m]}" for m in focus_mats)
print(f"{desc:24s} -> {summary}")
r_tie = [d["name"] for d in kinetics_selection.ashby_performance_index(constants.ASHBY_MATERIALS_DB, "stiff_tie_min_mass")]
r_plate = [d["name"] for d in kinetics_selection.ashby_performance_index(constants.ASHBY_MATERIALS_DB, "stiff_plate_min_mass")]
# Verify ultralight AZ31B Mg Alloy climbs dramatically above AISI 1020 Steel when moving from axial tie (beta=1) to plate bending (beta=3)
assert r_plate.index("AZ31B Mg Alloy") < r_tie.index("AZ31B Mg Alloy")
assert r_plate.index("AZ31B Mg Alloy") < r_plate.index("AISI 1020 Steel")
Demonstration 4: Loading-Geometry Slope beta = 1 (Tie) -> 2 (Beam) -> 3 (Plate) Ranking Shift
=============================================================================================
beta=1 (E / rho) -> SiC: #1 | CFRP: #3 | AZ31B: #8 | Al 6061: #6 | AISI 1020: #4
beta=2 (E^{1/2} / rho) -> SiC: #1 | CFRP: #2 | AZ31B: #4 | Al 6061: #5 | AISI 1020: #9
beta=3 (E^{1/3} / rho) -> SiC: #2 | CFRP: #1 | AZ31B: #3 | Al 6061: #6 | AISI 1020: #10
Inside the algorithm¶
What Demonstration 4 shows. In axial tension (), steel, aluminum, titanium, and magnesium all have nearly identical specific modulus . Yet in plate bending (, ), thickening a lightweight panel increases bending rigidity cubically (), moving light AZ31B Magnesium () to #3 overall ahead of aluminum, titanium, and steel (#10).
Below we inspect kinetics_selection.fit_avrami_exponent and kinetics_selection.pareto_frontier_2d, and verify our NumPy implementations side by side.
Check against the library¶
heading("Inside the Algorithm: kinetics_selection.fit_avrami_exponent & pareto_frontier_2d")
print(show_source(kinetics_selection.fit_avrami_exponent))
print(show_source(kinetics_selection.pareto_frontier_2d))
# Verify pairwise Pareto dominance filter by hand:
n_m = rho_db.size
dom_hand = np.array([
np.any((rho_db <= rho_db[i]) & (sy_db >= sy_db[i]) & ((rho_db < rho_db[i]) | (sy_db > sy_db[i])))
for i in range(n_m)
])
nd_hand = np.flatnonzero(~dom_hand)
nd_hand = nd_hand[np.argsort(rho_db[nd_hand])]
assert np.array_equal(nd_hand, pareto_idx)
print("Matched exact Pareto indices:", pareto_idx)
Inside the Algorithm: kinetics_selection.fit_avrami_exponent & pareto_frontier_2d
=================================================================================
def fit_avrami_exponent(t: np.ndarray, X_trans: np.ndarray) -> dict:
"""Recover Avrami exponent n and rate constant k_rate by linearizing ln(-ln(1 - X)) = n*ln(t) + n*ln(k_rate)."""
tg = np.asarray(t, dtype=float).ravel()
xg = np.asarray(X_trans, dtype=float).ravel()
mask = (tg > 0.0) & (xg > 0.005) & (xg < 0.995)
if np.count_nonzero(mask) < 2:
raise ValueError("Need at least two interior transformation points with 0.005 < X < 0.995.")
u = np.log(tg[mask])
v = np.log(-np.log(1.0 - xg[mask]))
a_mat = np.column_stack([u, np.ones_like(u)])
coeffs, _, _, _ = np.linalg.lstsq(a_mat, v, rcond=None)
n_est = float(coeffs[0])
intercept = float(coeffs[1])
k_est = float(np.exp(intercept / n_est))
v_pred = a_mat @ coeffs
ss_res = float(np.sum((v - v_pred) ** 2))
ss_tot = float(np.sum((v - np.mean(v)) ** 2))
r2 = 1.0 - ss_res / ss_tot if ss_tot > 0.0 else 1.0
return {
"n_avrami": n_est,
"k_rate": k_est,
"intercept": intercept,
"r2": r2,
}
def pareto_frontier_2d(minimize_x: np.ndarray, maximize_y: np.ndarray) -> np.ndarray:
"""Return indices (sorted by ascending minimize_x) of Pareto-optimal points minimizing x and maximizing y."""
x_arr = np.asarray(minimize_x, dtype=float).ravel()
y_arr = np.asarray(maximize_y, dtype=float).ravel()
if x_arr.size != y_arr.size or x_arr.size == 0:
raise ValueError("minimize_x and maximize_y must be non-empty 1-D arrays of equal length.")
n = x_arr.size
dominated = np.zeros(n, dtype=bool)
for i in range(n):
better_or_eq_x = x_arr <= x_arr[i]
better_or_eq_y = y_arr >= y_arr[i]
strictly_better = (x_arr < x_arr[i]) | (y_arr > y_arr[i])
if np.any(better_or_eq_x & better_or_eq_y & strictly_better):
dominated[i] = True
nd_idx = np.flatnonzero(~dominated)
order = np.argsort(x_arr[nd_idx])
return nd_idx[order]
Matched exact Pareto indices: [11 9 4 1]
Exercises¶
Worked solutions are in 16_solutions.ipynb. The cell below the list is a short self-check to start from.
Verify a result. Derive the exact temperature reduction that doubles creep rupture life () at constant , and verify numerically at using
larson_miller_parameterandrupture_time_from_larson_miller.Find how it fails. Verify that
fit_avrami_exponentfilters out induction/saturation endpoints outside (recovering cleanly even when and endpoints are present in the input array, while raisingValueErrorif interior points exist), and verifyashby_performance_indexraisesValueErroron an unsupported mode.Implement it yourself. Implement
fracture_safe_beam_pareto(materials_db, min_K_Ic=25.0)that screens out brittle materials with and returns the Pareto-optimal subset minimizing beam cost index and maximizing specific beam stiffness . Verify that brittle ceramics (SiC,Alumina) are excluded whileCFRP Quasi-IsotropicandAISI 1020 Steelanchor the high-performance and low-cost ends of the frontier.
heading("Self-check for the exercises")
P_test = kinetics_selection.larson_miller_parameter(1000.0, 5000.0, C_lm=20.0)
T2_exact = 1000.0 * (np.log10(5000.0) + 20.0) / (np.log10(10_000.0) + 20.0)
tr2_check = kinetics_selection.rupture_time_from_larson_miller(P_test, T2_exact, C_lm=20.0)
print(f"Cooling from 1000.0 K to {T2_exact:.2f} K (delta T = {1000.0 - T2_exact:.2f} K) gives t_r = {tr2_check:.1f} h")
assert np.isclose(tr2_check, 10_000.0, rtol=1e-12)
print("All checks passed.")
Self-check for the exercises
============================
Cooling from 1000.0 K to 987.46 K (delta T = 12.54 K) gives t_r = 10000.0 h
All checks passed.