Skip to content
Snippets Groups Projects
Commit ac968623 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

set fuga smooth2zero_x and y to None, which makes it depend on LUT shape

parent 0e53d351
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ class FugaDeficit(WakeDeficitModel, BlockageDeficitModel, FugaUtils):
self.lut_interpolator = interp
def load(self):
du = self.init_lut(self.load_luts(['UL'])[0], self.zHub, smooth2zero_x=250, smooth2zero_y=50,
du = self.init_lut(self.load_luts(['UL'])[0], self.zHub, smooth2zero_x=None, smooth2zero_y=None,
remove_wriggles=self.remove_wriggles)
return self.x, self.y, self.z, du
......
......@@ -60,10 +60,10 @@ class GCLLocalDeficit(GCLDeficit):
7513.75582])),
(IEA37SimpleBastankhahGaussianDeficit(), read_iea37_windfarm(iea37_path + 'iea37-ex16.yaml')[2]),
(FugaDeficit(LUT_path=tfp + 'fuga/2MW/Z0=0.00408599Zi=00400Zeta0=0.00E+00.nc'),
(404441.6306021485, [9912.33731, 9762.05717, 12510.14066, 15396.76584, 23017.66483,
27799.7161, 43138.41606, 49623.79059, 24979.09001, 15460.45923,
16723.02619, 35694.35526, 77969.14805, 19782.41376, 13721.45739,
8950.79218])),
(404422.9302289747, [9911.82745, 9761.75297, 12509.30601, 15396.26107, 23016.74091,
27798.80471, 43135.53798, 49622.24427, 24977.80518, 15459.8399,
16721.53971, 35692.36221, 77966.92736, 19781.30917, 13720.23771,
8950.43363])),
(GCLDeficit(), (370863.6246093183,
[9385.75387, 8768.52105, 11450.13309, 14262.42186, 21178.74926,
25751.59502, 39483.21753, 44573.31533, 23652.09976, 13924.58752,
......@@ -458,10 +458,10 @@ def test_deficitModel_wake_map_convection_all2all(deficitModel, ref):
7495.1508])),
(IEA37SimpleBastankhahGaussian, read_iea37_windfarm(iea37_path + 'iea37-ex16.yaml')[2]),
(lambda *args, **kwargs: Fuga(tfp + 'fuga/2MW/Z0=0.00408599Zi=00400Zeta0=0.00E+00.nc', *args, **kwargs),
(404441.6306021485, [9912.33731, 9762.05717, 12510.14066, 15396.76584, 23017.66483,
27799.7161, 43138.41606, 49623.79059, 24979.09001, 15460.45923,
16723.02619, 35694.35526, 77969.14805, 19782.41376, 13721.45739,
8950.79218])),
(404422.9302289747, [9911.82745, 9761.75297, 12509.30601, 15396.26107, 23016.74091,
27798.80471, 43135.53798, 49622.24427, 24977.80518, 15459.8399,
16721.53971, 35692.36221, 77966.92736, 19781.30917, 13720.23771,
8950.43363])),
(GCL, (370863.6246093183,
[9385.75387, 8768.52105, 11450.13309, 14262.42186, 21178.74926,
25751.59502, 39483.21753, 44573.31533, 23652.09976, 13924.58752,
......@@ -572,7 +572,7 @@ def test_flow_map_symmetry(deficitModel):
ws = sim_res.flow_map(YZGrid(x=0, y=np.linspace(-150, 150, 20), z=windTurbines.hub_height())).WS_eff.squeeze()
ws_center = sim_res.flow_map(XYGrid(x=np.linspace(-150, 150, 20), y=0)).WS_eff.squeeze()
if 1:
if 0:
ax1, ax2 = plt.subplots(2)[1]
ws.plot(ax=ax1, label=deficitModel.__name__)
ax1.legend()
......
......@@ -63,15 +63,15 @@ def test_fuga():
npt.assert_array_almost_equal(
Z70[140, 100:400:10],
[10.0407, 10.0438, 10.0438, 10.013, 9.6847, 7.8787, 6.9561, 9.2251, 9.9686, 10.0382, 10.0498,
10.0569, 10.0325, 9.1787, 7.4004, 9.1384, 10.0329, 10.0297, 10.0232, 9.9265, 9.3163, 8.0768,
6.8858, 8.3754, 9.9592, 10.0197, 10.0118, 10.0141, 10.0118, 10.0095], 4)
[10.0444, 10.0468, 10.0448, 10.013, 9.6847, 7.8787, 6.9561, 9.2251, 9.9686, 10.0382, 10.0498, 10.0569, 10.0325,
9.1787, 7.4004, 9.1384, 10.0329, 10.0297, 10.0232, 9.9265, 9.3163, 8.0768, 6.8858, 8.3754, 9.9592, 10.0197,
10.0119, 10.0141, 10.0118, 10.0095], 4)
npt.assert_array_almost_equal(
Z73[140, 100:400:10],
[10.0404, 10.0435, 10.0433, 10.0113, 9.6836, 7.9206, 7.0218, 9.2326, 9.9665, 10.0376, 10.0494,
10.0563, 10.0304, 9.1896, 7.4515, 9.15, 10.0317, 10.0294, 10.0226, 9.9245, 9.3252, 8.1192, 6.9462,
8.3988, 9.9574, 10.0194, 10.0117, 10.014, 10.0117, 10.0094], 4)
[10.044, 10.0464, 10.0442, 10.0113, 9.6836, 7.9206, 7.0218, 9.2326, 9.9665, 10.0376, 10.0494, 10.0563, 10.0304,
9.1896, 7.4515, 9.15, 10.0317, 10.0294, 10.0226, 9.9245, 9.3252, 8.1192, 6.9462, 8.3988, 9.9574, 10.0194,
10.0119, 10.014, 10.0117, 10.0094], 4)
def test_fuga_blockage_wt_row():
......@@ -142,15 +142,15 @@ def test_fuga_new_casedata_bin_format():
npt.assert_array_almost_equal(
Z70[140, 100:400:10],
[10.0384, 10.042, 10.044, 10.0253, 9.7194, 7.7561, 6.7421, 9.2308, 9.9894, 10.0413, 10.0499,
10.0579, 10.0437, 9.1626, 7.2334, 9.1208, 10.0396, 10.0322, 10.0276, 9.9504, 9.2861, 7.8375,
6.6608, 8.3343, 9.9756, 10.0229, 10.0136, 10.0142, 10.0118, 10.0094], 4)
[10.0419, 10.0448, 10.0449, 10.0253, 9.7194, 7.7562, 6.7422, 9.2309, 9.9894, 10.0412, 10.0499, 10.0578, 10.0437,
9.1626, 7.2334, 9.1208, 10.0396, 10.0322, 10.0276, 9.9504, 9.2861, 7.8375, 6.6608, 8.3344, 9.9756, 10.0229,
10.0138, 10.0142, 10.0118, 10.0094], 4)
npt.assert_array_almost_equal(
Z73[140, 100:400:10],
[10.0384, 10.042, 10.044, 10.0253, 9.7194, 7.7561, 6.7421, 9.2308, 9.9894, 10.0413, 10.0499,
10.0579, 10.0437, 9.1626, 7.2334, 9.1208, 10.0396, 10.0322, 10.0276, 9.9504, 9.2861, 7.8375,
6.6608, 8.3343, 9.9756, 10.0229, 10.0136, 10.0142, 10.0118, 10.0094], 4)
[10.0419, 10.0448, 10.0449, 10.0253, 9.7194, 7.7562, 6.7422, 9.2309, 9.9894, 10.0412, 10.0499, 10.0578, 10.0437,
9.1626, 7.2334, 9.1208, 10.0396, 10.0322, 10.0276, 9.9504, 9.2861, 7.8375, 6.6608, 8.3344, 9.9756, 10.0229,
10.0138, 10.0142, 10.0118, 10.0094], 4)
def test_fuga_downwind():
......
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