- Deflection of a simply supported joist
- Von Mises safety factor of a shaft
- Concrete strength conformity
- Deflection of a beam with the CAS
- Buckling resistance of a steel column (Eurocode 3)
- Bottom reinforcement of a one-way RC slab (Eurocode 2)
- Member forces of a triangular roof truss by the method of joints
- Sag, length and tension of a suspended cable (catenary)
- Consolidation settlement and time of a clay layer (Terzaghi)
- Spot speed study: time mean, space mean and 85th percentile
Deflection of a simply supported joist
A C24 timber joist 100 x 220 mm spans 4.5 m under 3 kN/m. The script computes the second moment of area, the midspan deflection against L/300 and the bending stress.
#1. Timber joist C24: b = 100 mm, h = 220 mm, span 4.5 m, load 3 kN/m; -> "[I]" (unit calc "100 mm * (220 mm)^3 / 12" "cm^4"); #2. Midspan deflection 5 w L^4 / 384 E I, E = 11 GPa; -> "[d]" (unit calc (concat "5 * 3 kN/m * (4.5 m)^4 / (384 * 11 GPa * " [I] " cm^4)") "mm"); #3. Bending stress M / W with M = w L^2 / 8; -> "[s]" (unit calc (concat "(3 kN/m * (4.5 m)^2 / 8) * (110 mm) / (" [I] " cm^4)") "MPa"); -> "[lim]" (math calc "4500/300"); concat "I = " (math round [I] 0) " cm4, deflection = " (math round [d] 1) " mm for a limit L/300 = " [lim] " mm (" (if (<= [d] [lim]) {"OK"} {"NOT OK"}) "), bending stress = " (math round [s] 2) " MPa"
I = 8873 cm4, deflection = 16.4 mm for a limit L/300 = 15 mm (NOT OK), bending stress = 9.41 MPa
- Find the minimum height that passes with
num solve - Compare a steel IPE with E = 210 GPa
- Add the creep factor kdef for the final deflection of timber
Von Mises safety factor of a shaft
A 40 mm steel shaft carries a bending moment of 800 N.m and a torque of 1200 N.m. The script computes the bending and shear stresses, the von Mises stress and the safety factor against the yield strength.
#1. Steel shaft d = 40 mm under bending M = 800 N.m and torque T = 1200 N.m; -> "[sig]" (unit calc "32 * 800 N*m / (pi * (40 mm)^3)" "MPa"); -> "[tau]" (unit calc "16 * 1200 N*m / (pi * (40 mm)^3)" "MPa"); #2. Von Mises equivalent stress; -> "[vm]" (math calc "sqrt([sig]^2 + 3*[tau]^2)"); #3. Safety factor against the yield strength of C45 steel, Re = 430 MPa; -> "[sf]" (math calc "430/[vm]"); concat "sigma = " (math round [sig] 1) " MPa, tau = " (math round [tau] 1) " MPa, von Mises = " (math round [vm] 1) " MPa, safety factor = " (math round [sf] 2) (case ((< [sf] 1.5)) {" -> undersized"} {" -> OK"})
sigma = 127.3 MPa, tau = 95.5 MPa, von Mises = 208.7 MPa, safety factor = 2.06 -> OK
- Find the minimum diameter for a safety factor of 2 with
num solve - Add the fatigue check with a Goodman line
- Use
num uncertaintyon the loads to get the spread of the safety factor
Concrete strength conformity
15 cylinder results of a C30/37 concrete are received from the lab. The script computes the mean and standard deviation, the 5 % characteristic value and checks the EN 206 conformity criteria.
#1. 15 cylinder results of a C30/37 concrete, in MPa; -> "[f]" "[36.2, 38.5, 34.1, 39.8, 35.6, 37.9, 33.4, 40.2, 36.8, 35.1, 38.1, 34.7, 37.3, 36.5, 39.0]"; json load "rx_civ_s" (stat summary [f]); -> "[fcm]" (json select "rx_civ_s" /mean); -> "[sd]" (json select "rx_civ_s" /stddev); -> "[fmin]" (json select "rx_civ_s" /min); #2. Characteristic value at the 5 percent fractile: fcm + z0.05 * s; -> "[fk]" (math calc (concat "[fcm] + " (stat dist_inv "normal" "[0, 1]" 0.05) "*[sd]")); #3. EN 206 criteria for n = 15: fcm above fck + 1.48 s, every result above fck - 4; -> "[ok]" (and (>= [fcm] (math calc "30+1.48*[sd]")) (>= [fmin] 26)); concat "fcm = " (math round [fcm] 2) " MPa, s = " (math round [sd] 2) " MPa, estimated fck = " (math round [fk] 1) " MPa, conformity C30/37: " (if ([ok]) {"yes"} {"no"})
fcm = 36.88 MPa, s = 2.06 MPa, estimated fck = 33.5 MPa, conformity C30/37: yes
- Check the normality first with
stat shapiro - Compare two concrete plants with
stat ttest_2 - Draw the distribution with
stat histogram
Deflection of a beam with the CAS
The elastic line of a simply supported beam under a uniform load is solved symbolically: the differential equation with its boundary conditions gives y(x), then the rotation at the support and the famous 5qL^4/384EI at midspan, applied to an IPE 300 steel beam.
#1. Simply supported beam under a uniform load q: EI y'' = -M with M = q x L-x / 2, y = 0 at both supports; json load "rx_beam" (concat "{\"s\": " (cas dsolve "[\"y''(x) = -q*x*(L-x)/(2*EI)\", \"y(0) = 0\", \"y(L) = 0\"]" "y" "x") "}"); -> "[y]" (json select "rx_beam" "/s[0]/y(x)"); #2. Rotation at the support: y' at x = 0; -> "[dy]" (cas eval (concat "D(" [y] ", x)")); -> "[rot]" (cas simplify (string replace [dy] "x" "0")); #3. Midspan deflection, simplified; -> "[fmax]" (cas simplify (string replace [y] "x" "(L/2)")); #4. IPE 300 steel beam, L = 6 m, q = 10 kN/m: deflection in mm and the L/250 limit; -> "[f]" (math eval (concat (string replace [fmax] "ei" "EI") "*1000") "{\"q\": 10000, \"L\": 6, \"EI\": 17547600}"); concat "{\"y\": \"" [y] "\", \"rotation_support\": \"" [rot] "\", \"f_max\": \"" [fmax] "\", \"f_IPE300_mm\": " (math round [f] 2) ", \"limit_L_250_mm\": 24}"
{"y": "(L^3*q*x)/(24*ei)+(-L*q*x^3)/(12*ei)+(q*x^4)/(24*ei)", "rotation_support": "(L^3*q)/(24*ei)", "f_max": "5/384*(L^4*q)/ei", "f_IPE300_mm": 9.62, "limit_L_250_mm": 24}- Change the load: a point load in the middle gives qL^3/48EI.
- A cantilever needs y(0) = 0 and y'(0) = 0 in the list of conditions.
Buckling resistance of a steel column (Eurocode 3)
A pinned S355 column made of a CHS 168.3 x 6.3 tube is 4.5 m long. Compute its section properties, the Euler critical load, the reduced slenderness and the buckling resistance with curve a, then the longest column that still carries a design load of 900 kN.
#1. Steel column S355, pinned at both ends: CHS 168.3 x 6.3 tube; -> "[D]" 0.1683; -> "[t]" 0.0063; -> "[fy]" 355e6; -> "[E]" 210e9; -> "[A]" (math calc "pi/4*([D]^2-([D]-2*[t])^2)"); -> "[I]" (math calc "pi/64*([D]^4-([D]-2*[t])^4)"); -> "[i]" (math sqrt (/ [I] [A])); #2. Euler critical load for a buckling length of 4.5 m; -> "[L]" 4.5; -> "[Ncr]" (math calc "pi^2*[E]*[I]/[L]^2"); #3. Eurocode 3 buckling curve a for hot finished tubes, alpha 0.21; -> "[chi]" "1/(0.5*(1+0.21*(lb-0.2)+lb^2)+sqrt((0.5*(1+0.21*(lb-0.2)+lb^2))^2-lb^2))"; -> "[lb]" (math sqrt (/ (* [A] [fy]) [Ncr])); -> "[x]" (math eval [chi] (concat "{\"lb\": " [lb] "}")); -> "[NbRd]" (math calc "[x]*[A]*[fy]"); #4. Longest column carrying a design load of 900 kN: slenderness for which chi A fy = NEd; -> "[lbmax]" (num solve (concat [chi] "*" (* [A] [fy]) "-900e3") "lb" 0.2 3); -> "[Lmax]" (math calc "[lbmax]*pi*[i]*sqrt([E]/[fy])"); concat "A = " (math round (* [A] 1e4) 2) " cm2, i = " (math round (* [i] 100) 2) " cm, slenderness L/i = " (math round (/ [L] [i]) 1) " | Ncr = " (math round (unit convert [Ncr] "N" "kN") 0) " kN, reduced slenderness = " (math round [lb] 3) ", Nb,Rd = " (math round (/ [NbRd] 1000) 0) " kN | 900 kN is carried up to L = " (math round [Lmax] 2) " m"
A = 32.06 cm2, i = 5.73 cm, slenderness L/i = 78.5 | Ncr = 1078 kN, reduced slenderness = 1.027, Nb,Rd = 736 kN | 900 kN is carried up to L = 3.54 m
- Change the imperfection factor to 0.49 (curve c, cold formed tubes) and compare.
- Check the same column for a fire situation with a reduced E and fy.
Bottom reinforcement of a one-way RC slab (Eurocode 2)
A 20 cm reinforced concrete slab spans 4.5 m between two walls. The script derives the self-weight from the density and standard gravity, the ULS moment, the reduced moment mu, the steel area As and the number of HA10 bars per metre.
#1. Standard gravity from the constants, value only; -> "[g]" (string regexp_extract (constant physics_g) "[-0-9.]+E?[-0-9]*" 0); #2. Slab 0.20 m at 2500 kg/m3 + finishes 1.5 kN/m2, imposed load 2.5 kN/m2; -> "[gk]" (math calc "2500*[g]*0.20/1000+1.5"); -> "[ed]" (math calc "1.35*[gk]+1.5*2.5"); -> "[med]" (math calc "[ed]*4.5^2/8"); #3. C25/30: fcd = 16.7 MPa, B500: fyd = 435 MPa, d = 0.17 m, b = 1 m; -> "[mu]" (math calc "[med]/1000/(1*0.17^2*16.7)"); -> "[alpha]" (math calc "1.25*(1-sqrt(1-2*[mu]))"); -> "[as]" (math calc "[med]/1000/(0.17*(1-0.4*[alpha])*435)*10000"); #4. HA10 = 0.785 cm2: bars per metre and spacing; -> "[n]" (+ (math trunc (/ [as] 0.785)) 1); concat "g = " (math round [g] 4) " m/s2, gk = " (math round [gk] 2) " kN/m2, pEd = " (math round [ed] 2) " kN/m2" [_n_] "MEd = " (math round [med] 2) " kN.m/m, mu = " (math round [mu] 3) ", alpha = " (math round [alpha] 3) [_n_] "As = " (math round [as] 2) " cm2/m -> " [n] " HA10 per metre, spacing " (math trunc (/ 100 [n])) " cm"
g = 9.8067 m/s2, gk = 6.4 kN/m2, pEd = 12.39 kN/m2 MEd = 31.37 kN.m/m, mu = 0.065, alpha = 0.084 As = 4.39 cm2/m -> 6 HA10 per metre, spacing 16 cm
Member forces of a triangular roof truss by the method of joints
A timber triangular truss spans 8 m with a 2 m rise, trusses every 1.2 m. With the loads lumped at the apex, the script finds the pitch, the rafter length and, at the support joint, the rafter compression R csc(theta) and the tie tension R cot(theta).
#1. Geometry: half span 4 m, rise 2 m; -> "[theta]" (math atan2 2 4); -> "[rafter]" (math hypot 4 2); -> "[check]" (* 4 (math sec [theta])); #2. ULS load: dead 0.5 kN/m2, snow 0.8 kN/m2, spacing 1.2 m, span 8 m; -> "[w]" (math calc "(1.35*0.5+1.5*0.8)*1.2*8"); -> "[r]" (/ [w] 2); #3. Equilibrium of the support joint; -> "[c]" (* [r] (math csc [theta])); -> "[t]" (* [r] (math cot [theta])); concat "pitch = " (math round (math calc "[theta]*180/pi") 2) " deg, slope " (math round (* 100 (math tan [theta])) 1) " %, rafter = " (math round [rafter] 3) " m (check " (math round [check] 3) ")" [_n_] "W = " (math round [w] 2) " kN, R = " (math round [r] 2) " kN" [_n_] "rafter compression = " (math round [c] 2) " kN, tie tension = " (math round [t] 2) " kN"
pitch = 26.57 deg, slope 50 %, rafter = 4.472 m (check 4.472) W = 18 kN, R = 9 kN rafter compression = 20.12 kN, tie tension = 18 kN
- Run the apex joint with the same functions to check the symmetry.
- Turn the truss into a stiffness model and solve it with
matrix solve.
Sag, length and tension of a suspended cable (catenary)
A footbridge cable spans 100 m and weighs 15 N/m with a horizontal tension of 3 kN. The script computes the catenary parameter a = H/w, the sag, the cable length, the maximum tension and the distance from midspan where the cable is 2 m above its lowest point.
#1. Span L, weight w, horizontal tension H; -> "[L]" 100; -> "[w]" 15; -> "[H]" 3000; -> "[a]" (/ [H] [w]); -> "[u]" (/ [L] (* 2 [a])); #2. Sag, length and tension at the supports; -> "[f]" (* [a] (- (math cosh [u]) 1)); -> "[s]" (* (* 2 [a]) (math sinh [u])); -> "[tmax]" (* [H] (math cosh [u])); #3. Where is the cable 2 m above its lowest point; -> "[x]" (* [a] (math acosh (+ 1 (/ 2 [a])))); concat "a = " [a] " m, sag = " (math round [f] 3) " m, sag/span = 1/" (math round (/ [L] [f]) 0) [_n_] "cable length = " (math round [s] 3) " m, extra length = " (math round (- [s] [L]) 3) " m" [_n_] "max tension = " (math round [tmax] 1) " N, check w(a+f) = " (math round (* [w] (+ [a] [f])) 1) " N" [_n_] "2 m above the low point at +- " (math round [x] 2) " m from midspan"
a = 200 m, sag = 6.283 m, sag/span = 1/16 cable length = 101.045 m, extra length = 1.045 m max tension = 3094.2 N, check w(a+f) = 3094.2 N 2 m above the low point at +- 28.26 m from midspan
- Find H for a target sag with
num solve. - Compare with the parabola f = wL^2/8H, valid for shallow cables.
Consolidation settlement and time of a clay layer (Terzaghi)
A 6 m clay layer drained at both faces is loaded by an embankment. The script computes the oedometric settlement, the time for 90 % consolidation, the average degree of consolidation after 3 months and the excess pore pressure 1 m below the drained face.
#1. Layer H = 6 m, e0 = 0.95, Cc = 0.32, sigma0 = 80 kPa, embankment 60 kPa; -> "[s]" (math calc "6/(1+0.95)*0.32*log10((80+60)/80)"); #2. Double drainage: Hdr = 3 m, cv = 1.8 m2/year; -> "[t90]" (math calc "0.848*3^2/1.8"); #3. After 3 months, Tv and U, valid while U is below 60 %; -> "[tv]" (math calc "1.8*0.25/3^2"); -> "[pi]" (string regexp_replace (constant math_pi) "^\((\S+) .*$" "$1"); -> "[U]" (math sqrt (/ (* 4 [tv]) [pi])); #4. Early time solution near the drained face, z = 1 m; -> "[arg]" (/ 1 (* 2 (math sqrt (* 1.8 0.25)))); -> "[u]" (* 60 (math erf [arg])); concat "final settlement = " (math round (* 1000 [s]) 0) " mm, t90 = " (math round [t90] 2) " years" [_n_] "after 3 months: Tv = " [tv] ", U = " (math round (* 100 [U]) 1) " %, settlement = " (math round (* 1000 (* [s] [U])) 0) " mm" [_n_] "at z = 1 m: excess pore pressure = " (math round [u] 1) " kPa, dissipated = " (math round (* 100 (math erfc [arg])) 1) " %"
final settlement = 239 mm, t90 = 4.24 years after 3 months: Tv = 0.05, U = 25.2 %, settlement = 60 mm at z = 1 m: excess pore pressure = 42.5 kPa, dissipated = 29.2 %
- Use the series solution of U(Tv) with a
forloop for U above 60 %. - Plot the settlement versus time with
plot chart.
Spot speed study: time mean, space mean and 85th percentile
A radar recorded the speeds of 20 vehicles on an urban road. The traffic engineer needs the time mean speed, the space mean speed (harmonic mean), the modal speed, the 85th percentile speed used to set the limit, and Wardrop's relation as a check.
#1. Spot speeds in km/h; -> "[v]" "[42, 48, 51, 45, 50, 55, 47, 50, 61, 44, 50, 53, 46, 58, 49, 52, 50, 39, 56, 47]"; #2. Time and space mean speeds, modal speed; -> "[vt]" (math avg [v]); -> "[vs]" (stat harm_mean [v]); -> "[mode]" (stat mode [v]); #3. 85th percentile and Wardrop approximation vt = vs + sigma2 / vs; -> "[v85]" (stat percentile [v] 85); -> "[var]" (stat pvariance [v]); concat "time mean = " (math round [vt] 2) " km/h, space mean = " (math round [vs] 2) " km/h, mode = " [mode] [_n_] "v85 = " (math round [v85] 1) " km/h, posted limit = " (* 10 (math round (/ [v85] 10) 0)) " km/h" [_n_] "Wardrop check vs + var/vs = " (math round (+ [vs] (/ [var] [vs])) 2) " km/h"
time mean = 49.65 km/h, space mean = 49.1 km/h, mode = [50] v85 = 55.2 km/h, posted limit = 60 km/h Wardrop check vs + var/vs = 49.65 km/h
- Group the speeds into 5 km/h bins with
stat histogram. - Compute the flow from the density with q = k . vs.
