@@ -60,9 +60,6 @@ def cp_curve(v_wind, rho_hub, d_rotor, cp_values):
6060
6161 """
6262 # cp time series
63- # TODO introduce new parameter v_cutout to allow for power output above
64- # maximum wind speed from power coefficient curve (maximum power output
65- # must be limited)
6663 cp_series = np .interp (v_wind , cp_values .index , cp_values .cp ,
6764 left = 0 , right = 0 )
6865 power_output = (1 / 8 * rho_hub * d_rotor ** 2 * np .pi
@@ -72,9 +69,8 @@ def cp_curve(v_wind, rho_hub, d_rotor, cp_values):
7269 series_index = v_wind .index
7370 except AttributeError :
7471 series_index = range (1 , len (power_output )+ 1 )
75- power_output = pd .Series (data = power_output , index = series_index ,
76- name = 'feedin_wind_turbine' )
77- return power_output
72+ return pd .Series (data = power_output , index = series_index ,
73+ name = 'feedin_wind_turbine' )
7874
7975
8076def cp_curve_density_corr (v_wind , rho_hub , d_rotor , cp_values ):
@@ -116,7 +112,7 @@ def cp_curve_density_corr(v_wind, rho_hub, d_rotor, cp_values):
116112 p_values = (1 / 8 * 1.225 * d_rotor ** 2 * np .pi *
117113 np .power (cp_values .index , 3 ) * cp_values .cp )
118114 p_values = pd .DataFrame (data = np .array (p_values ), index = cp_values .index ,
119- columns = ['P ' ])
115+ columns = ['p ' ])
120116 return p_curve_density_corr (v_wind , rho_hub , p_values )
121117
122118
@@ -133,33 +129,30 @@ def p_curve(p_values, v_wind):
133129 p_values : pandas.DataFrame
134130 Power curve of the wind turbine.
135131 Indices are the wind speeds of the power curve in m/s, the
136- corresponding power values in W are in the column 'P '.
132+ corresponding power values in W are in the column 'p '.
137133 v_wind : pandas.Series or array
138134 Wind speed at hub height in m/s.
139135
140136 Returns
141137 -------
142138 power_output : pandas.Series
143- Electrical power output of the wind turbine in W .
139+ Electrical power output of the wind turbine in the unit of `p_values` .
144140
145141 Notes
146142 -------
147143 It is assumed that the power output for wind speeds above the maximum
148144 wind speed given in the power curve is zero.
149145
150146 """
151- # TODO introduce new parameter v_cutout to allow for power output above
152- # maximum wind speed from power curve
153- power_output = np .interp (v_wind , p_values .index , p_values .P ,
147+ power_output = np .interp (v_wind , p_values .index , p_values .p ,
154148 left = 0 , right = 0 )
155149 # Set index for time series
156150 try :
157151 series_index = v_wind .index
158152 except AttributeError :
159153 series_index = range (1 , len (power_output )+ 1 )
160- power_output = pd .Series (data = power_output , index = series_index ,
161- name = 'feedin_wind_turbine' )
162- return power_output
154+ return pd .Series (data = power_output , index = series_index ,
155+ name = 'feedin_wind_turbine' )
163156
164157
165158def p_curve_density_corr (v_wind , rho_hub , p_values ):
@@ -178,13 +171,13 @@ def p_curve_density_corr(v_wind, rho_hub, p_values):
178171 Density of air at hub height in kg/m³.
179172 p_values : pandas.DataFrame
180173 Power curve of the wind turbine.
181- The indices are the corresponding wind speeds of the power curve, the
182- power values containing column is called 'P '.
174+ Indices are the wind speeds of the power curve in m/s , the
175+ corresponding power values in W are in the column 'p '.
183176
184177 Returns
185178 -------
186179 power_output : pandas.Series
187- Electrical power output of the wind turbine in W .
180+ Electrical power output of the wind turbine in the unit of `p_values` .
188181
189182 Notes
190183 -----
@@ -204,9 +197,11 @@ def p_curve_density_corr(v_wind, rho_hub, p_values):
204197 v: wind speed [m/s], :math:`\rho`: density [kg/m³]
205198
206199 :math:`v_{std}` is the standard wind speed in the power curve
207- (:math:`v_{std}`, :math:`P_{std}`).
200+ (:math:`v_{std}`, :math:`P_{std}`),
208201 :math:`v_{site}` is the density corrected wind speed for the power curve
209- (:math:`v_{site}`, :math:`P_{std}`).
202+ (:math:`v_{site}`, :math:`P_{std}`),
203+ :math:`\rho_0` is the ambient density (1.225 kg/m³)
204+ and :math:`\rho_{site}` the density at site conditions (and hub height).
210205
211206 It is assumed that the power output for wind speeds above the maximum
212207 wind speed given in the power curve is zero.
@@ -224,20 +219,17 @@ def p_curve_density_corr(v_wind, rho_hub, p_values):
224219 at Reiner Lemoine Institute, 2014, p. 13
225220
226221 """
227- # TODO introduce new parameter v_cutout to allow for power output above
228- # maximum wind speed from power curve
229222 power_output = [(np .interp (v_wind [i ],
230223 p_values .index * (1.225 / rho_hub [i ])** (
231224 np .interp (p_values .index ,
232225 [7.5 , 12.5 ], [1 / 3 , 2 / 3 ])),
233- p_values .P , left = 0 , right = 0 ))
226+ p_values .p , left = 0 , right = 0 ))
234227 for i in range (len (v_wind ))]
235228
236229 # Set index for time series
237230 try :
238231 series_index = v_wind .index
239232 except AttributeError :
240233 series_index = range (1 , len (power_output )+ 1 )
241- power_output = pd .Series (data = power_output , index = series_index ,
242- name = 'feedin_wind_turbine' )
243- return power_output
234+ return pd .Series (data = power_output , index = series_index ,
235+ name = 'feedin_wind_turbine' )
0 commit comments