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


Python Data.propulsion方法代码示例

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


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

示例1: main

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import propulsion [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.Analyses.Atmospheric.US_Standard_1976()
    atmosphere_conditions =  atmosphere.compute_values(prop_attributes.design_altitude)
    
    V = prop_attributes.freestream_velocity
    
    conditions = Data()
    conditions.freestream = Data()
    conditions.propulsion = Data()
    conditions.freestream.update(atmosphere_conditions)
    conditions.freestream.dynamic_viscosity = atmosphere_conditions.dynamic_viscosity
    conditions.freestream.velocity = np.array([[V]])
    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 'Errors:'
    print  error
    
    for k,v in error.items():
        assert(np.abs(v)<0.001)
     
    return
开发者ID:Aircraft-Design-UniNa,项目名称:SUAVE,代码行数:62,代码来源:test_propeller.py

示例2: evaluate_thrust

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import propulsion [as 别名]
 def evaluate_thrust(self,state):
     """ Calculate thrust given the current state of the vehicle
 
         Assumptions:
         Caps the throttle at 110% and linearly interpolates thrust off that
 
         Source:
         N/A
 
         Inputs:
         state [state()]
 
         Outputs:
         results.thrust_force_vector [Newtons]
         results.vehicle_mass_rate   [kg/s]
         conditions.propulsion:
             rpm_lift                 [radians/sec]
             rpm _forward             [radians/sec]
             current_lift             [amps]
             current_forward          [amps]
             battery_draw             [watts]
             battery_energy           [joules]
             voltage_open_circuit     [volts]
             voltage_under_load       [volts]
             motor_torque_lift        [N-M]
             motor_torque_forward     [N-M]
             propeller_torque_lift    [N-M]
             propeller_torque_forward [N-M]
 
         Properties Used:
         Defaulted values
     """          
     
     # unpack
     conditions        = state.conditions
     numerics          = state.numerics
     motor_lift        = self.motor_lift 
     motor_forward     = self.motor_forward
     propeller_lift    = self.propeller_lift 
     propeller_forward = self.propeller_forward
     esc_lift          = self.esc_lift
     esc_forward       = self.esc_forward        
     avionics          = self.avionics
     payload           = self.payload
     battery           = self.battery
     num_lift          = self.number_of_engines_lift
     num_forward       = self.number_of_engines_forward
     
     ###
     # Setup batteries and ESC's
     ###
     
     # Set battery energy
     battery.current_energy = conditions.propulsion.battery_energy    
     
     volts = state.unknowns.battery_voltage_under_load   
     volts[volts>self.voltage] = self.voltage
     
     # ESC Voltage
     esc_lift.inputs.voltagein    = volts      
     esc_forward.inputs.voltagein = volts 
     
     ###
     # Evaluate thrust from the forward propulsors
     ###
     
     # Throttle the voltage
     esc_forward.voltageout(conditions)       
     # link
     motor_forward.inputs.voltage = esc_forward.outputs.voltageout
     
     # Run the motor
     motor_forward.omega(conditions)
     # link
     propeller_forward.inputs.omega =  motor_forward.outputs.omega
     propeller_forward.thrust_angle = self.thrust_angle_forward   
     
     # Run the propeller
     F_forward, Q_forward, P_forward, Cp_forward = propeller_forward.spin(conditions)
         
     # Check to see if magic thrust is needed, the ESC caps throttle at 1.1 already
     eta = conditions.propulsion.throttle[:,0,None]
     P_forward[eta>1.0] = P_forward[eta>1.0]*eta[eta>1.0]
     F_forward[eta>1.0] = F_forward[eta>1.0]*eta[eta>1.0]        
     
     # Run the motor for current
     motor_forward.current(conditions)  
     # link
     esc_forward.inputs.currentout =  motor_forward.outputs.current     
     
     # Run the esc
     esc_forward.currentin(conditions)        
    
     ###
     # Evaluate thrust from the lift propulsors
     ###
     
     # Make a new set of konditions, since there are differences for the esc and motor
     konditions                 = Data()
     konditions.propulsion      = Data()
#.........这里部分代码省略.........
开发者ID:suavecode,项目名称:SUAVE,代码行数:103,代码来源:Lift_Forward_Propulsor.py

示例3: main

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import propulsion [as 别名]
def main():
  
    vehicle = vehicle_setup()    
    weight = Tube_Wing.empty(vehicle)
    
    # regression values    
    actual = Data()
    actual.payload         = 27349.9081525 #includes cargo #17349.9081525 #without cargo
    actual.pax             = 15036.587065500002
    actual.bag             = 2313.3210870000003
    actual.fuel            = 12977.803363592691 #includes cargo #22177.6377131 #without cargo
    actual.empty           = 38688.08848390731
    actual.wing            = 6649.709658738429
    actual.fuselage        = 6642.061164271899
    actual.propulsion      = 6838.185174956626
    actual.landing_gear    = 3160.632
    actual.systems         = 13479.10479056802
    actual.wt_furnish      = 6431.80372889
    actual.horizontal_tail = 1037.7414196819743
    actual.vertical_tail   = 629.0387683502595
    actual.rudder          = 251.61550734010382
    
    # error calculations
    error                 = Data()
    error.payload         = (actual.payload - weight.payload)/actual.payload
    error.pax             = (actual.pax - weight.pax)/actual.pax
    error.bag             = (actual.bag - weight.bag)/actual.bag
    error.fuel            = (actual.fuel - weight.fuel)/actual.fuel
    error.empty           = (actual.empty - weight.empty)/actual.empty
    error.wing            = (actual.wing - weight.wing)/actual.wing
    error.fuselage        = (actual.fuselage - weight.fuselage)/actual.fuselage
    error.propulsion      = (actual.propulsion - weight.propulsion)/actual.propulsion
    error.landing_gear    = (actual.landing_gear - weight.landing_gear)/actual.landing_gear
    error.systems         = (actual.systems - weight.systems)/actual.systems
    error.wt_furnish      = (actual.wt_furnish - weight.systems_breakdown.furnish)/actual.wt_furnish
    error.horizontal_tail = (actual.horizontal_tail - weight.horizontal_tail)/actual.horizontal_tail
    error.vertical_tail   = (actual.vertical_tail - weight.vertical_tail)/actual.vertical_tail
    error.rudder          = (actual.rudder - weight.rudder)/actual.rudder
    
    print('Results (kg)')
    print(weight)
    
    print('Relative Errors')
    print(error)  
      
    for k,v in list(error.items()):
        assert(np.abs(v)<1E-6)    
   
    #General Aviation weights; note that values are taken from Raymer,
    #but there is a huge spread among the GA designs, so individual components
    #differ a good deal from the actual design
   
    vehicle        = vehicle_setup_general_aviation()
    GTOW           = vehicle.mass_properties.max_takeoff
    weight         = General_Aviation.empty(vehicle)
    weight.fuel    = vehicle.fuel.mass_properties.mass 
    actual         = Data()
    actual.bag     = 0.
    actual.empty   = 618.485310343
    actual.fuel    = 144.69596603

    actual.wing            = 124.673093906
    actual.fuselage        = 119.522072873
    actual.propulsion      = 194.477769922 #includes power plant and propeller, does not include fuel system
    actual.landing_gear    = 44.8033840543+5.27975390045
    actual.furnishing      = 37.8341395817
    actual.electrical      = 36.7532226254
    actual.control_systems = 14.8331955546
    actual.fuel_systems    = 15.6859717453
    actual.systems         = 108.096549345

    error                 = Data()
    error.fuel            = (actual.fuel - weight.fuel)/actual.fuel
    error.empty           = (actual.empty - weight.empty)/actual.empty
    error.wing            = (actual.wing - weight.wing)/actual.wing
    error.fuselage        = (actual.fuselage - weight.fuselage)/actual.fuselage
    error.propulsion      = (actual.propulsion - weight.propulsion)/actual.propulsion
    error.landing_gear    = (actual.landing_gear - (weight.landing_gear_main+weight.landing_gear_nose))/actual.landing_gear
    error.furnishing      = (actual.furnishing-weight.systems_breakdown.furnish)/actual.furnishing
    error.electrical      = (actual.electrical-weight.systems_breakdown.electrical)/actual.electrical
    error.control_systems = (actual.control_systems-weight.systems_breakdown.control_systems)/actual.control_systems
    error.fuel_systems    = (actual.fuel_systems-weight.systems_breakdown.fuel_system)/actual.fuel_systems
    error.systems         = (actual.systems - weight.systems)/actual.systems

    print('actual.systems=', actual.systems)
    print('General Aviation Results (kg)')
    print(weight)

    print('Relative Errors')
    print(error)  

    for k,v in list(error.items()):
        assert(np.abs(v)<1e-6)    

    # BWB WEIGHTS
    vehicle = bwb_setup()    
    weight  = BWB.empty(vehicle)
            
    # regression values    
    actual = Data()
#.........这里部分代码省略.........
开发者ID:suavecode,项目名称:SUAVE,代码行数:103,代码来源:weights.py

示例4: main

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import propulsion [as 别名]
def main():
  
    vehicle = vehicle_setup()    
    weight = Tube_Wing.empty(vehicle)
    
    # regression values    
    actual = Data()
    actual.payload         = 27349.9081525 #includes cargo #17349.9081525 #without cargo
    actual.pax             = 15036.587065500002
    actual.bag             = 2313.3210870000003
    actual.fuel            = 12990.957450008464 #includes cargo #22177.6377131 #without cargo
    actual.empty           = 38674.934397491539
    actual.wing            = 6649.7096587384294
    actual.fuselage        = 6642.0611642718986
    actual.propulsion      = 6838.1851749566231
    actual.landing_gear    = 3160.632
    actual.systems         = 13479.10479056802
    actual.wt_furnish      = 6431.80372889
    actual.horizontal_tail = 1024.5873332662029
    actual.vertical_tail   = 629.03876835025949
    actual.rudder          = 251.61550734010382
    
    # error calculations
    error                 = Data()
    error.payload         = (actual.payload - weight.payload)/actual.payload
    error.pax             = (actual.pax - weight.pax)/actual.pax
    error.bag             = (actual.bag - weight.bag)/actual.bag
    error.fuel            = (actual.fuel - weight.fuel)/actual.fuel
    error.empty           = (actual.empty - weight.empty)/actual.empty
    error.wing            = (actual.wing - weight.wing)/actual.wing
    error.fuselage        = (actual.fuselage - weight.fuselage)/actual.fuselage
    error.propulsion      = (actual.propulsion - weight.propulsion)/actual.propulsion
    error.landing_gear    = (actual.landing_gear - weight.landing_gear)/actual.landing_gear
    error.systems         = (actual.systems - weight.systems)/actual.systems
    error.wt_furnish      = (actual.wt_furnish - weight.systems_breakdown.furnish)/actual.wt_furnish
    error.horizontal_tail = (actual.horizontal_tail - weight.horizontal_tail)/actual.horizontal_tail
    error.vertical_tail   = (actual.vertical_tail - weight.vertical_tail)/actual.vertical_tail
    error.rudder          = (actual.rudder - weight.rudder)/actual.rudder
    
    print 'Results (kg)'
    print weight
    
    print 'Relative Errors'
    print error  
      
    for k,v in error.items():
        assert(np.abs(v)<1E-6)    
   
    #General Aviation weights; note that values are taken from Raymer,
    #but there is a huge spread among the GA designs, so individual components
    #differ a good deal from the actual design
   
    vehicle        = vehicle_setup_general_aviation()
    GTOW           = vehicle.mass_properties.max_takeoff
    weight         = General_Aviation.empty(vehicle)
    weight.fuel    = vehicle.fuel.mass_properties.mass 
    actual         = Data()
    actual.bag     = 0.
    actual.empty   = 618.485310343
    actual.fuel    = 144.69596603

    actual.wing            = 124.673093906
    actual.fuselage        = 119.522072873
    actual.propulsion      = 194.477769922 #includes power plant and propeller, does not include fuel system
    actual.landing_gear    = 44.8033840543+5.27975390045
    actual.furnishing      = 37.8341395817
    actual.electrical      = 36.7532226254
    actual.control_systems = 14.8331955546
    actual.fuel_systems    = 15.6859717453
    actual.systems         = 108.096549345

    error                 = Data()
    error.fuel            = (actual.fuel - weight.fuel)/actual.fuel
    error.empty           = (actual.empty - weight.empty)/actual.empty
    error.wing            = (actual.wing - weight.wing)/actual.wing
    error.fuselage        = (actual.fuselage - weight.fuselage)/actual.fuselage
    error.propulsion      = (actual.propulsion - weight.propulsion)/actual.propulsion
    error.landing_gear    = (actual.landing_gear - (weight.landing_gear_main+weight.landing_gear_nose))/actual.landing_gear
    error.furnishing      = (actual.furnishing-weight.systems_breakdown.furnish)/actual.furnishing
    error.electrical      = (actual.electrical-weight.systems_breakdown.electrical)/actual.electrical
    error.control_systems = (actual.control_systems-weight.systems_breakdown.control_systems)/actual.control_systems
    error.fuel_systems    = (actual.fuel_systems-weight.systems_breakdown.fuel_system)/actual.fuel_systems
    error.systems         = (actual.systems - weight.systems)/actual.systems

    print 'actual.systems=', actual.systems
    print 'General Aviation Results (kg)'
    print weight

    print 'Relative Errors'
    print error  

    for k,v in error.items():
        assert(np.abs(v)<1e-6)    
   
    return
开发者ID:michK,项目名称:SUAVE,代码行数:97,代码来源:weights.py

示例5: main

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

#.........这里部分代码省略.........
    vehicle.append_component(turbofan)      
    

    vehicle.passengers                                  = 170.                            # Number of passengers
    vehicle.mass_properties.cargo                       = 0.  * Units.kilogram            # Mass of cargo
    vehicle.systems.control                             = "fully powered"                 # Specify fully powered, partially powered or anything else is fully aerodynamic
    vehicle.systems.accessories                         = "medium-range"                  # Specify what type of aircraft you have
    
    vehicle.reference_area                              = 124.862  * Units.meter**2  # Wing gross area in square meters
    wing = SUAVE.Components.Wings.Wing()
    wing.tag = 'main_wing'
    wing.spans.projected          = 50.      * Units.meter     # Span in meters
    wing.taper                    = 0.2                        # Taper ratio
    wing.thickness_to_chord       = 0.08                       # Thickness-to-chord ratio
    wing.sweep                    = .4363323 * Units.rad       # sweep angle in degrees
    wing.chords.root              = 15.      * Units.meter     # Wing root chord length
    wing.chords.mean_aerodynamic  = 10.      * Units.meters    # Length of the mean aerodynamic chord of the wing
    wing.origin                 = [20,0,0] * Units.meters    # Location of main wing from origin of the vehicle
    wing.aerodynamic_center       = [3,0,0]  * Units.meters    # Location of aerodynamic center from origin of the main wing
    vehicle.append_component(wing)
    
    fuselage = SUAVE.Components.Fuselages.Fuselage()
    fuselage.tag = 'fuselage'    
    fuselage.areas.wetted             = 688.64    * Units.meter**2  # Fuselage wetted area 
    fuselage.differential_pressure    = 55960.5   * Units.pascal    # Maximum differential pressure
    fuselage.width                    = 4.        * Units.meter     # Width of the fuselage
    fuselage.heights.maximum          = 4.        * Units.meter     # Height of the fuselage
    fuselage.lengths.total            = 58.4      * Units.meter     # Length of the fuselage
    fuselage.number_coach_seats       = 200.       
    vehicle.append_component(fuselage)
    
    wing = SUAVE.Components.Wings.Wing()
    wing.tag = 'horizontal_stabilizer'    
    wing.areas.reference          = 75.     * Units.meters**2 # Area of the horizontal tail
    wing.spans.projected          = 15.     * Units.meters    # Span of the horizontal tail
    wing.sweep                    = 38.     * Units.deg       # Sweep of the horizontal tail
    wing.chords.mean_aerodynamic  = 5.      * Units.meters    # Length of the mean aerodynamic chord of the horizontal tail
    wing.thickness_to_chord       = 0.07                      # Thickness-to-chord ratio of the horizontal tail
    wing.areas.exposed            = 199.7792                  # Exposed area of the horizontal tail
    wing.areas.wetted             = 249.724                   # Wetted area of the horizontal tail
    wing.origin                 = [45,0,0]                  # Location of horizontal tail from origin of the vehicle
    wing.aerodynamic_center       = [3,0,0]                   # Location of aerodynamic center from origin of the horizontal tail
    vehicle.append_component(wing)    
    
    wing = SUAVE.Components.Wings.Wing()
    wing.tag = 'vertical_stabilizer'    
    wing.areas.reference     = 60.     * Units.meters**2 # Area of the vertical tail
    wing.spans.projected     = 15.     * Units.meters    # Span of the vertical tail
    wing.thickness_to_chord  = 0.07                      # Thickness-to-chord ratio of the vertical tail
    wing.sweep               = 40.     * Units.deg       # Sweep of the vertical tail
    wing.t_tail              = "false"                   # Set to "yes" for a T-tail
    vehicle.append_component(wing)   
    
    weight = Tube_Wing.empty(vehicle)
    
    
    actual = Data()
    actual.payload = 17349.9081525
    actual.pax = 15036.5870655
    actual.bag = 2313.321087
    actual.fuel = -13680.6265874
    actual.empty = 75346.5184349
    actual.wing = 27694.192985
    actual.fuselage = 11423.9380852
    actual.propulsion = 6855.68572746 
    actual.landing_gear = 3160.632
    actual.systems = 16655.7076511
    actual.wt_furnish = 7466.1304102
    actual.horizontal_tail = 2191.30720639
    actual.vertical_tail = 5260.75341411
    actual.rudder = 2104.30136565    
    
    error = Data()
    error.payload = (actual.payload - weight.payload)/actual.payload
    error.pax = (actual.pax - weight.pax)/actual.pax
    error.bag = (actual.bag - weight.bag)/actual.bag
    error.fuel = (actual.fuel - weight.fuel)/actual.fuel
    error.empty = (actual.empty - weight.empty)/actual.empty
    error.wing = (actual.wing - weight.wing)/actual.wing
    error.fuselage = (actual.fuselage - weight.fuselage)/actual.fuselage
    error.propulsion = (actual.propulsion - weight.propulsion)/actual.propulsion
    error.landing_gear = (actual.landing_gear - weight.landing_gear)/actual.landing_gear
    error.systems = (actual.systems - weight.systems)/actual.systems
    error.wt_furnish = (actual.wt_furnish - weight.systems_breakdown.furnish)/actual.wt_furnish
    
    error.horizontal_tail = (actual.horizontal_tail - weight.horizontal_tail)/actual.horizontal_tail
    error.vertical_tail = (actual.vertical_tail - weight.vertical_tail)/actual.vertical_tail
    error.rudder = (actual.rudder - weight.rudder)/actual.rudder
    
    print 'Results (kg)'
    print weight
    
    print 'Relative Errors'
    print error  
      
    for k,v in error.items():
        assert(np.abs(v)<0.001)    
   
    
    return
开发者ID:Alexandrovich,项目名称:SUAVE,代码行数:104,代码来源:weights.py

示例6: main

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import propulsion [as 别名]
def main():
    vehicle = SUAVE.Vehicle()# Create the vehicle for testing
    
    # Parameters Required
    vehicle.envelope.ultimate_load                      = 3.5                             # Ultimate load
    vehicle.mass_properties.max_takeoff                 = 79015.8 * Units.kilograms       # Maximum takeoff weight in kilograms
    vehicle.mass_properties.max_zero_fuel               = 79015.8 * 0.9 * Units.kilograms # Maximum zero fuel weight in kilograms
    vehicle.envelope.limit_load                         = 1.5                             # Limit Load
    
    turbofan = SUAVE.Components.Propulsors.TurboFanPASS()
    turbofan.tag = 'turbo_fan'    
    turbofan.number_of_engines   = 2.                              # Number of engines on the aircraft
    turbofan.design_thrust  = 200.   * Units.newton    # Define Thrust in Newtons    
    vehicle.append_component(turbofan) 

    vehicle.passengers                                  = 170.                            # Number of passengers
    vehicle.mass_properties.cargo                       = 0.  * Units.kilogram            # Mass of cargo
    vehicle.systems.control                             = "fully powered"                 # Specify fully powered, partially powered or anything else is fully aerodynamic
    vehicle.systems.accessories                         = "medium-range"                  # Specify what type of aircraft you have
    
    vehicle.reference_area                              = 124.862  * Units.meter**2  # Wing gross area in square meters
    wing = SUAVE.Components.Wings.Wing()
    wing.tag = 'main_wing'
    wing.spans.projected          = 50.      * Units.meter     # Span in meters
    wing.taper                    = 0.2                        # Taper ratio
    wing.thickness_to_chord       = 0.08                       # Thickness-to-chord ratio
    wing.sweep                    = .4363323 * Units.rad       # sweep angle in degrees
    wing.chords.root              = 15.      * Units.meter     # Wing root chord length
    wing.chords.mean_aerodynamic  = 10.      * Units.meters    # Length of the mean aerodynamic chord of the wing
    wing.origin                 = [20,0,0] * Units.meters    # Location of main wing from origin of the vehicle
    wing.aerodynamic_center       = [3,0,0]  * Units.meters    # Location of aerodynamic center from origin of the main wing
    vehicle.append_component(wing)
    
    fuselage = SUAVE.Components.Fuselages.Fuselage()
    fuselage.tag = 'fuselage'    
    fuselage.areas.wetted             = 688.64    * Units.meter**2  # Fuselage wetted area 
    fuselage.differential_pressure    = 55960.5   * Units.pascal    # Maximum differential pressure
    fuselage.width                    = 4.        * Units.meter     # Width of the fuselage
    fuselage.heights.maximum          = 4.        * Units.meter     # Height of the fuselage
    fuselage.lengths.total            = 58.4      * Units.meter     # Length of the fuselage
    fuselage.number_coach_seats       = 200.       
    vehicle.append_component(fuselage)
    
    wing = SUAVE.Components.Wings.Wing()
    wing.tag = 'horizontal_stabilizer'    
    wing.areas.reference          = 75.     * Units.meters**2 # Area of the horizontal tail
    wing.spans.projected          = 15.     * Units.meters    # Span of the horizontal tail
    wing.sweep                    = 38.     * Units.deg       # Sweep of the horizontal tail
    wing.chords.mean_aerodynamic  = 5.      * Units.meters    # Length of the mean aerodynamic chord of the horizontal tail
    wing.thickness_to_chord       = 0.07                      # Thickness-to-chord ratio of the horizontal tail
    wing.areas.exposed            = 199.7792                  # Exposed area of the horizontal tail
    wing.areas.wetted             = 249.724                   # Wetted area of the horizontal tail
    wing.origin                 = [45,0,0]                  # Location of horizontal tail from origin of the vehicle
    wing.aerodynamic_center       = [3,0,0]                   # Location of aerodynamic center from origin of the horizontal tail
    vehicle.append_component(wing)    
    
    wing = SUAVE.Components.Wings.Wing()
    wing.tag = 'vertical_stabilizer'    
    wing.areas.reference     = 60.     * Units.meters**2 # Area of the vertical tail
    wing.spans.projected     = 15.     * Units.meters    # Span of the vertical tail
    wing.thickness_to_chord  = 0.07                      # Thickness-to-chord ratio of the vertical tail
    wing.sweep               = 40.     * Units.deg       # Sweep of the vertical tail
    wing.t_tail              = "false"                   # Set to "yes" for a T-tail
    vehicle.append_component(wing)   
    
    weight = Tube_Wing.empty(vehicle)
    
    actual = Data()
    actual.payload = 17349.9081525
    actual.pax = 15036.5870655
    actual.bag = 2313.321087
    actual.fuel = -6993.89102491
    actual.empty = 68659.7828724
    actual.wing = 27694.192985
    actual.fuselage = 11504.5186408
    actual.propulsion = 88.3696093424
    actual.landing_gear = 3160.632
    actual.systems = 16655.7076511
    actual.wt_furnish = 7466.1304102
    actual.horizontal_tail = 2191.30720639
    actual.vertical_tail = 5260.75341411
    actual.rudder = 2104.30136565    
    
    error = Data()
    error.payload = (actual.payload - weight.payload)/actual.payload
    error.pax = (actual.pax - weight.pax)/actual.pax
    error.bag = (actual.bag - weight.bag)/actual.bag
    error.fuel = (actual.fuel - weight.fuel)/actual.fuel
    error.empty = (actual.empty - weight.empty)/actual.empty
    error.wing = (actual.wing - weight.wing)/actual.wing
    error.fuselage = (actual.fuselage - weight.fuselage)/actual.fuselage
    error.propulsion = (actual.propulsion - weight.propulsion)/actual.propulsion
    error.landing_gear = (actual.landing_gear - weight.landing_gear)/actual.landing_gear
    error.systems = (actual.systems - weight.systems)/actual.systems
    error.wt_furnish = (actual.wt_furnish - weight.wt_furnish)/actual.wt_furnish
    error.horizontal_tail = (actual.horizontal_tail - weight.horizontal_tail)/actual.horizontal_tail
    error.vertical_tail = (actual.vertical_tail - weight.vertical_tail)/actual.vertical_tail
    error.rudder = (actual.rudder - weight.rudder)/actual.rudder
      
    for k,v in error.items():
#.........这里部分代码省略.........
开发者ID:aerialhedgehog,项目名称:SUAVE,代码行数:103,代码来源:test_weights.py


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