Airfoil 2D

class pyturbo.aero.airfoil2D(alpha1, alpha2, axial_chord, stagger)[source]

Design a 2D Airfoil using bezier curves

add_pitch(x_pitch: float)[source]

Adds extra pitch by shifting the turbine blade over by a x direction

Parameters:

x_pitch (float) – [description]

channel_get(s_c)[source]

Gets adjacent airfoil

Parameters:

s_c (float) – pitch to chord ratio

Returns:

pitch in between airfoils numpy.ndarray: x coordinate of the suction side numpy.ndarray: x coordinate of the pressure side numpy.ndarray: y coordinate of the suction side numpy.ndarray: y coordinate of the pressure side airfoil2D: the adjacent airfoil

Return type:

List[float]

custom_camber(x: float, y: float)[source]
Creates a custom bezier curve camberline from 3 points [LEPoint, (x,y), TEPoint]
Usage:

Example profile.custom_camber(0.5,0.5)

Parameters:
  • x (float) – arbitrary x coordinate

  • y (float) – arbitrary y coordinate

flip()[source]

Swaps the leading edge with trailing edge

flow_guidance(s_c)[source]

Straightens out the suction side. This method can agressively straighten out the suction side

Parameters:

s_c (float) – pitch to chord ratio, used to compute where the throat starts.

Returns:

flow_guidance2(n: int = 8)[source]

This function straightens out the suction side by specifying n bezier control points instead of a straight line.

Args:.

n (int): number of control points, increase this to make straightening more aggressive. Defaults to 8.

flow_guidance3(s_c: float, n: int)[source]

Straightens out the suction side. Computes the intersection point of the throat and draws a line, adds bezier points along the line

Parameters:
  • s_c (float) – pitch-to-chord ratio

  • n (int) – number of bezier control points

get_axial_chord()[source]

returns the axial chord

Returns:

axial_chord

Return type:

float

get_centroid()[source]

Returns the centroid of the airfoil

Returns:

centroid x and y coordinates (x,y)

Return type:

float,float

le_radius_estimate()[source]

Assumes the blade’s leading edge thickness, suction side, pressure side are already defined.

le_thickness_add(thickness: float, counter_rotation: bool = False)[source]
Adds thickness to leading edge either on pressure side or suction side.

If counter rotation is false, thickness is added to the suction side

Parameters:
  • thickness (float) – float value for defining a bezier curve thickness

  • counter_rotation (bool, optional) – switches the side for the bezier curve initial thickness. Defaults to False.

le_thickness_match()[source]

Matches the second derivative by changing the thickness of the opposite side

Args:

Returns:

error in matching the second derivative

Return type:

float

plot2D()[source]

Plots the airfoil

Returns:

None

plot2D_channel(pitchChordRatio: float)[source]

plots the 2D airfoil in a channel with another airfoil given a pitch to chord ratio

Parameters:

pitchChordRatio (float) – pitch to chord ratio (spacing between airfoils relative to the chord)

Returns:

[description]

Return type:

plt.figure

plot_camber()[source]

Plots the camber of the airfoil

Returns:

None

plot_derivative2(xlim=[0, 1], ylim=[-400, 400])[source]

Plots the second derivative of the airfoil.

References

https://mathformeremortals.wordpress.com/2013/01/12/a-numerical-second-derivative-from-three-points/

Parameters:
  • xlim (list, optional) – Plot x-axis. Defaults to [0,1].

  • ylim (list, optional) – Plot y-axis. Defaults to [-400,400].

ps_thickness_add(thicknessArray: List[float], expansion_ratio: float = 1.2)[source]

Add thickness to the pressure side

Parameters:
  • thicknessArray (List[float]) – thickness along the suction side. Example: [0.2400, 0.2000, 0.1600, 0.1400]

  • expansion_ratio (float, optional) – determines the spacing of the thickness array from leading edge. Defaults to 1.2.

shift(x: float, y: float)[source]

Shifts the blade over by x or y direction. LE points +y where TE is at (0,0) Be sure to take into account the rotation of the blade

Parameters:
  • x (float) – amount to shift the blade by in x direction

  • y (float) – amount to shift the bade by in y direction

ss_thickness_add(thicknessArray: List[float], camberPercent: float | None = None, thickness_loc: List[float] | None = None, expansion_ratio: float = 1.2)[source]

Adds thickness to the suction side by specifying bezier control points

Parameters:
  • thicknessArray (List[float]) – thickness along the suction side. Example: [0.2400, 0.2000, 0.1600, 0.1400]

  • camberPercent (float, optional) – Percent camber where straightening of the suction side happens. Defaults to None.

  • thickness_loc (List[float], optional) – Location where thickness is applied. Defaults to None.

  • expansion_ratio (float, optional) – If thickness location is specified then this is not necessary otherwise thickness_loc is calculated by the expansion ratio. Defaults to 1.2.

te_create(radius: float, wedge_ss: float, wedge_ps: float)[source]

Creates the trailing edge using a semi-circle

Parameters:
  • radius (float) – circle radius

  • wedge_ss (float) – wedge angle on the suction side

  • wedge_ps (float) – wedge angle on the pressure side

thickness()[source]

Calculates the location and value of maximum thickness along with average thickness

Returns:

along camberline of max thickness float: max thickness float: average thickness

Return type:

int