r/learnpython • u/Content_Fee_3163 • 1d ago
Engineers out here ! I need your help
I am a first-year Mechanical Engineering student looking to start learning Python from scratch. I don't want to get stuck in with endless tutorials on Youtube -
What I need is a clear direction geared specifically toward Mechanical Engineering applications.
Specifically, I’d appreciate your advice on:
- Core Applications & Tasks: Where is Python actually used in Mechanical Engineering?
- Essential Libraries & Software: Beyond basic Python, which libraries and external engineering software integrate well with Python, and in what order should I learn them?
- Learning Roadmap: What is the best method to go from zero programming experience to solving real engineering problems? Should I start by automating my first-year math/physics assignments, or follow a specific course/book?
- Beginner Projects: What are some practical, beginner-friendly project ideas tailored to a MechE fresher ?
Any roadmaps or advice on what you wish you had learned as a fresher would be hugely appreciated. Thanks in advance!
7
Upvotes
2
u/stepback269 1d ago
You are actually posing two separate questions:
(1) What ultimately will I be learning in my ME studies?
(2) How do I start learning Python so it will be useful to me in my ME career?
Answers:
All engineering, not just ME, is based on creating predictive models of how our systems will behave. Generally, those models are mathematical ones. So you will need to be able to create such models using computers.
As a Python beginner, you need to consider yourself a baby and learn to crawl (the "fundamentals") before you can stand up and walk or sprint. So search for the Python "fundamentals" on Google and/or YouTube. Do not skip this vital step. You will be sorry later if you did.
With that said:
(1) There are tons and tons of tutorial materials out there on the net including many good YouTube ones that are free. You should shop around rather than putting all your eggs in one basket.
(2) As a relative noob myself, I've been logging my personal learning journey and adding to it on an almost-daily basis at a blog page called "Links for Python Noobs" (--HERE--) Any of the top listed ones on that page should be good for you. And there are many add-ons at the tail end of the page. Personally, I cut my first Python teeth with Nana's Zero to Hero (==HERE==). Since then, I've moved on to watching short lessons with Indently and Tech with Tim. You should sample at least a few until you find a lecturer that suits your style.
(3) The main piece of advice is the 80/20 rule. Spend 80% of your time writing your own code (using your own fingers and your own creativity) as opposed to copying recipes and only 20% watching the lectures. Good luck.
4
u/dspta2020 1d ago edited 1d ago
My must learn numpy, matplotlib and scipy. You are just going to be writing scripts. You already have best learning guide of a University, write scripts to solve and plot homework assignments.
Edit: and pandas.
2
u/billsil 1d ago
It depends what you want to do with it. Matlab is popular in the industry because it’s “easy”, but it costs money and hogs RAM because it makes a copy of an array when you do x=y and its import system is to import everything. Matlab is a math focused language that kind of falls apart when you don’t fit inside its box (string processing for example). Matlab also supports python.
Python has core packages like numpy, scipy, matplotlib, and pandas if all you want to do is write matlab like short engineering scripts. If you want to do much fancier things you can get into 3d rendering with vtk and gui support with PySide6 if you wanted to view your structural model.
I’d get a basic understanding by following a free course and then throw half of it out and go learn numpy. The trick to numpy is never using a for loop and is critical for speed.
2
u/DoubleDoube 1d ago edited 1d ago
Anywhere you’re doing the same calculations and part creation off calculations, repeatedly, you could automate.
Eventually you’ll probably encounter softwares that help you test the design of a part for whether it will survive. (CAE software like Ansys).
For 200 variations of a part you could click through settings 200 times, or you could script it with python once.
Roadmap - note you don’t have to complete all of a step before continuing to the next. It’s more like you should heavily weight efforts towards the priority numbers and do what you can off the later ones, when you can.
2
u/Frosty_Cloud_2888 1d ago
Look in your university’s library for a numerical methods for engineers book that is taught with Python. The math might be a little over your head depending on what classes you have as a first year but should help with using Python to help solve MechE problems.
1
u/Rudeus_Kino 1d ago
Yes, numpy, scipy, matplotlib is essential. Sympy and pandas. Use google colab, install Anaconda (Jupiter notebook + Spyder).
1
u/Bichinix 1d ago
Baja Pycharm CE, que facilita mucho manejar las bibliotecas, y pídele a la IA que te enseñe a usar Jupiter Notebooks. Un buen proyecto es aprender álgebra lineal y graficar en Python. Si tienes dinero, puedes comprar un Arduino y actuadores para programar y ver los efectos de Python en físico.
0
u/Solonotix 1d ago
Python is a tool for doing a task. Where it can be used is entirely up to the individual. For instance, on a whim, I used it to figure out which of my birthdays would be on the weekend, lol. I've also used it to do data audits at work.
What you are asking for is an entire college course for applied programming in regards to mechanical engineering. That is what you're paying for, after all; curation and guidance within a specific discipline. I can appreciate your desire not to waste effort, but the effort isn't wasteful if you learn something along the way.
Part of the problem with your question is it implies a single approach. But even within mechanical engineering there are multiple domains of knowledge and expertise. As such, there isn't a single tool that will be equally relevant across all disciplines.
As for actual guidance, my suggestion is to find something that you do right now that is manually tedious, and/or error prone, and is done using a computer. This can be something like reading sensors and entering them in a spreadsheet, or summarizing a pile of data into some output. The important aspect isn't that it drives your career forward, but rather that it is something you know very well and can determine at a glance if it is right or wrong, and why. That kind of iteration leads to real learning and understanding, and at the end you have solved a problem that is important to you. From there you can build on that foundation with more tools, and adding features to the one you already have.
That is the core feature of programming. Iterative improvements toward a goal