{ "info": { "author": "Alfredo Carella", "author_email": "alfredocarella@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Programming Language :: Python :: 3" ], "description": "# BeamBending: a teaching aid for 1-D shear-force and bending-moment diagrams\n\n[![Version](https://img.shields.io/badge/version-1.0.1-blue.svg)](https://github.com/alfredocarella/simplebendingpractice/archive/1.0.1.tar.gz)\n[![License](https://img.shields.io/badge/license-CC--BY%204.0-lightgrey.svg)](https://github.com/alfredocarella/simplebendingpractice/raw/master/LICENSE)\n[![status](http://jose.theoj.org/papers/8f3c2cbbcd7338364864a8c8e7155fa5/status.svg)](http://jose.theoj.org/papers/8f3c2cbbcd7338364864a8c8e7155fa5)\n[![Build Status](https://travis-ci.com/alfredocarella/simplebendingpractice.svg?branch=master)](https://travis-ci.com/alfredocarella/simplebendingpractice)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/alfredocarella/simplebendingpractice/master?filepath=simple_demo.ipynb)\n\n\nBeamBending is _both_ an educational module _and_ a Python package, intended to serve as a teaching aid during a first course in _Statics_.\nThe aim of this module is to enhance clarity and provide visual hands-on examples while introducing the concepts of:\n* stresses on slender _one-dimensional_ solids (i.e. beams)\n* normal force, shear force and bending moment diagrams\n\nThe [package documentation](https://alfredocarella.github.io/simplebendingpractice/) includes a simple (but still rigorous) explanation of the background theory, inspired in [@Beer2017] and [@Bell2015].\nIt is assumed that the students understand static equilibrium of flat rigid bodies, but a short recap is provided.\nCode snippets that reproduce the theory examples are presented next to each result.\n\nThe package can be used by\n* teachers who want to automatically create problem sets with their solutions (easily scriptable, _random-problem-generator friendly_);\n* students who want to verify their solutions to introductory problem sets;\n* students who like to play with example problems and receive immediate visual feedback about how simple modifications to imposed loads affect the resulting reaction forces and internal stresses.\n\nThe materials are distributed publicly and openly under a Creative Commons Attribution license, [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)\n\n\n\n\n\n## Statement of Need\nStatics courses in undergraduate engineering programs are sometimes taught before the knowledge of the relevant mathematical tools (i.e. simple calculus and linear vector algebra) is fully mature.\nIntroducing a topic that resembles the mindset of calculus and employs an unintuitive standard sign convention, on top of a wobbly mathematical foundation, makes it fairly common for students to get lost in the calculations.\n\nThis package/module aims to bridge this gap and simplify students' first contact with this challenging new topic by working on two fronts simultaneously:\n1. Explain the [background theory](https://alfredocarella.github.io/simplebendingpractice/background.html) from a simple example with focus on connecting the mathematical description with the physical beam model (`beambending` code snippets are interleaved in order to illustrate how the package works).\n2. Provide a temporary scaffolding that helps to establish an immediate visual association between beam load states and internal stresses.\n\n\n## Functionality and Usage\nA typical use case of the `beambending` package always involves creating an instance of the `Beam` class. The class constructor takes an optional _length_ argument, which defaults to 10 in case no argument is provided.\n\n```python\nfrom beambending import Beam\nbeam = Beam(9) # Initialize a Beam object of length 9m\n```\n\nAfter a `Beam` object is created, the properties corresponding to the x-coordinates of the pinned and rolling supports must be defined.\n\n```python\nbeam.pinned_support = 2 # x-coordinate of the pinned support\nbeam.rolling_support = 7 # x-coordinate of the rolling support\n```\n\nNote that the Beam class currently supports only statically determined beams with _exactly_ one pinned and one roller support.\n\nEach load applied to the beam requires an instance of one of the load classes `DistributedLoadH`, `DistributedLoadV`, `PointLoadH`, or `PointLoadV`.\nThe load classes are simply _namedtuples_, and make the resulting scripts easier to read by making the user's intention explicit.\nThe symbolic variable `x`, also defined by the module, is used for defining variable distributed loads.\n\n```python\nfrom beambending import DistributedLoadV, PointLoadH, PointLoadV, x\n```\n\nThe loads can be applied to the `Beam` by passing an iterable (list or tuple) to the method `add_loads`.\n\n```python\nbeam.add_loads((\n PointLoadH(10, 3), # 10kN pointing right, at x=3m\n PointLoadV(-20, 3), # 20kN downwards, at x=3m\n DistributedLoadV(-10, (3, 9)), # 10 kN/m, downward, for 3m <= x <= 9m\n DistributedLoadV(-20 + x**2, (0, 2)), # variable load, for 0m <= x <= 2m\n ))\n```\n\nAfter the problem is fully defined (beam length + placement of supports + loads), the `plot` method can me invoked to plot a sketch of the loaded beam together with its corresponding load diagrams (normal force, shear force and bending moment).\n\n```python\nfig = beam.plot()\n```\n\nThe `plot` method is actually a wrapper that combines these four methods: `plot_beam_diagram`, `plot_normal_force`, `plot_shear_force` and `plot_bending_moment` into a single A4-sized printer-friendly plot.\n\nThe script above produces the following figure:\n![Output corresponding to the example code above](https://github.com/alfredocarella/simplebendingpractice/raw/master/examples/example_1.png)\n\nYou can read about this example in context in the [documentation](https://alfredocarella.github.io/simplebendingpractice/examples/example_1.html), or try it in a Jupyter notebook hosted online: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/alfredocarella/simplebendingpractice/master?filepath=simple_demo.ipynb)\n\nFor more sophisticated applications, like automatic problem generation, you should read the [package documentation](https://alfredocarella.github.io/simplebendingpractice/reference.html).\n\n\n\n## Installing the package\nIf you want to install the `beambending` package, you run this one-liner:\n\n```shell\npip install --user beambending\n```\n\n> **NOTE**: You need Python 3 to install this package (you may need to write `pip3` instead of `pip`).\n\nThe library dependencies are listed in the file `requirements.txt`, but you only need to look at them if you clone the repository.\nIf you install the package via `pip`, the listed dependencies should be installed automatically.\n\n\n## How to contribute to BeamBending\n\nThe guidelines for contributing are specified [here](https://github.com/alfredocarella/simplebendingpractice/blob/master/CONTRIBUTING.md).\n\n## Copyright and License\n\n(c) 2018 Alfredo R. Carella. All content is under Creative Commons Attribution [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode.txt).\n\nYou are welcome to re-use this content in any way.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/alfredocarella/simplebendingpractice/archive/1.0.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alfredocarella/simplebendingpractice", "keywords": "", "license": "cc-by-4.0", "maintainer": "", "maintainer_email": "", "name": "beambending", "package_url": "https://pypi.org/project/beambending/", "platform": "", "project_url": "https://pypi.org/project/beambending/", "project_urls": { "Download": "https://github.com/alfredocarella/simplebendingpractice/archive/1.0.1.tar.gz", "Homepage": "https://github.com/alfredocarella/simplebendingpractice" }, "release_url": "https://pypi.org/project/beambending/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Educational package for visualizing shear forces and bending moments on 1-D beams", "version": "1.0.1" }, "last_serial": 5770162, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "b54f588933830470d31c88d321f7a61d", "sha256": "99b27298854789ae9295c6ac15c93186533c54bdba4a7d635ced4186596ad696" }, "downloads": -1, "filename": "beambending-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b54f588933830470d31c88d321f7a61d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11048, "upload_time": "2019-09-02T10:41:23", "url": "https://files.pythonhosted.org/packages/8e/23/a57e9957041971fff64a4a8c11fbb6b016ab8416de41c3d5e6228444150a/beambending-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b54f588933830470d31c88d321f7a61d", "sha256": "99b27298854789ae9295c6ac15c93186533c54bdba4a7d635ced4186596ad696" }, "downloads": -1, "filename": "beambending-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b54f588933830470d31c88d321f7a61d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11048, "upload_time": "2019-09-02T10:41:23", "url": "https://files.pythonhosted.org/packages/8e/23/a57e9957041971fff64a4a8c11fbb6b016ab8416de41c3d5e6228444150a/beambending-1.0.1.tar.gz" } ] }