@@ -31,8 +31,8 @@ class WindTurbine(object):
3131 Diameter of the rotor in m.
3232 power_coefficient_curve : None, pandas.DataFrame or dictionary
3333 Power coefficient curve of the wind turbine. DataFrame/dictionary must
34- have 'wind_speed' and 'values ' columns/keys with wind speeds in m/s
35- and the corresponding power coefficients. Default: None.
34+ have 'wind_speed' and 'power_coefficient ' columns/keys with wind speeds
35+ in m/s and the corresponding power coefficients. Default: None.
3636 power_curve : None, pandas.DataFrame or dictionary
3737 Power curve of the wind turbine. DataFrame/dictionary must have
3838 'wind_speed' and 'values' columns/keys with wind speeds in m/s and the
@@ -56,11 +56,11 @@ class WindTurbine(object):
5656 Diameter of the rotor in m.
5757 power_coefficient_curve : None, pandas.DataFrame or dictionary
5858 Power coefficient curve of the wind turbine. DataFrame/dictionary must
59- have 'wind_speed' and 'values ' columns/keys with wind speeds in m/s
60- and the corresponding power coefficients. Default: None.
59+ have 'wind_speed' and 'power coefficient ' columns/keys with wind speeds
60+ in m/s and the corresponding power coefficients. Default: None.
6161 power_curve : None, pandas.DataFrame or dictionary
6262 Power curve of the wind turbine. DataFrame/dictionary must have
63- 'wind_speed' and 'values ' columns/keys with wind speeds in m/s and the
63+ 'wind_speed' and 'power ' columns/keys with wind speeds in m/s and the
6464 corresponding power curve value in W. Default: None.
6565 nominal_power : None or float
6666 The nominal output of the wind turbine in W.
@@ -92,7 +92,7 @@ class WindTurbine(object):
9292
9393 """
9494
95- def __init__ (self , turbine_name , hub_height , rotor_diameter = None ,
95+ def __init__ (self , object_name , hub_height , rotor_diameter = None ,
9696 power_coefficient_curve = None , power_curve = None ,
9797 nominal_power = None , fetch_curve = None ):
9898
@@ -135,7 +135,7 @@ def fetch_turbine_data(self):
135135 ... 'object_name': 'ENERCON E 126 7500',
136136 ... 'fetch_curve': 'power_coefficient_curve'}
137137 >>> e126 = wind_turbine.WindTurbine(**enerconE126)
138- >>> print(e126.power_coefficient_curve['values '][5])
138+ >>> print(e126.power_coefficient_curve['power coefficient '][5])
139139 0.423
140140 >>> print(e126.nominal_power)
141141 7500000
@@ -179,7 +179,11 @@ def restructure_data():
179179 data = np .vstack ((data , np .array (
180180 [float (col ), float (wpp_df [col ])])))
181181 data = np .delete (data , 0 , 0 )
182- df = pd .DataFrame (data , columns = ['wind_speed' , 'values' ])
182+ if self .fetch_curve == 'power_curve' :
183+ df = pd .DataFrame (data , columns = ['wind_speed' , 'power' ])
184+ if self .fetch_curve == 'power_coefficient_curve' :
185+ df = pd .DataFrame (data , columns = ['wind_speed' ,
186+ 'power coefficient' ])
183187 nominal_power = wpp_df ['p_nom' ].iloc [0 ]
184188 return df , nominal_power
185189 if self .fetch_curve == 'power_curve' :
0 commit comments