In [1]:
!git clone https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake.git
In [0]:
%cd /content/PyWake
!pip install -e .
In [0]:
import numpy as np
from py_wake.aep._aep import AEP
from py_wake.examples.data.hornsrev1 import wt_x, wt_y, HornsrevV80,\
HornsrevSite
from py_wake.wake_models.noj import NOJ
from py_wake.wake_models.fuga import FugaWakeModel
import matplotlib.pyplot as plt
wt_x = np.array(wt_x)[[0,1,2,8,9,10,16,17,18]]
wt_y = np.array(wt_y)[[0,1,2,8,9,10,16,17,18]]
from py_wake.tests.test_files import tfp
path = tfp + 'fuga/2MW/Z0=0.03000000Zi=00401Zeta0=0.00E+0/'
wake_model = FugaWakeModel(path, windTurbines)
wake_model=
wt = HornsrevV80()
aep = AEP(HornsrevSite(), wt, NOJ(wt))
print('AEP [GWh]', aep.calculate_AEP(wt_x, wt_y)[0].sum())
x_j = np.linspace(min(wt_x)-1000, max(wt_x)+1000, 500)
y_j = np.linspace(min(wt_y)-1000, max(wt_y)+1000, 300)
X, Y, Z = aep.wake_map(x_j, y_j, 70, wt_x, wt_y, wd=[0], ws=[9])
c = plt.contourf(X, Y, Z, np.arange(2, 9.1, .01), cmap='Blues_r')
plt.colorbar(c, label='wind speed [m/s]')
plt.plot(wt_x, wt_y, '.k')
for i, (x_, y_) in enumerate(zip(wt_x, wt_y)):
plt.annotate(i, (x_, y_))
plt.axis('equal')
plt.show()
In [0]:
In [0]:
Out[0]: