r/AerospaceEngineering • u/[deleted] • Feb 15 '23
Uni / College Python code
So my assignment problem is coding a program to find the mach number and total enthalpy using python/matlab. I prefer python coz of the vast possiblities in AI and Automation. Can someone please help me with this🫡
5
u/NukeRocketScientist Feb 15 '23
This is super easy, you don't even need MATLAB or Python. You can either solve for M1 using a numerical solver or just guess and check with a few iterations.
-4
Feb 15 '23
According to the professor i have to write a code.ðŸ˜ðŸ«¡
5
u/NukeRocketScientist Feb 15 '23
Okayyyyy, so just set up the equation to solve for M1 in MATLAB or Python. If you don't have the programming knowledge to at the minimum set up a single equation variable solver you're going to have a very hard time. This should honestly take you less than 10 minutes in MATLAB.
36
u/Bobyyyyyyyghyh Feb 15 '23
How do you prefer python if you don't know python? If you know MATLAB you're more than knowledgeable enough to do this. MATLAB was born for problem solving like this, use the symbolic toolbox if you need
5
u/Jaky_ Feb 15 '23
If you know matlab, python Is not that difficult
2
Feb 15 '23
I learned, Python -> MATLAB -> C.
8
u/Jaky_ Feb 15 '23
I learned C -> Matlab -> python
5
u/imagatorsfan Feb 16 '23
I learned Matlab -> … ahh I’ll learn python later!
1
1
u/13D00 Feb 16 '23
I know matlab quite well, nothing too crazy but am comfortable doing maths and simple data analysis. My company just doesn’t feel like getting me a license and forces me into python.
I’ve never used python though, so I guess I’ll have to learn it in some way or another. :)
1
u/imagatorsfan Feb 16 '23
That seems to be the consensus once you get out of academia. I definitely want to learn python for that reason and the fact that I’ve heard nothing but good things about it.
I enjoyed learning coding through Matlab, but I definitely have encountered many headaches when doing more advanced stuff that I just feel like shouldn’t be an issue. Trying to make an app was a nightmare…
1
12
u/[deleted] Feb 15 '23
Assuming you know the brayton cycle it should be pretty straightforward to put it in code, i recommend using coolprop for thermo calcs.