Package: indeterminatebeam
Indeterminate BeamIndeterminateBeam is a Python Package aiming to serve as a foundation for civil and structural engineering projects in Python. The module can also serve as a stand-alone program and is useful for determining:reaction forces for indeterminate beamsinternal forces for indeterminate beams (shear, bending, axial)deflections of beams due to resulting forcesaxial force, shear force, bending moment and deflection diagrams.The package is based mainly on engineering concepts of statics as described in (Hibbeler, 2013), and Python packages Sympy (Meurer et al., 2017) and Plotly (Plotly Technologies Inc, 2015).Thepackage documentationprovides a brief overview of the theory behind the solutions used to calculate the forces on the indeterminate beam. The full package documentation can be accessedhere.Text-based examples of the package presented in thedocumentationcan be found on thisJupyter Notebookand a web-based graphical user interface (GUI) is available athttps://indeterminate-beam.herokuapp.com/.Project PurposeThe purpose of this project is two-fold:Create afree websitethat has more features than paid and free beam calculators that exist on the web.Provide a foundation for civil and structural engineers who want to create higher order engineering Python programs.Several (mostly paid) beam calculator websites currently exist online, providing the same service as this package, with web traffic in the hundreds of thousands per month (Similiarweb, 2021). Despite this, no online service exists (to the authors knowledge) that has all the features ofIndeterminateBeamand is also free.Similiarly, there are no well-documented indeterminate beam solving Python packages (to the authors knowledge) despite the importance of such a calculation in engineering. Several python finite element analysis (FEA) packages do exist, however they are vastly overcomplicated for someone wanting to only solve for forces on a one-dimensional beam.This python package was heavily inspired bybeambending(Carella, 2019), a module created for educational purposes by Alfredo Carella of the Oslo Metropolitan University. The beambending module, although well documented, can only solve for simply supported beams consisting of a pin and roller support. Thepackage documentationfor this project includes a more rigorous overview of the theory behind the basics for solving determinate structures.Functionality and UsageA typical use case of theIndeterminateBeampackage involves the following steps:Create aBeamobjectCreateSupportobjects and assign toBeamCreateLoadobjects and assign toBeamSolve for forces onBeamobjectPlot resultsYou can follow along with the example below in this web-basedJupyter Notebook.
Alternatively, you can download the jupyter-notebook for this examplehere, or the python file for this codehere.The units used throughout the Python package are the base SI units (newtons and metres), but can be updated using theupdate_unitsmethod. Units and load direction conventions are described in thepackage documentation.Creating a BeamThe creation of aBeaminstance involves the input of the beam length (m) and optionally the input of the Young's Modulus (E), second moment of area (I), and cross-sectional area (A). E, I and A are optional and by default are the properties of a steel 150UB18.0. For a beam with constant properties, these parameters will only affect the deflections calculated and not the distribution of forces, unless spring supports are specified.fromindeterminatebeamimportBeam# Create 7 m beam with E, I, A as defaultsbeam=Beam(7)# Create 9 m beam with E, I, and A assigned by userbeam_2=Beam(9,E=2000,I=10**6,A=3000)Defining SupportsSupportobjects are created separately from theBeamobject, and are defined by an x-coordinate (m) and the beams translational and rotational degrees of freedom.Degrees of freedom are represented by a tuple of 3 booleans, representing the x , y , and m directions respectively. A1indicates the support is fixed in a direction and a0indicates it is free.Optionally, stiffness can be specified in either of the translational directions, which overrides the boolean specified.fromindeterminatebeamimportSupport# Defines a pin support at location x = 5 ma=Support(5,(1,1,0))# Defines a roller support at location x = 0 mb=Support(0,(0,1,0))# Defines a fixed support at location x = 7 mc=Support(7,(1,1,1))# Assign the support objects to a beam object created earlierbeam.add_supports(a,b,c)Defining loadsLoadobjects are created separately from theBeamobject, and are generally defined by a force value and then a coordinate value, however this varies slightly for different types of loading classes.fromindeterminatebeamimportPointLoadV,PointTorque,DistributedLoadV# Create a 1000 N point load at x = 2 mload_1=PointLoadV(1000,2)# Create a 2000 N/m UDL from x = 1 m to x = 4 mload_2=DistributedLoadV(2000,(1,4))# Defines a 2 kN.m point torque at x = 3.5 mload_3=PointTorque(2*10**3,3.5)# Assign the load objects to the beam objectbeam.add_loads(load_1,load_2,load_3)Solving for ForcesOnce theBeamobject has been assigned withLoadandSupportobjects it can then be solved. To solve for reactions and internal forces we call the analyse function.beam.analyse()Plotting resultsAfter the beam has been analysed we can plot the results.fig_1=beam.plot_beam_external()fig_1.show()fig_2=beam.plot_beam_internal()fig_2.show()Theplot_beam_externalandplot_beam_internalmethods collate otherwise seperate plots.The script above produces the following figures:Installing the packageIf you want to install theindeterminatebeampackage, you run this one-liner:pipinstallindeterminatebeamNOTE: You need Python 3 to install this package (you may need to writepip3instead ofpip).The library dependencies are listed in the filerequirements.txt, but you only need to look at them if you clone the repository.
If you install the package viapip, the listed dependencies should be installed automatically.Future WorkThe following are areas that can be implemented in future:allow for segmental beam properties (E,I,A)calculate axial deflectionsLatex or PDF output of calculationsMore indeterminate beams in testingContributingThe guidelines for contributing are specifiedhere.SupportThe guidelines for support are specifiedhere.LicenseCopyright (c) 2020, Jesse BonannoReferencesCarella, A. (2019). BeamBending: A teaching aid for 1-d shear force and bending moment
diagrams.Journal of Open Source Education, 2(16), 65.https://doi.org/10.21105/jose.00065Hibbeler, R. (2013).Mechanics of materials. P.Ed Australia. ISBN: 9810694369Meurer, A., Smith, C. P., Paprocki, M., Čertík, O., Kirpichev, S. B., Rocklin, M., Kumar,
A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T., Vig, S., Granger, B. E., Muller,
R. P., Bonazzi, F., Gupta, H., Vats, S., Johansson, F., Pedregosa, F., … Scopatz, A.
(2017). SymPy: symbolic computing in Python.PeerJ Computer Science, 3, e103.https://doi.org/10.7717/peerj-cs.103Similiarweb, 2021,https://www.similarweb.com/. Accessed 1 Mar 2021.Plotly Technologies Inc.Collaborative data science. Montréal, QC, 2015.https://plot.ly."