ProfilesΒΆ
Derived module from profilebase.py to provide the airfoil coordinates.
CustomProfile._check_coordinates |
Private method that checks whether the airfoil coordinates defined are provided correctly. |
NacaProfile._check_args |
Private method to check that the number of the airfoil discrete points is a positive integer. |
NacaProfile._generate_coordinates |
Private method that generates the coordinates of the NACA 4 or 5 digits airfoil profile. |
-
class
CustomProfile
(xup, yup, xdown, ydown)[source] Bases:
bladex.profilebase.ProfileBase
Provide custom profile for the airfoil coordinates.
Parameters: - xup (numpy.ndarray) – 1D array that contains the X-components of the airfoil’s upper surface
- xdown (numpy.ndarray) – 1D array that contains the X-components of the airfoil’s lower surface
- yup (numpy.ndarray) – 1D array that contains the Y-components of the airfoil’s upper surface
- ydown (numpy.ndarray) – 1D array that contains the Y-components of the airfoil’s lower surface
-
_check_coordinates
()[source] Private method that checks whether the airfoil coordinates defined are provided correctly.
We note that each array of coordinates must be consistent with the other arrays. The upper and lower surfaces should start from exactly the same point, the leading edge, and proceed on the way till the trailing edge. The trailing edge might have a non-zero thickness as in the case of some NACA-airfoils. In case of an open trailing edge, the average coordinate between upper and lower part is taken as the unique value.
Raises: - ValueError – if either xup, xdown, yup, ydown is None
- ValueError – if the 1D arrays xup, yup or xdown, ydown do not have the same length
- ValueError – if array yup not greater than or equal array ydown element-wise
- ValueError – if xdown[0] != xup[0] or ydown[0] != yup[0] or xdown[-1] != xup[-1]
-
class
NacaProfile
(digits, n_points=240, cosine_spacing=True)[source] Bases:
bladex.profilebase.ProfileBase
Generate 4- and 5-digit NACA profiles.
The NACA airfoils are airfoil shapes for aircraft wings developed by the National Advisory Committee for Aeronautics (NACA). The shape of the NACA airfoils is described using a series of digits following the word “NACA”. The parameters in the numerical code can be entered into equations to precisely generate the cross-section of the airfoil and calculate its properties.
The NACA four-digit series describes airfoil by the format MPTT, where:
- M/100: indicates the maximum camber in percentage, with respect to the chord length.
- P/10: indicates the location of the maximum camber measured from the leading edge. The location is normalized by the chord length.
- TT/100: the maximum thickness as fraction of the chord length.
The profile 00TT refers to a symmetrical NACA airfoil.
The NACA five-digit series describes more complex airfoil shapes. Its format is: LPSTT, where:
- L: the theoretical optimum lift coefficient at ideal angle-of-attack = 0.15*L
- P: the x-coordinate of the point of maximum camber (max camber at x = 0.05*P)
- S: indicates whether the camber is simple (S=0) or reflex (S=1) TT/100: the maximum thickness in percent of chord, as in a four-digit NACA airfoil code
References:
- Moran, Jack (2003). An introduction to theoretical and computational aerodynamics. Dover. p. 7. ISBN 0-486-42879-6.
- Abbott, Ira (1959). Theory of Wing Sections: Including a Summary of Airfoil Data. New York: Dover Publications. p. 115. ISBN 978-0486605869.
Parameters: - digits (str) – 4 or 5 digits that describes the NACA profile
- n_points (int) – number of discrete points that represents the airfoil profile. Default value is 240
- cosine_spacing (bool) – if True, then a cosine spacing is used for the airfoil coordinate distribution, otherwise linear spacing is used. Default value is True
Raises: - ValueError – if n_points is not positive
- TypeError – if n_points is not of type int
- SyntaxError – if digits is not a string
- Exception – if digits is not of length 4 or 5
-
_check_args
()[source] Private method to check that the number of the airfoil discrete points is a positive integer.
-
_generate_coordinates
()[source] Private method that generates the coordinates of the NACA 4 or 5 digits airfoil profile. The method assumes a zero-thickness trailing edge, and no half-cosine spacing.