From 127f61f9191a62231da4f3e208b7e3462a6f4f54 Mon Sep 17 00:00:00 2001 From: "Mads M. Pedersen" <mmpe@dtu.dk> Date: Fri, 9 Jul 2021 06:33:13 +0000 Subject: [PATCH] Fix pywake park --- py_wake/wind_turbines/_wind_turbines.py | 2 +- py_wake/wind_turbines/power_ct_functions.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/py_wake/wind_turbines/_wind_turbines.py b/py_wake/wind_turbines/_wind_turbines.py index be624ee06..576217007 100644 --- a/py_wake/wind_turbines/_wind_turbines.py +++ b/py_wake/wind_turbines/_wind_turbines.py @@ -321,7 +321,7 @@ Use WindTurbines(names, diameters, hub_heights, power_ct_funcs) instead""", Depr 'mode', [PowerCtTabular(wt['WindSpeed'], wt['PowerOutput'], power_unit, wt['ThrustCoEfficient'], ws_cutin=wt['LowSpeedCutIn'], ws_cutout=wt['HighSpeedCutOut'], ct_idle=wt['ct_idle'], additional_models=[]) for wt in wt_data], - default_value=0, additional_models=[SimpleYawModel()]) + default_value=default_mode, additional_models=[SimpleYawModel()]) char_data_tables = [np.array([pct.ws_tab, pct.power_ct_tab[0], pct.power_ct_tab[1]]).T for pct in power_ct_funcs.windTurbineFunction_lst] diff --git a/py_wake/wind_turbines/power_ct_functions.py b/py_wake/wind_turbines/power_ct_functions.py index c6cd9aee4..49c09010a 100644 --- a/py_wake/wind_turbines/power_ct_functions.py +++ b/py_wake/wind_turbines/power_ct_functions.py @@ -231,6 +231,7 @@ class PowerCtTabular(PowerCtFunction): ws = np.r_[ws, ws_cutout + eps, 100] power = np.r_[power, power_idle, power_idle] ct = np.r_[ct, ct_idle, ct_idle] + self.ws_cutin, self.ws_cutout, self.ct_idle = ws_cutin, ws_cutout, ct_idle idx = np.argsort(ws) ws, power, ct = np.asarray(ws)[idx], np.asarray(power)[idx], np.asarray(ct)[idx] -- GitLab