buffalo_wings.airfoil.Curve

class buffalo_wings.airfoil.Curve[source]

Bases: ABC

Base class for 1-d curves.

Curves can be interrogated based on their natural parameterization, using the parameter, t.

__init__()

Methods

__init__()

arc_length(t_s, t_e)

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

joints()

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

k(t)

Calculate the curvature at parameter location.

normal(t)

Calculate the unit normal at parameter location.

tangent(t)

Calculate the unit tangent at parameter location.

xy(t)

Calculate the coordinates of geometry at parameter location.

xy_t(t)

Calculate rates of change of the coordinates at parameter location.

xy_tt(t)

Calculate second derivative of the coordinates at parameter location.

abstractmethod xy(t)[source]

Calculate the coordinates of geometry at parameter location.

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]]]

abstractmethod xy_t(t)[source]

Calculate rates of change of the coordinates at parameter location.

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]]]

abstractmethod xy_tt(t)[source]

Calculate second derivative of the coordinates at parameter location.

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]]]

normal(t)[source]

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

tangent(t)[source]

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

k(t)[source]

Calculate the curvature at parameter location.

Parameters:

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

Returns:

Curvature of surface at point.

Return type:

numpy.ndarray

arc_length(t_s, t_e)[source]

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

abstractmethod joints()[source]

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

The resulting list needs to contain any parametric locations where some non-standard discontinuity (slope, curvature, etc.) occurs as well as the end points for the curve (if they exist).

Returns:

Parametric coordinates of any discontinuities.

Return type:

List[float]