# How Bridges Work 7, Exercise 3: catenary or parabola? # A cable hanging under its own weight forms a catenary, y = a (cosh(x / a) - 1). # With a deck load spread along the span, it forms a parabola. For a 300 m span and # sag-to-span ratios of 1/20, 1/10 and 1/5, find the catenary parameter a that # gives the stated sag (use bisection), then the difference in metres between the # catenary and the same-sag parabola a quarter of the way across. Which ratio # makes the choice of curve matter most? import math def catenary_sag(a, half): return a * (math.cosh(half / a) - 1) def solve_a(span, sag): lo, hi = 1.0, 1e7 for _ in range(200): mid = (lo + hi) / 2 if catenary_sag(mid, span / 2) > sag: lo = mid else: hi = mid return (lo + hi) / 2 span = 300 for ratio in (20, 10, 5): sag = span / ratio a = solve_a(span, sag) x = span / 4 y_cat = catenary_sag(a, span / 2) - catenary_sag(a, span / 2 - x) y_par = sag * (1 - (1 - x / (span / 2)) ** 2) print(f"1/{ratio}", round(a), round(y_cat, 3), round(y_par, 3), round(y_cat - y_par, 3)) # Output when run: # 1/20 752 11.259 11.25 0.009 # 1/10 380 22.573 22.5 0.073 # 1/5 197 45.532 45.0 0.532 # # Columns: sag ratio, catenary parameter a (m), height of the catenary at a quarter # span (m), height of the parabola (m), difference (m). At 1/20 the two curves # differ by 9 mm, at 1/10 by 73 mm and at 1/5 by 0.53 m. For flat cables the # difference is negligible, which is why engineers use the simpler parabola for a # cable carrying a deck, while the catenary matters for a cable under its own # weight and for steep, deeply sagging cables.