Skip to main content

Basic package for doing beam bending analysis.

Project description

Simple Beam

License: MIT Code style: black PyPI Version

Introduction

A basic beam bending analysis package, intended to do simple beam bending moment & shear force analysis. The method used is McCauley's method, and the implementation is based on SymPy's beam analysis module, just more nicely wrapped for everyday usage.

The use of the term "Simple" does not mean that only simply-supported beams will be included in this package. McCauley's method can handle fixed ended (and even multi-span) beams. However, beams with axial loads, beams in 3-dimensions and frames, trusses etc. will not be included.

This is primarily intended to be a proof of concept package for me - at this point it is not a robust means for doing your engineering analysis. This may change as the package develops.

Installation

Use your preferred virtual environment solution and then simply pip install.

pip install simplebeam

Basic Usage

The following demonstrates basic usage of simplebeam:

>>> from simplebeam import simple, point
>>> length = 1
>>> load = point(position=length/2, magnitude=1)
>>> beam = simple(length=length, loads=load)
>>> beam.max_moment()
0.25

By itself, this seems like overkill - M = PL / 4 would be faster. However, consider the following examples:

>>> from simplebeam import simple, udl
>>> length = 5
>>> l1 = udl(magnitude=-5000)
>>> l2 = udl(magnitude=-5000, start=0, end=3.5)
>>> beam = simple(length=length, elastic_modulus=200e9, second_moment=0.0001, loads=[l1, l2])
>>> beam.max_moment_locations()
((0.0, 0.0), (2.4000000000000004, -28500.0))

>>> beam.plot_deflection()

Or:

>>> from simplebeam import Beam, pin, udl
>>> length = 5
>>> r1 = pin(position=0)
>>> r2 = pin(position=2)
>>> r3 = pin(position=4)
>>> l1 = udl(magnitude=-5000)
>>> beam = Beam(length=length, elastic_modulus=200e9, second_moment=0.0001, restraints=[r1, r2, r3], loads=l1)
>>> beam.plot_moment()

>>> beam.reaction_summary()

                                  Reactions                                   
┌────────────────────────────┬────────────────────────────┬───────────────────┐
          Position                     Force                  Moment       
├────────────────────────────┼────────────────────────────┼───────────────────┤
         0.000e+00                   4.062e+03                 None        
         2.000e+00                   1.062e+04                 None        
         4.000e+00                   1.031e+04                 None        
├────────────────────────────┼────────────────────────────┼───────────────────┤
            Max.                     1.062e+04                 None        
            Min.                     4.062e+03                 None        
└────────────────────────────┴────────────────────────────┴───────────────────┘

Documentation

You're reading it. Additionally, check the tests folder to see additional uses. I may add documentation at some future point in time but no promises.

Future Development

The following future developments may be done:

  • Implementation of helper methods for different load types.
  • Multiple load cases & load combinations
  • Implementation of beams with pins & varying properties.

Disclaimer

While all efforts have been made to ensure that the appropriate engineering theories etc. have been implemented correctly, it is the user's responsibilty to ensure that all output is correct. In particular, users should be familiar with basic structural mechanics and standard engineering practices.

For example, you should be doing independent checks of tools you take from unknown authors on the internet.

Contributing

Feel free to contribute through a pull request to provide bug fixes, new features or documentation.

Note that the intent of this program is that it will remain focussed on simple 2D beam bending only.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplebeam-0.0.7.tar.gz (82.7 kB view details)

Uploaded Source

Built Distribution

simplebeam-0.0.7-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file simplebeam-0.0.7.tar.gz.

File metadata

  • Download URL: simplebeam-0.0.7.tar.gz
  • Upload date:
  • Size: 82.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for simplebeam-0.0.7.tar.gz
Algorithm Hash digest
SHA256 40675e2c8f039b4ec581b5ad9ff928c4e49e2cd7be5fd6855259fe749a6f8975
MD5 08f01f2fb6c6e72adb1c72b5f4d6ad69
BLAKE2b-256 e22b0dc5f2462d6d72ebaf64ddf052f4e4d5541a175618c8cbe043155dbdf8cb

See more details on using hashes here.

File details

Details for the file simplebeam-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: simplebeam-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for simplebeam-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1693ac378b196289918f9a949213a5ce5179dbda23a54aca0671ebc6cc87e059
MD5 f73f803d532136c85283d146abce4c24
BLAKE2b-256 503a427e322ebeb0059c4b36a6cda9c57af5b3aef6509d7a43fc520aabf53033

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page