@@ -27,10 +27,9 @@ def power_coefficient_curve(wind_speed, density, rotor_diameter, cp_values):
2727 Density of air at hub height in kg/m³.
2828 rotor_diameter : float
2929 Rotor diameter in m.
30- cp_values : pandas.DataFrame
30+ cp_values : pandas.Series
3131 Power coefficient curve of the wind turbine.
32- Indices are the wind speeds of the power coefficient curve in m/s, the
33- corresponding power coefficient values are in the column 'cp'.
32+ Indices are the wind speeds of the power coefficient curve in m/s.
3433
3534 Returns
3635 -------
@@ -61,7 +60,7 @@ def power_coefficient_curve(wind_speed, density, rotor_diameter, cp_values):
6160 Wirtschaftlichkeit". 4. Auflage, Springer-Verlag, 2008, p. 542
6261
6362 """
64- cp_time_series = np .interp (wind_speed , cp_values .index , cp_values . cp ,
63+ cp_time_series = np .interp (wind_speed , cp_values .index , cp_values ,
6564 left = 0 , right = 0 )
6665 # Convert density to np.array if wind_speed is np.array
6766 if isinstance (wind_speed , np .ndarray ) and isinstance (density , pd .Series ):
@@ -92,10 +91,9 @@ def cp_curve_density_corr(wind_speed, density, rotor_diameter, cp_values):
9291 Density of air at hub height in kg/m³.
9392 rotor_diameter : float
9493 Rotor diameter in m.
95- cp_values : pandas.DataFrame
94+ cp_values : pandas.Series
9695 Power coefficient curve of the wind turbine.
97- Indices are the wind speeds of the power coefficient curve in m/s, the
98- corresponding power coefficient values are in the column 'cp'.
96+ Indices are the wind speeds of the power coefficient curve in m/s.
9997
10098 Returns
10199 -------
@@ -115,9 +113,8 @@ def cp_curve_density_corr(wind_speed, density, rotor_diameter, cp_values):
115113
116114 """
117115 p_values = (1 / 8 * 1.225 * rotor_diameter ** 2 * np .pi *
118- np .power (cp_values .index , 3 ) * cp_values .cp )
119- p_values = pd .DataFrame (data = np .array (p_values ), index = cp_values .index ,
120- columns = ['p' ])
116+ np .power (cp_values .index , 3 ) * cp_values )
117+ p_values = pd .Series (np .array (p_values ), index = cp_values .index )
121118 return p_curve_density_corr (wind_speed , density , p_values )
122119
123120
@@ -133,10 +130,9 @@ def power_curve(wind_speed, p_values):
133130 ----------
134131 wind_speed : pandas.Series or numpy.array
135132 Wind speed at hub height in m/s.
136- p_values : pandas.DataFrame
133+ p_values : pandas.Series
137134 Power curve of the wind turbine.
138- Indices are the wind speeds of the power curve in m/s, the
139- corresponding power values in W are in the column 'p'.
135+ Indices are the wind speeds of the power curve in m/s.
140136
141137 Returns
142138 -------
@@ -150,7 +146,7 @@ def power_curve(wind_speed, p_values):
150146 and below the minimum wind speed given in the power curve is zero.
151147
152148 """
153- power_output = np .interp (wind_speed , p_values .index , p_values . p ,
149+ power_output = np .interp (wind_speed , p_values .index , p_values ,
154150 left = 0 , right = 0 )
155151 # Power_output as pd.Series if wind_speed is pd.Series
156152 if isinstance (wind_speed , pd .Series ):
@@ -173,10 +169,9 @@ def p_curve_density_corr(wind_speed, density, p_values):
173169 Wind speed time series at hub height in m/s.
174170 density : pandas.Series or numpy.array
175171 Density of air at hub height in kg/m³.
176- p_values : pandas.DataFrame
172+ p_values : pandas.Series
177173 Power curve of the wind turbine.
178- Indices are the wind speeds of the power curve in m/s, the
179- corresponding power values in W are in the column 'p'.
174+ Indices are the wind speeds of the power curve in m/s.
180175
181176 Returns
182177 -------
@@ -231,7 +226,7 @@ def p_curve_density_corr(wind_speed, density, p_values):
231226 p_values .index * (1.225 / density [i ])** (
232227 np .interp (p_values .index ,
233228 [7.5 , 12.5 ], [1 / 3 , 2 / 3 ])),
234- p_values . p , left = 0 , right = 0 ))
229+ p_values , left = 0 , right = 0 ))
235230 for i in range (len (wind_speed ))]
236231 # Power_output as pd.Series if wind_speed is pd.Series
237232 if isinstance (wind_speed , pd .Series ):
0 commit comments