Summary
In this lecture, we'll cover:
- How to generate a structured text-based summary of structural analysis results
- How to extract and index reaction forces from the global force vector
- How to output member forces programmatically using loops and enumeration
- How to compute and display nodal displacements from the global displacement vector
- How to format, scale and round numerical results for clear presentation
In this lecture, we focus on producing a clear, quantitative text summary of a structure’s behaviour to complement the qualitative insight provided by the deflected shape plot. We extract reaction forces directly from the previously computed global force vector, carefully indexing the restrained degrees of freedom and formatting the output so that results are presented in kN and rounded appropriately. The key idea is that all results have already been calculated — the main challenge is correctly accessing and presenting the relevant values.
We then extend this approach to member forces and nodal displacements. Using loops, we systematically step through the members array to report axial forces, again scaling and rounding for clarity. Finally, we compute horizontal and vertical nodal displacements by identifying the correct degrees of freedom within the global displacement vector. Throughout, we ensure that no values are hard coded; instead, all outputs are generated programmatically from the data defined at the top of the file. In this way, we produce both qualitative and quantitative descriptions of structural behaviour in a fully automated and generalisable manner.
Next up:
In the next lecture, we begin Section 9, where we put our completed solver to the test by analysing several example truss structures.
Tags
Please log in or enroll to continue
If you've already enrolled, please log in to continue.
The Direct Stiffness Method for Truss Analysis with Python
Build your own finite element truss analysis software using Python and tackle large scale structures.
After completing this course...
- You’ll understand how to use the Direct Stiffness Method to build complete structural models that can be solved using Python.
- You’ll have your own analysis programme to identify displacements, reactions and internal member forces for any truss.
- You’ll understand how common models of elastic behaviour such as plane stress and plane strain apply to real-world structures.