You are on page 1of 21

Unsteady BEM Model

Peter Bæk (s021893), Jakob Borbye (s021936)


& Janne F. Otzen (s011678)

March 1, 2005

1
Introduction
In the following a simplified Vestas V66 wind turbine has been modelled.
Matlab has been used in the proceeding calculations and to generate plots. The
calculations were made using the formulas from the note “Unsteady BEM model”
by Martin O.L. Hansen and Jens N. Sørensen [2].
In problem 1 the wind turbine has been simplified significantly, to aid the compu-
tations. The tower radius is assumed to be constant and the pitch was assumed
constant even though V66 is a pitch regulated wind turbine. Furthermore the dy-
namic stall and the dynamic wake models are neglected in this problem.

1 Blades
Due to the wind changing in time and space a knowledge of the position relative to
a fixed coordinate system at the base of the tower is necessary. The Matlab scripts
used to generate the plots are available in appendix A.1.1, A.1.2 and A.1.3.
For a deeper explanation of what these scripts do, we refer to the inline docu-
mentation in the source code. However briefly explained, the functions does the
following:
Given the values of the DOF-variables (yaw, tilt, wing, cone), and the indices of
two coordinate systems,A.1.1 constructs the transformation matrix between them.
A.1.2 translates the coordinates of a point in a given coordinate system to another
coordinate system, given by indices. This is done by internally calling A.1.1, and
performing the translation between the systems (i.e. translating by the tower height
from system 1 to system 2).
A.1.3 Describes the structure parts (blades, nacelle, tower) in their “native” coor-
dinates, and utilizes the above functions to describe them in the inertial frame and
plot them. The results are seen at figures 1 to 4.
In figure 1 the wind turbine is plotted for 0o yaw and 0o tilt. The three black lines
illustrate the position of the blades on the wind turbine. The red line indicates the
tower and the small green line the shaft. The blue circle is the a point on blade 1
at radius r = 20 plotted during one revolution.
In figure 2 the wind turbine is plotted for 20o yaw and 0o tilt. If the wind turbine
is yawed, which is the case for this figure, the shaft and the blades are affected, i.e.
a 20o yaw yaw the rotor plane 20o in the positive direction seen from the xy-plane.
Figure 3 shows the positions of the blades for 0o yaw and −10o tilt. When tilting
the wind turbine the whole rotor plane is rotated around the y-axis, i.e. when tilting
−10o the rotor plane is tilted upwards as seen in the figure. The nacelle of the wind
turbine becomes slightly visible above the tower due to the tilt.
In figure 4 both a yaw and a tilt has been added, 20o and −10o respectively, i.e.
the rotor plane has been rotated around both the x and the y-axis.

2
x−y view of the turbine for yaw=0° , tilt=0° , wing=0° , cone=0°

90 x =80 m Disc at r=20 m


y =0 m Point at θ=wing
80 z =−5 m Tower (height=60 m)
Nacelle (length=5 m)
70 Blades (length=33 m)

60

50
x [m]

40

30

20

10

0
20 10 0 −10 −20
y [m]

Figure 1: The positions of the blades in the xy-plane for θyaw = 0o and θtilt = 0o

x−y view of the turbine for yaw=20° , tilt=0° , wing=0° , cone=0°

90 x =80 m Disc at r=20 m


y =1.71 m Point at θ=wing
80 z =−4.7 m Tower (height=60 m)
Nacelle (length=5 m)
70 Blades (length=33 m)

60

50
x [m]

40

30

20

10

0
20 10 0 −10 −20
y [m]

Figure 2: The positions of the blades in the xy-plane for θyaw = 20o and θtilt = 0o

3
x−y view of the turbine for yaw=0° , tilt=−10° , wing=0° , cone=0°

90 x =80.6 m Disc at r=20 m


y =0 m Point at θ=wing
80 z =−1.45 m Tower (height=60 m)
Nacelle (length=5 m)
70 Blades (length=33 m)

60

50
x [m]

40

30

20

10

0
20 10 0 −10 −20
y [m]

Figure 3: The positions of the blades in the xy-plane for θyaw = 0o and θtilt = −10o

x−y view of the turbine for yaw=20° , tilt=−10° , wing=0° , cone=0°

90 x =80.5 m Disc at r=20 m


y =1.71 m Point at θ=wing
80 z =−1.15 m Tower (height=60 m)
Nacelle (length=5 m)
70 Blades (length=33 m)

60

50
x [m]

40

30

20

10

0
20 10 0 −10 −20
y [m]

Figure 4: The positions of the blades in the xy-plane for θyaw = 20o and θtilt = −10o

4
2 Wind
The wind velocity is given in system 1, which is placed at the base of the tower.
To find the undisturbed wind velocity as seen by the blades the given velocity are
transformed to system 4, which is aligned with one of the blades, using the Matlab
function transform.m, available in appendix A.1.2.
A deterministic wind model was implemented including wind shear and the effect
of the tower, see appendix A.1.4. For an undisturbed wind velocity of V0 (H) = 10
m/s the wind velocity as seen by blade 1 at r=10m for θyaw = 0o is shown in figure
5.
The Z component at θyaw=0 degs The Y component at θyaw=0 degs
10.5 1.5

1
10

Wind Velocity (Y−component) [m/s]


Wind Velocity (Z−component) [m/s]

0.5

9.5

−0.5

8.5
−1

8 −1.5
0 1 2 3 4 5 6 0 1 2 3 4 5 6
Blade Angle, θ [rad] Blade Angle, θ [rad]
wing wing

Figure 5: The z and y components of the wind velocity for one revolution for θ yaw =
0o .

For θyaw = 0o the wind velocity profile in the z-direction is symmetric around π (and
0 and 2π). Between π/2 and 3π/2 the blade is below the towerheight. The wind
below towerheight is forced to pass around the tower and when doing this, the wind
is forced to speed up in order to have the same flow. The blade will therefore see
an increasing wind in z-direction when passing below towerheight. This is however
counteracted since the tower slows down the wind in front of it. That is why the
blade experiences a significantly lower wind speed close to θwing = π. To minimize
the discontinuity at θwing = π2 and 3π2 a cone has been added on top of the tower
with the height equivilent of the tower radius.
The wind velocity in the y-direction changes sign at π, due to the fact that the wind
forced is forced in two opposite directions around the tower. The y-component of
the windspeed disapears when the blade is above hubheight.
When θyaw = 20o is added the symmetri around π for the z-component disappears,
as seen in figure 6. During a revolution the blade is first pointing downwind, thereby
being closer to the tower and experiencing higher windspeeds. At 3π/2 revolution
the blade is pointing upwind and therefore the tower effects are less pronounced.
The same asymmetri is seen on the y-component of the wind. The first half of
the revolution is governed by higher wind speeds than the second half where the
blade is further away from the towers wind shear. For angles larger than θwing = π,
the absolute value of the velocity has been reduced, comparing with the no yaw
situation.

5
The Z component at θ =20 degs The Y component at θ =20 degs
yaw yaw
10.5 1.4

1.2

10 1

Wind Velocity (Y−component) [m/s]


0.8
Wind Velocity (Z−component) [m/s]

9.5 0.6

0.4

9 0.2

8.5 −0.2

−0.4

8 −0.6
0 1 2 3 4 5 6 0 1 2 3 4 5 6
Blade Angle, θwing [rad] Blade Angle, θwing [rad]

Figure 6: The z and y components of the wind velocity for one revolution for θ yaw =
20o .

3 Power
Now, having defined the structure of our turbine, and having determined the wind
field it is time to investigate the aerodynamical forces.
The main purpose of the unsteady BEM method is to calculate the induced velocity
and thereby the flowangle and thus the angle of attack. Having the induced velocity
it is possible to compute the loads, with which the power produced by the wind
turbine can be found. In the used BEM method the dynamic stall and the dynamic
wake model has been neglected. The applied BEM model is available in Appendix
A.1.7 and was created on basis of the procedure described in the note [2].
A couple of brief comments on our implementation of the BEM:
BEM.m calls the script loaddata.m, which loads airfoil and structural data from
data files. The already mentioned functions Shiftbasis.m and tranform.m is used
to express the wind velocity vectors and position and orientation of the blades
in the same coordinate system. From this the relative velocity is computed, and
thus the needed angles can be found. This is done for all timesteps, blades and
bladeelements.
The algoritm is pretty straightforward, and the implementation can be seen in the
code. However attention is required towards the computation of Prandtl’s tip loss
factor. If φ is negative the tip loss factor can become imaginary, which of course
makes no sense. Of course it would make no sense either if φ was negative globally,
as it would mean that the sign of the z-component of the relative velocity would be
changed. In other words the wind turbine would act as a fan, which is nonsense.
Locally, however, it can well be the case when the turbine is yawed. According to our
experience this local sign change of sign for phi do not happen at the tip elements,
where the tip loss factor would become significantly different from 1. Thus, in case
of negative φ, we set the tip loss factor to 1, so that the program will run smoothly.
If this is done a warning is printed to the terminal. The power is computed as in the
steady BEM, with the difference that we now do it for the three blades individually.
In the following the results from our implementation of the unsteady BEM is plotted.

6
For an undisturbed wind speed of V0 (H) = 10 m/s the power has been computed
for θyaw = 0o and θyaw = 20o respectively.
In figure 7 it is posible to see the power plotted as a function of the time for
θyaw = 0o . From the figure it is seen that every time a blade passes the tower the
power decreases. Furthermore the maximum power is produced right after a blade
has passed the tower, and decreases slightly as the next blade approaches the tower.
This assymmetry is due to the difference in the y-component caused by the tower as
discused in the previous section. I.e the blade “experiences” a larger velocity right
after the tower and a smaller velocity before.
In figure 8 the power for θyaw = 20o has been plotted as a function of the time.
Due to the yaw the maximum power is now produced just before the tower, and a
sligthly lower value occurs right after the tower, as the first half of the rotorplane
is governed by higher wind speeds than the second half where the blade is further
away from the towers wind shear. Thus if the sign of the yaw was changed, the
maximum power would be produced just after a blade having passed the tower.
The difference between the power before and after the tower depends on the size of
the yaw.

7
5 Power curve for yaw=0 degs
x 10

9.2

8.8
Power [W]

8.6

8.4

8.2

8
1 1.5 2 2.5 3 3.5 4
Time [s]

Figure 7: The power as a function of the time for θyaw = 0o .

5 Power curve for yaw=20 degs


x 10

8.6

8.4

8.2

8
Power [W]

7.8

7.6

7.4

7.2

7
1.5 2 2.5 3 3.5 4
Time [s]

Figure 8: The power as a function of the time for θyaw = 20o

8
4 References
1. Hansen, Martin O.L. (2003): Aerodynamics of Wind Turbines, James and
James Ltd.
2. Hansen, Martin O.L.; Sørensen, Jens N. (2005): Unsteady BEM model, MEK,
DTU.

A The Matlab Calculations

A.1 Our code

A.1.1 shiftbasis.m

Creates the matrices used to transform a vector given in a certain coordinate system
to a new vector given in the requested coordinate system.
1 f u n c t i o n s h i f t m a t r i x=s h i f t b a s i s ( from , to , yaw , t i l t , wing , cone )
% newvector= shiftbasis(vector,from ,to ,yaw ,tilt ,wing ,cone)
% Transforms a "vector" given in the coordinates of
coordinate system of
% index "from" to " newvector" given in coordinates of the
coordinate system indexed
% "to". The values of "yaw", "tilt", "wing" and "cone" has
to be given as arguments.
6

% The transformation matrix from coordinate system 1 to 2:


a12= [ [ cos ( t i l t ) , 0 , −s i n (
tilt ) ];
[ s i n ( yaw ) ∗ s i n ( t i l t ) , c o s ( yaw ) , s i n ( yaw )
∗ cos ( t i l t ) ];
11 [ c o s ( yaw ) ∗ s i n ( t i l t ) , −s i n ( yaw ) , c o s ( yaw )
∗cos ( t i l t ) ]];

% The transformation matrix from coordinate system 2 to 3:


a23= [ [ c o s ( wing ) , s i n ( wing ) , 0 ];
[− s i n ( wing ) , c o s ( wing ) , 0 ];
16 [0 , 0 , 1 ] ];

% The transformation matrix from coordinate system 3 to 4:


a34= [ [ c o s ( cone ) , 0 , −s i n ( cone ) ];
[0 , 1 , 0 ];
21 [ s i n ( cone ) , 0 , c o s ( cone ) ] ];

% Creates an array of the transformation matrices:


t r a n s f o r m s=z e r o s ( 3 , 3 , 3 ) ;
t r a n s f o r m s ( : , : , 1 )=a12 ;
26 t r a n s f o r m s ( : , : , 2 )=a23 ;
t r a n s f o r m s ( : , : , 3 )=a34 ;

% Initializes the final transformation matrix, as the 3x3


unit matrix:

9
t=d i a g ( [ 1 1 1 ] ) ;
31

i f ( from==t o )
s h i f t m a t r i x=d i a g ( [ 1 1 1 ] ) ;
else
i f ( from>t o )
36 f o r i=from −1: −1: t o
% using transposed tranformation matrices:
t=t r a n s f o r m s ( : , : , i ) ’ ∗ t ;
end
else
41 f o r i=from : 1 : to −1
% using transformation matrices:
t=t r a n s f o r m s ( : , : , i ) ∗ t ;
end

46 end
s h i f t m a t r i x=t ;
end

A.1.2 transform.m

Transforms a vector given in a certain coordinate system to a new vector given in


the requested coordinate system.
f u n c t i o n newvector=t r a n s f o r m ( v e c t o r , from , to , yaw , t i l t , wing ,
cone , t o w e r h e i g h t , n a c e l l e l e n g t h )
2 % newvector= transform(vector,from ,to ,yaw,tilt ,wing ,cone)
% This function transforms the column-vector "vector" from
the coordinate
% system indexed "from", into "to"-coordinates , given the
values of "yaw", "tilt",
% "wing" and "cone".

7 % The translation vectors between the coordinate systems ,


given in their
% "natural " coordinates:
tower =[ t o w e r h e i g h t ; 0 ; 0 ] ;
n a c e l l e =[0;0; − n a c e l l e l e n g t h ] ;

12 % A temporary vector
tempvector=v e c t o r ;

% If the transformation is from a low index to a higher:


i f ( from<t o )
17 f o r i=from : 1 : t o
i f ( i ==2)
% translating and shifting basis:
tempvector=s h i f t b a s i s ( 1 , 2 , yaw , t i l t , wing , cone ) ∗ (
tempvector −tower ) ;
end
22 i f ( i ==3)
% translating and shifting basis:

10
tempvector=s h i f t b a s i s ( 2 , 3 , yaw , t i l t , wing , cone ) ∗ (
tempvector −n a c e l l e ) ;
end
i f ( i ==4)
27 % Shifting basis:
tempvector=s h i f t b a s i s ( 3 , 4 , yaw , t i l t , wing , cone ) ∗
tempvector ;
end
end
else
32 % If the transformation is from a high index to a lower:
i f ( from>t o )
f o r i=from −1: −1: t o
i f ( i ==1)
% shifting basis and translating:
37 tempvector =( s h i f t b a s i s ( 2 , 1 , yaw , t i l t , wing , cone ) ∗
tempvector )+tower ;
end
i f ( i ==2)
% shifting basis and translating:
tempvector =( s h i f t b a s i s ( 3 , 2 , yaw , t i l t , wing , cone ) ∗
tempvector )+n a c e l l e ;
42 end
i f ( i ==3)
%shifting basis:
tempvector=s h i f t b a s i s ( 4 , 3 , yaw , t i l t , wing , cone ) ∗
tempvector ;
end
47 end
end
end

newvector=tempvector ;

A.1.3 transformationplot.m

Matlab function that plots the wind turbine, i.e. illustrates the affects of tilt and
yaw.
f u n c t i o n t r a n s f o r m a t i o n p l o t ( yaw , t i l t , wing , cone , numpoints ,
towerheight , . . .
b l a d e l e n g t h , n a c e l l e l e n g t h , B) ;
3 % function transformationplot(yaw,tilt ,wing ,cone ,numpoints ,
towerheight ,
% bladelength ,nacellelength ,B);
% Plots a 3D image of the turbine, given all the geometric
variables above

% clears the current figure:


8 clf

% If called without arguments , default values for all


arguments are set:

11
i f n a r g i n==0
yaw=20∗ p i / 1 8 0 ;
13 t i l t =−10∗p i / 1 8 0 ;
wing =0;
cone =0;
numpoints =100;
B=3;
18 t o w e r h e i g h t =60;
b l a d e l e n g t h =33;
n a c e l l e l e n g t h =5;
end

23 % Sets default values for geometric values of the turbine ,


if only yaw ,
% tilt , wing and cone values are provided:
i f n a r g i n==4
numpoints =100;
B=3;
28 t o w e r h e i g h t =60;
b l a d e l e n g t h =33;
n a c e l l e l e n g t h =5;
end

33 % Constructs the tower line:


tower =[ l i n s p a c e ( 0 , t o w e r h e i g h t , 2 ) ; l i n s p a c e ( 0 , 0 , 2 ) ; l i n s p a c e
(0 ,0 ,2) ] ;

% Constructs the nacelle line:


n a c e l l e c o o r d s= . . .
38 [ l i n s p a c e ( 0 , 0 , 2 ) ; l i n s p a c e ( 0 , 0 , 2 ) ; l i n s p a c e (0 , −
nacellelength ,2) ] ;

n a c e l l e= . . .
[ t r a n s f o r m ( n a c e l l e c o o r d s ( : , 1 ) , 2 , 1 , yaw , t i l t , 0 , cone ,
towerheight , . . .
nacellelength) , . . .
43 t r a n s f o r m ( n a c e l l e c o o r d s ( : , 2 ) , 2 , 1 , yaw , t i l t , cone , 0 ,
towerheight , . . .
nacellelength) ] ;

% Constructs the blade line:


b l a d e =[ l i n s p a c e ( 0 , b l a d e l e n g t h , 2 ) ; l i n s p a c e ( 0 , 0 , 2 ) ; l i n s p a c e
(0 ,0 ,2) ] ;
48

% Constructs angular positions for the blades, with first


blade in wing
% angle:
b l a d e d i s t =2∗ p i /B; %Angle between blades [
rad]
b l a d e p o s=l i n s p a c e ( wing , wing+2∗pi−b l a d e d i s t , B) ’ ;
53

% makes a blade for each angular position , and stores them:


f o r i =1:B
b l a d e s ( : , : , i )= . . .

12
[ t r a n s f o r m ( b l a d e ( : , 1 ) , 4 , 1 , yaw , t i l t , b l a d e p o s ( i ) , cone ,
towerheight , . . .
58 nacellelength ) , . . .
t r a n s f o r m ( b l a d e ( : , 2 ) , 4 , 1 , yaw , t i l t , b l a d e p o s ( i ) , cone ,
towerheight , . . .
nacellelength ) ] ;
end

63 % makes a circular disc in the rotorplane at radius = 20 m:


d i s c p o i n t s =z e r o s ( 3 , numpoints ) ;
d i s c a n g l e=l i n s p a c e ( 0 , 2 ∗ pi , numpoints ) ;
disccoord =[20;0;0];
f o r i =1: numpoints
68 d i s c p o i n t s ( : , i )= . . .
t r a n s f o r m ( d i s c c o o r d , 4 , 1 , yaw , t i l t , d i s c a n g l e ( i ) , cone ,
towerheight , . . .
nacellelength ) ;
end

73 % makes a point indicating the blade with angle=wing in


radius =20 m:
w i n g p o i n t=t r a n s f o r m ( d i s c c o o r d , 3 , 1 , yaw , t i l t , wing , cone ,
towerheight , . . .
nacellelength) ;

% Creates figure
78 figure (1)

% Plots circular disc at radius =20 m:


plot3 ( discpoints (1 ,:) , discpoints (2 ,:) , discpoints (3 ,:) , ’
LineWidth ’ , 1 ) ;
hold on
83 % plots a point on the first blade at radius =20 m:
p l o t 3 ( w i n g p o i n t ( 1 ) , w i n g p o i n t ( 2 ) , w i n g p o i n t ( 3 ) , ’ o r ’ , ’ LineWidth
’ ,3) ;
% plots the tower:
p l o t 3 ( tower ( 1 , : ) , tower ( 2 , : ) , tower ( 3 , : ) , ’ r ’ , ’ LineWidth ’ , 5 ) ;
% plots the nacelle:
88 p l o t 3 ( n a c e l l e ( 1 , : ) , n a c e l l e ( 2 , : ) , n a c e l l e ( 3 , : ) , ’ g ’ , ’ LineWidth ’
,7) ;
% plots the blades:
f o r i =1:B
plot3 ( blades ( 1 , : , i ) , blades ( 2 , : , i ) , blades ( 3 , : , i ) , ’k ’ , ’
LineWidth ’ , 2 ) ;
end
93

% Sets figure properties:


axis equal
view ([ −90 9 0 ] ) ;
t i t l e s t r i n g=s t r c a t ( ’ x−y view o f t h e t u r b i n e f o r yaw= ’ , . . .
98 num2str ( yaw∗(180/ p i ) , 2 ) , ’ \ c i r c , t i l t = ’ , num2str ( t i l t
∗(180/ p i ) , 2 ) . . .
, ’ \ c i r c , wing= ’ , num2str ( wing ∗(180/ p i ) , 2 ) , ’ \ c i r c , cone
= ’ , ...

13
num2str ( cone ∗(180/ p i ) , 2 ) , ’ \ c i r c ’ ) ;
title ( titlestring ) ;
x l a b e l ( ’ x [m] ’ ) ;
103 y l a b e l ( ’ y [m] ’ ) ;
z l a b e l ( ’ z [m] ’ ) ;
p o i n t t e x t=s t r c a t ( ’ x = ’ , . . .
num2str ( w i n g p o i n t ( 1 ) , 3 ) , ’ m\ n e w l i n e y = ’ , . . .
num2str ( w i n g p o i n t ( 2 ) , 3 ) , ’ m\ n e w l i n e z = ’ , . . .
108 num2str ( w i n g p o i n t ( 3 ) , 3 ) , ’ m ’ ) ;
text (85 ,25 , pointtext ) ;
l e g e n d ( ’ D i s c a t r =20 m’ , ’ Point a t \ t h e t a=wing ’ , . . .
s t r c a t ( ’ Tower ( h e i g h t= ’ , num2str ( t o w e r h e i g h t ) , ’ m) ’ ) ,
...
s t r c a t ( ’ N a c e l l e ( l e n g t h= ’ , num2str ( n a c e l l e l e n g t h ) , ’ m) ’ )
, ...
113 s t r c a t ( ’ B l a d e s ( l e n g t h= ’ , num2str ( b l a d e l e n g t h ) , ’ m) ’ ) ) ;
hold o f f

A.1.4 WindProfile.m

This matlab function calculates the wind velocities at point (x1 , y1 , z1 ) and outputs
a velocity vector.
1 f u n c t i o n V=W i n d P r o f i l e ( v e c t o r , VoH, H, nu , a )
% Calculates the wind velocity at point x1 , y1 , z1 and
outputs a velocity
%vector.
x1=v e c t o r ( 1 ) ; y1=v e c t o r ( 2 ) ; z1=v e c t o r ( 3 ) ;

%We assume that the wind velocity upwards (Vx1) is zero

Vx1=0;

11 %Wind Shear

Vz1=VoH∗ ( x1/H) ^nu ; %(formula 24)


%Vz1=VoH;
%Tower Disturbance (if x<H)
16 i f x1>H+a
a =0;
end

i f ( x1>H && x1<=H+a )


21 a=(−(x1−H)+a ) ;
end

i f z1^2+y1^2<=a^2
e r r o r ( ’Do not t r y t o e v a l u a t e t h e wind i n s i d e t h e tower
. . . Moron ! ’ )
26

keyboard
end

14
31 % Cartesian to Polar coords.
r=s q r t ( z1^2+y1 ^2) ; %(30)
cosTheta=z1 / r ; %(29)
s i n T h e t a=−y1/ r ;

36

Vr=Vz1∗(1 −( a/ r ) ^2) ∗ cosTheta ; %(25)


Vtheta=−Vz1∗(1+( a/ r ) ^2) ∗ s i n T h e t a ; %(26)

Vz1=Vr∗ cosTheta−Vtheta ∗ s i n T h e t a ; %(27)


41 Vy1=−Vr∗ sinTheta−Vtheta ∗ cosTheta ; %(28)

V=[Vx1 , Vy1 , Vz1 ] ’ ;

A.1.5 opg2.m

Matlab function that plots the wind velocity distribution in the z and the y direction
relative to the blade.
1 f u n c t i o n opg2
numpoints=100;
r e v o l u t i o n=l i n s p a c e ( 0 , 2 ∗ pi , numpoints ) ;
yaw=0∗ p i / 1 8 0 ;
t i l t =0;
6 cone =0;
VoH=10;%m/s Wind speed at top of tower
H=60;%m height of tower
n a c e l l e l e n g h t=5
nu =0.2% Wind Shear
11 a=2%m tower radius.
p o i n t o n b l a d e = [ 1 0 , 0 , 0 ] ’ ; %10m from center of rotorplane.
figure (3)
clf
f o r i =1: numpoints
16 % transform(vector,from ,to,yaw,tilt ,wing ,cone)
b l a d e c o o r d i n a t e ( : , i )=t r a n s f o r m ( p o i n t o n b l a d e , 4 , 1 , yaw , t i l t
, r e v o l u t i o n ( i ) , cone , H, n a c e l l e l e n g h t ) ;
V( : , i )=W i n d P r o f i l e ( b l a d e c o o r d i n a t e ( : , i ) , VoH, H, nu , a ) ;
i
figure (3)
21 p l o t 3 ( [ b l a d e c o o r d i n a t e ( 1 , i ) , b l a d e c o o r d i n a t e ( 1 , i )+V( 1 , i )
] , [ b l a d e c o o r d i n a t e ( 2 , i ) , b l a d e c o o r d i n a t e ( 2 , i )+V( 2 , i )
] , [ b l a d e c o o r d i n a t e ( 3 , i ) , b l a d e c o o r d i n a t e ( 3 , i )+V( 3 , i )
])
hold on
axis equal
pause ( 0 . 1 )

26 end
figure (1)
subplot (1 ,2 ,1)

15
p l o t ( r e v o l u t i o n , V( 3 , : ) , ’ r− ’ )
31 xlim ( [ 0 6 . 2 8 3 ] )
t i t l e ( s t r c a t ( ’ The Z component a t \ theta_ {yaw}= ’ , num2str ( yaw
∗180/ p i ) , ’ degs ’ ) )
x l a b e l ( ’ Blade Angle , \ theta_ { wing } [ rad ] ’ )
y l a b e l ( ’ Wind V e l o c i t y ( Z−component ) [m/ s ] ’ )
subplot (1 ,2 ,2)
36 p l o t ( r e v o l u t i o n , V( 2 , : ) , ’ b− ’ )
x l a b e l ( ’ Blade Angle , \ theta_ { wing } [ rad ] ’ )
y l a b e l ( ’ Wind V e l o c i t y (Y−component ) [m/ s ] ’ )
xlim ( [ 0 6 . 2 8 3 ] )
t i t l e ( s t r c a t ( ’ The Y component a t \ theta_ {yaw}= ’ , num2str ( yaw
∗180/ p i ) , ’ degs ’ ) )

A.1.6 loaddata.m

Matlab function that loads the data for a V66 blade.


f u n c t i o n [ r , c , t h e t a , EI1 , EI2 ,M, alpha , c l , cd ]= l o a d d a t a ( )

3 % loading data for V66 blade


geo=l o a d ( ’ . . / Data/ geometry . dat ’ ) ;
r=geo ( : , 2 ) ;
c=geo ( : , 3 ) ;
t h e t a=geo ( : , 4 ) ;
8 t c=geo ( : , 5 ) ;

s t r u c=l o a d ( ’ . . / Data/ s t r u c . dat ’ ) ;


EI1=s t r u c ( : , 3 ) ;
EI2=s t r u c ( : , 4 ) ;
13 M=s t r u c ( : , 5 ) ;

N=15;

p4=l o a d ( ’ . . / Data/ p r o f 0 4 . dat ’ ) ;


18 p5=l o a d ( ’ . . / Data/ p r o f 0 5 . dat ’ ) ;
p6=l o a d ( ’ . . / Data/ p r o f 0 6 . dat ’ ) ;
p7=l o a d ( ’ . . / Data/ p r o f 0 7 . dat ’ ) ;
p8=l o a d ( ’ . . / Data/ p r o f 0 8 . dat ’ ) ;
p9=l o a d ( ’ . . / Data/ p r o f 0 9 . dat ’ ) ;
23 p10=l o a d ( ’ . . / Data/ p r o f 1 0 . dat ’ ) ;
p11=l o a d ( ’ . . / Data/ p r o f 1 1 . dat ’ ) ;
p12=l o a d ( ’ . . / Data/ p r o f 1 2 . dat ’ ) ;
p13=l o a d ( ’ . . / Data/ p r o f 1 3 . dat ’ ) ;
p14=l o a d ( ’ . . / Data/ p r o f 1 4 . dat ’ ) ;
28 p15=l o a d ( ’ . . / Data/ p r o f 1 5 . dat ’ ) ;

33 f o r s =1:N
i f s>=4

16
p a r r a y =[p4 , p5 , p6 , p7 , p8 , p9 , p10 , p11 , p12 , p13 , p14 , p15 ] ;
n=(s −3)∗4 −3;
m=(s −3) ∗ 4 ;
38 p=p a r r a y ( : , n :m) ;
p

alpha=p ( : , 1 ) ;
c l ( : , s )=p ( : , 2 ) ;
43 cd ( : , s )=p ( : , 3 ) ;
else
alpha ( : , s )=z e r o s ( 3 5 , 1 ) ; c l ( : , s )=z e r o s ( 3 5 , 1 ) ; cd ( : , s
)=z e r o s ( 3 5 , 1 ) ;
end
end

A.1.7 BEM.m

A Matlab function implemented an unsteady BEM model.


f u n c t i o n BEM( yaw , t i l t , wing , cone )
% BEM.m calculates the induced velocities for a V66 wind
3 % turbine input: yaw, tilt , wing , cone in degrees: yaw,
% tilt , wing and cone are the different angles for the
% wind turbine.
% output: P is the power as a function of time.

8 i f n a r g i n==0
yaw=0; %Angle input is in degrees .
t i l t =−90;
wing =0;
cone =0;
13 end

yaw=yaw∗ p i / 1 8 0 ; %Convert degree angles to


t i l t=t i l t ∗ pi /180; %radians
wing=wing∗ p i / 1 8 0 ;
18 cone=cone ∗ p i / 1 8 0 ;

R=33; %Rotor radius [m]


H=60; %Tower heigth [m]
nu = 0 . 2 ; %Shear parameter [1]
23 a =2; %Tower radius [m]
B=3; %No of blades [1]
omega =19.8∗2∗ p i / 6 0 ; % Rotational speed [rad/s]
rho = 1 . 2 ; %1.209 %Density of air [kg/m^3]
VoH=10; %Wind in hub heigth [m/s]
28 b l a d e d i s t =2∗ p i /B; %Angle between blades [rad]
n=[0 0 1 ] ’ ; % normalvector in 3. system
[1]
VoHvector = [ 0 ; 0 ;VoH ] ; %Wind vector at hubheight
in
%1st coordinate system. [m/
s]

17
N=15; %Number of elements on
blade [1]
33 t i m e s t e p s =200; %Number of timesteps [1]
T=5; %Total time [s]
dt=T/ t i m e s t e p s ; %Time increment [s]
t=l i n s p a c e ( dt ,T+dt , t i m e s t e p s ) ; %Time vector [s]
n a c e l l e l e n g t h =5; %Length of nacelle
38

% Initialize values:
Wy_old ( : , : ) =z e r o s (B,N) ;
Wz_old ( : , : ) =z e r o s (B,N) ;
Py=z e r o s ( t i m e s t e p s , 1 ) ;
43 Pz=z e r o s ( t i m e s t e p s , 1 ) ;
Wy_mean=z e r o s (N, 1 ) ;
Wz_mean=z e r o s (N, 1 ) ;
big_A=z e r o s (N, 1 ) ;
big_B=z e r o s (N, 1 ) ;
48 dM=z e r o s (N, 1 ) ;
dT=z e r o s (N, 1 ) ;
P=z e r o s ( t i m e s t e p s , 1 ) ;

% Load data:
53 [ r a d i i , chords , t h e t a s , EI1s , EI2s , Masses , alpha , c l s , cds ]=
loaddata ;

f o r j =1: t i m e s t e p s % For all timesteps


j
wing=wing+omega∗ dt ;
58 b l a d e p o s=l i n s p a c e ( wing , wing+2∗pi−b l a d e d i s t , B) ’ ;
f o r i =1:N % For all segments along blade

% Load new data:


c=c h o r d s ( i ) ;
63 r=r a d i i ( i ) ;
t h e t a=t h e t a s ( i ) ∗ p i / 1 8 0 ;
c l=c l s ( : , i ) ;
cd=cds ( : , i ) ;

68 f o r b=1:B %For all three blades:


% Computes the wind velocity in the
% considered point:
s e g m e n t p o s i t i o n=t r a n s f o r m ( [ r , 0 , 0 ] ’ , 4 , 1 , yaw , t i l t ,
b l a d e p o s ( b ) , cone , H, n a c e l l e l e n g t h ) ;
V=W i n d P r o f i l e ( s e g m e n t p o s i t i o n , VoH, H, nu , a ) ;
73 V=s h i f t b a s i s ( 1 , 3 , yaw , t i l t , b l a d e p o s ( b ) , cone ) ∗V;
Vrot =[0 −r ∗omega∗ c o s ( cone ) 0 ] ’ ;
% cone is the rotation around the y-axis

% Compute relative velocity , Vrel , to blade


element (eq. 9):
78 W=[0 Wy_old( b , i ) Wz_old ( b , i ) ] ’ ;
V r e l=V+Vrot+W;

18
% Calculate flowangle , phi and angle of attack,
alpha:
p h i=atan ( V r e l ( 3 ) /(− V r e l ( 2 ) ) ) ;
83 gamma=phi−t h e t a ;
% gamma is the angle of attack

% Determine C_l and C_d:

88

i f alpha==0
CL=0;
CD=0;
93 else
CL=i n t e r p 1 ( alpha , c l , gamma∗180/ p i ) ;
% alpha is a vector of the angle of attack
CD=i n t e r p 1 ( alpha , cd , gamma∗180/ p i ) ;
% cl is the corresponding vector with the
98 % lift coefficient values.
end

% Calculate lift and drag (eq. 21):


L=0.5∗ rho ∗norm ( V r e l ) ^2∗ c ∗CL ;
103 D=0.5∗ rho ∗norm ( V r e l ) ^2∗ c ∗CD;

% Compute loads Pz and Py (eq. 19 and 20):

Pz ( j , i , b )=L∗ c o s ( p h i )+D∗ s i n ( p h i ) ;
108 Py ( j , i , b )=L∗ s i n ( p h i )−D∗ c o s ( p h i ) ;

% Compute equlibrium values for Wz and Wy


% (eq. 13 and 14):
i f phi <0
113 F=1;
warning ( ’ p h i < 0 l o c a l l y . P r a n d t l t i p l o s s
f a c t o r ommitted ’ )
else
f=B/2∗(R−r ) / ( r ∗ s i n ( p h i ) ) ;
F=2/ p i ∗ a c o s ( exp(− f ) ) ; %Prandtl ’s tip loss
factor
118 end

W_new( 3 , b , i )=−B∗L∗ c o s ( p h i ) /(4∗ rho ∗ p i ∗ r ∗F∗norm (V+


n ∗ (sum ( n . ∗W) ) ) ) ;
123 W_new( 2 , b , i )=−B∗L∗ s i n ( p h i ) /(4∗ rho ∗ p i ∗ r ∗F∗norm (V+
n ∗ (sum ( n . ∗W) ) ) ) ;
end % end blade loop
% Calculate mean W for all three blades.
Wz_mean( i ) =1/B∗sum (W_new( 3 , : , i ) ) ;
Wy_mean( i ) =1/B∗sum (W_new( 2 , : , i ) ) ;
128

end % end segment loop

19
% Calculate skew angle
i f yaw~=0
133 r_skew =0.7∗R;
i n d e x=f i n d ( abs ( r−r_skew )==min ( abs ( r−r_skew ) ) ) ;
W_mean=[ z e r o s (N, 1 ) ,Wy_mean, Wz_mean ] ’ ;
V_prime=s h i f t b a s i s ( 1 , 3 , yaw , t i l t , wing , cone ) ∗ VoHvector
−W_mean( : , i n d e x ) ;
k s i=a c o s ( sum ( n . ∗ V_prime ) / ( norm ( n ) ∗norm ( V_prime ) ) ) ;
138

f o r b=1:B % For all blades


f o r i =1:N % For all elements
W_new( : , b , i )=W_mean( : , i ) ∗(1+ r a d i i ( i ) . /R∗ tan (
k s i / 2 ) ∗ c o s ( b l a d e p o s ( b )+s i g n ( s i n ( yaw ) ) ∗ p i
/2) ) ;
end % End elements
143 end % End blades
end

Wy_old ( : , : ) =W_new( 2 , : , : ) ;
Wz_old ( : , : ) =W_new( 3 , : , : ) ;
148

Thr=0;
Mom=0;
f o r b=1:B
f o r i =1:N−1
153 %Computes Momentum
big_A ( i ) =(Py ( j , i +1,b )−Py ( j , i , b ) ) / ( r a d i i ( i +1)−
r a d i i ( i ) ) ; %8.26
big_B ( i ) =(Py ( j , i , b ) ∗ r a d i i ( i +1)−Py ( j , i +1,b ) ∗ r a d i i
( i)) /...
( r a d i i ( i +1)−r a d i i ( i ) ) ; %8.27
dM( i )=big_A ( i ) ∗ ( r a d i i ( i +1)^3− r a d i i ( i ) ^3)/3+big_B
( i) ∗...
158 ( r a d i i ( i +1)^2− r a d i i ( i ) ^2) / 2 ; %8.29
%Computes thrust
big_A ( i ) =(Pz ( j , i +1,b )−Pz ( j , i , b ) ) / ( r a d i i ( i +1)−
r a d i i ( i ) ) ; %8.26
big_B ( i ) =(Pz ( j , i , b ) ∗ r a d i i ( i +1)−Pz ( j , i +1,b ) ∗ r a d i i
( i)) /...
( r a d i i ( i +1)−r a d i i ( i ) ) ; %8.27
163 dT( i ) =1/2∗big_A ( i ) ∗ ( r a d i i ( i +1)^2− r a d i i ( i ) ^2)+
big_B ( i ) ∗ . . .
( r a d i i ( i +1)−r a d i i ( i ) ) ; %8.29
end % End segments
Mom=Mom+sum (dM) ; %Total Momentum (8.30)
Thr=Thr+sum (dT) ; %Total Thrust
168 end % End blades

P( j )=Mom∗omega ; %8.3

end % End time


173 Py
figure (9)

20
p l o t ( t , P)
t i t l e ( s t r c a t ( ’ Power c u r v e f o r yaw= ’ , num2str ( yaw∗180/ p i ) , ’
degs ’ ) )
x l a b e l ( ’ Time [ s ] ’ )
178 y l a b e l ( ’ Power [W] ’ )

21

You might also like