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


Python Data.number_blades方法代码示例

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


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

示例1: main

# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import number_blades [as 别名]
def main():

    # ------------------------------------------------------------------
    #   Propulsor
    # ------------------------------------------------------------------
    
    # build network
    net = Solar_Network()
    net.number_motors = 1.
    net.nacelle_dia   = 0.2
    
    # Component 1 the Sun?
    sun = SUAVE.Components.Energy.Processes.Solar_Radiation()
    net.solar_flux = sun
    
    # Component 2 the solar panels
    panel = SUAVE.Components.Energy.Converters.Solar_Panel()
    panel.area                 = 100 * Units.m
    panel.efficiency           = 0.18
    panel.mass_properties.mass = panel.area*.600
    net.solar_panel            = panel
    
    # Component 3 the ESC
    esc = SUAVE.Components.Energy.Distributors.Electronic_Speed_Controller()
    esc.efficiency = 0.95 # Gundlach for brushless motors
    net.esc       = esc
    
    # Component 5 the Propeller
    
    #Propeller design specs
    design_altitude = 0.0 * Units.km
    Velocity        = 10.0  # freestream m/s
    RPM             = 5887
    Blades          = 2.0
    Radius          = .4064
    Hub_Radius      = 0.05
    Design_Cl       = 0.7
    Thrust          = 0.0 #Specify either thrust or power to design for
    Power           = 7500.  #Specify either thrust or power to design for
    
    # Design the Propeller
    prop_attributes = Data()
    prop_attributes.number_blades       = Blades 
    prop_attributes.freestream_velocity = Velocity
    prop_attributes.angular_velocity    = RPM*(2.*np.pi/60.0)
    prop_attributes.tip_radius          = Radius
    prop_attributes.hub_radius          = Hub_Radius
    prop_attributes.design_Cl           = Design_Cl 
    prop_attributes.design_altitude     = design_altitude
    prop_attributes.design_thrust       = Thrust
    prop_attributes.design_power        = Power
    prop_attributes                     = propeller_design(prop_attributes)
    
    # Create and attach this propeller
    prop                 = SUAVE.Components.Energy.Converters.Propeller()
    prop.prop_attributes = prop_attributes
    net.propeller        = prop
    
    # Component 4 the Motor
    motor = SUAVE.Components.Energy.Converters.Motor()
    motor.resistance           = 0.01
    motor.no_load_current      = 8.0
    motor.speed_constant       = 140.*(2.*np.pi/60.) # RPM/volt converted to rad/s     
    motor.propeller_radius     = prop.prop_attributes.tip_radius
    motor.propeller_Cp         = prop.prop_attributes.Cp
    motor.gear_ratio           = 1.
    motor.gearbox_efficiency   = 1.
    motor.expected_current     = 260.
    motor.mass_properties.mass = 2.0
    net.motor                  = motor   
    
    # Component 6 the Payload
    payload = SUAVE.Components.Energy.Peripherals.Payload()
    payload.power_draw           = 0. #Watts 
    payload.mass_properties.mass = 0. * Units.kg
    net.payload                  = payload
    
    # Component 7 the Avionics
    avionics = SUAVE.Components.Energy.Peripherals.Avionics()
    avionics.power_draw = 0. #Watts  
    net.avionics        = avionics      
    
    # Component 8 the Battery
    bat = SUAVE.Components.Energy.Storages.Battery()
    bat.mass_properties.mass = 50.  #kg
    bat.type = 'Li-Ion'
    bat.resistance = 0.0
    net.battery = bat
    
    #Component 9 the system logic controller and MPPT
    logic = SUAVE.Components.Energy.Distributors.Solar_Logic()
    logic.system_voltage  = 50.0
    logic.MPPT_efficiency = 0.95
    net.solar_logic       = logic
    
    # Setup the conditions to run the network
    conditions                 = Data()
    conditions.propulsion      = Data()
    conditions.freestream      = Data()
    conditions.frames          = Data()
#.........这里部分代码省略.........
开发者ID:designToolDeveloper,项目名称:SUAVE,代码行数:103,代码来源:test_solar_network.py

示例2: define_vehicle

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

#.........这里部分代码省略.........
  
    # add to vehicle
    vehicle.append_component(wing)  
    
     #------------------------------------------------------------------
     # Propulsor
     #------------------------------------------------------------------
    
    # build network
    net = Solar_Network()
    net.number_motors = 1.
    net.nacelle_dia   = 0.2
    
    # Component 1 the Sun?
    sun = SUAVE.Components.Energy.Processes.Solar_Radiation()
    net.solar_flux = sun
    
    # Component 2 the solar panels
    panel = SUAVE.Components.Energy.Converters.Solar_Panel()
    panel.area                 = vehicle.reference_area
    panel.efficiency           = 0.2
    panel.mass_properties.mass = panel.area*0.6
    net.solar_panel            = panel
    
    # Component 3 the ESC
    esc = SUAVE.Components.Energy.Distributors.Electronic_Speed_Controller()
    esc.efficiency = 0.95 # Gundlach for brushless motors
    net.esc       = esc
    
    # Component 5 the Propeller
    
    # Design the Propeller
    prop_attributes = Data()
    prop_attributes.number_blades       = 2.0
    prop_attributes.freestream_velocity = 50.0 # freestream m/s
    prop_attributes.angular_velocity    = 300.*(2.*np.pi/60.0)
    prop_attributes.tip_radius          = 4.25
    prop_attributes.hub_radius          = 0.0508
    prop_attributes.design_Cl           = 0.7
    prop_attributes.design_altitude     = 23.0 * Units.km
    prop_attributes.design_thrust       = 0.0
    prop_attributes.design_power        = 10000.0
    prop_attributes                     = propeller_design(prop_attributes)
    
    prop = SUAVE.Components.Energy.Converters.Propeller()
    prop.prop_attributes = prop_attributes
    net.propeller        = prop

    # Component 4 the Motor
    motor = SUAVE.Components.Energy.Converters.Motor()
    motor.resistance           = 0.008
    motor.no_load_current      = 4.5
    motor.speed_constant       = 120.*(2.*np.pi/60.) # RPM/volt converted to rad/s     
    motor.propeller_radius     = prop.prop_attributes.tip_radius
    motor.propeller_Cp         = prop.prop_attributes.Cp
    motor.gear_ratio           = 20. # Gear ratio
    motor.gearbox_efficiency   = .98 # Gear box efficiency
    motor.expected_current     = 160. # Expected current
    motor.mass_properties.mass = 2.0
    net.motor                  = motor    
    
    # Component 6 the Payload
    payload = SUAVE.Components.Energy.Peripherals.Payload()
    payload.power_draw           = 100. #Watts 
    payload.mass_properties.mass = 25.0 * Units.kg
    net.payload                  = payload
开发者ID:designToolDeveloper,项目名称:SUAVE,代码行数:70,代码来源:test_solar_uav_mission.py

示例3: main

# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import number_blades [as 别名]
def main():
    
    # This script could fail if either the design or analysis scripts fail,
    # in case of failure check both. The design and analysis powers will 
    # differ because of karman-tsien compressibility corrections in the 
    # analysis scripts
    
    # Design the Propeller
    prop_attributes = Data()
    prop_attributes.number_blades       = 2.0 
    prop_attributes.freestream_velocity = 50.0
    prop_attributes.angular_velocity    = 2000.*(2.*np.pi/60.0)
    prop_attributes.tip_radius          = 1.5
    prop_attributes.hub_radius          = 0.05
    prop_attributes.design_Cl           = 0.7 
    prop_attributes.design_altitude     = 0.0 * Units.km
    prop_attributes.design_thrust       = 0.0
    prop_attributes.design_power        = 7000.
    prop_attributes                     = propeller_design(prop_attributes)    

    # Find the operating conditions
    atmosphere = SUAVE.Attributes.Atmospheres.Earth.US_Standard_1976()
    p, T, rho, a, mu = atmosphere.compute_values(prop_attributes.design_altitude)
    
    V = prop_attributes.freestream_velocity
    
    conditions = Data()
    conditions.freestream = Data()
    conditions.propulsion = Data()
    conditions.freestream.density        = np.array([rho])
    conditions.freestream.viscosity      = np.array([mu])
    conditions.freestream.velocity       = np.array([[V]])
    conditions.freestream.speed_of_sound = np.array([a])
    conditions.freestream.temperature    = np.array([T])
    conditions.propulsion.throttle       = np.array([[1.0]])
    
    # Create and attach this propeller
    prop                 = SUAVE.Components.Energy.Converters.Propeller()
    prop.prop_attributes = prop_attributes    
    prop.inputs.omega    = prop_attributes.angular_velocity
    
    F, Q, P, Cplast = prop.spin(conditions)
    
    # Truth values
    F_truth      = 166.41590262
    Q_truth      = 45.21732911
    P_truth      = 9470.2952633 # Over 9000!
    Cplast_truth = 0.00085898
    
    error = Data()
    error.Thrust  = np.max(np.abs(F-F_truth))
    error.Power   = np.max(np.abs(P-P_truth))
    error.Torque  = np.max(np.abs(Q-Q_truth))
    error.Cp      = np.max(np.abs(Cplast-Cplast_truth))   
    
    print  error
    
    for k,v in error.items():
        assert(np.abs(v)<0.001)
     
    return
开发者ID:designToolDeveloper,项目名称:SUAVE,代码行数:63,代码来源:test_propeller.py


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