pfh.glidersim.foil_sections#

Models that provide foil section geometry and coefficients.

Classes

FoilSections(profiles[, coefficients, ...])

Provides the section profile geometry and coefficients.

SimpleIntakes(s_end, r_upper, r_lower)

Defines the upper and lower surface coordinates as constant along the span.

class pfh.glidersim.foil_sections.SimpleIntakes(s_end: float, r_upper: float, r_lower: float)#

Bases: object

Defines the upper and lower surface coordinates as constant along the span.

This version currently uses explicit r_upper and r_lower in airfoil coordinates, but other parametrizations might be the intake midpoint and width (where “width” might be in the airfoil s, or as a percentage of the chord) or c_upper and c_lower as points on the chord.

Parameters
s_end: float

Section index. Air intakes are present between +/- s_end.

r_upper, r_lowerfloat

The starting coordinates of the upper and lower surface of the parafoil, given in airfoil profile coordinates. These are used to define air intakes, and for determining the inertial properties of the upper and lower surfaces.

The airfoil coordinates use r = 0 for the leading edge, r = 1 for trailing edge of the curve above the chord, and r = -1 for the trailing edge of the curve below the chord, so these choices must follow -1 <= r_lower <= r_upper <= 1.

Methods

__call__(s, r, surface)

Convert parafoil surface coordinates into airfoil coordinates.

__init__(s_end: float, r_upper: float, r_lower: float) None#
__call__(s, r, surface: str)#

Convert parafoil surface coordinates into airfoil coordinates.

Parameters
sarray_like of float

Section index.

rarray_like of float

Parafoil surface coordinate, where 0 <= r <= 1, with 0 being the leading edge, and 1 being the trailing edge.

surface{“upper”, “lower”}

Which surface.

Returns
array_like of float, shape (N,)

The normalized (unscaled) airfoil coordinates.

class pfh.glidersim.foil_sections.FoilSections(profiles: AirfoilGeometryInterpolator, coefficients: AirfoilCoefficientsInterpolator = None, intakes: Callable | None = None, Cd_intakes: float = 0, Cd_surface: float = 0)#

Bases: object

Provides the section profile geometry and coefficients.

This simple implementation only takes a single airfoil; it does not support spanwise interpolation of section profiles.

Parameters
profilesAirfoilGeometryInterpolator

The section profiles. This class currently assumes all sections have the same, fixed airfoil. In the future the section profiles will be functions of both s and ai, not just ai.

coefficientsAirfoilCoefficientsInterpolator

The section coefficients. This class currently assumes all sections have the section coefficients. In the future the coefficients will be functions of s.

intakesfunction, optional

A function that defines the upper and lower intake positions in airfoil profile coordinates as a function of the section index.

Cd_intakesfloat, optional

Additional drag coefficient due to air intake openings. See [1].

Cd_surfacefloat, optional

Additional drag coefficient due to surface characteristics. See [2].

References

1

Holger Babinsky, “The aerodynamic performance of paragliders”, 1999. DOI: 10.1017/S0001924000027974

2

George M. Ware, “Wind-tunnel investigation of ram-air inflated all flexible wings of aspect ratios 1.0 to 3.0”, 1969.

Methods

Cd(s, ai, alpha, Re[, clamp])

Compute the drag coefficient of the airfoil.

Cl(s, ai, alpha, Re[, clamp])

Compute the lift coefficient of the airfoil.

Cl_alpha(s, ai, alpha, Re[, clamp])

Compute the derivative of the lift coefficient versus angle of attack.

Cm(s, ai, alpha, Re[, clamp])

Compute the pitching coefficient of the airfoil.

surface_xz(s, ai, r, surface)

Compute unscaled surface coordinates along section profiles.

thickness(s, ai, r)

Compute section thickness.

__init__(profiles: AirfoilGeometryInterpolator, coefficients: AirfoilCoefficientsInterpolator = None, intakes: Callable | None = None, Cd_intakes: float = 0, Cd_surface: float = 0) None#
surface_xz(s, ai, r, surface: str)#

Compute unscaled surface coordinates along section profiles.

These are unscaled since the FoilSections only defines the normalized airfoil geometry and coefficients. The Foil scales, translates, and orients these with the chord data it gets from the FoilLayout.

Parameters
sarray_like of float

Section index.

aifloat

Airfoil index.

rarray_like of float

Surface or airfoil coordinates, depending on the value of surface.

surface{“chord”, “camber”, “upper”, “lower”, “airfoil”}

How to interpret the coordinates in r. If “upper” or “lower”, then r is treated as surface coordinates, which range from 0 to 1, and specify points on the upper or lower surfaces, as defined by the intakes. If “airfoil”, then r is treated as raw airfoil profile coordinates, which must range from -1 to +1, and map from the lower surface trailing edge to the upper surface trailing edge.

Returns
array of float

A set of points from the section surface in foil frd. The shape is determined by standard numpy broadcasting of s, ai, and r.

Cl(s, ai, alpha, Re, clamp=False)#

Compute the lift coefficient of the airfoil.

Parameters
sarray_like of float

Section index.

aifloat

Airfoil index.

alphaarray_like of float [radians]

Angle of attack

Refloat [unitless]

Reynolds number

clampbool

Whether to clamp alpha to the highest non-nan value supported by the (ai, Re) pair.

Returns
Clfloat
Cl_alpha(s, ai, alpha, Re, clamp=False)#

Compute the derivative of the lift coefficient versus angle of attack.

Parameters
sarray_like of float

Section index.

aifloat

Airfoil index.

alphaarray_like of float [radians]

Angle of attack

Refloat [unitless]

Reynolds number

clampbool

Whether to return 0 if alpha exceeds the the highest non-nan value supported by the (ai, Re) pair.

Returns
Cl_alphafloat
Cd(s, ai, alpha, Re, clamp=False)#

Compute the drag coefficient of the airfoil.

Parameters
sarray_like of float

Section index.

aifloat

Airfoil index.

alphaarray_like of float [radians]

Angle of attack

Refloat [unitless]

Reynolds number

clampbool

Whether to clamp alpha to the highest non-nan value supported by the (ai, Re) pair.

Returns
Cdfloat
Cm(s, ai, alpha, Re, clamp=False)#

Compute the pitching coefficient of the airfoil.

Parameters
sarray_like of float

Section index.

aifloat

Airfoil index.

alphafloat [radians]

The angle of attack

Refloat [unitless]

The Reynolds number

clampbool

Whether to clamp alpha to the highest non-nan value supported by the (ai, Re) pair.

Returns
Cmfloat
thickness(s, ai, r)#

Compute section thickness.

These are the normalized thicknesses, not the absolute values. The absolute thickness requires knowledge of the chord length.

Parameters
sarray_like of float

Section index.

aifloat

Airfoil index.

rarray_like of float [percentage]

Fractional position on the camber line, where 0 <= r <= 1

Returns
thicknessarray_like of float

The normalized section profile thicknesses.