Wind Farm Power Calculator
The purpose of this tool is to calculate simple windwave interactions by take into account the effect of the waves on the wind speed.
The vertical profile of wind speed with height in neutral stability
condition is given by:
Uz - is the horizontal wind speed at the height Z above the ocean surface;
u* - is the friction velocity;
k - is the von Kármán constant;
Z0 - is aerodynamic roughness length.
The effects of the wave field on the wind vertical profile are
represented by the lumped constant Z0. Usually this constant is
calculated by using Charnock expression for the aerodynamic roughness
Where g is the acceleration of gravity, and α is known as Charnock constant which is given the value of 0.012 by Charnock. The Charnock expression doesn’t include the effect of the wave characteristics such as wave speed.
Stewart  suggested a modification for Charnock expression by
relating the aerodynamics roughness height to the wave age as
Where Cp is the peak phase speed of the ocean wave, and (Cp / u*) is the wave age.
The A and B coefficients in Stewart expression are given different values in different studies.
The engineering toolkit code calculates the aerodynamics roughness height by using both the Charnock expression and the one suggested by Stewart and compared between them. The coefficients, A and B are given different values  depending on five different references as in table 1:
|Toba et al.||0.020||0.5|
|Sugimori et al.||0.020||0.7|
|Smith et al.||0.48||-1.0|
|Johanson et al.||1.89||-1.59|
|Drennan et al.||1.7||-1.7|
The calculated aerodynamic roughness is then used in equation (1) to calculate the velocity at the turbine hub height, which is needed to estimate the power output from the turbine.
The turbine power output is calculated as following:
Where the air density is taken to be 1.225, the energy pattern 1.91 (Rayleigh distribution), and the swept area is calculated depending on the turbine diameter.
Code and example
Skipped, see in attached file below.
 Charnock H. 1955. Wind stress on a water surface. Quart J Roy Meteorology Soc, 81:639-640
 Stewart RW. 1974. The air-sea momentum exchange. Bound. Layer Meteor., 16, 151-167
 Shi Jian et al. 2011 Dependence of sea surface drag coefficient on wind-wave parameters
Wind-Wave interactions ToolKit (PDF, 881KB)