GSoC 2022 Phase III plan - sympy/sympy GitHub Wiki

This wiki page contains the plan that I propose for the third phase of my project working on the Continuum Mechanics submodule of SymPy under Google Summer of Code 2022 with my mentor Prakhar Saxena. Till now I have added the implementation of Trusses including the functionality for adding multiple nodes and members along with solving for different systems and returning various results related to the Truss including reaction forces and internal forces.

I begin the third phase of my project from this week. As listed in my proposal, I have mentioned that I will be working on the geometry module, primarily adding methods like:

  • Calculating the first moment of area for the Ellipse class.
  • Making composite shapes using Boolean operations on basic shapes in the geometry module.

However, after giving this a little thought a few weeks back, I find these proposed ideas as a part of my project a bit out of place. My project has largely been based on the Physics submodule of SymPy, particularly, Continuum Mechanics. After working on this theme for more than two-thirds of my project, going on to start work on the geometry module does make my project objective seem quite deranged. I have discussed this with my mentor back. One suggestion that he had provided is that the Beam module has a draw method which returns a beam diagram of the object under concern in the form of a plot object. A similar function can be added to the Truss class as well. When one initialises and builds a truss, visualising it is extremely important and helpful. Instead of having to resort to other pages, just having a function like that would help the user to have a look at the truss he is making and subsequently, make any amends or changes if needed.

I have decided that I want to work and develop this function as a part of my project.

About how I plan to approach, I will be drawing inspiration from the draw method and basically how this entire functionality has been implemented in the Beam class.

The Beam class utilises three functions for this, namely draw, _draw_load and _draw_support. Hence, the basic theme is having a main function which would call various sub-functions which are each responsible for each smaller part, just like along with the main beam here, we have separate functions for its supports and its loads.

A Truss consists of nodes, members, loads and supports. Hence, similar sub-functions can be added for the supports, loads and members, with the nodes being nothing but just points. However, unlike beams where the general theme was to draw a beam, one can have a variety of trusses with various orientations. Hence, that difference will have to be accounted for while building this functionality.