@@ -42,7 +42,7 @@ class NoseCone:
42
42
attack and the Mach number. It must take as input the angle of attack in
43
43
radians and the Mach number. It should return the lift coefficient.
44
44
NoseCone.clalpha : float
45
- Lift coefficient derivative . Has units of 1/rad.
45
+ Lift coefficient slope . Has units of 1/rad.
46
46
"""
47
47
48
48
def __init__ (self , length , kind , distanceToCM , name = "Nose Cone" ):
@@ -98,6 +98,61 @@ def __init__(self, length, kind, distanceToCM, name="Nose Cone"):
98
98
99
99
return None
100
100
101
+ def geometricInfo (self ):
102
+ """Prints out all the geometric information of the nose cone.
103
+
104
+ Parameters
105
+ ----------
106
+ None
107
+
108
+ Returns
109
+ -------
110
+ None
111
+ """
112
+ print ("Nose Cone Geometric Information of Nose: {}" .format (self .name ))
113
+ print ("-------------------------------" )
114
+ print ("Length: " , self .length )
115
+ print ("Kind: " , self .kind )
116
+ print (f"Distance to rocket's dry CM: { self .distanceToCM :.3f} m" )
117
+
118
+ return None
119
+
120
+ def aerodynamicInfo (self ):
121
+ """Prints out all the aerodynamic information of the nose cone.
122
+
123
+ Parameters
124
+ ----------
125
+ None
126
+
127
+ Returns
128
+ -------
129
+ None
130
+ """
131
+ print ("Nose Cone Aerodynamic Information of Nose: {}" .format (self .name ))
132
+ print ("-------------------------------" )
133
+ print ("Center of Pressure position: " , self .cp , "m" )
134
+ print ("Lift Coefficient Slope: " , self .clalpha )
135
+ print ("Lift Coefficient as a function of Alpha and Mach:" )
136
+ self .cl ()
137
+
138
+ return None
139
+
140
+ def allInfo (self ):
141
+ """Prints out all the geometric and aerodynamic information of the nose cone.
142
+
143
+ Parameters
144
+ ----------
145
+ None
146
+
147
+ Returns
148
+ -------
149
+ None
150
+ """
151
+ self .geometricInfo ()
152
+ self .aerodynamicInfo ()
153
+
154
+ return None
155
+
101
156
102
157
class Fins :
103
158
"""Super class that holds common methods for the fin classes.
@@ -363,7 +418,7 @@ def geometricalInfo(self):
363
418
------
364
419
None
365
420
"""
366
- print ("\n \n Geometrical Parameters\n " )
421
+ print ("\n Geometrical Parameters\n " )
367
422
if isinstance (self , TrapezoidalFins ):
368
423
print ("Fin Type: Trapezoidal" )
369
424
print ("Tip Chord: {:.3f} m" .format (self .tipChord ))
@@ -373,7 +428,7 @@ def geometricalInfo(self):
373
428
print ("Root Chord: {:.3f} m" .format (self .rootChord ))
374
429
print ("Span: {:.3f} m" .format (self .span ))
375
430
print ("Cant Angle: {:.3f} °" .format (self .cantAngle ))
376
- print ("Fin Area: {:.3f} m" .format (self .Af ))
431
+ print ("Longitudinal Section Area: {:.3f} m" .format (self .Af ))
377
432
print ("Aspect Ratio: {:.3f} m" .format (self .AR ))
378
433
print ("Gamma_c: {:.3f} m" .format (self .gamma_c ))
379
434
print ("Mean Aerodynamic Chord: {:.3f} m" .format (self .Yma ))
@@ -397,15 +452,23 @@ def liftInfo(self):
397
452
------
398
453
None
399
454
"""
400
- print ("\n \n Lift Information\n " )
455
+ print ("\n Lift Information" )
456
+ print ("----------------" )
401
457
print ("Lift Interference Factor: {:.3f} m" .format (self .liftInterferenceFactor ))
402
458
print (
403
459
"Center of Pressure position: ({:.3f},{:.3f},{:.3f}) (x, y, z)" .format (
404
460
self .cpx , self .cpy , self .cpz
405
461
)
406
462
)
463
+ print (
464
+ "Lift Coefficient derivative as a Function of Alpha and Mach for Single Fin"
465
+ )
407
466
self .clalphaSingleFin ()
467
+ print (
468
+ "Lift Coefficient derivative as a Function of Alpha and Mach for the Fin Set"
469
+ )
408
470
self .clalphaMultipleFins ()
471
+ print ("Lift Coefficient as a Function of Alpha and Mach for the Fin Set" )
409
472
self .cl ()
410
473
411
474
return None
@@ -422,9 +485,13 @@ def rollInfo(self):
422
485
------
423
486
None
424
487
"""
425
- print ("\n \n Roll Information\n " )
426
- print ("Cant Angle: {:.3f} °" .format (self .cantAngle ))
427
- print ("Cant Angle Radians: {:.3f} rad" .format (self .cantAngleRad ))
488
+ print ("\n Roll Information" )
489
+ print ("----------------" )
490
+ print (
491
+ "Cant Angle: {:.3f} ° or {:.3f} rad" .format (
492
+ self .cantAngle , self .cantAngleRad
493
+ )
494
+ )
428
495
print (
429
496
"Roll Damping Interference Factor: {:.3f} rad" .format (
430
497
self .rollDampingInterferenceFactor
@@ -453,7 +520,7 @@ def allInfo(self):
453
520
None
454
521
"""
455
522
456
- print ("Fin information\n \n " )
523
+ print ("Fin set information\n \n " )
457
524
458
525
print ("Basic Information\n " )
459
526
@@ -1218,6 +1285,15 @@ def __init__(
1218
1285
# Retrieve reference radius
1219
1286
rref = self .radius
1220
1287
1288
+ # Calculate tail slant length
1289
+ self .slantLength = np .sqrt (
1290
+ (self .length ) ** 2 + (self .topRadius - self .bottomRadius ) ** 2
1291
+ )
1292
+ # Calculate the surface area of the tail
1293
+ self .surfaceArea = (
1294
+ np .pi * self .slantLength * (self .topRadius + self .bottomRadius )
1295
+ )
1296
+
1221
1297
# Calculate cp position relative to center of dry mass
1222
1298
if distanceToCM < 0 :
1223
1299
cpz = distanceToCM - (length / 3 ) * (1 + (1 - r ) / (1 - r ** 2 ))
@@ -1241,3 +1317,45 @@ def __init__(
1241
1317
self .clalpha = clalpha
1242
1318
1243
1319
return None
1320
+
1321
+ def geometricInfo (self ):
1322
+ """Prints out all the geometric information of the tail.
1323
+
1324
+ Returns
1325
+ -------
1326
+ None
1327
+ """
1328
+
1329
+ print (f"\n Tail name: { self .name } " )
1330
+ print (f"Tail Top Radius: { self .topRadius :.3f} m" )
1331
+ print (f"Tail Bottom Radius: { self .bottomRadius :.3f} m" )
1332
+ print (f"Tail Length: { self .length :.3f} m" )
1333
+ print (f"Tail Distance to Center of Dry Mass: { self .distanceToCM :.3f} m" )
1334
+ print (f"Rocket body radius at tail position: { 2 * self .radius :.3f} m" )
1335
+ print (f"Tail Slant Length: { self .slantLength :.3f} m" )
1336
+ print (f"Tail Surface Area: { self .surfaceArea :.6f} m^2" )
1337
+
1338
+ return None
1339
+
1340
+ def aerodynamicInfo (self ):
1341
+
1342
+ print (f"\n Tail name: { self .name } " )
1343
+ print (f"Tail Center of Pressure: { self .cp } " )
1344
+ # print(f"Tail Lift Coefficient: {self.cl}")
1345
+ print (f"Tail Lift Coefficient Slope: { self .clalpha } " )
1346
+ print ("Tail Lift Coefficient as a function of Alpha and Mach:" )
1347
+ self .cl ()
1348
+
1349
+ return None
1350
+
1351
+ def allInfo (self ):
1352
+ """Prints all the information about the tail object.
1353
+
1354
+ Returns
1355
+ -------
1356
+ None
1357
+ """
1358
+ self .geometricInfo ()
1359
+ self .aerodynamicInfo ()
1360
+
1361
+ return None
0 commit comments