Skip to content

b-smyers/bridge-truss-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Bridge Banner Image

Bridge Truss Solver

Built on Python

This truss-simulation includes:

  • Tension and compression calculations for each member in a truss
  • Support for one rolling and one fixed node
  • Supports as many load forces as you want
  • Only allows for completely vertical load vectors (wip)
  • No units
  • Visualize stress on individual members
  • Visualize members in tension and compression

Four test bridges are provided that are ready to simulate.
Open the BridgeSim.py file and change the name of the data you want to run.

#Load Bridge Data
try:
    f = open('Bridges/TestBridgeData1.json') <--- #You can change the bridge here
except:
    raise Exception("No bridge data file could be found.")
else:
    bridgeData = json.load(f)
    f.close()

The project now supports materials!
The general format for materials are as follows:

{
    "Name": "Balsa",
    "CrossSectionalDimensions": [0.003175, 0.003175],
    "Density": 0.13,
    "CompressionStrength": 7,
    "TensileStrength": 14
}

Units:

  • Dimensions: meter x meter
  • Density: grams per cubic centimeter
  • Tensile & Compression Strength: Mega Pascal
The materials folder contains balsa wood you can experiment with for now. As of the current version, density is not used and will throw an error if not included in your material file. If you would like to add your own materials you can use the balsa wood as an example.
You can change the material for the bridge:
#Load Material Data
try:
    f = open('Materials/Balsa.json') <--- #You can change the material here
except:
    raise Exception("No material data file could be found.")
else:
    materialData = json.load(f)
    f.close()

While using a material you can visualize the general stress on each member.