Power calculations with shear profiles
Dear PyWake Team!
I am currently writing my MSc thesis. The topic is how shear profiles affect the estimated energy production (AEP) within a wind farm. My primary question is whether PyWake considers shear profiles when calculating power output.
In my research, I plan to use a dataset from NORA3. This dataset contains wind speed and wind direction data at heights of 50, 100, 150, 200 and 250 metres above sea level. To assess the power output for each hour of the year, I have attempted to use the site object with wind speed at multiple heights for each timestamp in the year. From my observations, changing the wind speed in the simulation result does not affect the power output. However, I have to include it to make it work. Only the wind direction in the simulation result will affect the power output.
I see no change in power output when I choose to include wind speed at hub height (150m). Does PyWake automatically use the hub height data if it is available in the site object? If it is not available in the site object, will the program use interpolation or a rotor equivalent wind speed if serval wind speed is used in the site object?
Here is an example of my code. Would you recommend using an alternative site object or method within PyWake for my problem?
Thanks for your guidance and help.
import numpy as np
import xarray as xr
from py_wake.site.xrsite import XRSite
from py_wake.wind_turbines.power_ct_functions import PowerCtTabular
from py_wake.wind_turbines import WindTurbine
from py_wake.deficit_models.noj import NOJLocalDeficit
from py_wake.wind_farm_models.engineering_models import PropagateDownwind
from py_wake.turbulence_models.crespo import CrespoHernandez
x1_positions = np.array([-106635.65095524, -106395.65095524, -106568.066542965])
y1_positions= np.array([ 6634031.48894353, 6634031.48894353, 6633071.48894353])
#Wind turbine data from IEA15MW
u=[2.999999831,3.499999916,4,4.500000084,4.750000126,5.000000169,5.249999874,5.999999663,6.199999966,6.40000027,6.499999747,6.55000016,6.599999899,6.700000051,6.800000202,6.900000354,6.919999845,6.929999928,6.94000001,6.950000093,6.960000175,6.969999584,6.980000341,6.989999749,6.999999831,7.499999916,8,8.500000084,9.000000169,9.500000253,10.00000034,10.2499997,10.49999975,10.60000057,10.70000005,10.72000022,10.73999971,10.76000055,10.78000004,10.78400034,10.78600049,10.78699989,10.78799997,10.78899937,10.78950042,10.8000002,10.89999968,10.99999983,11.24999987,11.50000059,11.75000063,11.99999933,12.99999949,13.99999966,14.99999983,17.50000025,20.00000067,22.49999975,24.99999882]
Power=[70.021377,301.9937,595.088475,964.887394,1185.081978,1429.216889,1695.245223,2656.263808,2957.216831,3275.743373,3442.669566,3528.654678,3614.989064,3791.164267,3971.967845,4155.58904,4192.387051,4210.773549,4228.841377,4247.186435,4265.458105,4283.898392,4301.948494,4320.289911,4339.296326,5338.82324,6481.116995,7774.570984,9229.227024,10855.04374,12661.25448,13638.148,14660.65727,14994.84635,14994.64979,14994.61195,14994.55374,14994.52082,14994.55424,14994.52965,14994.53211,14994.53141,14994.51543,14994.52466,14994.59142,14994.53984,14994.4265,14994.26629,14994.02192,14994.10762,14994.17514,14994.17331,14994.76256,14994.76121,14994.75771,14994.82665,14994.82754,14996.27008,14997.62687]
Ct=[0.819748943,0.801112031,0.808268424,0.821910918,0.822876237,0.823265981,0.830989358,0.834932456,0.833618598,0.83180478,0.829011103,0.826909201,0.824740997,0.820429675,0.816176257,0.811200233,0.809740903,0.808780765,0.808102306,0.807566626,0.807251977,0.80662442,0.806495512,0.806806173,0.806651158,0.805469658,0.804571567,0.803949121,0.803904895,0.803708734,0.80345211,0.801706154,0.801777393,0.768657554,0.70731525,0.698507743,0.690211963,0.682335591,0.674835939,0.673371183,0.672646111,0.672283185,0.671921569,0.671564033,0.671386994,0.667639697,0.635292304,0.607277698,0.548965866,0.501379105,0.460982977,0.425965654,0.32116631,0.2511023,0.201415182,0.125653944,0.08506697,0.061026446,0.045814967]
#IEA15MMW
my_wt = WindTurbine(name='MyWT', diameter=240, hub_height=150,
powerCtFunction=PowerCtTabular(u, Power, 'kW', Ct, ws_cutin=2.999999831, ws_cutout=24.99999882))
#Wind direction values
F = [0.00537634, 0.00268817, 0.06317204, 0.12096774, 0.14516129, 0.23252688, 0.19758065, 0.23252688]
wd = np.linspace(0, 360, len(F), endpoint=False)
site = XRSite(
ds=xr.Dataset(data_vars={'WS': ('h', [8, 9, 12] ), 'P': ('wd', F), 'TI': 0.1},
coords={'wd': wd, 'h': [100, 150, 200]}) )
wfm = PropagateDownwind(site, my_wt, NOJLocalDeficit(use_effective_ws=True), turbulenceModel=CrespoHernandez())
sim_res = wfm(x1_positions, y1_positions, ws=10, wd=355)
total_power = sim_res.Power.sel(wt=0).sum().values/1e6
print('Total power for selected wind turbine in front: %f MW'%total_power)
total_power = sim_res.Power.sel(wt=2).sum().values/1e6
print('Total power for selected wind turbine behind: %f MW'%total_power)
total_power = sim_res.Power.sum().values/1e6
print('Total power for wind turbines: %f MW'%total_power)