1- import math
2-
3- import numpy as np
4-
51from rocketpy .plots .aero_surface_plots import _TrapezoidalFinPlots
62from rocketpy .prints .aero_surface_prints import _TrapezoidalFinPrints
73from rocketpy .rocket .aero_surface .fins ._trapezoidal_mixin import _TrapezoidalMixin
106
117
128class TrapezoidalFin (_TrapezoidalMixin , Fin ):
13- """A class used to represent a single trapezoidal fin. TODO: review this
9+ """A class used to represent a single trapezoidal fin.
1410
1511 This class inherits from the Fin class.
1612
@@ -29,8 +25,8 @@ class TrapezoidalFin(_TrapezoidalMixin, Fin):
2925 Attributes
3026 ----------
3127 TrapezoidalFin.angular_position : float
32- Angular position of the fin set with respect to the rocket centerline, in
33- degrees.
28+ Angular position of the fin set with respect to the rocket centerline,
29+ in degrees.
3430 TrapezoidalFin.rocket_radius : float
3531 The reference rocket radius used for lift coefficient normalization, in
3632 meters.
@@ -39,9 +35,6 @@ class TrapezoidalFin(_TrapezoidalMixin, Fin):
3935 Second is the unit of the curve (radians or degrees).
4036 TrapezoidalFin.cant_angle : float
4137 Fins cant angle with respect to the rocket centerline, in degrees.
42- TrapezoidalFin.changing_attribute_dict : dict
43- Dictionary that stores the name and the values of the attributes that
44- may be changed during a simulation. Useful for control systems.
4538 TrapezoidalFin.cant_angle_rad : float
4639 Fins cant angle with respect to the rocket centerline, in radians.
4740 TrapezoidalFin.root_chord : float
@@ -102,6 +95,56 @@ def __init__(
10295 airfoil = None ,
10396 name = "Fins" ,
10497 ):
98+ """Initializes the TrapezoidalFin class.
99+
100+ Parameters
101+ ----------
102+ angular_position : float
103+ Angular position of the fin in degrees measured as the rotation
104+ around the symmetry axis of the rocket relative to one of the other
105+ principal axis. See :ref:`Angular Position Inputs <angular_position>`
106+ root_chord : int, float
107+ Fin root chord in meters.
108+ tip_chord : int, float
109+ Fin tip chord in meters.
110+ span : int, float
111+ Fin span in meters.
112+ rocket_radius : int, float
113+ Reference radius to calculate lift coefficient, in meters.
114+ cant_angle : int, float, optional
115+ Fins cant angle with respect to the rocket centerline. Must
116+ be given in degrees.
117+ sweep_length : int, float, optional
118+ Fins sweep length in meters. By sweep length, understand the axial
119+ distance between the fin root leading edge and the fin tip leading
120+ edge measured parallel to the rocket centerline. If not given, the
121+ sweep length is assumed to be equal the root chord minus the tip
122+ chord, in which case the fin is a right trapezoid with its base
123+ perpendicular to the rocket's axis. Cannot be used in conjunction
124+ with sweep_angle.
125+ sweep_angle : int, float, optional
126+ Fins sweep angle with respect to the rocket centerline. Must
127+ be given in degrees. If not given, the sweep angle is automatically
128+ calculated, in which case the fin is assumed to be a right trapezoid
129+ with its base perpendicular to the rocket's axis.
130+ Cannot be used in conjunction with sweep_length.
131+ airfoil : tuple, optional
132+ Default is null, in which case fins will be treated as flat plates.
133+ Otherwise, if tuple, fins will be considered as airfoils. The
134+ tuple's first item specifies the airfoil's lift coefficient
135+ by angle of attack and must be either a .csv, .txt, ndarray
136+ or callable. The .csv and .txt files can contain a single line
137+ header and the first column must specify the angle of attack, while
138+ the second column must specify the lift coefficient. The
139+ ndarray should be as [(x0, y0), (x1, y1), (x2, y2), ...]
140+ where x0 is the angle of attack and y0 is the lift coefficient.
141+ If callable, it should take an angle of attack as input and
142+ return the lift coefficient at that angle of attack.
143+ The tuple's second item is the unit of the angle of attack,
144+ accepting either "radians" or "degrees".
145+ name : str
146+ Name of fin set.
147+ """
105148 super ().__init__ (
106149 angular_position ,
107150 root_chord ,
0 commit comments