Python: Pressure Value Calculation Program Under Sea Water Dependent on Depth

I am a 4th year engineering student who has just started the Python Program and aims to extract a resource called 'Python and Automotive' (beginner level) by combining some formulas that he has learned in Automotive Engineering with Python. Of course, I will not be limited to Automotive only and will try to create original codes and programs using basic engineering knowledge and formulas.

You can find the Python code of the pressure value calculation program that affects the depth under seawater below. All explanations about the program are included in the visuals and code.

Example: The pressure value affecting people at sea level (0 meters) is 101325 Pascal. If we want to dive 10 meters below the sea, this value is 199425 Pascal. So it is about 2 times. The world diving record is 333.35 meters. The pressure value affecting at this depth is 3371488.5 Pascal. To better understand this depth, which is about 33.27 times the standard atmospheric pressure, I recommend that you try to dive only 2 meters underwater. :)


Programın Python Kodu

print("""****************************
Pressure value calculation program affecting under seawater depending on the depth
****************************
P=Pressure(Pa)
P0=Standard Atmospheric Pressure(Pa)=101325Pa = 1BAR
D=Density of Sea Water(kg/m3)~=1000kg/m3
G=Gravitational Acceleration(m/s2)=9.81m/s2
H=Depth(m)
****************************

""")
while True:
P0 = 101325
D= 1000
G= 9.81
H= float(input("Enter the depth value in meters:"))

P= P0 + (D * G * H )
print("Affecting Pressure value (Pa):",P)

#for i in range(1,30): #This code prints pressure values up to 30 meters on the screen.
#P = P0 + (D * G * i)
#print("Pressure values (Pa):", P)

Hiç yorum yok:

Yorum Gönder