当前位置: 首页>>代码示例>>Python>>正文


Python Data.mdot方法代码示例

本文整理汇总了Python中SUAVE.Core.Data.mdot方法的典型用法代码示例。如果您正苦于以下问题:Python Data.mdot方法的具体用法?Python Data.mdot怎么用?Python Data.mdot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SUAVE.Core.Data的用法示例。


在下文中一共展示了Data.mdot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: energy_network

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import mdot [as 别名]

#.........这里部分代码省略.........
    # setup
    combustor.efficiency                = 0.99 
    combustor.alphac                    = 1.0     
    combustor.turbine_inlet_temperature = 1450
    combustor.pressure_ratio            = 0.95
    combustor.fuel_data                 = SUAVE.Attributes.Propellants.Jet_A()    
    
    # add to network
    turbofan.append(combustor)
 
    # ------------------------------------------------------------------
    #  Component 8 - Core Nozzle
    
    # instantiate
    nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle()   
    nozzle.tag = 'core_nozzle'
    
    # setup
    nozzle.polytropic_efficiency = 0.95
    nozzle.pressure_ratio        = 0.99    
    
    # add to network
    turbofan.append(nozzle)

    # ------------------------------------------------------------------
    #  Component 9 - Fan Nozzle
    
    # instantiate
    nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle()   
    nozzle.tag = 'fan_nozzle'

    # setup
    nozzle.polytropic_efficiency = 0.95
    nozzle.pressure_ratio        = 0.99    
    
    # add to network
    turbofan.append(nozzle)
    
    # ------------------------------------------------------------------
    #  Component 10 - Fan
    
    # instantiate
    fan = SUAVE.Components.Energy.Converters.Fan()   
    fan.tag = 'fan'

    # setup
    fan.polytropic_efficiency = 0.93
    fan.pressure_ratio        = 1.7    
    
    # add to network
    turbofan.append(fan)
    
    # ------------------------------------------------------------------
    #  Component 10 - Thrust
        
    # instantiate
    thrust = SUAVE.Components.Energy.Processes.Thrust()       
    thrust.tag ='thrust'
    
    # setup
    thrust.total_design = 42383.01818423
    
    # add to network
    turbofan.thrust = thrust    
  
    numerics = Data()    
    eta=1.0
    
    #size the turbofan
    turbofan_sizing(turbofan,0.8,10000.0)
    
    print("Design thrust ",turbofan.design_thrust)
    print("Sealevel static thrust ",turbofan.sealevel_static_thrust)
    
    
    results_design     = turbofan(state_sizing)
    results_off_design = turbofan(state_off_design)
    F                  = results_design.thrust_force_vector
    mdot               = results_design.vehicle_mass_rate
    F_off_design       = results_off_design.thrust_force_vector
    mdot_off_design    = results_off_design.vehicle_mass_rate
    

    #Test the model 
    
    #Specify the expected values
    expected        = Data()
    expected.thrust = 42360.88505056
    expected.mdot   = 0.76399257
    
    #error data function
    error              =  Data()
    error.thrust_error = (F[0][0] -  expected.thrust)/expected.thrust
    error.mdot_error   = (mdot[0][0]-expected.mdot)/expected.mdot
    print(error)
    
    for k,v in list(error.items()):
        assert(np.abs(v)<1e-6)    
    
    return
开发者ID:suavecode,项目名称:SUAVE,代码行数:104,代码来源:gasturbine_network.py

示例2: energy_network

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import mdot [as 别名]

#.........这里部分代码省略.........
    ram = SUAVE.Components.Energy.Converters.Ram()
    ram.tag = 'ram'
    
    # add to the network
    ramjet.append(ram)

    # ------------------------------------------------------------------
    #  Component 2 - Inlet Nozzle
    
    # instantiate
    inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle()
    inlet_nozzle.tag = 'inlet_nozzle'
    
    # setup
    inlet_nozzle.polytropic_efficiency      = 1.0
    inlet_nozzle.pressure_ratio             = 1.0
    inlet_nozzle.compressibility_effects    = True
    
    # add to network
    ramjet.append(inlet_nozzle)
      
    # ------------------------------------------------------------------
    #  Component 3 - Combustor
    
    # instantiate    
    combustor = SUAVE.Components.Energy.Converters.Combustor()   
    combustor.tag = 'combustor'
    
    # setup
    combustor.efficiency                = 1.0 
    combustor.turbine_inlet_temperature = 2400.
    combustor.pressure_ratio            = 1.0
    combustor.area_ratio                = 2.0
    combustor.fuel_data                 = SUAVE.Attributes.Propellants.Jet_A()  
    combustor.rayleigh_analyses         = True
    
    # add to network
    ramjet.append(combustor)

    # ------------------------------------------------------------------
    #  Component 4 - Core Nozzle
    
    # instantiate
    nozzle = SUAVE.Components.Energy.Converters.Supersonic_Nozzle()   
    nozzle.tag = 'core_nozzle'
    
    # setup
    nozzle.polytropic_efficiency = 1.0
    nozzle.pressure_ratio        = 1.0   
    
    # add to network
    ramjet.append(nozzle)

    # ------------------------------------------------------------------
    #  Component 5 - Thrust
    
    # instantiate
    thrust = SUAVE.Components.Energy.Processes.Thrust()       
    thrust.tag ='thrust'
    
    # setup
    thrust.total_design = ramjet.number_of_engines*169370.4652 * Units.N
    
    # add to network
    ramjet.thrust = thrust    

    #size the ramjet
    ramjet_sizing(ramjet,2.5,10000.0)
    
    print "Design thrust :",ramjet.design_thrust
    print "Sealevel static thrust :",ramjet.sealevel_static_thrust
    
    results_design     = ramjet(state_sizing)
    results_off_design = ramjet(state_off_design)
    F                  = results_design.thrust_force_vector
    mdot               = results_design.vehicle_mass_rate
    Isp                = results_design.specific_impulse
    F_off_design       = results_off_design.thrust_force_vector
    mdot_off_design    = results_off_design.vehicle_mass_rate
    Isp_off_design     = results_off_design.specific_impulse
    
    #Specify the expected values
    expected = Data()
    
    expected.thrust = 338740.93039999995
    expected.mdot   = 23.11959727
    expected.Isp    = 1494.05374047
    
    #error data function
    error =  Data()
    
    error.thrust_error = (F[0][0] -  expected.thrust)/expected.thrust
    error.mdot_error   = (mdot[0][0] - expected.mdot)/expected.mdot
    error.Isp_error    = (Isp[0][0]- expected.Isp)/expected.Isp
    print error
    
    for k,v in error.items():
        assert(np.abs(v)<1e-6)    
    
    return
开发者ID:michK,项目名称:SUAVE,代码行数:104,代码来源:ramjet_network.py

示例3: energy_network

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import mdot [as 别名]

#.........这里部分代码省略.........
    ram.tag = 'ram'
    
    # add to the network
    scramjet.append(ram)

    # ------------------------------------------------------------------
    #  Component 2 - Inlet Nozzle
    
    # instantiate
    inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle()
    inlet_nozzle.tag = 'inlet_nozzle'
    
    # setup
    inlet_nozzle.polytropic_efficiency      = 0.90
    inlet_nozzle.pressure_ratio             = 1.0
    inlet_nozzle.compressibility_effects    = 3.0
    inlet_nozzle.compression_levels         = 3.0
    inlet_nozzle.theta                      = [0.10472,0.122173,0.226893]
    
    # add to network
    scramjet.append(inlet_nozzle)
      
    # ------------------------------------------------------------------
    #  Component 3 - Combustor
    
    # instantiate    
    combustor = SUAVE.Components.Energy.Converters.Combustor()   
    combustor.tag = 'combustor'
    
    # setup
    combustor.efficiency                = 0.90 
    combustor.pressure_ratio            = 1.0
    combustor.area_ratio                = 2.0
    combustor.fuel_data                 = SUAVE.Attributes.Propellants.Liquid_H2()  
    combustor.burner_drag_coefficient   = 0.01
    combustor.fuel_equivalency_ratio    = 1.0
    
    # add to network
    scramjet.append(combustor)

    # ------------------------------------------------------------------
    #  Component 4 - Core Nozzle
    
    # instantiate
    nozzle = SUAVE.Components.Energy.Converters.Supersonic_Nozzle()   
    nozzle.tag = 'core_nozzle'
    
    # setup
    nozzle.polytropic_efficiency    = 0.9
    nozzle.pressure_expansion_ratio = 1.1
    
    # add to network
    scramjet.append(nozzle)

    # ------------------------------------------------------------------
    #  Component 5 - Thrust
    
    # instantiate
    thrust = SUAVE.Components.Energy.Processes.Thrust()       
    thrust.tag ='thrust'
    
    # setup
    thrust.total_design = scramjet.number_of_engines*180000.0 * Units.N
    
    # add to network
    scramjet.thrust = thrust    

    #size the ramjet
    scramjet_sizing(scramjet,size.mach_number,size.altitude)
    
    print("Design thrust :",scramjet.design_thrust)
    print("Sealevel static thrust :",scramjet.sealevel_static_thrust)
    
    results_design     = scramjet(state_sizing)
    results_off_design = scramjet(state_off_design)
    F                  = results_design.thrust_force_vector
    mdot               = results_design.vehicle_mass_rate
    Isp                = results_design.specific_impulse   
    F_off_design       = results_off_design.thrust_force_vector
    mdot_off_design    = results_off_design.vehicle_mass_rate
    Isp_off_design     = results_off_design.specific_impulse
    
    #Specify the expected values
    expected        = Data()
    expected.thrust = 180000.0
    expected.mdot   = 7.8394948
    expected.Isp    = 2356.0590883
    
    #error data function
    error =  Data()
    
    error.thrust_error = (F[0][0] -  expected.thrust)/expected.thrust
    error.mdot_error   = (mdot[0][0] - expected.mdot)/expected.mdot
    error.Isp_error    = (Isp[0][0]- expected.Isp)/expected.Isp
    print(error)
    
    for k,v in list(error.items()):
        assert(np.abs(v)<1e-6)    
    
    return
开发者ID:suavecode,项目名称:SUAVE,代码行数:104,代码来源:scramjet_network.py

示例4: energy_network

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import mdot [as 别名]

#.........这里部分代码省略.........
    #  Component 8 - Core Nozzle
    
    # instantiate
    nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle()   
    nozzle.tag = 'core_nozzle'
    
    # setup
    nozzle.polytropic_efficiency = 0.95
    nozzle.pressure_ratio        = 0.99    
    
    # add to network
    turbofan.append(nozzle)


    # ------------------------------------------------------------------
    #  Component 9 - Fan Nozzle
    
    # instantiate
    nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle()   
    nozzle.tag = 'fan_nozzle'

    # setup
    nozzle.polytropic_efficiency = 0.95
    nozzle.pressure_ratio        = 0.99    
    
    # add to network
    turbofan.append(nozzle)
    
    
    # ------------------------------------------------------------------
    #  Component 10 - Fan
    
    # instantiate
    fan = SUAVE.Components.Energy.Converters.Fan()   
    fan.tag = 'fan'

    # setup
    fan.polytropic_efficiency = 0.93
    fan.pressure_ratio        = 1.7    
    
    # add to network
    turbofan.append(fan)
    
    
    # ------------------------------------------------------------------
    #  Component 10 - Thrust
    
    # to compute thrust
    
    # instantiate
    thrust = SUAVE.Components.Energy.Processes.Thrust()       
    thrust.tag ='thrust'
    
    # setup
    thrust.total_design                       =42383.01818423
    
    # add to network
    turbofan.thrust = thrust    

    #bypass ratio  closer to fan
    
    numerics = Data()
    
    eta=1.0
    
    #size the turbofan
    turbofan_sizing(turbofan,0.8,10000.0)
    
    print "Design thrust ",turbofan.design_thrust
    print "Sealevel static thrust ",turbofan.sealevel_static_thrust
    
    
    results_design = turbofan(state_sizing)
    results_off_design=turbofan(state_off_design)
    F    = results_design.thrust_force_vector
    mdot = results_design.vehicle_mass_rate
    F_off_design=results_off_design.thrust_force_vector
    mdot_off_design = results_off_design.vehicle_mass_rate
    

    #Test the model 
    
    #Specify the expected values
    expected = Data()
    
    expected.thrust = 42383.01818423 
    expected.mdot =  0.7657905
    
    #error data function
    error =  Data()
    
    error.thrust_error = (F[0][0] -  expected.thrust)/expected.thrust
    error.mdot_error =  (mdot[0][0]-expected.mdot)/expected.mdot
    print error
    
    for k,v in error.items():
        assert(np.abs(v)<1e-4)    
    
    
    return
开发者ID:Aircraft-Design-UniNa,项目名称:SUAVE,代码行数:104,代码来源:gasturbine_network.py


注:本文中的SUAVE.Core.Data.mdot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。