aeolus header

Creating a Wind Farm Model

The toolbox provides two methods for generating a wind farm model. One is interactive and the other is programatically from a Matlab script.

Both methods requires the set of data listed below

  • Number of turbines

  • Turbine positions (x,y) in meters

  • Turbine model (for each turbine)

  • Wind field data (see wind field generation)

  • Name and path to the mdl file

The interactive method will ask for this data and create the appropriate data structures etc you only need to double-click the Wind Farm Template - Taylor or Wind Farm Template - No Taylor block in the simulink library to start the procedure. Alternatively, you can run the script create_windfarm.m or create_windfarm_no_taylor.m.

The programmatic method requires that you place this data in appropriate data structures and invoke the gen_windfarm or gen_windfarm_no_taylor method.

An example illustrating how this is done is shown below both using the original and the new wind generation methods. Also two different types of postprocessing is illustrated.

Wind farm model creation using original Taylors frozen turbulence hypothesis

%The farm has three turbines, all of them the NREL5MW turine
farm.turbines={'NREL5MW', 'NREL5MW', 'NREL5MW'}

%The position of the turbines.
%(make sure that the turbines are within the grid of the windfield)
farm.pos=[0    100    200; %X values
	 200  300    400] %Y values

%Filename
mdlfile='myfarm.mdl'
mdlname=mdlfile(1:end-4);

%Pathname
wf_path = [pwd '/testfarm/']
if(~isdir(wf_path))
    mkdir(wf_path);
end

%Load the wind data used in the benchmark
l=load('benchmarkwind.mat')
wind=l.wind;

%Generate the wind farm
gen_windfarm(mdlfile,wf_path,farm,wind);

%Open windfarm
open([wf_path mdlfile])

%Simulate
sim(mdlname)


%Visualize wake
windanim(mdlname,logsout)
Wind farm model creation using new method


%Filename
mdlfile='myfarm_no_taylor.mdl'
mdlname=mdlfile(1:end-4);

%Pathname
wf_path = [pwd '/testfarm/']
if(~isdir(wf_path))
    mkdir(wf_path);
end

%Load the wind data used in the benchmark
l=load('benchmarkwind_no_taylor.mat');
wind=l.wind

%Generate the wind farm (the farm layout is obtained from the wind field)
gen_windfarm_no_taylor(mdlfile,wf_path,wind.farm,wind);

%Open windfarm
open([wf_path mdlfile])

%Simulate
sim(mdlname)

%Calculate fatigue
%(press OK two times to do the default fatigue calculation)
fatigue=fatiguegui(logsout);