- Young modulus and 0.2 % yield strength from a tensile test
- Thermal expansion coefficient and clamped thermal stress
- Is a heat treatment really harder? Vickers statistics
- Weibull modulus of a ceramic
- Fatigue life: Basquin law, Goodman correction and Miner rule
- Carburizing time for a given case depth
- Hall-Petch law from ASTM grain size numbers
- Recrystallization kinetics: JMAK (Avrami) law
- Principal stresses and safety factors (Mohr circle)
- Cross-ply laminate stiffness by classical lamination theory
Young modulus and 0.2 % yield strength from a tensile test
Stress-strain data of a 6061 aluminium sample are fitted with the Ramberg-Osgood law eps = s/E + 0.002.(s/sy)^n, where sy is exactly the 0.2 % offset yield strength Rp0.2. The script returns E, Rp0.2, the hardening exponent n and the permanent set after loading to 290 MPa.
#1. Tensile test of a 6061 aluminium sample: stress in MPa, total strain; -> "[s]" "[40, 80, 120, 160, 200, 230, 250, 265, 275, 285, 295]"; -> "[eps]" "[0.000575, 0.001162, 0.00175, 0.002312, 0.002881, 0.003407, 0.003972, 0.004834, 0.005816, 0.007634, 0.010951]"; #2. Ramberg-Osgood fit: eps = s/E + 0.002.s/sy^n, sy is the 0.2 % offset yield strength; json load "rx_ch_ro" (stat fit_model "s/E + 0.002*(s/sy)^n" "s" [s] [eps] "{\"E\": 70000, \"sy\": 270, \"n\": 15}"); -> "[e]" (json select "rx_ch_ro" /parameters/E); -> "[sy]" (json select "rx_ch_ro" /parameters/sy); -> "[n]" (json select "rx_ch_ro" /parameters/n); #3. Plastic strain left after unloading from 290 MPa; -> "[ep]" (math eval "0.002*(s/sy)^n" (concat "{\"s\": 290, \"sy\": " [sy] ", \"n\": " [n] "}")); concat "E = " (math round (math calc "[e]/1000") 1) " GPa, Rp0.2 = " (math round [sy] 1) " MPa, n = " (math round [n] 1) ", permanent set after 290 MPa = " (math round (math calc "100*[ep]") 3) " %"
E = 68.8 GPa, Rp0.2 = 276.3 MPa, n = 18.4, permanent set after 290 MPa = 0.486 %
- Fit only the elastic part with
stat fit"linear" to check E. - Compute the strain energy density with
num integrateof the fitted curve.
Thermal expansion coefficient and clamped thermal stress
A dilatometer measured a 100 mm steel rod from 20 to 400 degC. The script fits L(T) linearly, gives alpha = (dL/dT)/L0 in um/m.K and the thermal stress E.alpha.dT if the rod were fully clamped and heated by 150 K (E = 200 GPa).
#1. Dilatometer: length of a 100.000 mm steel rod versus temperature in degC; -> "[t]" "[20, 100, 200, 300, 400]"; -> "[l]" "[100.000, 100.097, 100.219, 100.343, 100.469]"; #2. Linear fit L = a + b.T, alpha = b / L0; json load "rx_ch_cte" (stat fit [t] [l] "linear"); -> "[alpha]" (math calc (concat (json select "rx_ch_cte" /b) "/100")); #3. Thermal stress if the rod is fully clamped and heated by 150 K, E = 200 GPa; -> "[sig]" (unit calc (concat "200 GPa * " [alpha] " * 150") "MPa"); concat "alpha = " (math round (math calc "[alpha]*1e6") 2) " um/m.K, r2 = " (math round (json select "rx_ch_cte" /r2) 5) ", clamped thermal stress = " (math round [sig] 0) " MPa"
alpha = 12.34 um/m.K, r2 = 0.99994, clamped thermal stress = 370 MPa
- Fit a quadratic with
pa polynomial_curve_fit_get_coeffto get alpha(T). - Compare with the yield strength to see if the clamped rod yields.
Is a heat treatment really harder? Vickers statistics
Eight HV10 indents were made on two heat treatments of a 42CrMo4 steel. The script gives the mean hardness of B with its 95 % confidence interval, a Welch t-test between A and B, and the usual estimate UTS = 3.3 x HV in MPa.
#1. Vickers HV10 indents on two heat treatments of a 42CrMo4 steel; -> "[a]" "[312, 318, 305, 322, 315, 309, 320, 311]"; -> "[b]" "[331, 326, 338, 329, 335, 324, 333, 330]"; #2. Mean hardness with its 95 % confidence interval; json load "rx_ch_hv" (stat conf_interval_mean [b] 0.95); #3. Welch test: is treatment B really harder; json load "rx_ch_tt" (stat ttest_2 [a] [b]); #4. Rough tensile strength estimate for steels: UTS = 3.3 x HV in MPa; concat "HV(B) = " (math round (json select "rx_ch_hv" /mean) 1) " +- " (math round (json select "rx_ch_hv" /margin) 1) ", p = " (json select "rx_ch_tt" /p_value) ", UTS(B) about " (math round (math calc (concat "3.3*" (json select "rx_ch_hv" /mean))) 0) " MPa"
HV(B) = 330.8 +- 3.8, p = 0.00002109341984128528, UTS(B) about 1091 MPa
- Check the normality of each series with
stat shapiro. - Use
stat mann_whitneyif outliers are present.
Weibull modulus of a ceramic
Ten alumina bars are broken in flexure. The script builds the Weibull plot in a loop (median ranks), fits the line to get the Weibull modulus with its confidence interval and the scale, then the mean strength with the gamma function and the failure probability at 300 MPa.
#1. Flexural strength of 10 alumina bars in MPa, sorted; json load "rx_wb" "{\"s\": [312, 335, 348, 356, 364, 371, 379, 388, 401, 425]}"; #2. Weibull plot: x = ln s, y = ln ln 1/1-F with median ranks F = i-0.3 / n+0.4; pa rl load_empty "rx_weibull"; for (-> "[i]" 0) (< [i] 10) (++ "[i]") { pa rl add_data "rx_weibull" (math calc (concat "ln(" (json select "rx_wb" (concat "/s[" [i] "]")) ")")) (math calc (concat "ln(-ln(1-(" [i] "+0.7)/10.4))")); }; #3. Weibull modulus m = slope, scale s0 = exp of -intercept/m; -> "[m]" (pa rl slope "rx_weibull"); -> "[s0]" (math calc (concat "exp(-(" (pa rl intercept "rx_weibull") ")/[m])")); #4. Mean strength s0 * gamma of 1+1/m, failure probability at 300 MPa; -> "[r]" (concat "n = " (pa rl count "rx_weibull") ", m = " (math round [m] 1) " +- " (math round (pa rl slope_confidence_interval "rx_weibull") 1) ", r2 = " (math round (pa rl r_square "rx_weibull") 4) ", s0 = " (math round [s0] 1) " MPa, mean = " (math round (math calc "[s0]*gamma(1+1/[m])") 1) " MPa, Pf at 300 MPa = " (math round (math calc "1-exp(-(300/[s0])^[m])") 4)); pa rl close "rx_weibull"; [r]
n = 10, m = 12.3 +- 1.4, r2 = 0.9822, s0 = 382.4 MPa, mean = 366.9 MPa, Pf at 300 MPa = 0.0487
- Scale to a bigger part with the effective volume: Pf = 1 - exp(-(V/V0) (s/s0)^m).
- Draw the Weibull plot with
plot points.
Fatigue life: Basquin law, Goodman correction and Miner rule
Fit the Basquin law to the S-N data of a steel, correct a load block with a mean stress by the Goodman line, get the life at each stress level and sum the Palmgren-Miner damage of one block of the loading spectrum.
#1. S-N data of a quenched and tempered steel, fully reversed: reversals 2Nf and stress amplitude in MPa; -> "[rev]" "[2e4, 1e5, 2e5, 1e6, 2e6, 1e7]"; -> "[sa]" "[520, 430, 395, 330, 305, 255]"; #2. Basquin law sa = sf'.2Nf^b, power fit on the log-log line; json load "rx_tu1_bq" (stat fit [rev] [sa] "power"); -> "[sf]" (json select "rx_tu1_bq" "/a"); -> "[b]" (json select "rx_tu1_bq" "/b"); #3. Block loading: 400 MPa with a mean stress of 100 MPa, Goodman correction with Su = 950 MPa, then 320 and 280 MPa; -> "[s1]" (math calc "400/(1-100/950)"); -> "[N]" (concat "[" (math calc "0.5*([s1]/[sf])^(1/[b])") ", " (math calc "0.5*(320/[sf])^(1/[b])") ", " (math calc "0.5*(280/[sf])^(1/[b])") "]"); json load "rx_tu1_nf" [N]; #4. Palmgren-Miner damage D = sum n_i/N_i for one block of 2000, 20000 and 100000 cycles; -> "[inv]" (concat "[" (/ 1 (json select "rx_tu1_nf" "/[0]")) ", " (/ 1 (json select "rx_tu1_nf" "/[1]")) ", " (/ 1 (json select "rx_tu1_nf" "/[2]")) "]"); -> "[D]" (vector dot "[2000, 20000, 100000]" [inv]); concat "Basquin: sf' = " (math round [sf] 1) " MPa, b = " (math round [b] 4) ", r2 = " (math round (json select "rx_tu1_bq" "/r2") 4) "; Goodman equivalent amplitude = " (math round [s1] 1) " MPa; Nf = " (math round_sig (json select "rx_tu1_nf" "/[0]") 3) ", " (math round_sig (json select "rx_tu1_nf" "/[1]") 3) ", " (math round_sig (json select "rx_tu1_nf" "/[2]") 3) " cycles; damage per block D = " (math round [D] 4) ", blocks to failure = " (math round (/ 1 [D]) 2)
Basquin: sf' = 1607.9 MPa, b = -0.1145, r2 = 0.9997; Goodman equivalent amplitude = 447.1 MPa; Nf = 35800, 663000, 2130000 cycles; damage per block D = 0.133, blocks to failure = 7.52
- Use the Gerber parabola or the SWT parameter instead of Goodman and compare the damage
- Count the cycles of a measured load history (rainflow) before applying Miner
Carburizing time for a given case depth
Find the gas carburizing time at 930 degC that gives 0.40 %C at 1.0 mm in a 0.20 %C steel with 1.00 %C at the surface (Fick second law, error function), then check the carbon level at 0.5 mm.
#1. Gas carburizing of a 0.20 %C steel at 930 degC, surface carbon 1.00 %, target 0.40 %C at 1.0 mm; -> "[cs]" 1.00; -> "[c0]" 0.20; -> "[cx]" 0.40; -> "[x]" 0.001; #2. Diffusion coefficient of carbon in austenite, D0 = 2.3e-5 m2/s, Q = 148 kJ/mol; -> "[d]" (math calc "2.3e-5*exp(-148000/(_R*(930+273.15)))"); #3. Fick second law: Cs - Cx / Cs - C0 = erf of x / 2.sqrt Dt, inverted by erf_inv; -> "[z]" (math erf_inv (math calc "([cs]-[cx])/([cs]-[c0])")); -> "[t]" (math calc "([x]/(2*[z]))^2/[d]"); #4. Carbon profile check at 0.5 mm after that time: C = C0 + Cs-C0 . erfc; -> "[c05]" (math calc (concat "[c0]+([cs]-[c0])*" (math erfc (math calc "0.0005/(2*sqrt([d]*[t]))")))); concat "D = " (math round (math calc "[d]*1e11") 3) "e-11 m2/s, z = " (math round [z] 4) ", carburizing time = " (math round (unit convert [t] "s" "h") 2) " h, carbon at 0.5 mm = " (math round [c05] 3) " %"
D = 0.864e-11 m2/s, z = 0.8134, carburizing time = 12.15 h, carbon at 0.5 mm = 0.652 %
- Draw the whole carbon profile with
plot functionand erfc. - Add a boost-diffuse cycle by superposition of two solutions.
Hall-Petch law from ASTM grain size numbers
Convert ASTM E112 grain size numbers into mean intercept lengths, fit the Hall-Petch law on yield strengths, and find the grain size (and ASTM number) needed to reach 450 MPa.
#1. Yield strength of a ferritic steel for 4 ASTM E112 grain size numbers G; -> "[g]" "[5, 7, 9, 11]"; -> "[sy]" "[212, 251, 305, 380]"; #2. Mean lineal intercept l in mm from G: G = -6.6457.log10 l - 3.298; -> "[l]" (concat "[" (math power 10 (math calc "-(5+3.298)/6.6457")) ", " (math power 10 (math calc "-(7+3.298)/6.6457")) ", " (math power 10 (math calc "-(9+3.298)/6.6457")) ", " (math power 10 (math calc "-(11+3.298)/6.6457")) "]"); #3. Hall-Petch fit: sigma_y = sigma0 + k.d^-1/2, k in MPa.mm^1/2; json load "rx_p4c_hp" (stat fit_model "s0 + k/sqrt(d)" "d" [l] [sy] "{\"s0\": 100, \"k\": 20}"); -> "[s0]" (json select "rx_p4c_hp" /parameters/s0); -> "[k]" (json select "rx_p4c_hp" /parameters/k); #4. Grain size needed for 450 MPa, d^-1/2 by a negative root; -> "[dt]" (math calc "([k]/(450-[s0]))^2"); concat "sigma0 = " (math round [s0] 1) " MPa, k = " (math round [k] 2) " MPa.mm^0.5 (" (math round (math calc "[k]/sqrt(1000)") 3) " MPa.m^0.5), R2 = " (math round (json select "rx_p4c_hp" /r2) 4) "; 450 MPa needs l = " (math round (math calc "[dt]*1000") 2) " um (d^-1/2 = " (math round (math nroot [dt] -2) 2) " mm^-1/2), ASTM G = " (math round (math calc (concat "-6.6457*" (math log10 [dt]) "-3.298")) 1)
sigma0 = 120.7 MPa, k = 21.81 MPa.mm^0.5 (0.69 MPa.m^0.5), R2 = 0.9999; 450 MPa needs l = 4.39 um (d^-1/2 = 15.09 mm^-1/2), ASTM G = 12.4
- Check the inverse Hall-Petch regime below 20 nm.
- Add solid-solution and precipitation terms to sigma0.
Recrystallization kinetics: JMAK (Avrami) law
Fit the Johnson-Mehl-Avrami-Kolmogorov law on the recrystallized fraction of an annealed aluminium alloy to get the Avrami exponent, then the times for 50 % and 95 % recrystallization.
#1. Recrystallized fraction of a cold-rolled aluminium alloy annealed at 350 degC, time in s; -> "[t]" "[60, 120, 180, 300, 450, 600, 900]"; -> "[x]" "[0.03, 0.15, 0.33, 0.66, 0.87, 0.96, 0.995]"; #2. JMAK law X = 1 - exp of -k.t^n; json load "rx_p4c_av" (stat fit_model "1-exp(-(k*t)^n)" "t" [t] [x] "{\"k\": 0.003, \"n\": 2}"); -> "[k]" (json select "rx_p4c_av" /parameters/k); -> "[n]" (json select "rx_p4c_av" /parameters/n); #3. Time for 50 % and 95 %: t = ln 1/1-X ^1/n / k, with log1p for accuracy; -> "[t50]" (math calc (concat (math power (math calc (concat "-" (math log1p -0.5))) (math calc "1/[n]")) "/[k]")); -> "[t95]" (math calc (concat (math power (math calc (concat "-" (math log1p -0.95))) (math calc "1/[n]")) "/[k]")); concat "Avrami exponent n = " (math round [n] 2) " , k = " (math round (math calc "[k]*1000") 3) "e-3 1/s; t50 = " (math round [t50] 0) " s, t95 = " (math round [t95] 0) " s, R2 = " (math round (json select "rx_p4c_av" /r2) 4)
Avrami exponent n = 1.88 , k = 3.37e-3 1/s; t50 = 244 s, t95 = 532 s, R2 = 0.9982
- Repeat at 3 temperatures and fit k with Arrhenius to get the activation energy.
- An exponent near 2 points to site saturation with 2D growth in a rolled sheet.
Principal stresses and safety factors (Mohr circle)
From the plane stress state at a weld toe, compute the Mohr circle, the principal stresses and angle, the maximum shear, and the von Mises and Tresca safety factors.
#1. Plane stress at a weld toe from a strain rosette, MPa: sigma_x, sigma_y, tau_xy and yield 250 MPa; -> "[sx]" 120; -> "[sy]" -40; -> "[txy]" 60; -> "[fy]" 250; #2. Mohr circle: centre and radius = hypot of sx-sy/2 and txy; -> "[c]" (math calc "([sx]+[sy])/2"); -> "[r]" (math hypot (math calc "([sx]-[sy])/2") [txy]); #3. Principal stresses and principal angle = 1/2.atan2 of 2.txy and sx-sy; -> "[s1]" (math calc "[c]+[r]"); -> "[s2]" (math calc "[c]-[r]"); -> "[th]" (math calc (concat "0.5*" (math atan2 (math calc "2*[txy]") (math calc "[sx]-[sy]")) "*180/pi")); #4. Von Mises and Tresca safety factors, s3 = 0; -> "[vm]" (math calc "sqrt([s1]^2-[s1]*[s2]+[s2]^2)"); -> "[tr]" (math calc "[s1]-[s2]"); concat "sigma1 = " [s1] " MPa, sigma2 = " [s2] " MPa at " (math round [th] 2) " deg, tau max = " [r] " MPa; von Mises = " (math round [vm] 1) " MPa, SF = " (math round (math calc "[fy]/[vm]") 2) "; Tresca SF = " (math round (math calc "[fy]/[tr]") 2)
sigma1 = 140 MPa, sigma2 = -60 MPa at 18.43 deg, tau max = 100 MPa; von Mises = 177.8 MPa, SF = 1.41; Tresca SF = 1.25
- Check the result with
matrix eigenon the 2x2 stress tensor. - Add the fatigue assessment with the stress range and an FAT class.
Cross-ply laminate stiffness by classical lamination theory
Build the extensional stiffness matrix A of a 0/90/90/0 carbon-epoxy laminate, factor it once with LU and reuse it for two load cases, then give the effective moduli Ex, nu_xy and Gxy.
#1. Carbon-epoxy ply, GPa: E1 = 140, E2 = 10, G12 = 5, nu12 = 0.3, ply thickness 0.125 mm; -> "[nu21]" (math calc "0.3*10/140"); -> "[d]" (math calc "1-0.3*[nu21]"); -> "[q11]" (math calc "140/[d]"); -> "[q22]" (math calc "10/[d]"); -> "[q12]" (math calc "0.3*10/[d]"); #2. A = sum of Qbar.t for the cross-ply 0/90/90/0 in GPa.mm, 2 x 0.125 mm at 0 deg and at 90 deg; -> "[a]" (matrix scalar_mul (concat "[[" (math calc "[q11]+[q22]") ", " (math calc "2*[q12]") ", 0], [" (math calc "2*[q12]") ", " (math calc "[q11]+[q22]") ", 0], [0, 0, 10]]") 0.25); #3. LU factorization once, reused for two load cases Nx = 100 N/mm and Nxy = 50 N/mm; json load "rx_p4c_lu" (matrix lu [a]); -> "[n]" "[[0.1, 0], [0, 0], [0, 0.05]]"; -> "[eps]" (matrix mul (matrix inverse (json select "rx_p4c_lu" /U)) (matrix mul (matrix inverse (json select "rx_p4c_lu" /L)) (matrix mul (json select "rx_p4c_lu" /P) [n]))); #4. Effective moduli of the 0.5 mm laminate: Ex = Nx / h.eps_x, Gxy = Nxy / h.gamma_xy; concat "eps_x = " (math round (math calc (concat "1e6*" (matrix get [eps] 1 1))) 0) " microstrain, eps_y = " (math round (math calc (concat "1e6*" (matrix get [eps] 2 1))) 0) " microstrain; Ex = " (math round (math calc (concat "0.1/(0.5*" (matrix get [eps] 1 1) ")")) 1) " GPa, nu_xy = " (math round (math calc (concat "-" (matrix get [eps] 2 1) "/" (matrix get [eps] 1 1))) 4) ", Gxy = " (math round (math calc (concat "0.05/(0.5*" (matrix get [eps] 3 2) ")")) 1) " GPa"
eps_x = 2654 microstrain, eps_y = -106 microstrain; Ex = 75.4 GPa, nu_xy = 0.04, Gxy = 5 GPa
- Add +45/-45 plies with the transformed Qbar (cos and sin of the angle).
- Compute the ply stresses and a Tsai-Wu failure index.
