buffalo_wings.airfoil.CstAirfoilSide

class buffalo_wings.airfoil.CstAirfoilSide(*, shape, delta_te=0.0)[source]

Bases: CstGeometrySide

Canonical CST side helper with fixed airfoil class exponents.

Notes

This helper represents the airfoil-specific CST case with n1 = 0.5 and n2 = 1.0. It also provides the exact canonical Bezier curve representation for the side in the auxiliary parameter s in [0, 1].

Methods

class_value(x)

Evaluate the CST class function.

class_x(x)

Evaluate the first derivative of the CST class function.

class_xx(x)

Evaluate the second derivative of the CST class function.

demote_degree(*[, count, continuity])

Lower the Bezier shape degree with constrained demotion.

promote_degree(*[, count])

Raise the Bezier shape degree without changing the side geometry.

rebuild_with_shape(shape, *[, delta_te])

Return one canonical side rebuilt with a replacement shape curve.

shape_value(x)

Evaluate the Bezier shape curve.

shape_x(x)

Evaluate the first derivative of the Bezier shape curve.

shape_xx(x)

Evaluate the second derivative of the Bezier shape curve.

x_canonical(s)

Return the canonical side chord coordinate x = s**2.

xy_canonical(s)

Return canonical side coordinates in the x = s**2 parameter.

xy_canonical_t(s)

Return first derivatives in the canonical side parameter.

xy_canonical_tt(s)

Return second derivatives in the canonical side parameter.

y(x)

Evaluate the CST side ordinate.

y_x(x)

Evaluate the first derivative of the CST side ordinate.

y_xx(x)

Evaluate the second derivative of the CST side ordinate.

Attributes

coefficients

Return the Bernstein coefficients of the shape curve.

delta_te

Return the linear trailing-edge term.

exact_curve

Return the exact canonical Bezier curve for this CST side.

n1

Return the leading-edge class exponent.

n2

Return the trailing-edge class exponent.

shape

Return the one-dimensional Bezier curve.

property exact_curve: BezierCurve2D

Return the exact canonical Bezier curve for this CST side.

Returns:

Exact Bezier curve in the auxiliary canonical airfoil parameterization x = s**2.

Return type:

BezierCurve2D

rebuild_with_shape(shape, *, delta_te=None)[source]

Return one canonical side rebuilt with a replacement shape curve.

Parameters:
  • shape (BezierCurve1D) – Replacement canonical CST shape curve.

  • delta_te (FloatScalar | None, default None) – Replacement side-local trailing-edge term. When omitted, the current side-local value is reused.

Returns:

Rebuilt canonical CST side with the same trailing-edge term.

Return type:

CstAirfoilSide

x_canonical(s)[source]

Return the canonical side chord coordinate x = s**2.

Parameters:

s (buffalo_core.typing.FloatInput) – Canonical side parameter in [0, 1].

Returns:

Chordwise coordinates for the canonical side parameter.

Return type:

buffalo_core.typing.FloatArray

xy_canonical(s)[source]

Return canonical side coordinates in the x = s**2 parameter.

Parameters:

s (buffalo_core.typing.FloatInput) – Canonical side parameter in [0, 1].

Returns:

Arrays (x(s), y(s)) for the canonical side parameter.

Return type:

tuple[FloatArray, FloatArray]

xy_canonical_t(s)[source]

Return first derivatives in the canonical side parameter.

Parameters:

s (buffalo_core.typing.FloatInput) – Canonical side parameter in [0, 1].

Returns:

Arrays (dx/ds, dy/ds).

Return type:

tuple[FloatArray, FloatArray]

Notes

These derivatives are evaluated directly in the canonical side parameter rather than through dy/dx * dx/ds so the leading-edge value remains finite.

xy_canonical_tt(s)[source]

Return second derivatives in the canonical side parameter.

Parameters:

s (buffalo_core.typing.FloatInput) – Canonical side parameter in [0, 1].

Returns:

Arrays (d2x/ds2, d2y/ds2).

Return type:

tuple[FloatArray, FloatArray]

Notes

These derivatives are evaluated in closed form in the canonical side parameter so the leading-edge value remains finite.

class_value(x)

Evaluate the CST class function.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

Class-function values at x.

Return type:

buffalo_core.typing.FloatArray

class_x(x)

Evaluate the first derivative of the CST class function.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

First derivative values of the class function at x.

Return type:

buffalo_core.typing.FloatArray

class_xx(x)

Evaluate the second derivative of the CST class function.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

Second derivative values of the class function at x.

Return type:

buffalo_core.typing.FloatArray

property coefficients: buffalo_core.typing.FloatArray

Return the Bernstein coefficients of the shape curve.

This property exposes the stored Bernstein coefficients for the one-dimensional Bezier curve.

property delta_te: buffalo_core.typing.FloatScalar

Return the linear trailing-edge term.

This property stores the linear trailing-edge term for this side.

demote_degree(*, count=1, continuity='NOT_CONNECTED')

Lower the Bezier shape degree with constrained demotion.

Parameters:
  • count (int, default 1) – Number of Bezier degree-reduction steps to apply to the stored shape curve.

  • continuity ({"NOT_CONNECTED", "C0", "C1", "C2"},) – default=”NOT_CONNECTED” Symmetric endpoint continuity preserved during each Bezier demotion step.

Returns:

Rebuilt CST side with a reduced-degree Bezier shape curve.

Return type:

CstGeometrySide

Notes

This operation is intentionally approximate unless the original shape curve is exactly reducible to the requested lower degree.

property n1: buffalo_core.typing.FloatScalar

Return the leading-edge class exponent.

This property stores the leading-edge class exponent.

property n2: buffalo_core.typing.FloatScalar

Return the trailing-edge class exponent.

This property stores the trailing-edge class exponent.

promote_degree(*, count=1)

Raise the Bezier shape degree without changing the side geometry.

Parameters:

count (int, default 1) – Number of Bezier degree-elevation steps to apply to the stored shape curve.

Returns:

Rebuilt CST side with an exact elevated Bezier shape curve.

Return type:

CstGeometrySide

property shape: BezierCurve1D

Return the one-dimensional Bezier curve.

This property exposes the one-dimensional Bezier curve used by the CST side.

shape_value(x)

Evaluate the Bezier shape curve.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

Shape-function values at x.

Return type:

buffalo_core.typing.FloatArray

shape_x(x)

Evaluate the first derivative of the Bezier shape curve.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

First derivative values of the shape curve at x.

Return type:

buffalo_core.typing.FloatArray

shape_xx(x)

Evaluate the second derivative of the Bezier shape curve.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

Second derivative values of the shape curve at x.

Return type:

buffalo_core.typing.FloatArray

y(x)

Evaluate the CST side ordinate.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

Surface ordinate values for this side at x.

Return type:

buffalo_core.typing.FloatArray

y_x(x)

Evaluate the first derivative of the CST side ordinate.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

First derivative values dy/dx for this side at x.

Return type:

buffalo_core.typing.FloatArray

y_xx(x)

Evaluate the second derivative of the CST side ordinate.

Parameters:

x (buffalo_core.typing.FloatInput) – Chordwise coordinates, typically in [0, 1].

Returns:

Second derivative values d2y/dx2 for this side at x.

Return type:

buffalo_core.typing.FloatArray