Structural analysis tool for validating a matboard bridge design under train loading conditions. Calculates factors of safety across tension, compression, shear, and glue-line shear failure modes using the PyCBA continuous beam analysis library.
The project models a 1200 mm span bridge and analyzes its response to a multi-vehicle train configuration (locomotive + light freight car + heavy freight car). It computes critical moments and shear forces, then checks them against material strengths to determine factors of safety and maximum allowable loads.
| File | Description |
|---|---|
beam_functions.py |
Core BeamModel class wrapping PyCBA for beam modeling, support definition, train creation, and analysis |
bridge.py |
Main analysis script defining beam geometry, material properties, and running FOS / failure load calculations |
test of beam_functions.py |
Example script demonstrating basic BeamModel usage with multiple supports and point loads |
- Python 3
- PyCBA
- NumPy
- Matplotlib
Install dependencies:
pip install pycba numpy matplotlibRun the main analysis:
python bridge.pyThis will:
- Create a beam model with a 1200 mm span and roller support
- Run a train analysis with a 100 N baseline car load
- Print factors of safety for tension, compression, shear, and glue shear
- Display beam diagrams and train interaction plots
To find the maximum load before failure, uncomment the analyze_max_P() call in bridge.py. This iteratively increases the car load from 135 N to 1000 N and reports which failure mode is reached first.
| Property | Value |
|---|---|
| Span length | 1200 mm |
| Elastic modulus (E) | 4000 N/mm² |
| Moment of inertia (I) | 629,372 mm⁴ |
| Centroidal axis (from bottom) | 81.5 mm |
| Total height | 103.81 mm |
| Mode | Strength |
|---|---|
| Tension | 30 MPa |
| Compression | 6 MPa |
| Shear | 4 MPa |
| Glue shear | 2 MPa |
MIT