GSoC 2022 Report Advait Pote : Extending the Continuum Mechanics Module - sympy/sympy GitHub Wiki

This report summarizes the work done by me in my project, Extending the Continuum Mechanics Module, during Google Summer of Code '22 under SymPy. The week-by-week development of the project can be found here.

About Me

I am Advait Pote, a third-year Undergraduate pursuing a Major in Mechanical Engineering and a Minor in Computer Science and Engineering from the Indian Institute of Technology Bombay.

Project Overview

My project, as the title suggests, revolved around the continuum_mechanics module of SymPy. The primary objective of my project was to create and develop the Truss class. Trusses are an assembly of members, like beams, connected by nodes that collectively create a rigid structure. These structures are very important and have numerous applications in both Civil and Mechanical Engineering. In addition to that, my intention was also to introduce Torsional problems into this module. The following is the list of all the Pull Requests opened by me in these three months:

  • #23629: Created and Initialised the Truss class. Properties of the object i.e. nodes, members, loads, and supports along with reaction_forces and internal_forces were added in addition to methods to initialize each of these. Due to this development, the user can initialize any kind of Truss he wants with any shape or any number of nodes and members at any position. Also added Documentation and Tests for each of the properties and methods.

  • #23755: The solve method was added to the class. Documentation and Tests were added for the same. This method, given the state of the truss in the form of its nodes & members and as a result of various applied loads & supports, solves for the reaction forces coming from each support and the internal forces present in each member. This method, however, solves for these properties provided the Solvability Condition of the truss is achieved.

  • #23868: Implemented Torsion in the beam module. My initial intention was to create a different class altogether for this so that beam bending and shaft torsion can be kept different from each other. However, this was not deemed necessary as having it in the same class proved successful and also made things a lot easier. All the constant moments applied in the direction parallel to the z-axis are accounted for and considered for calculating the angular deflection of the beam.

  • #23991: Finally the draw method was added to the class. This method returns a plot object representing the state of the truss by plotting each of its nodes and members on a plot with respect to a coordinate system. Various objects of the sympy.plotting module were used like markers for nodes and supports, rectangles for members, and finally annotations for loads. This method was heavily inspired by the draw method for the Beam class.

Future Work

Some ideas that had come to mind while drafting my proposal or during my project along with some I have seen being recommended as potential Future Work by past developers who worked on this module:

  • The Truss class can be further developed to include moments/torques as loads as well on any node.

  • Stress-Strain Analysis functions can be developed for a beam.

Concluding Remarks

I hope anyone looking start contributing to the sympy.physics.continuum_mechanics module or looking to participate in Google Summer of Code with SymPy finds this report helpful. This summer has been an incredible learning experience for me and I look forward to actively contributing to SymPy in the future. I would like to extend my deep gratitude to my mentor, Prakhar Saxena for always being available, giving valuable suggestions, and reviewing my work.