--- name: bridge-tunnel-engine description: Preliminary structural calculations for bridges and tunnels (simply-supported & cantilever beam analysis, moving/point/UDL loads, shear & bending moment, deflection, simple tunnel lining thrust, vehicle load lanes). Python (numpy/scipy) engine for early sizing and sanity checks, with references to CSiBridge / MIDAS Civil / SAP2000 / PLAXIS for detailed design. Use when a user asks about bridge beam/girder analysis, bending moment, shear force, deflection, span sizing, tunnel lining, load combination, or preliminary structural check. ---
🌉 bridge-tunnel-engine — محرّك الحسابات الأولية للجسور والأنفاق
> حسابات أولية (preliminary) للـ early sizing + sanity checks. للتصميم التفصيلي: CSiBridge · MIDAS Civil · SAP2000 · OpenBridge · PLAXIS/Rocscience (مرجعية). > القاعدة: الدقة 100%. كل ناتج يربط بالافتراضات. هذا أداة فحص أولي، لا بديل عن solver معتمد + كود تصميم.
---
🎯 القدرات
1. Simply-supported beam — point loads + UDL → reactions, shear, max bending moment, deflection. 2. Cantilever beam — point/UDL → fixed-end moment, max deflection. 3. Moving load / influence — أقصى عزم تحت حمل متحرك على جسر بسيط. 4. Section check — مقارنة العزم المطلوب بمقاومة المقطع (Mn) لمقطع RC/steel أولي. 5. Tunnel lining (thrust) — تقدير أولي للـ hoop thrust في بطانة دائرية تحت ضغط أرضي.
---
🛠️ السكربت
scripts/bridge.py
الأوامر
bash
1) Simply-supported beam (point loads + UDL)
python3 scripts/bridge.py beam --span 20 --udl 30 --point "100@10" --E 30e9 --I 0.052) Cantilever
python3 scripts/bridge.py cantilever --length 5 --udl 20 --point "50@5"3) Moving point load -> max moment envelope on simple span
python3 scripts/bridge.py moving --span 30 --load 150 --steps 604) Section moment-capacity sanity (RC rectangular)
python3 scripts/bridge.py section --b 0.4 --d 0.9 --As 0.005 --fy 460e6 --fc 40e65) Tunnel lining thrust (circular, preliminary)
python3 scripts/bridge.py tunnel --radius 3.0 --cover 15 --gamma 20000 --K0 0.56) Demo
python3 scripts/bridge.py demopython3 scripts/bridge.py --help
> أحمال بالـ kN و kN/m، أطوال m، E بالـ Pa، I بالـ m4 (وحدات SI). نقاط الحمل: value@position.
---
📐 المعادلات (داخل code blocks — لا LaTeX)
Simply-supported, UDL w over span L:
R_A = R_B = wL/2
M_max (midspan) = wL^2 / 8
delta_max = 5wL^4 / (384EI)Simply-supported, point P at distance a from A (b=L-a):
R_A = Pb/L , R_B = Pa/L
M_under_load = Pab/L
delta_under (approx) = Pa^2b^2 / (3EIL)
Cantilever length L:
UDL w: M_fixed = wL^2/2 , delta = wL^4/(8EI)
Point P at tip: M_fixed = PL , delta = PL^3/(3EI)
Moving single load P on simple span (max moment):
occurs with load at midspan -> M_max = PL/4
RC rectangular section (under-reinforced, simplified):
a = Asfy / (0.85fcb)
Mn = Asfy(d - a/2)
Tunnel lining (preliminary hoop thrust, circular):
sigma_v = gamma cover (vertical overburden stress)
sigma_h = K0 sigma_v (horizontal)
N (thrust) ~ sigma_h radius (per unit length, simplified)
🔗 التكامل
- الكميات →
quantity-takeoff-engine. - المنهجية (erection sequence, post-tensioning) →
civil-methodology-engine. - التصميم التفصيلي → CSiBridge/SAP2000/MIDAS/PLAXIS (خارجي — مرجعية).
⚠️ قواعد
- نتائج preliminary فقط — لا تُستخدم للتصميم النهائي بدون solver + كود (AASHTO/Eurocode/BS).
- تحقق من الافتراضات (boundary conditions, load factors, dynamic amplification).
- للأنفاق: التحليل الحقيقي يحتاج soil-structure interaction (PLAXIS) — هذا تقدير overburden فقط.