Skip to content

Commit 3e18215

Browse files
committed
enh: add allInfo() method
1 parent 7e4d180 commit 3e18215

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

rocketpy/AeroSurfaces.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,70 @@ def _finNumCorrection(_, n):
217217
else:
218218
return n / 2
219219

220+
def geometricalInfo(self):
221+
print("\n\n Geometrical Parameters\n")
222+
if isinstance(self, TrapezoidalFins):
223+
print("Fin Type: Trapezoidal")
224+
print("Tip Chord: {:.3f} m".format(self.tipChord))
225+
else:
226+
print("Fin Type: Elliptical")
227+
228+
print("Root Chord: {:.3f} m".format(self.rootChord))
229+
print("Span: {:.3f} m".format(self.span))
230+
print("Cant Angle: {:.3f} °".format(self.cantAngle))
231+
print("Fin Area: {:.3f} m".format(self.Af))
232+
print("Aspect Ratio: {:.3f} m".format(self.AR))
233+
print("Gamma_c: {:.3f} m".format(self.gamma_c))
234+
print("Mean Aerodynamic Chord: {:.3f} m".format(self.Yma))
235+
print(
236+
"Roll Geometrical Constant: {:.3f} m".format(self.rollGeometricalConstant)
237+
)
238+
239+
self.draw()
240+
241+
def liftInfo(self):
242+
print("\n\nLift Information\n")
243+
print("Lift Interference Factor: {:.3f} m".format(self.liftInterferenceFactor))
244+
print(
245+
"Center of Pressure position: ({:.3f},{:.3f},{:.3f}) (x, y, z)".format(
246+
self.cpx, self.cpy, self.cpz
247+
)
248+
)
249+
self.clalphaSingleFin()
250+
self.clalphaMultipleFins()
251+
self.cl()
252+
253+
def rollInfo(self):
254+
print("\n\nRoll Information\n")
255+
print("Cant Angle: {:.3f} °".format(self.cantAngle))
256+
print("Cant Angle Radians: {:.3f} rad".format(self.cantAngleRad))
257+
print(
258+
"Roll Damping Interference Factor: {:.3f} rad".format(
259+
self.rollDampingInterferenceFactor
260+
)
261+
)
262+
print(
263+
"Roll Forcing Interference Factor: {:.3f} rad".format(
264+
self.rollForcingInterferenceFactor
265+
)
266+
)
267+
self.rollParameters[0]()
268+
self.rollParameters[1]()
269+
270+
def allInfo(self):
271+
print("Fin information\n\n")
272+
273+
print("Basic Information\n")
274+
275+
print("Number of Fins: {:.0f}".format(self.n))
276+
print("Rocket radius at self's position: {:.3f} m".format(self.radius))
277+
print("Fin Distance to CM: {:.3f} m".format(self.distanceToCM))
278+
279+
self.geometricalInfo()
280+
self.liftInfo()
281+
if self.cantAngle:
282+
self.rollInfo()
283+
220284

221285
class TrapezoidalFins(Fins):
222286
def __init__(

0 commit comments

Comments
 (0)