r/AerospaceEngineering • • Feb 15 '23

Uni / College Python code

Post image

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🫡

0 Upvotes

22 comments sorted by

View all comments

Show parent comments

-23

u/[deleted] Feb 15 '23

I have next to 0 knowledge in coding

42

u/[deleted] Feb 15 '23

and you will remain that way if somebody posts an entire code for you on reddit. If that's what you're after try chatGPT :) If you ask some more specific questions people may be able to help, what is the problem you're having? Have you tried learning basic syntax and writing some straightforward calculation scripts yet?

-16

u/[deleted] Feb 15 '23

I have a minimal bg in coding i had bio as my major in 12th grade💀. But yeah i do wanna learn pythons i just wanted to know the process,heard aerospace has serperate libraries in python and matlab from cs friends

5

u/[deleted] Feb 15 '23

Here's where you should start, do you understand the Brayton cycle? can you solve this problem on paper without python? If you do not know how to solve the problem on paper, you will not be able to write a code to solve it, you have to tell the computer exactly what to do at every single step. If the answer to both of those questions is yes, you should move on to learning basic python. Start with basic syntax, how to make functions and solve equations. Then move on to libraries, if you are just starting your engineering schooling you should primarily get to know numpy and matplotlib.pyplot as those are going to be your best friends. There is an insane amount of resources online for learning the fundamentals of python. For AERO you will likely benefit greatly from a thermo library like coolprop. You may need pandas or scipy eventually but outside of this you should be good for most all AERO applications.

As an exercise you should work through the entire problem and break it down into the most basic steps you can imagine, and try to only use variables and minimize real numbers (generally called hard-coding). Then when you code that, you will be able to solve any Brayton cycle instead of just this problem.

1

u/[deleted] Feb 15 '23

Thankkkk youuuuuu!!!!!!!!!!