5.0 | 3 ratings Rate this file 15 Downloads (last 30 days) File Size: 2.25 KB File ID: #35722 Version: 1.0

3D Turbulent Wind Field by means of the Mann Model



IEC_Mann retrieves a 3D turbulent wind field for wind energy applications using the Mann model.

| Watch this File

File Information

Output: 4D matrix u = u[3,Nx,Ny,Nz] with

* size(u,1) = turbulent components u-, v- and w-;

* size(u,2) = number of points Nx in the longitudinal direction, x- ;

* size(u,3) = number of points Ny in the transversal direction, y- ;

* size(u,4) = number of points Nz in the vertical direction, z- ;

When defining the grid points Nx,Ny and Nz, the user has to input not-even Ny and Nz in order to count already the hub point.


%Box size

Nx= Number of grid points on x-axis;

Ny= Number of grid points on y-axis;

Nz= Number of grid points on z-axis;

%Spatial grid resolution


%WT / turbulence condition

UHub= Mean Wind Speed at the Hub Point;

HubHt= Hub Height;

z0= Terrain Roughness;

IECturbC= Wind Turbine Turbulence Class;

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 7.9 (R2009b)
Other requirements http://www.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with-multi-dimensional-support http://www.mathworks.com/matlabcentral/fileexchange/32296
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
17 Apr 2015 Vincent Wilms

Hi Francesco,

like your other submissions this one is great, too. I went through all your code, most of it does make sense to me, but a few questions remain.

When calculating the wave numbers, where did you find the equation that says to include the scale factor "l"? In the Mann paper chapter 6, k is defined as:
ki = m*2*pi/Li
No scale factor is mentioned here and in IEC 61400-1 2005-3 I even dont find any definiton of k.

In your nFFT, you call fftshift first. Is this because the wave vectors have negative frequencies first and then the positive frequencies? If so, then I am not sure if this is correct, because your first wave vector does not contain the zero frequency. In your other submission according to Kaimal and Karmann, the Fourier coefficients have been arranged correctly (in my opinion) to create a two-sided spectrum.

Have you discarded this method because we already have a two-sided spectrum? If this is the reason, the Fourier coefficients must be symmetric or else the result of the inverse Fourier transform is complex

And exactly this is the case in your script. The result is complex (the imaginary part is too big to say that this is due to rounding errors), which means the spectrum is not symmetric and therefore something must be wrong here, but I have no idea how to overcome this.

My third question is, should the mean wind speed been applied manually after all the calculations are done?

I hope I am not too confusing :-)


03 May 2013 pikchi

pikchi (view profile)

Great Submission! One thing that isn't clear is your use of Corrective Factor SF. Is there a corresponding paper that you could refer me to? Moreover, something seems to be wrong with the last nested for loop. As of now, the line for i = 1:length(sf) is equivalent to the line i = length(sf), since you don't carry any history for utmp with the iterating index i.

21 Oct 2012 Francesco Perrone

It is the hypergeometric function 2f1. You can find it as hypergeom in the newest Matlab releases, otherwise you should be able to find it in the File Exchange. I hope this helps.

Comment only
11 Oct 2012 The University of Iowa

Hello, Francesco Perrone, I downloaded your code and tried to run in Matlab. There is one error happened. "Undefined function or method 'pfq' for input arguments of type 'double'." in line 47. Could you please tell me what the command pfq is? Is a Matlab command only exist in Statistics Toolbox? Where can I get this pfq command? Thanks!

Contact us