@@ -233,6 +233,9 @@ def evaluateRollCoefficients(self):
233
233
roll moment damping coefficient and the cant angle in
234
234
radians
235
235
"""
236
+
237
+ self .cantAngleRad = np .radians (self .cantAngle )
238
+
236
239
clfDelta = (
237
240
self .rollForcingInterferenceFactor
238
241
* self .n
@@ -271,7 +274,7 @@ def setAttribute(self, name, value):
271
274
self .__dict__ [name ] = value
272
275
273
276
# Add changed attribute to dict
274
- if self .changingAttributeDict .has_key (name ):
277
+ if self .changingAttributeDict .get (name ) != None :
275
278
self .changingAttributeDict [name ].append (value )
276
279
else :
277
280
self .changingAttributeDict [name ] = [value ]
@@ -442,8 +445,7 @@ def allInfo(self):
442
445
443
446
self .geometricalInfo ()
444
447
self .liftInfo ()
445
- if self .cantAngle :
446
- self .rollInfo ()
448
+ self .rollInfo ()
447
449
448
450
return None
449
451
@@ -615,6 +617,27 @@ def __init__(
615
617
# Fin–body interference correction parameters
616
618
tau = (span + radius ) / radius
617
619
liftInterferenceFactor = 1 + 1 / tau
620
+ # Parameters for Roll Moment.
621
+ # Documented at: https://github.com/RocketPy-Team/RocketPy/blob/master/docs/technical/aerodynamics/Roll_Equations.pdf
622
+ λ = tipChord / rootChord
623
+ rollDampingInterferenceFactor = 1 + (
624
+ ((tau - λ ) / (tau )) - ((1 - λ ) / (tau - 1 )) * np .log (tau )
625
+ ) / (
626
+ ((tau + 1 ) * (tau - λ )) / (2 ) - ((1 - λ ) * (tau ** 3 - 1 )) / (3 * (tau - 1 ))
627
+ )
628
+ rollForcingInterferenceFactor = (1 / np .pi ** 2 ) * (
629
+ (np .pi ** 2 / 4 ) * ((tau + 1 ) ** 2 / tau ** 2 )
630
+ + ((np .pi * (tau ** 2 + 1 ) ** 2 ) / (tau ** 2 * (tau - 1 ) ** 2 ))
631
+ * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
632
+ - (2 * np .pi * (tau + 1 )) / (tau * (tau - 1 ))
633
+ + ((tau ** 2 + 1 ) ** 2 )
634
+ / (tau ** 2 * (tau - 1 ) ** 2 )
635
+ * (np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))) ** 2
636
+ - (4 * (tau + 1 ))
637
+ / (tau * (tau - 1 ))
638
+ * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
639
+ + (8 / (tau - 1 ) ** 2 ) * np .log ((tau ** 2 + 1 ) / (2 * tau ))
640
+ )
618
641
619
642
# Store values
620
643
self .n = n
@@ -623,7 +646,6 @@ def __init__(
623
646
self .distanceToCM = distanceToCM
624
647
self .cantAngle = cantAngle
625
648
self .changingAttributeDict = {}
626
- self .cantAngleRad = np .radians (cantAngle )
627
649
self .rootChord = rootChord
628
650
self .tipChord = tipChord
629
651
self .span = span
@@ -633,41 +655,21 @@ def __init__(
633
655
self .d = d
634
656
self .Aref = Aref # Reference area
635
657
self .Yr = Yr
636
- self .Af = Af * span / 2 # Fin area
658
+ self .Af = Af # Fin area
637
659
self .AR = AR # Fin aspect ratio
638
660
self .gamma_c = gamma_c # Mid chord angle
639
661
self .Yma = Yma # Span wise coord of mean aero chord
640
662
self .rollGeometricalConstant = rollGeometricalConstant
641
663
self .tau = tau
642
664
self .liftInterferenceFactor = liftInterferenceFactor
665
+ self .λ = λ
666
+ self .rollDampingInterferenceFactor = rollDampingInterferenceFactor
667
+ self .rollForcingInterferenceFactor = rollForcingInterferenceFactor
643
668
644
669
self .evaluateCenterOfPressure ()
645
670
self .evaluateLiftCoefficient ()
646
671
647
- if cantAngle :
648
- # Parameters for Roll Moment.
649
- # Documented at: https://github.com/RocketPy-Team/RocketPy/blob/master/docs/technical/aerodynamics/Roll_Equations.pdf
650
- self .λ = tipChord / rootChord
651
- self .rollDampingInterferenceFactor = 1 + (
652
- ((tau - self .λ ) / (tau )) - ((1 - self .λ ) / (tau - 1 )) * np .log (tau )
653
- ) / (
654
- ((tau + 1 ) * (tau - self .λ )) / (2 )
655
- - ((1 - self .λ ) * (tau ** 3 - 1 )) / (3 * (tau - 1 ))
656
- )
657
- self .rollForcingInterferenceFactor = (1 / np .pi ** 2 ) * (
658
- (np .pi ** 2 / 4 ) * ((tau + 1 ) ** 2 / tau ** 2 )
659
- + ((np .pi * (tau ** 2 + 1 ) ** 2 ) / (tau ** 2 * (tau - 1 ) ** 2 ))
660
- * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
661
- - (2 * np .pi * (tau + 1 )) / (tau * (tau - 1 ))
662
- + ((tau ** 2 + 1 ) ** 2 )
663
- / (tau ** 2 * (tau - 1 ) ** 2 )
664
- * (np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))) ** 2
665
- - (4 * (tau + 1 ))
666
- / (tau * (tau - 1 ))
667
- * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
668
- + (8 / (tau - 1 ) ** 2 ) * np .log ((tau ** 2 + 1 ) / (2 * tau ))
669
- )
670
- self .evaluateRollCoefficients ()
672
+ self .evaluateRollCoefficients ()
671
673
672
674
def evaluateCenterOfPressure (self ):
673
675
"""Calculates and returns the finset's center of pressure
@@ -951,6 +953,44 @@ def __init__(
951
953
# Fin–body interference correction parameters
952
954
tau = (span + radius ) / radius
953
955
liftInterferenceFactor = 1 + 1 / tau
956
+ rollDampingInterferenceFactor = 1 + (
957
+ (radius ** 2 )
958
+ * (
959
+ 2
960
+ * (radius ** 2 )
961
+ * np .sqrt (span ** 2 - radius ** 2 )
962
+ * np .log (
963
+ (2 * span * np .sqrt (span ** 2 - radius ** 2 ) + 2 * span ** 2 )
964
+ / radius
965
+ )
966
+ - 2
967
+ * (radius ** 2 )
968
+ * np .sqrt (span ** 2 - radius ** 2 )
969
+ * np .log (2 * span )
970
+ + 2 * span ** 3
971
+ - np .pi * radius * span ** 2
972
+ - 2 * (radius ** 2 ) * span
973
+ + np .pi * radius ** 3
974
+ )
975
+ ) / (
976
+ 2
977
+ * (span ** 2 )
978
+ * (span / 3 + np .pi * radius / 4 )
979
+ * (span ** 2 - radius ** 2 )
980
+ )
981
+ rollForcingInterferenceFactor = (1 / np .pi ** 2 ) * (
982
+ (np .pi ** 2 / 4 ) * ((tau + 1 ) ** 2 / tau ** 2 )
983
+ + ((np .pi * (tau ** 2 + 1 ) ** 2 ) / (tau ** 2 * (tau - 1 ) ** 2 ))
984
+ * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
985
+ - (2 * np .pi * (tau + 1 )) / (tau * (tau - 1 ))
986
+ + ((tau ** 2 + 1 ) ** 2 )
987
+ / (tau ** 2 * (tau - 1 ) ** 2 )
988
+ * (np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))) ** 2
989
+ - (4 * (tau + 1 ))
990
+ / (tau * (tau - 1 ))
991
+ * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
992
+ + (8 / (tau - 1 ) ** 2 ) * np .log ((tau ** 2 + 1 ) / (2 * tau ))
993
+ )
954
994
955
995
# Store values
956
996
self .n = n
@@ -965,57 +1005,19 @@ def __init__(
965
1005
self .name = name
966
1006
self .d = d
967
1007
self .Aref = Aref # Reference area
968
- self .Af = Af * span / 2 # Fin area
1008
+ self .Af = Af # Fin area
969
1009
self .AR = AR # Fin aspect ratio
970
1010
self .gamma_c = gamma_c # Mid chord angle
971
1011
self .Yma = Yma # Span wise coord of mean aero chord
972
1012
self .rollGeometricalConstant = rollGeometricalConstant
973
1013
self .tau = tau
974
1014
self .liftInterferenceFactor = liftInterferenceFactor
1015
+ self .rollDampingInterferenceFactor = rollDampingInterferenceFactor
1016
+ self .rollForcingInterferenceFactor = rollForcingInterferenceFactor
975
1017
976
1018
self .evaluateCenterOfPressure ()
977
1019
self .evaluateLiftCoefficient ()
978
-
979
- if cantAngle :
980
- self .rollDampingInterferenceFactor = 1 + (
981
- (radius ** 2 )
982
- * (
983
- 2
984
- * (radius ** 2 )
985
- * np .sqrt (span ** 2 - radius ** 2 )
986
- * np .log (
987
- (2 * span * np .sqrt (span ** 2 - radius ** 2 ) + 2 * span ** 2 )
988
- / radius
989
- )
990
- - 2
991
- * (radius ** 2 )
992
- * np .sqrt (span ** 2 - radius ** 2 )
993
- * np .log (2 * span )
994
- + 2 * span ** 3
995
- - np .pi * radius * span ** 2
996
- - 2 * (radius ** 2 ) * span
997
- + np .pi * radius ** 3
998
- )
999
- ) / (
1000
- 2
1001
- * (span ** 2 )
1002
- * (span / 3 + np .pi * radius / 4 )
1003
- * (span ** 2 - radius ** 2 )
1004
- )
1005
- self .rollForcingInterferenceFactor = (1 / np .pi ** 2 ) * (
1006
- (np .pi ** 2 / 4 ) * ((tau + 1 ) ** 2 / tau ** 2 )
1007
- + ((np .pi * (tau ** 2 + 1 ) ** 2 ) / (tau ** 2 * (tau - 1 ) ** 2 ))
1008
- * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
1009
- - (2 * np .pi * (tau + 1 )) / (tau * (tau - 1 ))
1010
- + ((tau ** 2 + 1 ) ** 2 )
1011
- / (tau ** 2 * (tau - 1 ) ** 2 )
1012
- * (np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))) ** 2
1013
- - (4 * (tau + 1 ))
1014
- / (tau * (tau - 1 ))
1015
- * np .arcsin ((tau ** 2 - 1 ) / (tau ** 2 + 1 ))
1016
- + (8 / (tau - 1 ) ** 2 ) * np .log ((tau ** 2 + 1 ) / (2 * tau ))
1017
- )
1018
- self .evaluateRollCoefficients ()
1020
+ self .evaluateRollCoefficients ()
1019
1021
1020
1022
return None
1021
1023
0 commit comments