def page_viewer(prob, point):
    flow_stations = [
        'fc.Fl_O', 'inlet.Fl_O', 'fan.Fl_O', 'bypass_duct.Fl_O',
        'splitter.Fl_O2', 'splitter.Fl_O1', 'ic_duct.Fl_O', 'hpc.Fl_O',
        'duct_3.Fl_O', 'bleed_3.Fl_O', 'burner.Fl_O', 'hpt.Fl_O',
        'it_duct.Fl_O', 'lpt.Fl_O', 'mixer.Fl_O', 'augmentor.Fl_O',
        'nozzle.Fl_O'
    ]

    compressors = ['fan', 'hpc']
    burners = ['burner', 'augmentor']
    turbines = ['hpt', 'lpt']
    shafts = ['hp_shaft', 'lp_shaft']

    MN = prob[point + '.fc.conv.fs.exit_static.statics.ps_resid.MN'][0]
    alt = prob[point + '.fc.ambient.readAtmTable.alt'][0]
    print('*' * 100)
    print('* ' + ' ' * 10 + point + "   MN: {}    alt: {} ft".format(MN, alt))
    print('*' * 100)

    print_perf(prob, point)

    print_flow_station(prob, [point + "." + fl for fl in flow_stations])
    print_compressor(prob, [point + "." + c for c in compressors])
    print_burner(prob, [point + "." + b for b in burners])
    print_turbine(prob, [point + "." + turb for turb in turbines])
    print_mixer(prob, [point + '.' + 'mixer'])
    print_nozzle(prob, [point + '.nozzle'])
    print_shaft(prob, [point + "." + s for s in shafts])
    print_bleed(prob, [
        point + '.hpc.cool1', point + '.hpc.cool2',
        point + '.bleed_3.cust_bleed'
    ])
示例#2
0
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)

    print_flow_station(prob,[point+ "."+fl for fl in flow_stations])
    print_compressor(prob,[point+ "." + c for c in compressors])
    # print_splitter(prob,[point+ ".splitter" ])
    print_burner(prob,[point+ "." + b for b in burners])
    print_turbine(prob,[point+ "." + turb for turb in turbines])
    print_mixer(prob, [point+'.mixer'])
    print_nozzle(prob, [point + '.mixed_nozz'])
    print_shaft(prob, [point+ "." + s for s in shafts])
    print_bleed(prob, [point+'.hpc.cool1', point+'.bld3.cool3'])
示例#3
0
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     PSFC ")
    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.PSFC']))

    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]
    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]
    print_compressor(prob, comp_full_names, file=file)

    print_burner(prob, [f'{pt}.burner'])

    turb_names = ['hpt', 'lpt']
    turb_full_names = [f'{pt}.{t}' for t in turb_names]
    print_turbine(prob, turb_full_names, file=file)

    noz_names = ['nozzle']
    noz_full_names = [f'{pt}.{n}' for n in noz_names]
    print_nozzle(prob, noz_full_names, file=file)

    shaft_names = ['hp_shaft', 'lp_shaft']
    shaft_full_names = [f'{pt}.{s}' for s in shaft_names]
    print_shaft(prob, shaft_full_names, file=file)

    bleed_names = ['bld25.cool1', 'bld25.cool2', 'bld3.cool3', 'bld3.cool4']
    bleed_full_names = [f'{pt}.{b}' for b in bleed_names]
    print_bleed(prob, bleed_full_names, file=file)
示例#4
0
def viewer(prob, pt, file=sys.stdout): 
    """
    print a report of all the relevant cycle properties
    """

    if pt == 'DESIGN':
        MN = prob['DESIGN.fc.Fl_O:stat:MN']
        LPT_PR = prob['DESIGN.balance.lpt_PR']
        HPT_PR = prob['DESIGN.balance.hpt_PR']
        FAR = prob['DESIGN.balance.FAR']
    else:
        MN = prob[pt+'.fc.Fl_O:stat:MN']
        LPT_PR = prob[pt+'.lpt.PR']
        HPT_PR = prob[pt+'.hpt.PR']
        FAR = prob[pt+'.balance.FAR']

    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" %(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']), file=file, flush=True)
    

    fs_names = ['fc.Fl_O', 'inlet.Fl_O', 'fan.Fl_O', 'splitter.Fl_O1', 'splitter.Fl_O2', 
                'duct4.Fl_O', 'lpc.Fl_O', 'duct6.Fl_O', 'hpc.Fl_O', 'bld3.Fl_O', 'burner.Fl_O', 
                'hpt.Fl_O', 'duct11.Fl_O', 'lpt.Fl_O', 'duct13.Fl_O', 'core_nozz.Fl_O', 'byp_bld.Fl_O', 
                'duct15.Fl_O', 'byp_nozz.Fl_O']
    fs_full_names = [f'{pt}.{fs}' for fs in fs_names]
    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]
    print_compressor(prob, comp_full_names, file=file)

    print_burner(prob, [f'{pt}.burner'])

    turb_names = ['hpt', 'lpt']
    turb_full_names = [f'{pt}.{t}' for t in turb_names]
    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]
    print_nozzle(prob, noz_full_names, file=file)

    shaft_names = ['hp_shaft', 'lp_shaft']
    shaft_full_names = [f'{pt}.{s}' for s in shaft_names]
    print_shaft(prob, shaft_full_names, file=file)

    bleed_names = ['hpc.cool1', 'hpc.cool2', 'bld3.cool3', 'bld3.cool4', 'hpc.cust', 'byp_bld.bypBld']
    bleed_full_names = [f'{pt}.{b}' for b in bleed_names]
    print_bleed(prob, bleed_full_names, file=file)
示例#5
0
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     PSFC ")
    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.PSFC']))

    fs_names = [
        'fc.Fl_O', 'inlet.Fl_O', 'comp.Fl_O', 'burner.Fl_O', 'turb.Fl_O',
        'pt.Fl_O', 'nozz.Fl_O'
    ]
    fs_full_names = [f'{pt}.{fs}' for fs in fs_names]
    print_flow_station(prob, fs_full_names, file=file)

    comp_names = ['comp']
    comp_full_names = [f'{pt}.{c}' for c in comp_names]
    print_compressor(prob, comp_full_names, file=file)

    print_burner(prob, [f'{pt}.burner'])

    turb_names = ['turb', 'pt']
    turb_full_names = [f'{pt}.{t}' for t in turb_names]
    print_turbine(prob, turb_full_names, file=file)

    noz_names = ['nozz']
    noz_full_names = [f'{pt}.{n}' for n in noz_names]
    print_nozzle(prob, noz_full_names, file=file)

    shaft_names = ['HP_shaft', 'LP_shaft']
    shaft_full_names = [f'{pt}.{s}' for s in shaft_names]
    print_shaft(prob, shaft_full_names, file=file)