You are on page 1of 13

BLADE ELEMENT MOMEMTUM CODE FOR HORIZONTAL AXIS WIND AND MARINE CURRENT

TURBINES BEMMCT. PACK I.


Copyright 2010. Alexander Ladino, MSc.
Alexander.Ladino@gmail.com

Description and Pack Content.


BEMMCT is a MATLAB Toolbox designed to perform computations in
conceptual and general design phase of horizontal axis wind turbines
(HAWCT) and Horizontal Axis Marine Current Turbines (HAMCT) . The code is
based on the classical Blade Element Momentum Method BEM. The code is
highly vectorized in order to improve speed computing.
The pack is composed by:
1. Script bemmain1.m which the packs main program.
2. Function bemcore.m: BEM core solver called from bemmain.m
3. Script
postprocoeffblade.m
and
postprocoeff.m:
scripts
for
postprocessing stage.
4. Specialized functions: Used in computation stage and they are called
by bemcore.m during BEM calculation.
5. preprocessing scripts: Scripts and templates used in order to
generate the main parameters required for BEM computation.
About the guide.
This guideline explain the main characteristics of BEMMCT pack, the main
routines and general steps and requirement to perform BEM computations of
a horizontal axis wind and marine current turbine.
This document is divided three parts:
1. How to perform a BEM analysis.
2. Function and script documentation.
How to perform a BEM analysis
The following paragraphs contain information step to step in order to
perform a Blade Element Momentum analysis. These steps are divided in 3
general stages: Geometry Definition, Profiles Definition, Simulation
Parameters and Postprocesing
a. Geometry definition (script geomdef.m).
The following data are required for blade definition (all of that are
defined respect to dimensionless span r/R):
Dimensionless span r/R: rR.
Dimensionless chord c/R: cR
Local blade pitch or local twist angle (deg): pitch
For blades composed by NACA profiles, it is necessary to define thickness
distribution: thickness
Dimensionless chord at blade root: crhub.
Dimensionless chord at blade tip: crtip.
Dimensionless hub radius: rhubnd.

Defining these parameters and running the script a filename.mat file will
be saved containing the information about the blade geometry definition.
b. Profiles
Definition:
Aero
/
Hydrodynamic
data
(template
naca638xxre300k.m)
In order to perform BEM computations, it is necessary to define the lift
and drag coefficients for the profiles used in the blade geometry.
This version only supports two kinds of profile definition in blade
geometry:
a. NACA profiles of the same series varying only thickness:
Ex: naca638xxre300k.m
b. Only one profile of any designation (Ex: NACA, Selig, Eppler e.t.c).
Ex: naca4412re300k.m
In general, the functions must load cl and cd data
Ex: x63812300kpol.mat)1 and it is necessary that lift and drag data cover
a wide range of angles of attack (minimum -90 to 90deg). Also, the data
must be in increasing order for aoa, for example:
aoa
-90
-85
-70

Cl
0
0.01
0.005

Data for airfoils can be obtained from the following links:


http://www.ae.illinois.edu/m-selig/ads/coord_database.html
http://isoar.ca/~andrewm/rc/airfoils/
http://www.worldofkrauss.com/
On the other hand, airfoils can be computed using XFOIL or Javafoil,
However be careful with the data since the range of confidence is only
limited to pre stall regime, and it is necessary to use some models to
extrapolate aerodynamic data for high angles of attack.
Finally, the exit variables from the function are cl and cd coefficients
evaluated at each local angle of attack at each radial position along the
blade.
c. Simulation Parameters (Script bemmain1.m)
The following lines are the Input section of bemmain1.m where turbine
properties are defined.
1. %% Inputs
2. % Results filename to save
3. filesave = 'bahajmctres.mat';
1

The mat file containing information of cl and cd, must have the following variable
names: For lift coefficient: clinfo. For drag coefficient: cdinfo. Both with
dim(numangles,2) where numangles are the number of data, the column 1 is the angle of
attack and column 2 is the coefficient.

4. % ----- TURBINE PROPERTIES ----5. % Turbine Geometry *.mat file


6. bladedata = 'bahajmct.mat';
7. % airfoil data function
8. mct.foilfcn = @naca638xxre300k;
9. % blade composed by different AIRFOILS. 1: Yes; No:0
10. nacacomp = 1;
11. % number of blades
12. nblades = 3;
The lines are explained below:
Line3: Write between the quotes the file name used to save the simulation
results. DO NOT FORGET THE MATLAB RESULTS FILE EXTENSION .mat
Line6: Write between the quotes the file name where turbine geometry is
defined (from geometry definition section a). DO NOT FORGET THE MATLAB
RESULTS FILE EXTENSION .mat
Line 8: Write after @ the function filename where lift and drag data are
defined (from profiles definition).
Line 10: Flag. Write 1 if the blade is composed
profiles or naca profiles with different thickness.

by

different

naca

Line 12: write the number of turbine blades (usually 3)


The following lines are the simulation conditions of bemmain1.m where
turbine properties are defined.
1:
2:
3:
4:
5:

% ---- SIMULATION CONDITIONS ---% TIP SPEED RATIO REGIME


TSR = [2:0.5:10];
% hub twist angles
settippitch = [0 5 10 12];

Line 3: Tip Speed Ration regime. Write the range of TSR and the increment
to be simulated [TSRmin:Increment:TSRmax];
Line5: settippitch. Write the pitch angle rotation of the blade. It is
possible to simulate the turbine for different pitch rotations. Ex:
settippitch = [ang1 ang2 ang3 angn].
The following lines are the solver parameters
bemmain1.m where turbine properties are defined.
1:
2:
3:
4:
5:
6:
7:

% ---- SOLVER CONDITIONS ---% calc hub loss? 1: YES, 0: NO


hubloss = 1;
% calc tip loss? 1: YES, 0: NO
tiploss = 1;
% maximun number of iterations
maxit = 200;

and

conditions

of

8: % number of elements
9: numele = 30;
10: % Termination criteria
11: tole = 1e-3;
12: % solucion weighting factor successive substitutions)
13: relaxfactor = 0.2;
Line3: Write 1 if Hub losses will be computed or 0 if not (Default 1).
Line5: Write 1 if Tip losses will be computed or 0 if not (Default 1).
Line7: Write the maximum number of iterations (Default 200).
Line9: Write the number of blade elements in which the blade will be
divided. (Default 30).
Line11: Write the convergence tolerance. (Default 1e-3 min 1e-5).
Line13: Write the weighting factor for successive substitutions. (1
implies that computed solution is the new solution. [0<relaxfactor<1]
implies a weighted solution between the computed and the actual solution.
(Default 0.05).
Note: If during a simulation a warning message like 'Maximum number of
iterations reached. No converged solution found' is displayed, try to
reduce the relaxfactor and increase the maximum number of iterations.
NOTE: IN ORDER TO SOLVE, RUN THE SCRIPT bemmain1.m USING THE KEY f5.
During the simulation, a progress record will be displayed in the command
window. After that, a message Results file saved as FILENAME.MAT WILL
BE displayed indicating that simulation has finished.
d. Postprocesing (Scripts postprocoeff.m and postprocoeffblade.m)
Once a simulation has finished and the results file written, go to
scripts postprocoeff.m and postprocoeffblade.m in order to extract and
display the results.

1:
2:
3:
4:
5:
6:
7:

- Power and Thrust Coefficients: Script postprocoeff.m.


% ENTER THE RESULTS FILENAME
filename = ['bahajmctres.mat'];
% Define axis limits
% axis limits for cp vs tsr: [tsrmin tsrmax cpmin cpmax]
axiscp = [2 10 0 0.6];
% axis limits for ct vs tsr: [tsrmin tsrmax cpmin cpmax]
axisct = [2 10 0 1.2];

Line2: Write between the


bemmain1.m). DO NOT FORGET
Line5 & lines6: Write the
vs TSR respectively ([xmin

quotes the results filename (file written by


THE MATLAB RESULTS FILE EXTENSION .mat
axis limits for power and thrust coefficients
xmax ymin ymax]).

In order to run the script, press the key f5. The postprocessing presents
MATLAB graphs which can be manipulated in standard way (save as *.fig,
save as image, e.t.c).
The following image is and example of postprocesing of a Bahajs Marine
Current Turbine.

- Variables along blade span: Script postprocoeffblade.m


1: % ENTER FILENAME
2: filename = ['bahajmctres.mat'];
3: % set the tsr to be ploted (-1 to plot all tsr available in results
file)
4: tsrplot = [4 5 6 7];
5: % set the pitchplot (settippitch) to be plotted (999 to plot all pitch
angle available in results file)
6: pitchplot = [0 5 10 12];
Line2: Write between the quotes the results filename (file written by
bemmain1.m). DO NOT FORGET THE MATLAB RESULTS FILE EXTENSION .mat
Line4: tsrplot: Write the tsr desired to be plotted. To plot all tsr
available in the results file write -1. Note: The tsr to be plotted must
be the exactly the same those were resolved. Interpolation between
results is not available in this version.
Line6: pitchplot: Write the pitch angle desired to be ploted. To plot all
pitch angles available in the results file, write 999. Note: The pitch to
be ploted must be the exactly the same that were resolved. Interpolation
between results is not available in this version.
In order to run the script, press the key f5. The postprocessing presents
MATLAB graphs which can be manipulated in standard way (save as *.fig,
save as image, e.t.c).

Routines, scripts and functions of BEMHAWT&MCT.


The following functions are the program functions used in BEMHAWT&MCT.
Function afactor.m
Computes the axial induction factor based on Classical Blade Element
Theory and Glauert Corrections. Moriarty & Hansen. Aerodyn Theory manual.
National Renewable Energy Laboratory. www.nrel.gov. AND Bahaj. The
Prediction of Hydrodynamic Performance of Marine Current Turbines.
Renewable Energy 33 (2008) 1085 - 1096.
Inputs:
dct: local thrust coefficient dim(1,numele) where numele is the
number of blade elements.
cnorm: normal coefficients at each blade element dim(1,numele) where
numele is the number of blade elements.
floss: Total loss factor dim(1,numele) where numele is the number of
blade elements.
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).
lsigma: local solidity at each blade element: dim(1,numele) where
numele is the number of blade elements.
Outputs:
afactor: local axial induction factor dim(1,numele)
Function aini.m
computes the initial axial induction factor. based on Moriarty & Hansen.
Aerodyn Theory manual. National Renewable Energy Laboratory. www.nrel.gov.
Inputs:
beta: angles between rotor plane and blade element chords
dim(1,numele) where numele is the number of blade elements.
ltsr: local tip speed ratio at blade element dim(1,numele)
lsigma: local solidity dim(1,numele).
Outputs:
afini: local initial axial induction factor dim(1,numele)
Function apfactor.m
Computes the tangential induction factor based on
Classical Blade Element Theory. Bahaj. The Prediction of Hydrodynamic
Performance of Marine Current Turbines. Renewable Energy 33 (2008) 1085 1096.
Inputs:
ctan: tangential coefficients at each blade element dim(1,numele)
where numele is the number of blade elements.
floss: Total loss factor dim(1,numele) where numele is the number of
blade elements.
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).

lsigma: local solidity at each blade element: dim(1,numele) where


numele is the number of blade elements.
Outputs:
apfactor: local tangential induction factor dim(1,numele)
Function bemcore.m
Core solver for Blade Element Momentum Calculations. Computes
principal parameters for a wind and marine current turbine.

the

Inputs:
- mct: structure of turbine parameters
mct.rpos: dimensionless radial positions along the blade. It
must be strictly hubroot < rpos < 1. Where root is the
dimensionless hub radius. dim(1,numele) where numele are the
number of elements per blade to be computed.
mct.cr: dimensionless chord c/R. where c is the real chord
lenght and R is the turbine radius.
mct.tc:
thickness/chord
ratio
(For
NACA
airfoils
only)
dim(1,numele)
mct.pitch: array of blade element angles. dim(1,n)
mct.lsigma: local solidity mct.cr.*nblades./(2.*pi.*mct.rpos)
dim(1,numele)
- parms: structure of solution parameters
parms.tol: termination criteria
parms.maxit: maximum number of iterations
parms.hubloss: 0. do not compute hub loss factor
1. compute hub loss factor
parms.tiploss: 0. do not compute tip loss factor
1. compute tip loss factor
parms.relaxfactor: relaxation factor solution update
0 < parms.relaxfactor <= 1. In order to avoid instability use
parms.relaxfactor <= 0.5 (recommended)
- ext: structure of operation conditions:
ext.settippitch: pitch angle offset from the original blade
geometry. (scalar).
ext.TSR:
array
of
increasing
Tip
Speed
Ratio
Regimes
dim(1,numTSR).
Where m is the number of TSR's to be computed.
Outputs:
- results: structure containing:
results.phi:
Local
Velocity
Rotor
Plane
Angle
dim(numele,numTSR)
results.aoa: local operation angle of attack dim(numele,numTSR)
results.cl: local operation lift coefficient dim(numele,numTSR)
results.cd: local operation drag coefficient dim(numele,numTSR)
results.ctan:
local
operation
tangential
coefficient
dim(numele,numTSR)
results.cnorm:
local
operation
normal
coefficient
dim(numele,numTSR)
results.afactor:
local
operation
axial
induction
factor
dim(numele,numTSR)

results.apfactor: local operation tangential induction factor


dim(numele,numTSR)
results.dct: local thrust coefficient dim(numTSR,1) where
numTSR is the number of tip speed ratio regime.
results.dcp: local power coefficient dim(numTSR,1) where numTSR
is the number of tip speed ratio regime.
results.ctt: total thrust coefficient dim(numTSR,1) where
numTSR is the number of tip speed ratio regime.
results.cpt: total power coefficient dim(numTSR,1) where numTSR
is the number of tip speed ratio regime.
Function coeffnt.m
Computes the normal and tangential coefficients in the turbine.
Inputs:
cl: lift coefficients at each blade element dim(1,numele) where
numele is the number of blade elements.
cd: drag coefficients at each blade element dim(1,numele) where
numele is the number of blade elements.
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).
Outputs:
cnorm: normal coefficients at each blade element dim(1,numele) where
numele is the number of blade elements.
ctan: tangential coefficients at each blade element dim(1,numele)
where numele is the number of blade elements.
Function ctcoef.m
Computes the local thrust coefficient based on classical Blade Element
Momentum Theory. Bahaj. The Prediction of Hydrodynamic Performance of
Marine Current Turbines. Renewable Energy 33 (2008) 1085 - 1096.
Inputs:
afactor: Axial induction factor dim(1,numele) where numele is the
number of blade elements.
cnorm: normal coefficient dim(1,numele) where numele is the number
of blade elements.
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).
lsigma: local solidity at each blade element: dim(1,numele) where
numele is the number of blade elements.
Outputs:
dct: local thrust coefficient dim(1,numele) where numele is the
number of blade elements.
Function cxcoef.m
Computes the local coefficients based on classical Blade Element Momentum
Theory. Bahaj. The Prediction of Hydrodynamic Performance of Marine
Current Turbines. Renewable Energy
33 (2008) 1085 - 1096.
Inputs:

afactor: Axial induction factor dim(1,numele) where numele is the


number of blade elements.
cnorm: normal coefficient dim(1,numele) where numele is the number
of blade elements.
ctan: tangential coefficients at each blade element dim(1,numele)
where numele is the number of blade elements.
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).
TSRj: Global Tip Speed Ratio
mct: structure array containing turbine information.
mct.lsigma: local solidity at each blade element: dim(1,numele)
where numele is the number of blade elements.
mct.rpos:
dimensionless
position
of
each
blade
element
dim(1,numele) where numele is the number of blade elements.
mct.deltar: blade element radial size.
mct.numblades: number of turbine blades.
Outputs:
dct: local thrust coefficient dim(1,numele) where numele is the
number of blade elements.
dcp: local power coefficient dim(1,numele) where numele is the
number of blade elements.
cpt: total power coefficient dim(1,numTSR) where numTSR is the
number of tip speed ratio regime.
ctt: total thrust coefficient dim(1,numTSR) where numTSR is the
number of tip speed ratio regime.
Function geomturbineinterp.m
Computes the geometrical parameters
interpolation

of

turbine

blade

using

cubic

Inputs:
- parmsori: structure. parmsori defines the blade parameters in
dimensionless form.
parmsori.cR: dimensionless chord along the blade c/R where c is
the local chord length and R is the blade Radius
parmsori.rR: dimensionless position along the blade r/R.
parmsori.pitch: local blade pitch angle.
- rpos: dimensionless positions along the blade where blade
data are required for BEM computations.
Outputs:
- cRI: dimensionless chord along the blade for local
dimensionless positions rpos.
- pitchI: blade pitch angle along the blade for local
dimensionless positions rpos.
Outputs:
- cRI: c/R relation for each blade element station dim(1,numele)
where numele is the number of blade elements.
- pitchI: pitch distribution for each blade element station
dim(1,numele) where numele is the number of blade elements.

- thicknessI: thickness distribution for each blade element


station dim(1,numele) where numele is the number of blade
elements.
Function hubloss.m
Computes the Hub Loss factor. Based on Moriarty & Hansen. Aerodyn Theory
manual. National Renewable Energy Laboratory. www.nrel.gov.
Inputs:
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).
rhubnd: dimensionless hub position
rpos: dimensionless position of each blade element dim(1,numele)
where numele is the number of blade elements.
numblades: number of turbine blades.
Outputs:
fhub: hub loss factor dim(1,numele) where numele is the number of
blade elements.
Function naca638xxre300k.m
Computes interpolated values for lift and drag coefficients of naca 638xx
airfoil series of Bahaj's Marine Current Turbines.
Inputs:
parms: structure array containing
parms.tc: airfoil thickness distribution dim(1,numele) where numele
is the number of blade elements.
only used if the blade is composed by a series of airfoil of
different thickness
parms.aoa: local angle of attack dim(1,numele) where numele is the
number of blade elements.
Outputs:
Cl: lift coefficient of each blade element dim(1,numele) where
numele is the number of blade elements.
Cd: drag coefficient of each blade element dim(1,numele) where
numele is the number of blade elements.
Note: This function can be used as a template in order to construct other
data base of airfoils for turbines blades.
Function phiang.m
Computes the angle phi between the incident velocity and rotor plane at
each blade element dim(1,numele) where numele is the number of blade
elements.
Inputs:
ltsr: local tip speed ratio dim(1,numele)
afactor: axial induction factor dim(1,numele)
apfactor: tangential induction factor dim(1,numele)

Function spaceresults.m

Allocates space for results array for a BEM simulation.


Inputs:
- mct: structure of turbine parameters
mct.rpos: dimensionless radial positions along the blade. It
must be strictly hubroot < rpos < 1. Where root is the
dimensionless hub radius. dim(1,numele) where numele are the
number of elements per blade to be computed.
mct.cr: dimensionless chord c/R. where c is the real chord
lenght and R is the turbines radius.
mct.tc: thickness/chord ratio (For NACA airfoils only).
dim(1,numele)
mct.pitch: array of blade element angles. dim(1,n)
mct.lsigma: local solidity mct.cr.*nblades./(2.*pi.*mct.rpos).
dim(1,numele)
- ext: structure of operation conditions:
ext.settippitch: pitch angle offset from the original blade
geometry. (scalar).
ext.TSR:
array
of
increasing
Tip
Speed
Ratio
Regimes
dim(1,numTSR). Where m is the number of TSR's to be computed.
Outputs:
- results: structure array. composed by:
*results.phi:
local
inplane
rotor
flow
angle.
dim(size(rpos),size(TSR),size(settippitch))
*results.aoa
local
angle
of
attack.
dim(size(rpos),size(TSR),size(settippitch))
*results.cl local lift coefficient.
dim(size(rpos),size(TSR),size(settippitch))
*results.cd local drag coefficient.
dim(size(rpos),size(TSR),size(settippitch))
*results.ctan local tangential coefficient.
dim(size(rpos),size(TSR),size(settippitch))
*results.cnorm local normal coefficient.
dim(size(rpos),size(TSR),size(settippitch))
*results.afactor local axial induction factor.
dim(size(rpos),size(TSR),size(settippitch))
*results.apfactor local tangential induction factor
dim(size(rpos),size(TSR),size(settippitch))
*results.dct local thrust coeffient.
dim(size(rpos),size(TSR),size(settippitch))
*results.dcp local power coefficient.
dim(size(rpos),size(TSR),size(settippitch))
*results.ctt total thrust coeffienct
dim(size(TSR),size(settippitch));
*results.cpt total power coeffienct
dim(size(TSR),size(settippitch));
Function tiploss.m
Computes the Prandtl Tip Loss factor. Based on Moriarty Hansen. Aerodyn
Theory manual. National Renewable Energy Laboratory. www.nrel.gov.

Inputs:
phi: angle between the incident velocity and rotor plane at each
blade element dim(1,numele).
rpos: dimensionless position of each blade element dim(1,numele)
where numele is the number of blade elements.
numblades: number of turbine blades.
Outputs:
ftip: tip loss factor dim(1,numele) where numele is the number of
blade elements.
Function writeresults.m
Save variables in results structure (See function spaceresults.m)

You might also like