wingstructure.aero package

Submodules

wingstructure.aero.analysis module

class wingstructure.aero.analysis.AirfoilData(alpha0: float = 0, dif_ca_alpha: float = 6.283185307179586, cm0: float = 0)

Bases: object

class wingstructure.aero.analysis.LiftAnalysis(wing: wingstructure.data.geometry.Wing, airfoil_db: dict = None)

Bases: object

Class for simplified handling of Multhopp

Parameters:
  • wing (geometry.Wing) – Definition of wing to be analysed.
  • airfoil_db (dict) – Database of airfoils used in wing.
calculate(C_L: float, air_brake=False, flap_deflections={}, return_C_Di=False) → tuple

Calculates lift distribution with defined control surface setting

Parameters:
  • C_L (float) – wing lift coefficient
  • air_brake (bool, optional) – Is air brake active (the default is False, which mean not active)
  • flap_deflections (dict, optional) – deflections of control surfaces as dictionary {cs-name: (deflection-left, deflection-right)}
  • return_C_Di (bool, optional) – Is induced drag also returned? (the default is False, which means it will not)
Returns:

(angle of attack, local lift coefficients, [induced drag])

Return type:

tuple

class wingstructure.aero.analysis.LiftAndMomentAnalysis(wing: wingstructure.data.geometry.Wing, airfoil_db: dict = {})

Bases: wingstructure.aero.analysis.LiftAnalysis

Extended Analysis, calculates lift and aerodynamic moments

Parameters:
  • wing (geometry.Wing) – Definition of wing to analyse
  • airfoil_db (dict) – Database of airfoil coefficients {airfoilname: AirfoilData}
calculate(lift: float, air_brake=False, flap_deflections={})

Calculates lift and moment distribution

Parameters:
  • lift (float) – wing lift coefficient
  • air_brake (bool, optional) – Is airbrake active?
  • flap_deflections (dict, optional) – Dictionary containing flap deflections, e.g. {‘flap1’:[np.radians(5),np.radians(-5)]}
Returns:

(wing angle of attack, distribution of local lift coefficients,

distribution of local moment coefficients)

Return type:

tuple

wingstructure.aero.liftingline module

Module providing the multhop quadrature method for solving prandtl’s lifting line problem.

wingstructure.aero.liftingline.multhopp(αs: numpy.ndarray, chords: numpy.ndarray, ys: numpy.ndarray, dcls: numpy.ndarray = nan, M: int = None, mode='c_l', interp=True)

Use multhopp’s quadrature to solve prandtl’s lifting line problem

Parameters:
  • αs (np.array) – angle of attack regarding zero lift angle
  • chords (np.array) – chord lengths of wing
  • ys (np.array) – corresponding span position
  • dcls (np.array, optional) – lift coefficient slope (the default is np.nan, which means 2pi is used)
  • M (int, optional) – number of evaluation points (the default is None, which let function use recommendation number)
  • mode (str, optional) – (the default is ‘c_l’, which [default_description])
  • interp (bool, optional) – calculate grid points or use given span positions for calculation (the default is True)
Returns:

local lift coefficients, optional circulation distribution

Return type:

namedtuple

wingstructure.aero.nnliftingline module

wingstructure.aero.nnliftingline.nonlinearLL(a, c_li, y_li, airfoil_li, v_inf, polars, max_iter=200)

Nichtlineares Iterationsverfahren zur Bestimmung der Auftriebsverteilung. Erlaubt die direkte Verwendung von Profilpolaren. :param a: Anstellwinkel :param c_li: Profiltiefen :param y_li: Spannweitenpositionen :param airfoil_li: Profile :param v_inf: Anströmgeschwindigkeit :param polars: Polaren für die angegebenen Profile :param max_iter: Maximale Anzahl an Iterationen :return:

wingstructure.aero.polarinterp module

class wingstructure.aero.polarinterp.PolarInterpolator(path: str)

Bases: object

A class for interpolation of airfoil drag

interpolate(airfoilname: str, reynolds: float, c_l: float)

Interpolate drag for given input

Parameters:
  • airfoilname (str) – name of airfoil
  • reynolds (float) – reynoldsnumber
  • c_l (float) – lift coefficient
Raises:

Exception – Airfoil not found

Returns:

interpolated drag

Return type:

float

Module contents