Skip to content
Snippets Groups Projects
Commit 230aff5f authored by Riccardo Riva's avatar Riccardo Riva
Browse files

Added shear keyword to example sites

parent d8640f7a
No related branches found
No related tags found
3 merge requests!624Multi mirror,!607Cupy RANS NN Surrogate Inference Changes,!249Added shear option to example sites
Pipeline #20306 passed
......@@ -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
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment