Fin Class#
- class rocketpy.Fin[source]#
Abstract class that holds common methods for the individual fin classes. Cannot be instantiated.
Note
- Local coordinate system:
Origin located at the top of the root chord.
Z axis along the longitudinal axis of symmetry, positive downwards (top -> bottom).
Y axis perpendicular to the Z axis, in the span direction, positive upwards.
X axis completes the right-handed coordinate system.
- Variables:
Fin.rocket_radius (
float) – The reference rocket radius used for lift coefficient normalization, in meters.Fin.airfoil (
tuple) – Tuple of two items. First is the airfoil lift curve. Second is the unit of the curve (radians or degrees).Fin.cant_angle (
float) – Fin cant angle with respect to the rocket centerline, in degrees.Fin.changing_attribute_dict (
dict) – Dictionary that stores the name and the values of the attributes that may be changed during a simulation. Useful for control systems.Fin.cant_angle_rad (
float) – Fin cant angle with respect to the rocket centerline, in radians.Fin.root_chord (
float) – Fin root chord in meters.Fin.tip_chord (
float) – Fin tip chord in meters.Fin.span (
float) – Fin span in meters.Fin.name (
string) – Name of fin set.Fin.sweep_length (
float) – Fin sweep length in meters. By sweep length, understand the axial distance between the fin root leading edge and the fin tip leading edge measured parallel to the rocket centerline.Fin.sweep_angle (
float) – Fin sweep angle with respect to the rocket centerline. Must be given in degrees.Fin.rocket_diameter (
float) – Reference diameter of the rocket. Has units of length and is given in meters.Fin.reference_area (
float) – Reference area of the rocket.Fin.Af (
float) – Area of the longitudinal section of each fin in the set.Fin.AR (
float) – Aspect ratio of each fin in the set.Fin.gamma_c (
float) – Fin mid-chord sweep angle.Fin.Yma (
float) – Span wise position of the mean aerodynamic chord.Fin.roll_geometrical_constant (
float) – Geometrical constant used in roll calculations.Fin.tau (
float) – Geometrical relation used to simplify lift and roll calculations.Fin.lift_interference_factor (
float) – Factor of Fin-Body interference in the lift coefficient.Fin.cp (
tuple) – Tuple with the x, y and z local coordinates of the fin set center of pressure. Has units of length and is given in meters.Fin.cpx (
float) – Fin set local center of pressure x coordinate. Has units of length and is given in meters.Fin.cpy (
float) – Fin set local center of pressure y coordinate. Has units of length and is given in meters.Fin.cpz (
float) – Fin set local center of pressure z coordinate. Has units of length and is given in meters.Fin.cl (
Function) – Function which defines the lift coefficient as a function of the angle of attack and the Mach number. Takes as input the angle of attack in radians and the Mach number. Returns the lift coefficient.Fin.clalpha (
float) – Lift coefficient slope. Has units of 1/rad.Fin.roll_parameters (
list) – List containing the roll moment lift coefficient, the roll moment damping coefficient and the cant angle in radians.
- __init__(angular_position, root_chord, span, rocket_radius, cant_angle=0, airfoil=None, name='Fin')[source]#
Initialize Fin class.
- Parameters:
angular_position (
float) – Angular position of the fin in degrees measured as the rotation around the symmetry axis of the rocket relative to one of the other principal axis. See Angular Position Inputsroot_chord (
int,float) – Fin root chord in meters.span (
int,float) – Fin span in meters.rocket_radius (
int,float) – Reference rocket radius used for lift coefficient normalization.cant_angle (
int,float, optional) – Fin cant angle with respect to the rocket centerline. Must be given in degrees.airfoil (
tuple, optional) – Default is null, in which case fins will be treated as flat plates. Otherwise, if tuple, fins will be considered as airfoils. The tuple’s first item specifies the airfoil’s lift coefficient by angle of attack and must be either a .csv, .txt, ndarray or callable. The .csv and .txt files can contain a single line header and the first column must specify the angle of attack, while the second column must specify the lift coefficient. The ndarray should be as [(x0, y0), (x1, y1), (x2, y2), …] where x0 is the angle of attack and y0 is the lift coefficient. If callable, it should take an angle of attack as input and return the lift coefficient at that angle of attack. The tuple’s second item is the unit of the angle of attack, accepting either “radians” or “degrees”.name (
str) – Name of fin.
- property cant_angle#
Cant angle in degrees.
- Returns:
Cant angle in degrees.
- Return type:
float
- property cant_angle_rad#
Cant angle in radians.
- Returns:
Cant angle in radians.
- Return type:
float
- evaluate_lift_coefficient()[source]#
Calculates and returns the fin set’s lift coefficient. The lift coefficient is saved and returned. This function also calculates and saves the lift coefficient derivative for a single fin and the lift coefficient derivative for a number of n fins corrected for Fin-Body interference.
- Return type:
None
- evaluate_roll_parameters()[source]#
Calculates and returns the fin set’s roll coefficients. The roll coefficients are saved in a list.
- Returns:
self.roll_parameters – List containing the roll moment lift coefficient, the roll moment damping coefficient and the cant angle in radians
- Return type:
list
- evaluate_rotation_matrix()[source]#
Calculates and returns the rotation matrix from the rocket body frame to the fin frame.
Note
Local coordinate system:
Origin located at the leading edge of the root chord.
Z axis along the longitudinal axis of the fin, positive downwards (leading edge -> trailing edge).
Y axis perpendicular to the Z axis, in the span direction, positive upwards (root chord -> tip chord).
X axis completes the right-handed coordinate system.
- Return type:
None
References
- compute_forces_and_moments(stream_velocity, stream_speed, stream_mach, rho, cp, omega, *args)[source]#
Computes the forces and moments acting on the aerodynamic surface.
- Parameters:
stream_velocity (
tupleoffloat) – The velocity of the airflow relative to the surface.stream_speed (
float) – The magnitude of the airflow speed.stream_mach (
float) – The Mach number of the airflow.rho (
float) – Air density.cp (
Vector) – Center of pressure coordinates in the body frame.omega (
tuple[float,float,float]) – Tuple containing angular velocities around the x, y, z axes.
- Returns:
The aerodynamic forces (lift, side_force, drag) and moments (pitch, yaw, roll) in the body frame.
- Return type:
tupleoffloat
- _compute_leading_edge_position(position, _csys)[source]#
Computes the position of the fin leading edge in a rocket’s user, given its position in a rocket.
- draw(*, filename=None)[source]#
Draw the fin shape along with some important information, including the center line, the quarter line and the center of pressure position.
- Parameters:
filename (
str | None, optional) – The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp (these are the formats supported by matplotlib).