PyWake issueshttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues2019-09-06T09:25:16Zhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/19Implement single wake model from Braunbehrens and Segalini2019-09-06T09:25:16ZPierre-Elouan RethoreImplement single wake model from Braunbehrens and Segalini## Reference Paper
Robert Braunbehrens, Antonio Segalini, A statistical model for wake meandering behind wind turbines, Journal of Wind Engineering and Industrial Aerodynamics, Volume 193, 2019 [doi:10.1016/j.jweia.2019.103954](https://w...## Reference Paper
Robert Braunbehrens, Antonio Segalini, A statistical model for wake meandering behind wind turbines, Journal of Wind Engineering and Industrial Aerodynamics, Volume 193, 2019 [doi:10.1016/j.jweia.2019.103954](https://www-sciencedirect-com.proxy.findit.dtu.dk/science/article/pii/S0167610519305458)
## Paper Abstract
A new wake model is proposed to account for wake meandering in simulations of wind-turbine wakes performed on steady solvers, through a wake-meandering description based on the dispersion theory of Taylor (1921, P. Lond. Math Soc., vol. 20, pp. 196–211). Single-turbine simulations were performed by means of the linearised solver ORFEUS. By analysing the steady wake behind a turbine, a set of parameters describing the wake was first obtained and synthesised into a look-up table. The proposed meandering model extended the simulation results by superimposing the lateral and vertical meandering motions to the steady wake. As a result, the time-averaged velocity distribution of the wake was increased in width and reduced in intensity. Through this combination, the model provides rationale for the wake-deficit decrease and for the power underestimation effects of several wake models. The new wake model is validated against the Lillgrund and Horns Rev data sets.
## TODO
* [ ] Code the single wake model from equation (11)
* [ ] Make LUT from figure 3.
* [ ] Add the same benchmark of the paper in the automatic benchmark report
Additional work for a MSc thesis:
* [ ] From LES simulations results of Søren Juhl do a surrogate model for the model
* [ ] Make a reproduction jupyter notebook of the paperhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/32Implement the wake meandering as a common feature to all the wake models in p...2020-03-20T08:24:03ZPierre-Elouan RethoreImplement the wake meandering as a common feature to all the wake models in pywakehttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/34Implement the wind direction uncertainty propagation for benchmarking2020-03-20T08:26:13ZPierre-Elouan RethoreImplement the wind direction uncertainty propagation for benchmarkinghttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/40No support for WeightedSum in memory-saving flow_map2020-06-29T06:19:38ZMads M. PedersenNo support for WeightedSum in memory-saving flow_maphttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/46Make notebook demonstrating local speed up vs local weibull2020-11-16T09:51:40ZMads M. PedersenMake notebook demonstrating local speed up vs local weibullhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/47make notebook demonstrating linear vs constant power in weibull weighted power2020-11-16T09:52:10ZMads M. Pedersenmake notebook demonstrating linear vs constant power in weibull weighted powerhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/50Implement deflection model from Zong 2020 & Shapiro 20182021-01-05T10:08:45ZPierre-Elouan RethoreImplement deflection model from Zong 2020 & Shapiro 2018For the sake of completeness and accomodating to the need of an ongoing MSc thesis, I suggest that we prioritize implementing the deflection model from Zong:
From Zong et al. 2020. doi:10.1017/jfm.2020.77:
![image](/uploads/51569c32722d...For the sake of completeness and accomodating to the need of an ongoing MSc thesis, I suggest that we prioritize implementing the deflection model from Zong:
From Zong et al. 2020. doi:10.1017/jfm.2020.77:
![image](/uploads/51569c32722d97275008e0565404afd5/image.png)Mads M. PedersenMads M. Pedersenhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/56possible bug in vortex model2022-12-13T13:45:28ZTobias Ahsbahspossible bug in vortex modelI was using the pywake implementation for a benchmark for an implementation. Some issues:
The deficit seems to not symmetric:
![image](/uploads/8ed04e701e96bbe215b1b8086a665f45/image.png)
Code for generating the plot below:
```
from ...I was using the pywake implementation for a benchmark for an implementation. Some issues:
The deficit seems to not symmetric:
![image](/uploads/8ed04e701e96bbe215b1b8086a665f45/image.png)
Code for generating the plot below:
```
from py_wake.deficit_models import VortexCylinder
if __name__ == '__main__':
import numpy as np
import matplotlib.pyplot as plt
import time
bm_PW = VortexCylinder()
WS, D_src, ct = 10, 75, 0.8
print("Across centerline")
dw = 2*D_src
cw_array = np.arange(-3*D_src, 3*D_src, 1)
deficit_PW = []
for cw in cw_array:
deficit_PW.append(bm_PW.calc_deficit(np.array([[[WS]]]),
np.array([[D_src]]),
np.array([[[[-dw]]]]),
np.array([[[[cw]]]]),
np.array([[[ct]]]))[0, 0, 0, 0])
plt.figure()
plt.plot(cw_array/D_src, deficit_PW, label='pywake')
plt.legend()
plt.xlabel("relative crosswind distance [-]")
plt.ylabel("wind speed deficit [m/s]")
plt.show()
```
I presume this is due to the coordinate system in the Vortex model. r is always positive, whereas cw_x can also be negative.
The issue is resolved when adding
```
cw_ijlk = np.abs(cw_ijlk)
```
to the beginning of VortexCylinder.calc_deficit.
![image](/uploads/6540140f65565966fcf1a3b6dda1458d/image.png)
A second issues seems to be the definition of:
```
# radial distance from turbine centre
r_ijlk = np.hypot(dw_ijlk, cw_ijlk)
```
the wiz package (where this code comes from), uses
```
r = np.sqrt(Xcp ** 2 + Ycp ** 2)
```
x and y are defined as the coordinates in the rotor plane. Whereas dw_x is perpendicular to the rotor plane.
r_ijlk is only used here:
```
ir = (np.abs(r_ijlk / R_il[:, na, :, na] - 1.) < self.limiter) & (np.abs(dw_ijlk / R_il[:, na, :, na]) < self.limiter)
```
I am not sure if this is an issue. As it is now this would be the point one radius upstream and downstream of the center of the rotor.
/Best
Tobiashttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/58flow map from time-series simulationResult2022-11-22T12:02:53ZMads M. Pedersenflow map from time-series simulationResulthttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/59Update publications page in documentation2022-01-21T08:25:34ZMads M. PedersenUpdate publications page in documentationJournal paper
Pedersen, M. M., & Larsen, G. C. (2020). Integrated wind farm layout and control optimization. Wind Energy Science, 1551-1566. https://doi.org/10.5194/wes-5-1551-2020
Presentations:
Pedersen, M. M., Larsen, G. C., & Ott, S...Journal paper
Pedersen, M. M., & Larsen, G. C. (2020). Integrated wind farm layout and control optimization. Wind Energy Science, 1551-1566. https://doi.org/10.5194/wes-5-1551-2020
Presentations:
Pedersen, M. M., Larsen, G. C., & Ott, S. (2021). Optimal open loop control of wind power plants. Abstract from Wind Energy Science Conference, Hannover, Germany.
Rafael. WESC2021
Master Thesis:
Hiram
Javier
Fischereit et al. Comparing and validating intra-farm and farm-to-farm wakes across different mesoscale and high-resolution wake models. DOI:10.5194/wes-2021-106
Baungaard et al. RANS modelling of a single wind turbine wake in the unstable surface layer. DOI:10.5194/wes-2021-94
van der Laan et al. Inflow modeling for wind farm flows in RANS. DOI:10.1088/1742-6596/1934/1/012012
Meyer Forsting et al. Verification of induction zone models for wind farm annual energy production estimation. DOI:10.1088/1742-6596/1934/1/012023
van der Laan et al. A pressure-driven atmospheric boundary layer model satisfying Rossby and Reynolds number similarity. DOI:10.5194/wes-6-777-2021
**torque 2022**
- Bossanyi
- Rebecca J. Barthelmiehttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/60Add default to Zong model mimicking the setup in his paper2021-09-16T09:43:08ZAlexAdd default to Zong model mimicking the setup in his paperIt seems people are a little confused about the usage of the Zong wake model (ie it should be used with the correct weighting method and local wind speed/Ti) so it would probably be good to add a default setup that is identical to the on...It seems people are a little confused about the usage of the Zong wake model (ie it should be used with the correct weighting method and local wind speed/Ti) so it would probably be good to add a default setup that is identical to the one used by Zong in his paper presenting the method.AlexAlexhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/69Gradients of all models2022-05-30T08:01:57ZMads M. PedersenGradients of all models# Outouts:
- [x] AEP
- [x] Power
- [x] WS_eff
- [x] TI
- [ ] Loads
# Inputs:
- [x] x,y
- [x] h
- [ ] site parameters
- [x] wt parameters
# Models
## WindFarmModels
- [x] PropagateDownwind
- [x] All2AllIterative
## WakeDeficitModels
- [...# Outouts:
- [x] AEP
- [x] Power
- [x] WS_eff
- [x] TI
- [ ] Loads
# Inputs:
- [x] x,y
- [x] h
- [ ] site parameters
- [x] wt parameters
# Models
## WindFarmModels
- [x] PropagateDownwind
- [x] All2AllIterative
## WakeDeficitModels
- [x] NOJDeficit
- [x] FugaDeficit
- [x] FugaYawDeficit
- [x] BastankhahGaussianDeficit
- [x] CarbajofuertesGaussianDeficit
- [x] IEA37SimpleBastankhahGaussianDeficit
- [x] NiayifarGaussianDeficit
- [x] TurboGaussianDeficit
- [x] ZongGaussianDeficit
- [x] GCLDeficit
- [x] NoWakeDeficit
- [x] NOJLocalDeficit
- [x] TurboNOJDeficit
- [x] FugaDeficit
- [x] FugaYawDeficit
## BlockageDeficitModels
- [x] HybridInduction
- [x] SelfSimilarityDeficit2020
- [x] VortexDipole
- [x] RankineHalfBody
- [x] Rathmann
- [x] RathmannScaled
- [x] SelfSimilarityDeficit
- [ ] VortexCylinder
- [x] FugaDeficit
- [x] FugaYawDeficit
## SuperpositionModels
- [x] LinearSum
- [x] MaxSum
- [x] SquaredSum
- [ ] WeightedSum
## RotorAverageModels
- [x] RotorCenter
- [x] CGIRotorAvg
- [x] EqGridRotorAvg
- [x] GQGridRotorAvg
- [x] GridRotorAvg
- [x] PolarGridRotorAvg
## DeflectionModels
- [ ] FugaDeflection
- [x] GCLHillDeflection
- [x] JimenezWakeDeflection
## TurbulenceModels
- [x] CrespoHernandez
- [x] GCLTurbulence
- [x] STF2005TurbulenceModel
- [x] STF2017TurbulenceModel
## AddedTurbulenceSuperpositionModels
- [x] LinearSum
- [x] MaxSum
- [x] SqrMaxSum
- [x] SquaredSum
## GroundModels
- [x] NoGround
- [x] Mirror
- [x] MirrorSquaredSum
## Sites
- [x] IEA37Site
- [x] Hornsrev1Site
- [x] ParqueFicticioSite
## DistanceModels
- [ ] xxx
- [ ] xxx
## ShearModels
- [x] PowerShear
- [x] LogShear
## WindTurbines
- [x] IEA37_WindTurbines
- [x] V80
- [x] IEA34_130_1WT_Surrogate (tensorflow surrogate)
## PowerCtModels
- [x] DensityScale
- [x] SimpleYawModel
- [x] PowerCtTabular
- [x] PowerCtFunctionList
- [x] PowerCtNDTabular
- [x] PowerCtXr
- [x] CubePowerSimpleCthttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/78Validate Turbogaussian against Ørsted report results2022-04-20T09:36:02ZMads M. PedersenValidate Turbogaussian against Ørsted report resultsvalidate TurboGaussianDeficit by reproducing results from https://github.com/OrstedRD/TurbOPark/blob/main/TurbOParkExamples.pdfvalidate TurboGaussianDeficit by reproducing results from https://github.com/OrstedRD/TurbOPark/blob/main/TurbOParkExamples.pdfhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/80JITStreamlineDistance in documentation of site.distance2022-03-28T08:09:24ZMads M. PedersenJITStreamlineDistance in documentation of site.distancehttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/84Improvement: XRSite to include joint probability distributions including e.g....2022-04-27T07:43:31ZMichael SangsterImprovement: XRSite to include joint probability distributions including e.g. temperatureCurrently, my understanding is that additional wind speed or direction dependent site parameters such as TI, Turning and Speedup can be passed as part of an xarray dataset when instantiating an XRSite object, however the probability dist...Currently, my understanding is that additional wind speed or direction dependent site parameters such as TI, Turning and Speedup can be passed as part of an xarray dataset when instantiating an XRSite object, however the probability distribution can only be passed with i, x, y, h, time, ws and wd as dimensions. It would provide greater functionality if the probability distribution could be specified using additional dimensions such as temperature, so that e.g. the power as a function of ws, wd and temperature could be determined (taking into account optional wtg temperature curtailment data, possibly specified as part of the wind turbine object) and then this power could be multipled by the joint probability of each ws, wd and temperature to arrive at the (temperature curtailed) AEP.https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/88Import error when installed from PyPI as a non-dev2022-04-25T08:25:25ZFrancisco CorreosoImport error when installed from PyPI as a non-devHi all,
The actual version in PyPI (v2.3.0) gives an error if you install `py_wake` as a non-developer.
```python
----> 1 import py_wake
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\__init__.py:7, in <module>
1 """PyW...Hi all,
The actual version in PyPI (v2.3.0) gives an error if you install `py_wake` as a non-developer.
```python
----> 1 import py_wake
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\__init__.py:7, in <module>
1 """PyWake
2
3 An open source wind farm simulation tool capable of calculating wind farm flow fields,
4 power production and annual energy production (AEP) of wind farms.
5 """
6 import pkg_resources
----> 7 from .deficit_models.noj import NOJ, NOJLocal
8 from .deficit_models.fuga import Fuga, FugaBlockage
9 from .deficit_models.gaussian import BastankhahGaussian, IEA37SimpleBastankhahGaussian
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\deficit_models\__init__.py:8, in <module>
6 from .vortexdipole import VortexDipole
7 from .rathmann import Rathmann
----> 8 from .noj import NOJDeficit, NOJLocalDeficit, TurboNOJDeficit
9 from .gaussian import BastankhahGaussianDeficit, IEA37SimpleBastankhahGaussianDeficit, \
10 NiayifarGaussianDeficit, ZongGaussianDeficit, CarbajofuertesGaussianDeficit, TurboGaussianDeficit
11 from .fuga import FugaDeficit, FugaYawDeficit
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\deficit_models\noj.py:5, in <module>
3 from py_wake.ground_models.ground_models import NoGround
4 from py_wake.superposition_models import SquaredSum, LinearSum
----> 5 from py_wake.wind_farm_models.engineering_models import PropagateDownwind
6 from py_wake.utils.area_overlapping_factor import AreaOverlappingFactor
7 from py_wake.rotor_avg_models.rotor_avg_model import RotorCenter
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\wind_farm_models\__init__.py:1, in <module>
----> 1 from .engineering_models import PropagateDownwind, All2AllIterative
2 from .wind_farm_model import WindFarmModel
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\wind_farm_models\engineering_models.py:5, in <module>
3 import numpy as np
4 from py_wake.superposition_models import SuperpositionModel, LinearSum, WeightedSum
----> 5 from py_wake.wind_farm_models.wind_farm_model import WindFarmModel
6 from py_wake.deflection_models.deflection_model import DeflectionModel
7 from py_wake.utils.gradients import autograd, cabs
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\wind_farm_models\wind_farm_model.py:3, in <module>
1 from abc import abstractmethod, ABC
2 from py_wake.site._site import Site, UniformSite, UniformWeibullSite, LocalWind
----> 3 from py_wake.wind_turbines import WindTurbines
4 import numpy as np
5 from py_wake.flow_map import FlowMap, HorizontalGrid, FlowBox, YZGrid, Grid, Points
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\wind_turbines\__init__.py:1, in <module>
----> 1 from ._wind_turbines import WindTurbines, WindTurbine
2 from .wind_turbines_deprecated import DeprecatedOneTypeWindTurbines as OneTypeWindTurbines
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\wind_turbines\_wind_turbines.py:6, in <module>
4 import warnings
5 import inspect
----> 6 from py_wake.wind_turbines.power_ct_functions import PowerCtFunctionList, PowerCtTabular, SimpleYawModel, CubePowerSimpleCt
7 from xarray.core.dataarray import DataArray
10 class WindTurbines():
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\wind_turbines\power_ct_functions.py:7, in <module>
4 from autograd.core import defvjp, primitive
5 from py_wake.wind_turbines.wind_turbine_functions import WindTurbineFunction, FunctionSurrogates,\
6 WindTurbineFunctionList
----> 7 from py_wake.utils.check_input import check_input
8 from py_wake.utils.model_utils import check_model, fix_shape
9 from py_wake.utils import gradients
File ~\Miniconda3\envs\pywake\lib\site-packages\py_wake\utils\check_input.py:2, in <module>
1 import numpy as np
----> 2 import pytest
5 def check_input(input_space_lst, input_lst, input_keys=None):
6 if input_keys is None:
ModuleNotFoundError: No module named 'pytest'
```
I see this is already fixed in `master`:
https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/blob/v2.3.0/py_wake/utils/check_input.py#L2
It would be nice to have a v2.3.1 on PyPI including this change (removing `pytest` import in the previous link) or updating *setup.py* to include `pytest` in the non-developer install.
This `import` error could be discouraging for new users.
Thanks.https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/90Improvement: Add "gross power" as well as Power to SimulationResult2022-05-06T11:25:52ZMichael SangsterImprovement: Add "gross power" as well as Power to SimulationResultCurrently the most efficient way to get to WTG-level gross power (i.e. power of each turbine at each set of wind conditions before wake losses is included) is to work backwards from the aep_ilk with wake losses set to false, dividing by ...Currently the most efficient way to get to WTG-level gross power (i.e. power of each turbine at each set of wind conditions before wake losses is included) is to work backwards from the aep_ilk with wake losses set to false, dividing by probabilities etc, taking care to normalise properly. This would be much more convenient if simply provided as a variable within the SimulationResult xarray dataset, and could be made optional using a kwarg flag in the call to wf_model to generate the SimulationResult. This is useful when not working on an Annual AEP basis, but still needing to compute "downstream" loss factors starting from gross power.https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/91Avoid NOJ and RotorAvgModels2022-05-23T12:58:06ZMads M. PedersenAvoid NOJ and RotorAvgModelsRemove rotorAvgModel argument from NOJ and NOJLocal + raise warning if applied.Remove rotorAvgModel argument from NOJ and NOJLocal + raise warning if applied.https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/92Document load support in pyWake2022-05-30T08:01:24ZPierre-Elouan RethoreDocument load support in pyWakeCurrently the only mention of load surrogates in pywake is deep inside the code. We would like to have a notebook in the docs documenting how it works, and show-casing the different models available with their pros/cons.
**TODO:**
- [ ]...Currently the only mention of load surrogates in pywake is deep inside the code. We would like to have a notebook in the docs documenting how it works, and show-casing the different models available with their pros/cons.
**TODO:**
- [ ] Make a notebook showing how to use the load surrogate with pywake (both with statistics and time series
- [ ] Expand the optimization example with a load constraint
- [ ] Implement the autograd support for load surrogate
- [ ] Merge DTU10MW load surrogate example in master
- [ ] Make a post on linkedIn about this functionality
- [ ] Organise a webinar with industrial and academic interest to showcase on how to build a load surrogate, run pywake and make load constraint optimization with pywake/topfarmhttps://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/issues/102Different options for numerical integration2022-10-31T10:44:28ZRiccardo RivaDifferent options for numerical integrationIn PyWake we need to integrate over the wind speed and wind directions to compute the AEP and Lifetime DEL. This is currently done by summing over the elements, but there are many other possibilities, as shown in the following snippet
`...In PyWake we need to integrate over the wind speed and wind directions to compute the AEP and Lifetime DEL. This is currently done by summing over the elements, but there are many other possibilities, as shown in the following snippet
```python
import numpy as np
from scipy.integrate import dblquad
from scipy.interpolate import interp2d
def fun(x, y):
return 5.0 * x ** 2 * np.cos(x * y)
x = np.linspace(-1, 1, 1000)
y = np.linspace(-2, 2, 2500)
dx = np.mean(np.diff(x))
dy = np.mean(np.diff(y))
X, Y = np.meshgrid(x, y)
Z = fun(X, Y)
# Call qagse from QUADPACK. Adaptive method.
int_dblquad, _ = dblquad(fun, -2.0, 2.0, -1.0, 1.0)
# Same as before, but we use linear interpolation. Equivalent to the trapezoidal method.
fun_interp = interp2d(x, y, Z, kind='linear', copy=False)
int_dblquad_interp, _ = dblquad(fun_interp, -2.0, 2.0, -1.0, 1.0)
# 2 ways of applying the trapezoidal method over a non-uniform grid.
int_trapz_1 = np.trapz(np.trapz(Z, x, axis=1), y)
int_trapz_2 = np.trapz(np.trapz(Z, y, axis=0), x)
# 2 ways of applying the trapezoidal method over a uniform grid.
int_trapz_3 = np.trapz(np.trapz(Z, dx=dx, axis=1), dx=dy)
int_trapz_4 = np.trapz(np.trapz(Z, dx=dy, axis=0), dx=dx)
# Full factorial method.
area = 4.0 * 2.0
int_ff = area * np.mean(Z)
```
I think that it would be nice to provide the user with some more options :slight_smile:
cc @mmpe