-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNoseCone.py
50 lines (43 loc) · 1.2 KB
/
NoseCone.py
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from enum import Enum
LN = 2 # length of nose
d = 3 # diameter at base of nose
dF = 4 # diameter at front of transition
dR = 5 # diameter at rear of transition
LT = 6 # length of transition
XP = 7 # distance from tip of nose to front of transition
CR = 8 # fin root chord
CT = 9 # fin tip chord
S = 1 # fin semispan
LF = 2 # length of fin mid-chord line
R = 3 # radius of body at aft end
XR = 4 # distance between fin root leading edge and fin tip leading edge parallel to body
XB = 5 # distance from nose tip to fin root chord leading edge
N = 6 # number of fins
#The nose cone enum class
class noseConeTypes(Enum):
cone = 1
Ogive = 2
#Nose Cone
CNN = 2;
XN = 0;
#NoseConeTypes = ["cone","Ogive"]
#cone = NoseConeTypes[0]
#Ogive = NoseConeType[1]
#Without enum
#def NoseConeTerms (NoseCone):
# if NoseCone == cone:
# XN = 0.666 * N
# elif NoseCone == Ogive:
# XN = 0.466 * N
# else :
# print("Error, Cone not recognised")
#With enum
def noseConeTerms (noseCone):
if noseCone = noseConeTypes.cone:
XN = 0.666 * N
elif noseCone = noseConeTypes.Ogive:
XN = 0.466 * N
else :
print("Error, Cone was not recognised")
#NoseConeTerms("cone")
noseConeTerms(noseConeTypes.cone)