def owtg_to_wtpc(owtg_file): ''' convert OWTG turbine definition file for openWind to FUSED-Wind ExtendedWindTurbinePowerCurveVT ''' wtpc = ExtendedWindTurbinePowerCurveVT() tree = rwTurbXML.parseOWTG(owtg_file) if tree is None: sys.stderr.write('\n*** ERROR: could not parse turbine file "{:}"\n\n"'.format(owtg_file)) return None vels, pwrs = rwTurbXML.getPwrTbls(tree) wtpc.power_curve = np.array([vels, pwrs]).transpose() vels, thrusts = rwTurbXML.getThrustTbls(tree) wtpc.c_t_curve = np.array([vels, thrusts]).transpose() vels, rpms = rwTurbXML.getRPMTbls(tree) wtpc.rpm_curve = np.array([vels, rpms]).transpose() name, capKW, hubHt, rtrDiam = rwTurbXML.getTurbParams(tree) wtpc.hub_height = hubHt wtpc.rotor_diameter = rtrDiam wtpc.power_rating = 1000.0 * capKW return wtpc
def dummy_wt_list(): wtl = ExtendedWindTurbinePowerCurveVT() nv = 20 wtl.hub_height = 100.0 wtl.rotor_diameter = 90.0 wtl.power_rating = 3.0 wtl.rpm_curve = [[float(i), 10.0] for i in range(nv)] wtl.pitch_curve = [[float(i), 0.0] for i in range(nv)] wtl.c_t_curve = [[float(i), 10.0] for i in range(nv)] wtl.power_curve = [[float(i), 10.0] for i in range(nv)] return wtl
def dummy_wt_list(): wtl = ExtendedWindTurbinePowerCurveVT() nv = 20 wtl.hub_height = 100.0 wtl.rotor_diameter = 90.0 wtl.power_rating = 3.0 wtl.rpm_curve = [ [float(i), 10.0] for i in range(nv) ] wtl.pitch_curve = [ [float(i), 0.0] for i in range(nv) ] wtl.c_t_curve = [ [float(i), 10.0] for i in range(nv) ] wtl.power_curve = [ [float(i), 10.0] for i in range(nv) ] return wtl