def page_viewer(point): flow_stations = [ 'fc.Fl_O', 'inlet.Fl_O', 'inlet_duct.Fl_O', 'fan.Fl_O', 'bypass_duct.Fl_O', 'splitter.Fl_O2', 'splitter.Fl_O1', 'splitter_core_duct.Fl_O', 'lpc.Fl_O', 'lpc_duct.Fl_O', 'hpc.Fl_O', 'bld3.Fl_O', 'burner.Fl_O', 'hpt.Fl_O', 'hpt_duct.Fl_O', 'lpt_duct.Fl_O', 'mixer.Fl_O', 'mixer_duct.Fl_O', 'afterburner.Fl_O', 'mixed_nozz.Fl_O' ] compressors = ['fan', 'hpc', 'lpc'] burners = ['burner', 'afterburner'] turbines = ['hpt', 'lpt'] shafts = ['hp_shaft', 'lp_shaft'] print('*' * 80) print('* ' + ' ' * 10 + point) print('*' * 80) print_perf(prob, point) pyc.print_flow_station(prob, [point + "." + fl for fl in flow_stations]) pyc.print_compressor(prob, [point + "." + c for c in compressors]) # print_splitter(prob,[point+ ".splitter" ]) pyc.print_burner(prob, [point + "." + b for b in burners]) pyc.print_turbine(prob, [point + "." + turb for turb in turbines]) pyc.print_mixer(prob, [point + '.mixer']) pyc.print_nozzle(prob, [point + '.mixed_nozz']) pyc.print_shaft(prob, [point + "." + s for s in shafts]) pyc.print_bleed(prob, [point + '.hpc', point + '.bld3'])
def viewer(prob, pt, file=sys.stdout): """ print a report of all the relevant cycle properties """ summary_data = (prob[pt + '.fc.Fl_O:stat:MN'], prob[pt + '.fc.alt'], prob[pt + '.inlet.Fl_O:stat:W'], prob[pt + '.perf.Fn'], prob[pt + '.perf.Fg'], prob[pt + '.inlet.F_ram'], prob[pt + '.perf.OPR'], prob[pt + '.perf.PSFC']) print(file=file, flush=True) print(file=file, flush=True) print(file=file, flush=True) print( "----------------------------------------------------------------------------", file=file, flush=True) print(" POINT:", pt, file=file, flush=True) print( "----------------------------------------------------------------------------", file=file, flush=True) print(" PERFORMANCE CHARACTERISTICS", file=file, flush=True) print( " Mach Alt W Fn Fg Fram OPR PSFC ") print(" %7.5f %7.1f %7.3f %7.1f %7.1f %7.1f %7.3f %7.5f" % summary_data) fs_names = [ 'fc.Fl_O', 'inlet.Fl_O', 'duct1.Fl_O', 'lpc.Fl_O', 'icduct.Fl_O', 'hpc_axi.Fl_O', 'bld25.Fl_O', 'hpc_centri.Fl_O', 'bld3.Fl_O', 'duct6.Fl_O', 'burner.Fl_O', 'hpt.Fl_O', 'duct43.Fl_O', 'lpt.Fl_O', 'itduct.Fl_O', 'pt.Fl_O', 'duct12.Fl_O', 'nozzle.Fl_O' ] fs_full_names = [f'{pt}.{fs}' for fs in fs_names] pyc.print_flow_station(prob, fs_full_names, file=file) comp_names = ['lpc', 'hpc_axi', 'hpc_centri'] comp_full_names = [f'{pt}.{c}' for c in comp_names] pyc.print_compressor(prob, comp_full_names, file=file) pyc.print_burner(prob, [f'{pt}.burner']) turb_names = ['hpt', 'lpt', 'pt'] turb_full_names = [f'{pt}.{t}' for t in turb_names] pyc.print_turbine(prob, turb_full_names, file=file) noz_names = ['nozzle'] noz_full_names = [f'{pt}.{n}' for n in noz_names] pyc.print_nozzle(prob, noz_full_names, file=file) shaft_names = ['hp_shaft', 'ip_shaft', 'lp_shaft'] shaft_full_names = [f'{pt}.{s}' for s in shaft_names] pyc.print_shaft(prob, shaft_full_names, file=file) bleed_names = ['bld25', 'bld3'] bleed_full_names = [f'{pt}.{b}' for b in bleed_names] pyc.print_bleed(prob, bleed_full_names, file=file)
def viewer(prob, pt, file=sys.stdout): """ print a report of all the relevant cycle properties """ print(file=file, flush=True) print(file=file, flush=True) print(file=file, flush=True) print("----------------------------------------------------------------------------", file=file, flush=True) print(" POINT:", pt, file=file, flush=True) print("----------------------------------------------------------------------------", file=file, flush=True) print(" PERFORMANCE CHARACTERISTICS", file=file, flush=True) print(" Mach Alt W Fn Fg Fram OPR TSFC ", file=file, flush=True) print(" %7.5f %7.1f %7.3f %7.1f %7.1f %7.1f %7.3f %7.5f" %(prob[pt+'.fc.Fl_O:stat:MN'], prob[pt+'.fc.alt'],prob[pt+'.inlet.Fl_O:stat:W'],prob[pt+'.perf.Fn'],prob[pt+'.perf.Fg'],prob[pt+'.inlet.F_ram'],prob[pt+'.perf.OPR'],prob[pt+'.perf.TSFC']), file=file, flush=True) fs_names = ['fc.Fl_O', 'inlet.Fl_O', 'duct1.Fl_O', 'comp.Fl_O', 'burner.Fl_O', 'turb.Fl_O', 'ab.Fl_O','nozz.Fl_O'] fs_full_names = [f'{pt}.{fs}' for fs in fs_names] pyc.print_flow_station(prob, fs_full_names, file=file) comp_names = ['comp'] comp_full_names = [f'{pt}.{c}' for c in comp_names] pyc.print_compressor(prob, comp_full_names, file=file) pyc.print_burner(prob, [f'{pt}.burner']) turb_names = ['turb'] turb_full_names = [f'{pt}.{t}' for t in turb_names] pyc.print_turbine(prob, turb_full_names, file=file) noz_names = ['nozz'] noz_full_names = [f'{pt}.{n}' for n in noz_names] pyc.print_nozzle(prob, noz_full_names, file=file) shaft_names = ['shaft'] shaft_full_names = [f'{pt}.{s}' for s in shaft_names] pyc.print_shaft(prob, shaft_full_names, file=file) bleed_names = ['comp'] bleed_full_names = [f'{pt}.{b}' for b in bleed_names] pyc.print_bleed(prob, bleed_full_names, file=file)
def viewer(prob, pt, file=sys.stdout): """ print a report of all the relevant cycle properties """ summary_data = (prob[pt + '.fc.Fl_O:stat:MN'], prob[pt + '.fc.alt'], prob[pt + '.inlet.Fl_O:stat:W'], prob[pt + '.perf.Fn'], prob[pt + '.perf.Fg'], prob[pt + '.inlet.F_ram'], prob[pt + '.perf.OPR'], prob[pt + '.perf.TSFC'], prob[pt + '.splitter.BPR']) print(file=file, flush=True) print(file=file, flush=True) print(file=file, flush=True) print( "----------------------------------------------------------------------------", file=file, flush=True) print(" POINT:", pt, file=file, flush=True) print( "----------------------------------------------------------------------------", file=file, flush=True) print(" PERFORMANCE CHARACTERISTICS", file=file, flush=True) print( " Mach Alt W Fn Fg Fram OPR TSFC BPR ", file=file, flush=True) print(" %7.5f %7.1f %7.3f %7.1f %7.1f %7.1f %7.3f %7.5f %7.3f" % summary_data, file=file, flush=True) fs_names = [ 'fc.Fl_O', 'inlet.Fl_O', 'fan.Fl_O', 'splitter.Fl_O1', 'duct2.Fl_O', 'lpc.Fl_O', 'bld25.Fl_O', 'duct25.Fl_O', 'hpc.Fl_O', 'bld3.Fl_O', 'burner.Fl_O', 'hpt.Fl_O', 'duct45.Fl_O', 'lpt.Fl_O', 'duct5.Fl_O', 'core_nozz.Fl_O', 'splitter.Fl_O2', 'byp_bld.Fl_O', 'duct17.Fl_O', 'byp_nozz.Fl_O' ] fs_full_names = [f'{pt}.{fs}' for fs in fs_names] pyc.print_flow_station(prob, fs_full_names, file=file) comp_names = ['fan', 'lpc', 'hpc'] comp_full_names = [f'{pt}.{c}' for c in comp_names] pyc.print_compressor(prob, comp_full_names, file=file) pyc.print_burner(prob, [f'{pt}.burner']) turb_names = ['hpt', 'lpt'] turb_full_names = [f'{pt}.{t}' for t in turb_names] pyc.print_turbine(prob, turb_full_names, file=file) noz_names = ['core_nozz', 'byp_nozz'] noz_full_names = [f'{pt}.{n}' for n in noz_names] pyc.print_nozzle(prob, noz_full_names, file=file) shaft_names = ['hp_shaft', 'lp_shaft', 'fan_shaft'] shaft_full_names = [f'{pt}.{s}' for s in shaft_names] pyc.print_shaft(prob, shaft_full_names, file=file) bleed_names = ['hpc', 'bld3', 'bld3', 'bld25'] bleed_full_names = [f'{pt}.{b}' for b in bleed_names] pyc.print_bleed(prob, bleed_full_names, file=file)