bemused package

class bemused.Blade(x, chord, twist, thickness, density=None, EA=None, EI_flap=None, EI_edge=None)[source]

Bases: object

Holds a blade definition.

x

Position of blade stations (measured from blade root)

Type:ndarray
chord

Chord length [m]

Type:ndarray
twist

Twist, positive points leading edge upwind [rad]

Type:ndarray
thickness

Percentage thickness of aerofoil [%]

Type:ndarray
density

Mass per unit length of blade [kg/m]

Type:ndarray, optional
EA

Axial stiffness

Type:ndarray, optional
EI_flap, EI_edge

Bending stiffness in flapwise and edgewise directions

Type:ndarray, optional
classmethod from_yaml(filename_or_file)[source]

Load blade definition from YAML file.

The file should have x, chord, twist and thickness keys.

For example:

x:     [0.2, 3.2, 4.3]
chord: [2.3, 1.0, 3]
twist: [2, 5, 0.2]
thickness: [100, 100, 43]

Note

NB: In the definition file, the twist is measured in degrees!

Parameters:filename_or_file (str or file) – Filename or file-like object to load the YAML data from
resample(new_x)[source]

Resample all blade data to the new x coordinates.

Parameters:new_x (array) – Coordinates (distance along the blade) to resample at
Returns:
Return type:A new Blade instance.
class bemused.AerofoilDatabase(filename)[source]

Bases: object

Store aerofoil list and drag data.

Loads data in .npz format. The data file should have two variables:

  • datasets : list of aerofoils
  • thicknesses : fractional thicknesses of the aerofoils in datasets

Each aerofoil is an array with alpha, CL, CD and CM columns, where the angles are in radians.

See Defining aerofoil databases for more details.

for_thickness(thickness)[source]

Return interpolated lift & drag data for the given thickness.

Parameters:thickness (float) – Fractional thickness
class bemused.BEMModel(blade, root_length, num_blades, aerofoil_database)[source]

Bases: object

A Blade Element - Momentum model.

Parameters:
  • blade (Blade object) – Blade parameter definition
  • root_length (float) – Distance from centre of rotor to start of blade
  • num_blades (int) – Number of blades in the rotor
  • aerofoil_database (AerofoilDatabase object) – Definitions of aerofoil coefficients
force_coefficients(inflow_angle, pitch, annuli=None)[source]

Calculate force coefficients for given inflow.

The force coefficients Cx and Cy are the out-of-plane and in-plane non-dimensional force per unit length, respectively.

Parameters:
  • inflow_angle (array_like) – Inflow angle at each annulus [radians]. Zero is in-plane, positive is towards upwind.
  • annuli (slice or indices, optional) – Subset of annuli to return data for. If given, alpha should refer only to the annuli of interest.
Returns:

Return type:

Array of shape (number of annuli, 2) containing CL and CD.

forces(windspeed, rotorspeed, pitch, rho, factors, extra_velocity_factors=None, annuli=None)[source]

Calculate in- and out-of-plane forces per unit length

inflow_derivatives(windspeed, rotorspeed, pitch, factors, extra_velocity_factors=None, annuli=None)[source]

Calculate the derivatives of the aerodynamic induced velocities for an annuli

$$ C_T = 4 a (1-a) + frac{16}{3 pi U_0} frac{R_2^3 - R_1^3}{R_2^2 - R_1^2} dot{a} $$

lift_drag(alpha, annuli=None)[source]

Interpolate lift & drag coefficients for given angle of attack.

Parameters:
  • alpha (array_like) – Angle of attach at each annulus [radians]
  • annuli (slice or indices, optional) – Subset of annuli to return data for. If given, alpha should refer only to the annuli of interest.
Returns:

Return type:

Array of shape (number of annuli, 2) containing CL and CD.

pcoeffs(windspeed, rotorspeed, pitch=0.0)[source]
solve(windspeed, rotorspeed, pitch, extra_velocity_factors=None, tol=None, max_iterations=500, annuli=None)[source]

Calculate the BEM solution for the given conditions.

Parameters:
  • windspeed (float) – Free-stream wind speed
  • rotorspeed (float) – Rotor speed [rad/s]
  • pitch (float) – Pitch angle [rad]
  • extra_velocity_factors (ndarray, optional) – Blade velocity normalised by windspeed
  • tol (float, optional) – Absolute tolerance for solution
  • max_iterations (int, optional) – Maximum number of iterations
  • annuli (slice or indices, optional) – Subset of annuli to return data for.
Returns:

  • Array of axial and tangential induction factors at each annulus,
  • shape (number of annuli, 2).

Raises:

RuntimeError if maximum number of iterations reached.

solve_wake(windspeed, rotorspeed, pitch, extra_velocities=None, tol=None)[source]