forked from kal179/Beginners_Python_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaircraft_thrust.py
More file actions
27 lines (19 loc) · 861 Bytes
/
aircraft_thrust.py
File metadata and controls
27 lines (19 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
# Calculating thrust of Aircraft Propeller
def thrust_props(diameter , velocity , velocity1 , density):
# According to formula
return math.pi / 4 * diameter ** 2 * (velocity + velocity1/2) * density * velocity1
print('Hello Aircraft Lovers,\n')
while(True):
# Loop for continous calculation
start_or_end = str(raw_input('start or end : ')).strip().lower()
# Main interface
if start_or_end == 'start':
res = thrust_props(float(input('\nDiameter of propeller: ')) , float(input('Velocity of air flow: ')) , float(input('Additional propeller acceleration, velocity: ')) , float(input('Fluid density: ')))
print("\nThrust of propeller: {}".format(res))
else:
quit()
print("")
# found formula on nasa's website