pymead.core.naca4.NACA4#
- class NACA4(max_camber: Param, max_camber_loc: Param, max_thickness: Param, leading_edge: Point, trailing_edge: Point, upper: bool, default_nt: int | None = None, name: str | None = None, cosine_spacing: bool = True, sharp_trailing_edge: bool = False, t_start: float | None = None, t_end: float | None = None, **kwargs)[source]#
Bases:
ParametricCurve- __init__(max_camber: Param, max_camber_loc: Param, max_thickness: Param, leading_edge: Point, trailing_edge: Point, upper: bool, default_nt: int | None = None, name: str | None = None, cosine_spacing: bool = True, sharp_trailing_edge: bool = False, t_start: float | None = None, t_end: float | None = None, **kwargs)[source]#
Computes the profile for either the lower or upper surface of a NACA 4-series airfoil.
- Parameters:
point_sequence (PointSequence) – Sequence of points defining the control points for the Bézier curve
name (str or
None) – Optional name for the curve. Default:Nonet_start (float or
None) – Optional starting parameter vector value for the Bézier curve. Not specifying this value automatically gives a value of0.0. Default:Nonet_end (float or
None) – Optional ending parameter vector value for the Bézier curve. Not specifying this value automatically gives a value of1.0. Default:None
Methods
Computes the camber distribution of the NACA 4-series airfoil.
derivative(theta, x, yt, order)Calculates an arbitrary-order derivative of the Bézier curve
evaluate([t])Evaluates the curve using an optionally specified parameter vector.
get_4_digit_designation()Gets a dictionary representation of the pymead object.
point_removal_deletes_curve()point_sequence()points()remove()remove_point([idx, point])set_point_sequence(point_sequence)Attributes
- compute_camber(x: ndarray) ndarray[source]#
Computes the camber distribution of the NACA 4-series airfoil.
- Parameters:
x (np.ndarray) – The pre-computed distribution of \(x\)-values
- Returns:
Array of the same size as
xcontaining the camber distribution.- Return type:
np.ndarray
- derivative(theta: ndarray, x: ndarray, yt: ndarray, order: int) ndarray[source]#
Calculates an arbitrary-order derivative of the Bézier curve
- Parameters:
theta (np.ndarray) – The pre-computed camber angle distribution
x (np.ndarray) – The pre-computed distribution of \(x\)-values
yt (np.ndarray) – The pre-computed thickness distribution
order (int) – The order of the derivative. The only valid orders are
1and2.
- Returns:
An array of
shape=(N,2)whereNis the number of evaluated points specified by the \(x\) vector. The columns represent \(C^{(m)}_x(t)\) and \(C^{(m)}_y(t)\), where \(m\) is the derivative order.- Return type:
np.ndarray
- evaluate(t: array | None = None, **kwargs)[source]#
Evaluates the curve using an optionally specified parameter vector.
- Parameters:
t (np.ndarray or
None) – Optional direct specification of the parameter vector for the curve. Not specifying this value gives a vector fromt_startort_endwith the default size and with spacing determined by the value ofcosine_spacingspecified in the class constructor. Default:None- Returns:
Data class specifying the following information about the NACA 4-series airfoil curve:
\[C_x(t), C_y(t), C'_x(t), C'_y(t), C''_x(t), C''_y(t), \kappa(t)\]where the \(x\) and \(y\) subscripts represent the \(x\) and \(y\) components of the vector-valued functions \(\vec{C}(t)\), \(\vec{C}'(t)\), and \(\vec{C}''(t)\).
- Return type:
- get_dict_rep()[source]#
Gets a dictionary representation of the pymead object. In general, this dictionary should consist of only the required arguments for object instantiation. For example, the dictionary representation of a point looks something like this:
{"x": 0.3, "y": 0.5}. If the argument requires a reference to aPymeadObjrather than a string or float value, thename()method should be the value that is stored. For an example, see the overridden value of this method inpymead.core.airfoil.Airfoil. All subclasses ofPymeadObjmust implement this method, since it is the way pymead objects are stored in saved instances of aGeometryCollection(.jmeafiles).