Abhinav Cillanki

Mechanics Of Solids – Python Project

July 24, 2024 | by Abhinav Cillanki

Mechanics of Solids

My first year of college was online due to the coronavirus not having dwindled. During my first year, the only introduction I got to mechanics was through the course Basic Engineering Mechanics and the remaining courses were from other departments to provide a holistic view of the different engineering fields. During the online semesters, I  learned to program in Python and also made a couple of projects that got me comfortable with understanding the powerful capabilities combined with the simplicity of Python. 

Although complaining about the extremely humid weather conditions at KGP and how it was absolutely miserable compared to Bengaluru’s amazing weather, I was excited to be at campus, meet peers who I had only met virtually, and also attend offline classes while having an amazing college life like the one portrayed in Chhichhore.

Being my first semester on campus, I used to attend almost all classes (I still do 🙂) and was particularly excited about one of the subjects taught by Prof. Jeevanjyoti Chakraborty. It was Mechanics of Solids and I couldn’t wait to see him in live action as I had only seen him before in his YouTube videos. The excellence of the professors in my department did spark an interest in solving mechanical problems using code.

I remember sometime after mid-semester, Prof. Jeevenjyoti called out for students to work under his guidance on projects related to the mechanics of solids. Even though I was hesitant to work on the mechanical side of it, I did consult him about how I could fit in and do something in this domain. The professor understood my interests and also found me to have developed a good knack for Python. He invited me for a chat and showed me his GitHub repository, where he had solved the MOS course Tutorial problems on beams. He wanted me to create a generalized system that solved problems of beams, possessing the ability to calculate various properties at different points of the beams like the shear force, bending moment, and deviations.

Thanks to the codebase I was working with at KRSSG, I was able to instantly come up with an idea for an Object Oriented Design for solving the problem, which could generalize solving the problems for a lot of scenarios of beam problems. Prof. Jeevanjyoti also found it quite intriguing and I started working on creating the design for the same.

The key to identifying the design was to see the obvious. What was the beam if not an object with certain attributes like the length, stiffness constants, and a number of loads (forces) acting on it?

I wanted to eliminate any sort of typecasting while obtaining the solution, and this meant making sure my design provided methods for performing all the necessary mathematical operations. 

My solution to the design as represented in the UML diagram:


Working on this project opened me up to a whole new experience, and I made an application that simplified tasks a second-year mechanical engineering student like me would be introduced to during the curriculum.

This also introduced me to the world of open source during the process, which my professor was also very encouraging about and supported me in making open source contributions. 

I had developed a command line utility that was capable of solving tutorial problems in the Mechanics of Solids course and wanted others to be able to use it. As a part of publishing my own Python package, I used Pytest to set up unit tests to make sure the class methods were working right and to use it to demonstrate the working to curious users. Now, I have published the package on PyPI and it can be installed through the terminal by any user using just a pip command. 

Links:

https://pypi.org/project/Lib-mechsolids-abhinav

https://github.com/JebronLames32/Lib-mechsolids-abhinav

Fast forward a couple of years, I took courses in my department like the DATA ANALYSIS AND VISUALIZATION FOR MECHANICAL SCIENCES taught by Professor Aditya Bandopadhyay, who truly motivates me to strive for excellence as a student. In this course, I was introduced to various topics like Fluid flow visualization using matplotlib functions, solving thermodynamic equations using CoolProp and Pyromat, Audio and Video analysis of various mechanical phenomena. I would definitely recommend taking this course as an elective for any of my juniors who are reading this as it does not require any solid programming foundations as the professor would teach it.

I also took the course DATA-DRIVEN METHODS IN THERMAL AND FLUID SCIENCES taught by Professor Rajaram Lakkaraju, who introduced me to the applications of Artificial Intelligence in mechanical engineering. Professor Raja, who is also the advisor to my B.Tech project introduced me to various topics like using Autoencoders to compress huge amounts of data, in this case, the data of a planet which can be modeled as a very viscous fluid over large timesteps and predict the future lifecycle of the planet using neural networks that incorporate the Navier-Stokes equations as the loss function, Analysing the results of neural networks in predicting fluid turbulence simulations by using Explainable AI and many such scenarios. I am truly grateful for having such wonderful professors and cannot complain the least bit that my department has not provided me exposure to the most state of the art techniques of Artificial Intelligence even while being a Mechanical Engineering student.

RELATED POSTS

View all

view all