# How Bridges Work 2, Exercise 2: choosing a steel I-beam # A beam spans 6 m and carries a single 80 kN load at midspan (ignore the # beam's own weight). Allowable bending stress is 165 MPa and the # deflection limit is span/360. E = 200 000 MPa. # Candidate I-sections: (flange width, flange thickness, web thickness, depth) def i_section(bf, tf, tw, depth): inner = depth - 2 * tf return (bf * depth**3 - (bf - tw) * inner**3) / 12 span_m, load = 6, 80 E = 200e3 allow = 165 m = load * span_m / 4 # kN m, point load at midspan print("M =", m) sections = [(100, 8, 5, 200), (125, 10, 6, 250), (150, 12, 8, 300), (150, 14, 8, 350)] for bf, tf, tw, d in sections: i = i_section(bf, tf, tw, d) stress = m * 1e6 * (d / 2) / i defl = load * 1000 * (span_m * 1000) ** 3 / (48 * E * i) limit = span_m * 1000 / 360 ok = stress <= allow and defl <= limit print(d, round(i), round(stress, 1), round(defl, 1), round(limit, 1), ok) # Output when run: # M = 120.0 # 200 17349760 691.7 103.7 16.7 False # 250 42104333 356.3 42.8 16.7 False # 300 88709184 202.9 20.3 16.7 False # 350 140866899 149.1 12.8 16.7 True # # Columns: depth (mm), I (mm4), stress (MPa), deflection (mm), limit (mm), ok. # Only the 350 mm section passes: its stress (149.1 MPa) is under 165 MPa # and its deflection (12.8 mm) is under the 16.7 mm limit. The 300 mm # section fails on both counts (202.9 MPa and 20.3 mm). Note how the # deflection falls as I rises: it is proportional to 1/I.