I worked on a simple structural analysis program. I am working in civil engineering where you would use structural analysis to model for example a bridge or a steel structure to calculate the internal forces and displacements that will occur on them for a given load.
Internal forces and displacements are the basis for further calculations like what type of concrete should be used or how thick a beam should be built.
To be more specific, the program is performing a finite element analysis on a simple beam-joint model (2 degrees of freedom) which is the simplest form of a finite element analysis.
Unfortunately I was only able to finish the calculations of the displacements. Calculating the internal forces from that should be trivial though.
I was planing to make a program where you could draw models, but I was only able to finish a simple viewer for the model (which is loaded from an input-text-file) and the calculated displacements.
Here see it in action: 2021-10-03 22-56-37.mp4
The things I had to do were:
- Design a file format for the input model
- Parse that file
- Write a system of equations solver (Gauss-Elimination-Method)
- Graph data structure for the model (I overengineered that a bit)
- Build the system of equations from the graph data
- GUI for viewing the model and the displacements
It was super fun! I learned how to do a finite element analysis, I learned how to use raylib and I learned to love Halts rectangle-cutting-ui-layouting (https://halt.software/dead-simple-layouts/ ).
I want to finish this program and do more complicated FEM programs in the future (maybe with Proctor, my CAD + Spreadsheet program that I showcased a couple of times).
Here are the binaries (Windows 64bit only):
Usage: Just drag and drop the file from the 'examples' folder into the window! Play around with the variables in the file in your editor of choice. Saving the file will update the model in the viewer.