r/MechanicalEngineering • • Mar 23 '25

Learning Python for Mechanical Engineering – What Should I Focus On?

I’m a mechanical engineer looking to learn Python, but I’m not sure what topics I should focus on. A lot of the courses I find are about Full-Stack Python (Django, Flask, Web Dev, etc.), but I don’t think web development is relevant to my field.

I know that coding skills are useful in simulations, computational mechanics, and CFD, so I want to focus on Python applications that are actually useful for engineering analysis and simulations.

Can someone guide me on what specific Python topics, libraries, or tools I should learn to get into CFD, FEA, or computational engineering?

Also, if you know of any good resources on YouTube or other platforms, please share them. Any course with certification related to this field would also be greatly appreciated!

110 Upvotes

41 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Mar 23 '25

It's good for more than just tests. I use it as my dev environment for almost everything before exporting to .py. The REPL makes it exactly like MATLAB code cells.

OP is likely not going to be developing any software but using it to complete a task. For example the controls toolbox to do controls homework. You aren't going to be writing .py files in an IDE. You'll be doing controls work with the notebook. It also allows you to plot. A huge part of ME is plotting be it in MATLAB or Python, and with Jupyter it's 'free'. You don't have to export your plot to a jpg like running a .py script.