File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def __init__(
176176 self .rotor_diameter = float (turbine_data ["rotor_diameter" ])
177177
178178 if self .rotor_diameter :
179- if self .hub_height <= 0.5 * self .rotor_diameter :
179+ if self .hub_height <= 0.5 * self .rotor_diameter :
180180 msg = "1/2rotor_diameter cannot be greater than hub_height"
181181 raise ValueError (msg )
182182
@@ -409,6 +409,29 @@ def get_turbine_data_from_file(turbine_type, path):
409409 return wpp_df
410410
411411
412+ def create_power_curve (wind_speed , power ):
413+ """
414+ A list, numpy.array, pandas.Series or other iterables can be passed to
415+ define the wind speed and the power output. Make sure that the order is
416+ not mutable because, values from both parameters will be used as value
417+ pairs.
418+
419+ Parameters
420+ ----------
421+ wind_speed : iterable
422+ A series of wind speed values in meter per second [m/s].
423+ power : iterable
424+ A series of power values in Watt [W].
425+
426+ Returns
427+ -------
428+ pandas.DataFrame
429+ """
430+ return pd .DataFrame (
431+ data = {"value" : power , "wind_speed" : wind_speed , }
432+ )
433+
434+
412435def load_turbine_data_from_oedb (schema = "supply" , table = "wind_turbine_library" ):
413436 r"""
414437 Loads turbine library from the OpenEnergy database (oedb).
You can’t perform that action at this time.
0 commit comments