From a3e517fac8326294d15452fe55694ff130a1ff6d Mon Sep 17 00:00:00 2001 From: Riccardo Riva <ricriv@dtu.dk> Date: Mon, 8 Feb 2021 15:38:57 +0100 Subject: [PATCH] Added shear keyword to example sites --- py_wake/examples/data/hornsrev1.py | 4 ++-- py_wake/examples/data/iea37/_iea37.py | 4 ++-- py_wake/examples/data/lillgrund.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/py_wake/examples/data/hornsrev1.py b/py_wake/examples/data/hornsrev1.py index e4343b5dd..a6bc70044 100644 --- a/py_wake/examples/data/hornsrev1.py +++ b/py_wake/examples/data/hornsrev1.py @@ -92,14 +92,14 @@ HornsrevV80 = V80 class Hornsrev1Site(UniformWeibullSite): - def __init__(self): + def __init__(self, shear=None): f = [3.597152, 3.948682, 5.167395, 7.000154, 8.364547, 6.43485, 8.643194, 11.77051, 15.15757, 14.73792, 10.01205, 5.165975] a = [9.176929, 9.782334, 9.531809, 9.909545, 10.04269, 9.593921, 9.584007, 10.51499, 11.39895, 11.68746, 11.63732, 10.08803] k = [2.392578, 2.447266, 2.412109, 2.591797, 2.755859, 2.595703, 2.583984, 2.548828, 2.470703, 2.607422, 2.626953, 2.326172] - UniformWeibullSite.__init__(self, np.array(f) / np.sum(f), a, k, .1) + UniformWeibullSite.__init__(self, np.array(f) / np.sum(f), a, k, .1, shear=shear) self.initial_position = np.array([wt_x, wt_y]).T diff --git a/py_wake/examples/data/iea37/_iea37.py b/py_wake/examples/data/iea37/_iea37.py index 13a2cf14a..4d1c0280d 100644 --- a/py_wake/examples/data/iea37/_iea37.py +++ b/py_wake/examples/data/iea37/_iea37.py @@ -16,14 +16,14 @@ class IEA37_WindTurbines(OneTypeWindTurbines): class IEA37Site(UniformSite): - def __init__(self, n_wt, ti=.075): + def __init__(self, n_wt, ti=.075, shear=None): assert n_wt in [9, 16, 36, 64] from py_wake.examples.data.iea37.iea37_reader import \ read_iea37_windfarm, read_iea37_windrose _, wsp, freq = read_iea37_windrose(iea37_path + "iea37-windrose.yaml") - UniformSite.__init__(self, freq, ti, ws=wsp) + UniformSite.__init__(self, freq, ti, ws=wsp, shear=shear) self.initial_position = np.array(read_iea37_windfarm(iea37_path + 'iea37-ex%d.yaml' % n_wt)[:2]).T diff --git a/py_wake/examples/data/lillgrund.py b/py_wake/examples/data/lillgrund.py index 79e69780f..11c177367 100644 --- a/py_wake/examples/data/lillgrund.py +++ b/py_wake/examples/data/lillgrund.py @@ -90,11 +90,11 @@ LillgrundSWT23 = SWT23 class LillgrundSite(UniformWeibullSite): - def __init__(self): + def __init__(self, shear=None): f = [3.8, 4.5, 0.4, 2.8, 8.3, 7.5, 9.9, 14.8, 14.3, 17.0, 12.6, 4.1] a = [4.5, 4.7, 3.0, 7.2, 8.8, 8.2, 8.4, 9.5, 9.2, 9.9, 10.3, 6.7] k = [1.69, 1.78, 1.82, 1.70, 1.97, 2.49, 2.72, 2.70, 2.88, 3.34, 2.84, 2.23] - UniformWeibullSite.__init__(self, f, a, k, .1) + UniformWeibullSite.__init__(self, f, a, k, .1, shear=shear) self.initial_position = np.array([wt_x, wt_y]).T -- GitLab