alphacheng / CR_beam_diagram

This containes the code for the web app which produces the shear and bending moment diagram of a beam subjected to external loads

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Beam loading simulator

This contains the code for the web app which produces the shear and bending moment diagram of a beam subjected to external loads. There are three main parts: the Solver, the assets and the app. The web app is given below:

https://cr-beam-loads.herokuapp.com/

The Solver contains functions which calculate the internal shear force, the internal moments, and the reaction loads. It can solve for a cantilever and a simply supported beam. The solver accepts loads symbolic functions defined using sympy library and calculates the answer analytically. This ensures that the calculations have zero error. On the other hand, the solver becomes slow as the number of input loads increases. This may be mitigated using a numerical solver and this is suggested for future work. The solver can accept any kind of load as long as it can be analytically defined.

The app containes the code for generating a web based graphical user interface. The user can select between two types of beams - Cantilever and simply supported beam - and specify the dimension and support for the beam. Three types of loads can be placed on the beam: point force, point moment, and linear distributed force. Clicking the submit button adds the specified load into the load data table. Within the load data table, the user can modify the load and also remove it. Finally, the update button calculates the internal loads and displays the external loads and internal loads in a figure.

For a cantilever, the reaction loads were calculated by:

first equation

second equation

For the simply supported beam, the reaction loads were calculated by:

third equation

fourth equation

The assets file contains the functions used to define the beam figure and the load markers.

Development environment

This app was developed using python 3.7.3. It uses the following libraries: plotly, dash, sympy and numpy.

Usage

Run the python script and go the address shown in the console window. This app is also hosted on Heroku. So, this app can be accessed by going to the website https://cr-beam-loads.herokuapp.com/.

License and Author

The work is licensed under the MIT license. The code was written by Rohit K. John

Reference

“Aerospace Mechanics of Materials - TU Delft OCW.” n.d. TU Delft OCW. Accessed July 9, 2019. https://ocw.tudelft.nl/courses/aerospace-mechanics-of-materials/.

Recommendation for improvements

The solver calculates the internal loads and reaction force analytically using sympy Computer algebra system. Although this is the exact solution, the solver slows down considerably when handling piecewise functions. A numerical solver could be implemented to improve the speed

A column showing serial numbers can be added to the load data table to easily refer to a load

About

This containes the code for the web app which produces the shear and bending moment diagram of a beam subjected to external loads

License:MIT License


Languages

Language:Python 76.5%Language:Jupyter Notebook 16.9%Language:CSS 6.6%