GSoC 2018 Report Jashanpreet Singh: Create a Rich Beam Solving System - sympy/sympy GitHub Wiki

This page summarises the work I've done during my GSoC project along with links to PRs in the order they were submitted. See my blog for weekly posts following my progress during this summer.

About Me

My name is Jashanpreet Singh Sraw and I have just completed my second year of Bachelor's in Computer Science and Engineering from Thapar Institute of Engineering and Technology.

Introduction

My project focused mainly on improving the continuum_mechanics module and this included implementation of various methods, a class for 3D beams and plotting methods. See my proposal for further information.

Pull Requests and Comments

Major Additions

  • #14446: Before this Pull request, deflection method used to intgrate shear_force twice, in absence of bc_deflection(or bc_slope), without including integral constants. base_char parameter was also added to the API, which allows the user to decide the base character used for generating the constant sequence.
  • #14751: This Pull Request implements remove_load method to remove previously applied loads on the beam object. This is little different from adding a negative load to make net equal to zero and would work only if that particular load already exists on beam. applied_loads method was also added to keeps a track of all load applied on beam.
  • #14753: point_cflexure was added to find point of contraflexure in the Beam. It is a point where bending moment curve of the beam object changes its sign from negative to positive or vice versa.
  • #14773: Support for composite beams was added. Beams can now be connected via hinge or fixed axially. join method was used to join two Beam instances and _solve_hinge_beams was added as a solver for hinged beams.
  • #14786: apply_support and max_deflection methods were added. apply_support supports three kind of support structures: roller, hinge or fixed and abstractly add all the bc_conditions and support reactions on the Beam.
  • #14826: Support for statically indeterminate beams was added. This Pull request also included max_shear_forceand max_bmoment methods to find maximum shear_force and bending_moment in the beam.
  • #14856: This pull requests added a few test cases to show units work with Beam class after PR #14865 got merged.
  • #14883: Beam_3d(name changed to Beam3D) class was added. It included apply_load, apply_moment_load, shear_force, axial_force, bending_moment, torsional_moment, solve_slope_deflection, slope and deflection methods.
  • #14967: Plotting methods were added to the Beam class. plot_shear_force, plot_bending_moment, plot_slope, plot_deflection and plot_loading_results methods were added.

Documentation and Misc.

  • #14865: This Pull Request fixed a bug in quantity_simplify method of physics.units module. Due to this bug, Beam objects were returning errors on using quantities having units.
  • #14453: More beam problems were added in beam_problems.rst file. Corresponding ascii dagrams were also included.
  • #14984: This Pull Request fixed a bug in unset_show method. Earlier it didn't worked for plots using TextBackend. unset_show was then added to runtests.doctest, so that plots didn't show up during doctests.

Open Pull Requests

  • #15029: This Pull Request allowed the module to solve non-prismatic beams (that is beams in which I or E value changes with length).
  • #15068: This Pull request was mainly focussed on implementing solve_for_reaction_loads methods to solve reaction forces applied to Beam3D instances. More test cases were added too.
  • #15052: More beam problems were added in beam_problems.rst file. Corresponding ascii dagrams were also included. Also return type of slope and deflection method was changed from Piecewise to Add, like other type of beams.

Future Work

  • Adding method to find Bending stress distribution across beam's cross-section (including for cross-section made up of more than one material) and its graphical plot.
  • Adding method to find Shear-stress distribution across beam's cross-section and its graphical plot.
  • Adding support of point loads for Beam3D class. It only works for continous load applied over whole span of beam. For now only solve_for_reaction_loads method returns correct answer in all kind of applied loads.
  • Introducing methods like max_deflection, max_bending_moment etc in Beam3D class.
  • Also in Beam3D.solve_for_reaction_loads method, adding support for statically indeterminate beams.

Conclusion

I hope this report will be of use to whoever else might be interested in developing continuum_mechanics module. I plan to improve this module further and actively contribute to SymPy. Overall, this summer was a good learning experience and I learned alot while working on this project. I am grateful to my mentors, Arihant and Jason for reviewing my work and giving me valuable advice.