pywasp.wind_farm_flow_map#
- pywasp.wind_farm_flow_map(wwc, wtg, wind_turbines, output_locs, air_density_correction='infer', air_density=None, wind_farm_model='PARK2_onshore', turbulence_intensity=None, ws_stepsize=1.0, ws_upper_limit=None, ws_lower_limit=0.0, n_subsector=5, site_interp_method='nearest', site_interp_bounds='ignore', n_cpu_pywake=1)#
Generate a flow map around a wind farm using py_wake for wake and blockage effects. The map is calculated at the same points as the weibull wind climate(s) are provided.
Warning
This function is experimental and its signature may change.
- Parameters:
wwc (
Dataset) – Weibull Wind Climate Cuboid Dataset containing wind climates for locations in output_locs.wtg (
Dataset,dict) – Wind Turbine Generator as a WTG-formatted xr.Dataset, or a dict of wtg_keys and such Datasets. All turbines must use the same model – the map’s AEP is one reference turbine’s production – so awind_turbinesnaming several raises; usepotential_aep()for a mixed farm. A dict may hold entries the farm does not use; the model named bywind_turbines.wtg_keyis the one used.wind_turbines (
Dataset) – Wind Turbine locations, hub heights, group_id’s, and wtg_keys.output_locs (
Dataset) – Locations to calculate the flow map at. Must be a “cuboid” xr.Dataset with 3 spatial dimensions: ‘west_east’, ‘south_north’, ‘height’. The coordinates of the output locations must be covered by the cuboid spanned by the weibull wind climate(s).air_density_correction (
string, optional) – “infer” –> correct the power curve at each output point to the air density there, and the turbines’ thrust curves to the site mean. “none” –> use the power curve as it is; the air density is not read.air_density (
float, optional) – Air density to correct the power and thrust curves to, used only with air_density_correction=”infer”. Overwrites the air density of the WWC, which is otherwise used.wind_farm_model (
str,function, optional) – Wind farm model to use for deficit calculations. Can Either be a name of a predefined wind farm model: “PARK1”, “PARK2_onshore”, “PARK2_offshore”, or a predefined py_wake wind_farm_model object. By default “PARK2_onshore” is used.turbulence_intensity (
float, optional) – Turbulence intensity for the calculation; wind climates produced by pywasp do not include it, so it is only available if passed here or added to the WWC as a “turbulence_intensity” variable, which a value passed here overwrites. The built-in wind farm models do not use it – it only feeds the effective turbulence intensity outputs, which are omitted when it is absent – but a custom wind farm model requires it.ws_stepsize (
float, optional) – Wind speed step between the simulated wind speed cases, by default 1.0 m/s. Effective wind speeds are taken as linear between the cases, so a jump in the wake response, where an upstream turbine cuts in or out, is only resolved to this step. That matters most for small deficits, which it can shift by a noticeable fraction of their value.wspddoes not depend on it.ws_upper_limit (
float, optional) – Upper limit of wind speed range, by default None Which means the upper limit of the wind speed range will be the maximumws_lower_limit (
float, optional) – Deprecated since 2.1.0; will be removed in 3.0. Warns for any value other than 0.0. A float is ignored; the wind speed cases start at 0.0 m/s.Nonestarts them at the cut-in wind speed instead, and has no replacement.n_subsector (
int, optional) – Number of equispaced wind directions simulated within each sector, by default 5. Subsectors sample the wake geometry within their sector only: a subsector always uses its parent sector’s wind climate, speed-up and turbulence intensity.site_interp_method (
str, optional) – The interpolation method to use in py_wake XRSite, by default “nearest”. Interpolation applies to the spatial axes; a subsector always uses its parent sector’s speed-up and turbulence intensity. The same interpolation gives the wind climate (A,k,wdfreq) and air density atoutput_locs, so with “linear” an output point off the wind climate grid gets a blend of its neighbours’ wind climates.site_interp_bounds (
str, optional) – The extrapolation method to use in py_wake XRSite, by default “ignore”. Applies to the reported wind climate as well as to the wind speeds.n_cpu_pywake (
int, optional) – Number of CPUs to use in py_wake, by default 1
- Returns:
Dataset– Wind farm flow map for the output_locs containing the variables:- potential_aep_sector:
Potential AEP in GWh for each sector
- gross_aep_sector:
Gross AEP in GWh for each sector
- potential_aep_deficit_sector:
AEP deficit in units of fraction for each sector
- wspd_sector:
Average wind speed in m/s for each sector
- wspd_eff_sector:
Average effective wind speed in m/s for each sector
- wspd_deficit_sector:
Average wind speed deficit in units of fraction for each sector
- turbulence_intensity_eff_sector:
Average effective turbulence intensity for each sector (only present when turbulence intensity is available)
- wdfreq:
Wind direction frequency in units of fraction for each sector, at the output location, interpolated with
site_interp_method
- potential_aep:
Potential AEP in GWh for each location
- gross_aep:
Gross AEP in GWh for each location. Integrated exactly over the Weibull distribution, as
gross_aep()does, but only up to the highest wind speed simulated, so aws_upper_limitstopping short of where the turbine still produces lowers it. Its ratio withpotential_aepis therefore a pure wake effect.
- potential_aep_deficit:
AEP deficit in units of fraction for each location,
1 - potential_aep / gross_aep
- wspd:
Mean wind speed in m/s for each location: the mean of its sector Weibull distributions, weighted by
wdfreq
- wspd_eff:
Mean effective wind speed in m/s for each location. Above the highest wind speed simulated, the effective wind speed keeps its ratio to the free wind speed there.
- wspd_deficit:
Average wind speed deficit in units of fraction for each location,
1 - wspd_eff / wspd
- turbulence_intensity_eff:
Mean effective turbulence intensity for each location, held at its value at the highest wind speed simulated above it (only present when turbulence intensity is available)
- Raises:
TypeError – If output_locs is not a xr.Dataset
ValueError – If output_locs is not a “cuboid” xr.Dataset
ValueError – If wwc is not a “cuboid” xr.Dataset
ValueError – If output_locs is not covered by the cuboid spanned by the weibull wind climate(s)
ValueError – If the wind turbine locations are not covered by the cuboid spanned by the weibull wind climate(s)
ValueError – If a custom wind farm model is used and turbulence_intensity is neither in the WWC nor passed explicitly.
PywaspError – If a variable the calculation needs is not in the WWC, if no cell of it has a known air density, or if wind_turbines uses more than one turbine model.
- Warns:
UserWarning – If the simulated wind speeds do not reach the wind speeds where the turbines still produce, which truncates the AEP integrals. Raise
ws_upper_limitor leave it unset.UserWarning – If some cells have no air density, which leaves the AEP missing at the output points that read them.