buffalo_wings.airfoil.Naca4ModifiedAirfoilClassic

class buffalo_wings.airfoil.Naca4ModifiedAirfoilClassic(spec)[source]

Bases: OrthogonalAirfoil

Classic modified NACA 4-digit airfoil built from a designation.

Parameters:

spec (Naca4ModifiedAirfoilSpec) – Serialized specification containing a modified-series designation.

Raises:

ValueError – If spec does not contain a valid designation-only definition.

__init__(spec)[source]

Build a classic modified NACA 4-digit airfoil from its spec.

Parameters:

spec (Naca4ModifiedAirfoilSpec) – Serialized specification containing a modified-series designation.

Raises:

ValueError – If spec does not contain a valid designation-only definition.

Return type:

None

Methods

__init__(spec)

Build a classic modified NACA 4-digit airfoil from its spec.

arc_length(t_s, t_e)

Calculate the arc-length distance between two points on surface.

camber_location(t)

Return the location of camber at specified parameter location.

chord()

Return the chord length of the airfoil.

d2ydx2(t)

Calculate the second derivative at parameter location.

dydx(t)

Calculate the slope at parameter location.

from_designation(designation)

Build a classic modified NACA 4-digit airfoil from a designation.

joints()

Return the locations of any joints/discontinuities in the curve.

k(t)

Calculate the curvature at parameter location.

leading_edge()

Return the location of the leading edge.

normal(t)

Calculate the unit normal at parameter location.

t_from_s(s)

Calculate the parametric value for arc-length provided.

t_from_x(x, upper)

Calculate the parametric value for x-location provided.

tangent(t)

Calculate the unit tangent at parameter location.

thickness_value(t)

Return the amount of thickness at specified parameter location.

to_spec()

Return the schema definition needed to recreate this airfoil.

trailing_edge()

Return the location of the trailing edge.

xy(t)

Calculate the coordinates of geometry at parameter location.

xy_from_s(s)

Calculate the coordinates of geometry at arc-length location.

xy_s(s)

Calculate rates of change of the coordinates at arc-length location.

xy_ss(s)

Calculate second derivative of the coordinates at arc-length location.

xy_t(t)

Calculate rates of change of the coordinates at parameter location.

xy_tt(t)

Return second derivative of the coordinates at parameter location.

Attributes

camber

Return the camber function for airfoil.

spec

Return the source spec for this airfoil.

surface_length

Return the full airfoil surface length.

thickness

Return the thickness function for airfoil.

xmax_parameter

Return the parameter of the largest x-coordinate for the airfoil.

xmin_parameter

Return the parameter of the smallest x-coordinate for the airfoil.

classmethod from_designation(designation)[source]

Build a classic modified NACA 4-digit airfoil from a designation.

Parameters:

designation (str) – Modified NACA 4-digit designation such as "0003-64".

Returns:

Runtime airfoil built from designation.

Return type:

Self

Raises:

ValueError – If designation is not a valid modified NACA 4-digit code.

property spec: Naca4ModifiedAirfoilSpec

Return the source spec for this airfoil.

Returns:

Defensive copy of the serialized source spec.

Return type:

Naca4ModifiedAirfoilSpec

to_spec()[source]

Return the schema definition needed to recreate this airfoil.

Returns:

Serialized source spec for this airfoil.

Return type:

Naca4ModifiedAirfoilSpec

arc_length(t_s, t_e)

Calculate the arc-length distance between two points on surface.

Parameters:
  • t_s (float) – Start point of distance calculation.

  • t_e (numpy.ndarray) – End point of distance calculation.

Returns:

Distance from start point to end point.

Return type:

numpy.ndarray

property camber: Camber

Return the camber function for airfoil.

Returns:

Camber-line model associated with this airfoil.

Return type:

Camber

camber_location(t)

Return the location of camber at specified parameter location.

Parameters:

t (numpy.ndarray) – Parameter location of interest.

Returns:

  • numpy.ndarray – X-coordinate of camber at specified point.

  • numpy.ndarray – Y-coordinate of camber at specified point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]

chord()

Return the chord length of the airfoil.

Returns:

Chord length.

Return type:

float

d2ydx2(t)

Calculate the second derivative at parameter location.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

Second derivative of surface at point.

Return type:

numpy.ndarray

Raises:

ValueError – If there is no surface point at the given x-location.

dydx(t)

Calculate the slope at parameter location.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

Slope of surface at point.

Return type:

numpy.ndarray

Raises:

ValueError – If there is no surface point at the given x-location.

joints()

Return the locations of any joints/discontinuities in the curve.

Returns:

Xi-coordinates of any discontinuities.

Return type:

List[float]

k(t)

Calculate the curvature at parameter location.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

Curvature of surface at point.

Return type:

numpy.ndarray

leading_edge()

Return the location of the leading edge.

Returns:

  • float – X-coordinate of leading edge.

  • float – Y-coordinate of leading edge.

Return type:

tuple[float | floating[Any], float | floating[Any]]

normal(t)

Calculate the unit normal at parameter location.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

Unit normal at point.

Return type:

numpy.ndarray, numpy.ndarray

property surface_length: float | floating[Any]

Return the full airfoil surface length.

Returns:

Arc length measured from the lower trailing edge to the upper trailing edge.

Return type:

float

t_from_s(s)

Calculate the parametric value for arc-length provided.

Parameters:

s (numpy.ndarray) – Arc-length location of point.

Raises:

ValueError – When arc-length provided is larger than airfoil surface length.

Returns:

Parametric value for location provided.

Return type:

numpy.ndarray

t_from_x(x, upper)

Calculate the parametric value for x-location provided.

Parameters:
Returns:

Parameteric value for location provided.

Return type:

numpy.ndarray

Raises:

ValueError – If there is no surface point at the given x-location.

tangent(t)

Calculate the unit tangent at parameter location.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

Unit tangent at point.

Return type:

numpy.ndarray, numpy.ndarray

property thickness: Thickness

Return the thickness function for airfoil.

Returns:

Thickness model associated with this airfoil.

Return type:

Thickness

thickness_value(t)

Return the amount of thickness at specified parameter location.

Parameters:

t (numpy.ndarray) – Parameter location of interest.

Returns:

Thickness at specified point.

Return type:

numpy.ndarray

trailing_edge()

Return the location of the trailing edge.

Notes

Since some airfoil descriptions have gap between the upper and lower surface at the trailing edge (such as NACA 4-digit and 5-digit airfoils), the point returned is the average of the two trailing edge points. If the specific location of the upper or the lower surface of the trailing edge is desired, use xy() passing in either -1 (lower) or +1 (upper).

Returns:

  • float – X-coordinate of trailing edge.

  • float – Y-coordinate of trailing edge.

Return type:

tuple[float | floating[Any], float | floating[Any]]

property xmax_parameter: float | floating[Any]

Return the parameter of the largest x-coordinate for the airfoil.

Returns:

Native airfoil parameter at the maximum x-location.

Return type:

float

property xmin_parameter: float | floating[Any]

Return the parameter of the smallest x-coordinate for the airfoil.

Returns:

Native airfoil parameter at the minimum x-location.

Return type:

float

xy(t)

Calculate the coordinates of geometry at parameter location.

Notes

Parameter goes from -1 (trailing edge lower surface) to +1 (trailing edge upper surface) with 0 representing the leading edge.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

  • numpy.ndarray – X-coordinate of point.

  • numpy.ndarray – Y-coordinate of point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]

xy_from_s(s)

Calculate the coordinates of geometry at arc-length location.

Parameters:

s (numpy.ndarray) – Arc-length location for point.

Returns:

  • numpy.ndarray – X-coordinate of point.

  • numpy.ndarray – Y-coordinate of point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]

xy_s(s)

Calculate rates of change of the coordinates at arc-length location.

Parameters:

s (numpy.ndarray) – Arc-length location for point.

Returns:

  • numpy.ndarray – Arc-length rate of change of the x-coordinate of point.

  • numpy.ndarray – Arc-length rate of change of the y-coordinate of point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]

xy_ss(s)

Calculate second derivative of the coordinates at arc-length location.

Parameters:

s (numpy.ndarray) – Arc-length location for point.

Returns:

  • numpy.ndarray – Arc-length second derivative of the x-coordinate of point.

  • numpy.ndarray – Arc-length second derivative of the y-coordinate of point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]

xy_t(t)

Calculate rates of change of the coordinates at parameter location.

Notes

Parameter goes from -1 (trailing edge lower surface) to +1 (trailing edge upper surface) with 0 representing the leading edge.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

  • numpy.ndarray – Parametric rate of change of the x-coordinate of point.

  • numpy.ndarray – Parametric rate of change of the y-coordinate of point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]

xy_tt(t)

Return second derivative of the coordinates at parameter location.

Notes

Parameter goes from -1 (trailing edge lower surface) to +1 (trailing edge upper surface) with 0 representing the leading edge.

Parameters:

t (numpy.ndarray) – Parameter for desired locations.

Returns:

  • numpy.ndarray – Parametric second derivative of the x-coordinate of point.

  • numpy.ndarray – Parametric second derivative of the y-coordinate of point.

Return type:

tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]