Updates log
PyWake 2.5 (February 15, 2023)
New Features and API changes
PyWake conda package available. Install by
conda install -c https://conda.windenergy.dtu.dk/channel/open py_wakeBefore
RotorAvgModelwas an input to the WindFarmModel. This is ambigious as the rotor average models may be applied to both wake deficit, blockage deficit and turbulence. Instead theRotorAvgModelis now an input option toWakeDeficitModel,BlockageDeficitModelandTurbulenceModelBefore the an area overlapping rotor average model was integrated into the
NOJDeficitModel. These models have now been separated. The default behaviour is unchanged as the default rotor average model ofNOJDeficitis set toAreaOverlapAvgModelThe
IEA37SimpleBastankhahGaussianwind farm model is deprecated. Please use theIEA37CaseStudy1model from py_wake.literature.iea37_case_study1 insteadNotebook with verification of the TurbOPark model from Ørsted
New netcdf-based Fuga look-up table format. The function
dat2netcdfpy_wake.utils.fuga_utils can be used to convert files from the old deprecated format to the new format.Wind turbine positions may now depend on wind direction and wind speed (e.g. floating wind turbines or multirotors)
Before
All2AllIterativetook an inputinitialize_with_PropagateDownwindwhich defaulted to True to decide whether the effective wind speed inAll2AllIterativeshould start with the free stream value or the effective wind speed computed byPropagateDownwind(i.e. without blockage). This input has been replaced with the optional input argumentWS_eff. IfWS_eff=None(default) then the initial effective wind speed is obtained fromPropagateDownwind. Alternatively, the initial effective wind speed can be set to the free wind byWS_eff=0or directly to a custom value byWS_eff=effective wind speed. Note, however, that bypassing some iterations by setting the “correct” effective wind speed may result in wrong gradientsAll2AllIterativewill now return after first iteration ifconvergence_toleranceis set toNone. This only makes sense if CT and the deficit are independent of the effective wind speed, like the IEA37CaseStudy1 setup.The default behaviour of
StraightDistanceis now to use the reference wind directionNew method to avoid deficit and turbulence from wind turbines on themselves. This allows flow maps without discontinuties at the wind turbines
New
InputModifierModeltype that capable of modifying inputs before or during the simulations. This enables simulation of multirotor and floating wind turbines
New models and functions
DeficitModels
FugaMultiLUTDeficit, which allows different wind turbine types
XRDeficitModel for deficit models based on xarray.dataarray look-up table (with linear interpolation)
RotorAvgModels
GaussianOverlap. The model is based on a lookup table with numerically integrated overlap factors based on normalized input of downstream rotor diamter and crosswind distance.
TurbulenceModels
XRTurbulenceModel for turbulence models based on xarray.dataarray look-up table (with linear interpolation)
Predefined WindFarmModels
TurbOPark. A setup very similar to the original Ørsted implementation
InputModifierModels
MultiRotor. Model to change the position of the rotors on a multirotor wind turbine depending on the wind direction
ISONoiseModel. Simple noise propagation model, see https://topfarm.pages.windenergy.dtu.dk/PyWake/notebooks/Noise.html
InputModifierModel. New model type that allows to modify inputs before or during the simulations. This allows multirotor
Functions
New
circularmethod in py_wake.utils.layouts to generate circular layouts
Bug fixes
Fix a bug in
WindFarmModel.aepthat ignored then_cpu,wd_chunksandws_chunksarguments and always computed on only one CPU.Fix
NOJLocalDeficit. Before a layout term was precalculated, but in the local version this term depends on the effective TI which was unknow at this stageFix error
ModuleNotFoundError: No module named 'xarray.plot.plot'occurring with newer version of xarrayFix parallel executino with FugaDeficit
and many more
PyWake 2.4 (July 6, 2022)
New features and API changes
Before, the
Mirrorground model used linear superposition of the above- and below-ground wind turbines whileMirrorSquaredSumused squared sum. In this version theMirrorSquaredSumhas been removed andMirroris now using the superposition model of the wind farm model to calculate the sum. I.e.Mirrorbehaves as before if the superposition model isLinearSumand as the previuosMirrorSquaredSumif the superposition model isSquaredSum.Easy chunkification and parallelization via the arguments
n_cpu,wd_chunksandws_chunks, see https://topfarm.pages.windenergy.dtu.dk/PyWake/notebooks/RunWindFarmSimulation.html#Chunkification-and-parallelization and https://topfarm.pages.windenergy.dtu.dk/PyWake/notebooks/Optimization.html#Chunkify-and-Parallelization.Change dAEPdxy to automatically compute gradients of aep wrt. the concatenated list of x,y which is faster than computing first wrt. x then y.
py_wake.utils.layoutscontains functions to create rectangular and square wind turbine layouts.New approach to switch numpy backend (used when switching to
autograd.numpy,Numpy32(see below, etc.). The new approach requires all modules to import np from py_wake, i.e.from py_wake import np.Easy way to switch between double presicion (standard numpy) and single precision (
Numpy32), see https://topfarm.pages.windenergy.dtu.dk/PyWake/notebooks/gradients_parallellization.html#Precision.New function
floris_yaml_to_pywake_turbine(see https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/blob/master/py_wake/utils/floris_wrapper.py). This function creates a PyWake WindTurbine object from a Floris wind turbine yaml file and allows more direct comparison.Previuosly,
LocalWind(returned bysite.localWind) was an xarrayDatasetsubclass. Due to issues with autograd and cupy, this has been changed such thatLocalWindis now adictsubclass with numpy arrays,{'WS_ilk': np.array([...])}. Xarray DataArrays are created byLocalWindwhen requesting attributes without_ilk, e.g.localWind.WS.Long list of bug and issue fixes.
New models
RotorAvgModels
New WSPowerRotorAvg, which computes the rotor average deficit by, \(deficit = WS - \sqrt[\alpha]{\frac{1}{N} \sum_{i}{\left(WS - deficit_i\right)}^\alpha}\). Note that
WSis the rotor center wind speed and thus shear and terrain-dependent inflow variation are not taken into account when computing the rotor average deficit.
Power/Ct functions
New
DensityCompensationwhich scales the wind speed wrt. air density. In most cases this model is more realistic than the existing alternative model,DensityScale, which scales the power and ct wrt. air density.
PyWake 2.3 (March 18, 2022)
New features and API changes
GroundModelis now an input toDeficitModelinstead ofWindFarmModel. This means that a ground model can be applied to the blockage or wake, only.PyWake can now compute gradients via finite differnece, complex step and automatic differentiation, see https://topfarm.pages.windenergy.dtu.dk/PyWake/notebooks/gradients_parallelization.html#Gradients. Most models supports all three methods, while a few do not work yet.
Flow maps can be computed in both the vertical downwind and crosswind plane.
New models
WakeDeficitModels
CarbajofuertesGaussianDeficit
TurboNOJDeficit
TurboGaussianDeficit
BlockageDeficitModels
RathmannScaled
DeflectionModels
GCLHillDeflection
JimenezWakeDeflection (extended with vertical deflection due to rotor tilt)
WeightModels (to be used with the STF2005 and STF2017 TurbulenceModels)
FrandsenWeight (the previous implementation)
IECWeight (weight as specified in the IEC standard)
SiteModels
GlobalWindAtlasSite (site with data from online global wind atlas)
DistanceModels
JITStreamlineDistance (compute distances between wind turbines along streamlines)
ShearModels
LogShear
PyWake 2.2 (March 26, 2021)
New features and API changes
All DeficitModels should inherit either
WakeDeficitModelorBlockageDeficitModel.All Sites are now subclasses of XRSite.
WeightedSum SuperpositionModel reimplemented to be more efficient.
TurbulenceModels now take a RotorAvgModel as optional input. This allows PyWake to use different RotorAvgModels for wake and turbulence.
Validation feature updated, see here.
The Power/Ct curve functionality of
WindTurbineshas been updated to support multidimensional Power and Ct curves, e.g. curves depending on turbulence intensity, air density, yaw misalignment, operational mode etc. This means that instantiatingWindTurbinesandOneTypeWindTurbineswith the old set of arguments, i.e.name, diameter, hub_height, ct_func, power_func, power_unit, is deprecated. Use the the newWindTurbineandWindturbinesclasses with the argumentsname, diameter, hub_height, powerCtFunctioninstead, see here. Backward compatibility is ensured (with runtime warning) for most use cases. ThepowerCtFunctioncan be one of the classes from py_wake.wind_turbines.power_ct_functions, i.e.PowerCtFunctionPowerCtTabularPowerCtFunctionListPowerCtNDTabularPowerCtXrCubePowerSimpleCt
Support for time series of wd and ws, see here. Possible use cases:
Time-dependent inflow, e.g. measurements of wd, ws, ti, shear, density, etc.
Time-dependent operation, e.g. periods of failure or maintaince of a wind turbine
Added support for load surrogates to predict wind turbine loads.
New models
BlockageDeficitModels (see here)
SelfSimilarityDeficit2020
HybridInduction
RankineHalfBody
VortexCylinder
VortexDipole
Rathmann
DeflectionModels
FugaDeflection (requires Fuga look-up tables,
UL,UT,VL,VT)
GroundModels
Mirror
MirrorSquaredSum
PyWake 2.1 (September 14, 2020)
New features and API changes
New xarray data structure
LocalWind, SimulationResult and FlowMap are now
xarray.Dataset-objects with some additional methods and attributes.simulationResult.aep()now returns axarray.DataArraywith aep for all wind turbines, wind directions and wind speeds. To get the total AEP as before, usesimulationResult.aep().sum().New general XRSite where the site is defined as an xarray with the following structure:
Required data variables:
P(probability) or f(sector frequency), A(Weibull scale), k(Weibull shape)
Optional data variables:
WS(defaults to reference wind speed, ws), TI(turbulence intensity), SpeedUp, Turning
All data variables may be constant or dependent on any of:
ws (reference wind speed)
wd (reference wind direction)
position in terms of
gridded 2D position, (x,y)
gridded 3D position, (x,y,z)
wt position, (i)
Include effects of neighbouring wind farms in site (wind resource) to speed up optimization of a wind farm with neighbouring farms.
Vertical flow map via the YZGrid.
New models
New
RotorAverageModel, see here. The default model,RotorCenter, behaves as before as it estimates the rotor-average wind speed from the wind speed at the rotor center. Other models, however, provide a more accurate estimate based on multiple points on the cost of computation. TheCGIRotorAvg(4)andCGIRotorAvg(7)with 4 and 7 points, respectively, provide good compromises between accuracy and computational cost.Deficit model:
GCLDeficit: The Gunner Larsen semi-analytical wake model.
Superposition model:
WeightedSum A weighted sum approach taking wake convection velocity into account. The model is so far only applicable to the gaussian models. The model is based on “A momentum-conserving wake superposition method for wind farm power prediction” by Haohua Zong and Fernando Porté-Agel, J. Fluid Mech. (2020), vol. 889, A8; doi:10.1017/jfm.2020.77.
PyWake 2.0 (April 15, 2020)
New structure
Purpose:
Easier combination of different models for flow propagation, wake and blockage deficit, superposition, wake deflection and turbulence.
More consistent interface to and support for engineering models and PyWake-Rans.
Changes
WakeModelclass refactored mainly into theWindFarmModelsEngineeringWindFarmModelandPropagateDownwind.WindFarmModels, e.g.NOJ,Fuga,BastankhahGaussianreturns aSimulationResultcontaining the results as well as an AEP and a flow_map method. See the QuickStart tutorial,and many more.
Backward compatibility
AEP Calculator works as before, but is now deprecated.
Lower level interfaces and implementations has changed.
New documentation matching the new structure.
Optional blockage deficit models and implementation of the SelfSimilarity model.
Optional wake deflection models and implementation of a model by Jimenez.