def initial_sizing(nexus): for config in nexus.vehicle_configurations: config.mass_properties.max_zero_fuel = nexus.MZFW_ratio*config.mass_properties.max_takeoff for wing in config.wings: wing = SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform(wing) wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference #compute atmosphere conditions for turbofan sizing air_speed = nexus.missions.base.segments['cruise'].air_speed altitude = nexus.missions.base.segments['climb_5'].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream = atmosphere.compute_values(altitude) #freestream conditions mach_number = air_speed/freestream.speed_of_sound freestream.mach_number = mach_number freestream.velocity = air_speed freestream.gravity = 9.81 conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() conditions.freestream = freestream turbofan_sizing(config.propulsors['turbofan'], mach_number, altitude) compute_turbofan_geometry(config.propulsors['turbofan'], conditions) # diff the new data config.store_diff() return nexus
def initial_sizing(nexus): for config in nexus.vehicle_configurations: config.mass_properties.max_zero_fuel = nexus.MZFW_ratio * config.mass_properties.max_takeoff for wing in config.wings: wing = SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform( wing) wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference #compute atmosphere conditions for turbofan sizing air_speed = nexus.missions.base.segments['cruise'].air_speed altitude = nexus.missions.base.segments['climb_5'].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream = atmosphere.compute_values( altitude) #freestream conditions mach_number = air_speed / freestream.speed_of_sound freestream.mach_number = mach_number freestream.velocity = air_speed freestream.gravity = 9.81 conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() conditions.freestream = freestream turbofan_sizing(config.propulsors['turbofan'], mach_number, altitude) compute_turbofan_geometry(config.propulsors['turbofan'], conditions) # diff the new data config.store_diff() return nexus
def simple_sizing(nexus): configs = nexus.vehicle_configurations base = configs.base #find conditions air_speed = nexus.missions.base.segments['cruise'].air_speed altitude = nexus.missions.base.segments['climb_5'].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream = atmosphere.compute_values(altitude) freestream0 = atmosphere.compute_values(6000. * Units.ft) #cabin altitude diff_pressure = np.max(freestream0.pressure - freestream.pressure, 0) fuselage = base.fuselages['fuselage'] fuselage.differential_pressure = diff_pressure #now size engine mach_number = air_speed / freestream.speed_of_sound #now add to freestream data object freestream.velocity = air_speed freestream.mach_number = mach_number freestream.gravity = 9.81 conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics( ) #assign conditions in form for propulsor sizing conditions.freestream = freestream for config in configs: config.wings.horizontal_stabilizer.areas.reference = ( 26.0 / 92.0) * config.wings.main_wing.areas.reference for wing in config.wings: wing = SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform( wing) wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference fuselage = config.fuselages['fuselage'] fuselage.differential_pressure = diff_pressure turbofan_sizing(config.networks['turbofan'], mach_number=mach_number, altitude=altitude) compute_turbofan_geometry(config.networks['turbofan'], config.nacelles.nacelle_1) return nexus
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'EMBRAER E190AR' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 51800.0 # kg vehicle.mass_properties.operating_empty = 29100.0 # kg vehicle.mass_properties.takeoff = 51800.0 # kg ## vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 0. * Units.kilogram vehicle.mass_properties.center_of_gravity = [60 * Units.feet, 0, 0] # Not correct vehicle.mass_properties.moments_of_inertia.tensor = [[10**5, 0, 0], [ 0, 10**6, 0, ], [0, 0, 10**7] ] # Not Correct # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92.0 vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.4 wing.sweeps.quarter_chord = 23.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.span_efficiency = 1.0 ## wing.spans.projected = 27.8 ## ## wing.chords.root = 5.203 ## wing.chords.tip = 1.460 ## wing.chords.mean_aerodynamic = 3.680 wing.areas.reference = 92.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [13.2, 0, 0] # Need to fix ## wing.aerodynamic_center = [3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.flaps.type = "double_slotted" wing.flaps.chord = 0.280 wing.dynamic_pressure_ratio = 1.0 # add to vehicle size_planform(wing) vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 5.5 wing.sweeps.quarter_chord = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 ## wing.spans.projected = 11.958 ## ## wing.chords.root = 3.030 ## wing.chords.tip = 0.883 ## wing.chords.mean_aerodynamic = 2.3840 wing.areas.reference = 26.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [31., 0, 0] # need to fix ## wing.aerodynamic_center = [2,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle size_planform(wing) vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.7 # wing.sweeps.quarter_chord = 35 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.span_efficiency = 0.9 ## wing.spans.projected = 5.270 # ## ## wing.chords.root = 4.70 ## wing.chords.tip = 1.45 ## wing.chords.mean_aerodynamic = 3.36 wing.areas.reference = 16.0 # wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [29.5, 0, 0] ## wing.aerodynamic_center = [2,0,0] wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle size_planform(wing) vehicle.append_component(wing) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 gt_engine.position[1] = 4.50 #compute engine areas Awet = 1.1 * np.pi * gt_engine.nacelle_diameter * gt_engine.engine_length #assign engine areas gt_engine.areas.wetted = Awet #set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air #add working fluid to the network gt_engine.working_fluid = working_fluid #Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram #Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # turbofan.fan_nozzle_pressure_ratio = 0.98 #0.98 #add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle #Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 #add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor #Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 #add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor #Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag = 'lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 #add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine #Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag = 'hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 #add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine #Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() #add the combustor to the network gt_engine.combustor = combustor #Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle #Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 #add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle #Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 #add the fan to the network gt_engine.fan = fan #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 37278.0 * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan #create conditions object for sizing the turbofan atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() conditions = atmosphere.compute_values(altitude) turbofan_sizing(gt_engine, mach_number, altitude) compute_turbofan_geometry(gt_engine, conditions) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def energy_network(): # ------------------------------------------------------------------ # Evaluation Conditions # ------------------------------------------------------------------ # --- Conditions ones_1col = np.ones([1, 1]) # setup conditions conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() ''' conditions.frames = Data() conditions.freestream = Data() conditions.aerodynamics = Data() conditions.propulsion = Data() conditions.weights = Data() conditions.energies = Data() ''' # self.conditions = conditions # freestream conditions conditions.freestream.mach_number = ones_1col * 0.8 conditions.freestream.pressure = ones_1col * 20000. conditions.freestream.temperature = ones_1col * 215. conditions.freestream.density = ones_1col * 0.8 conditions.freestream.dynamic_viscosity = ones_1col * 0.000001475 conditions.freestream.altitude = ones_1col * 10. conditions.freestream.gravity = ones_1col * 9.81 conditions.freestream.isentropic_expansion_factor = ones_1col * 1.4 conditions.freestream.Cp = 1.4 * 287.87 / (1.4 - 1) conditions.freestream.R = 287.87 conditions.M = conditions.freestream.mach_number conditions.T = conditions.freestream.temperature conditions.p = conditions.freestream.pressure conditions.freestream.speed_of_sound = ones_1col * np.sqrt( conditions.freestream.Cp / (conditions.freestream.Cp - conditions.freestream.R) * conditions.freestream.R * conditions.freestream.temperature) #300. conditions.freestream.velocity = conditions.M * conditions.freestream.speed_of_sound conditions.velocity = conditions.M * conditions.freestream.speed_of_sound conditions.q = 0.5 * conditions.freestream.density * conditions.velocity**2 conditions.g0 = conditions.freestream.gravity # propulsion conditions conditions.propulsion.throttle = ones_1col * 1.0 # ------------------------------------------------------------------ # Design/sizing conditions # ------------------------------------------------------------------ # Conditions ones_1col = np.ones([1, 1]) # Setup conditions conditions_sizing = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics( ) ''' conditions_sizing.frames = Data() conditions_sizing.freestream = Data() conditions_sizing.aerodynamics = Data() conditions_sizing.propulsion = Data() conditions_sizing.weights = Data() conditions_sizing.energies = Data() ''' # self.conditions = conditions # freestream conditions conditions_sizing.freestream.mach_number = ones_1col * 0.8 conditions_sizing.freestream.pressure = ones_1col * 26499.73156529 conditions_sizing.freestream.temperature = ones_1col * 223.25186491 conditions_sizing.freestream.density = ones_1col * 0.41350854 conditions_sizing.freestream.dynamic_viscosity = ones_1col * 1.45766126e-05 conditions_sizing.freestream.altitude = ones_1col * 10000. conditions_sizing.freestream.gravity = ones_1col * 9.81 conditions_sizing.freestream.isentropic_expansion_factor = ones_1col * 1.4 conditions_sizing.freestream.Cp = 1.4 * 287.87 / (1.4 - 1) conditions_sizing.freestream.R = 287.87 conditions_sizing.freestream.speed_of_sound = 299.53150968 conditions_sizing.freestream.velocity = conditions_sizing.freestream.mach_number * conditions_sizing.freestream.speed_of_sound # propulsion conditions conditions_sizing.propulsion.throttle = ones_1col * 1.0 state_sizing = Data() state_sizing.numerics = Data() state_sizing.conditions = conditions_sizing state_off_design = Data() state_off_design.numerics = Data() state_off_design.conditions = conditions # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # Instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.bypass_ratio = 5.4 turbofan.number_of_engines = 2.0 turbofan.engine_length = 2.5 turbofan.nacelle_diameter = 1.580 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 # 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 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.01818402065 expected.mdot = 0.76425264 #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-6) return
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.operating_empty = 62746.4 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.max_zero_fuel = 62732.0 # kg #0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.center_of_gravity = [[ 15.30987849, 0., -0.48023939 ]] vehicle.mass_properties.moments_of_inertia.tensor = [[ 3173074.17, 0, 28752.77565 ], [0, 3019041.443, 0], [0, 0, 5730017.433]] # estimated, not correct vehicle.design_mach_number = 0.78 vehicle.design_range = 3582 * Units.miles vehicle.design_cruise_alt = 35000.0 * Units.ft # envelope properties vehicle.envelope.ultimate_load = 3.75 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.1 wing.spans.projected = 34.32 wing.chords.root = 7.760 * Units.meter wing.chords.tip = 0.782 * Units.meter wing.chords.mean_aerodynamic = 4.235 * Units.meter wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [[13.61, 0, -1.27]] wing.aerodynamic_center = [0, 0, 0] #[3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # Wing Segments root_airfoil = SUAVE.Components.Wings.Airfoils.Airfoil() root_airfoil.coordinate_file = '../Vehicles/B737a.txt' segment = SUAVE.Components.Wings.Segment() segment.tag = 'Root' segment.percent_span_location = 0.0 segment.twist = 4. * Units.deg segment.root_chord_percent = 1. segment.thickness_to_chord = 0.1 segment.dihedral_outboard = 2.5 * Units.degrees segment.sweeps.quarter_chord = 28.225 * Units.degrees segment.thickness_to_chord = .1 segment.append_airfoil(root_airfoil) wing.append_segment(segment) yehudi_airfoil = SUAVE.Components.Wings.Airfoils.Airfoil() yehudi_airfoil.coordinate_file = '../Vehicles/B737b.txt' segment = SUAVE.Components.Wings.Segment() segment.tag = 'Yehudi' segment.percent_span_location = 0.324 segment.twist = (wing.twists.root * (1 - segment.percent_span_location)) * Units.deg segment.root_chord_percent = 0.5 segment.thickness_to_chord = 0.1 segment.dihedral_outboard = 5.5 * Units.degrees segment.sweeps.quarter_chord = 25. * Units.degrees segment.thickness_to_chord = .1 segment.append_airfoil(yehudi_airfoil) wing.append_segment(segment) mid_airfoil = SUAVE.Components.Wings.Airfoils.Airfoil() mid_airfoil.coordinate_file = '../Vehicles/B737c.txt' segment = SUAVE.Components.Wings.Segment() segment.tag = 'Section_2' segment.percent_span_location = 0.963 segment.twist = (wing.twists.root * (1 - segment.percent_span_location)) * Units.deg segment.root_chord_percent = 0.220 segment.thickness_to_chord = 0.1 segment.dihedral_outboard = 5.5 * Units.degrees segment.sweeps.quarter_chord = 56.75 * Units.degrees segment.thickness_to_chord = .1 segment.append_airfoil(mid_airfoil) wing.append_segment(segment) tip_airfoil = SUAVE.Components.Wings.Airfoils.Airfoil() tip_airfoil.coordinate_file = '../Vehicles/B737d.txt' segment = SUAVE.Components.Wings.Segment() segment.tag = 'Tip' segment.percent_span_location = 1. segment.twist = 0. * Units.degrees segment.root_chord_percent = 0.10077 segment.thickness_to_chord = 0.1 segment.dihedral_outboard = 0. segment.sweeps.quarter_chord = 0. segment.thickness_to_chord = .1 segment.append_airfoil(tip_airfoil) wing.append_segment(segment) # control surfaces ------------------------------------------- slat = SUAVE.Components.Wings.Control_Surfaces.Slat() slat.tag = 'slat' slat.span_fraction_start = 0.2 slat.span_fraction_end = 0.963 slat.deflection = 0.0 * Units.degrees slat.chord_fraction = 0.075 wing.append_control_surface(slat) flap = SUAVE.Components.Wings.Control_Surfaces.Flap() flap.tag = 'flap' flap.span_fraction_start = 0.2 flap.span_fraction_end = 0.7 flap.deflection = 0.0 * Units.degrees flap.configuration_type = 'double_slotted' flap.chord_fraction = 0.30 wing.append_control_surface(flap) aileron = SUAVE.Components.Wings.Control_Surfaces.Aileron() aileron.tag = 'aileron' aileron.span_fraction_start = 0.7 aileron.span_fraction_end = 0.963 aileron.deflection = 0.0 * Units.degrees aileron.chord_fraction = 0.16 wing.append_control_surface(aileron) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Horizontal_Tail() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 # wing.sweeps.quarter_chord = 40 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.2 wing.spans.projected = 14.2 wing.chords.root = 4.7 wing.chords.tip = .955 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.areas.exposed = 59.354 # Exposed area of the horizontal tail wing.areas.wetted = 64.976 # Wetted area of the horizontal tail wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [[32.83, 0, 1.14]] wing.aerodynamic_center = [0, 0, 0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # Wing Segments segment = SUAVE.Components.Wings.Segment() segment.tag = 'root_segment' segment.percent_span_location = 0.0 segment.twist = 0. * Units.deg segment.root_chord_percent = 1.0 segment.dihedral_outboard = 8.63 * Units.degrees segment.sweeps.quarter_chord = 38.42 * Units.degrees segment.thickness_to_chord = .1 wing.append_segment(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'tip_segment' segment.percent_span_location = 1. segment.twist = 0. * Units.deg segment.root_chord_percent = 0.203 segment.dihedral_outboard = 0 * Units.degrees segment.sweeps.quarter_chord = 0 * Units.degrees segment.thickness_to_chord = .1 wing.append_segment(segment) # control surfaces ------------------------------------------- elevator = SUAVE.Components.Wings.Control_Surfaces.Elevator() elevator.tag = 'elevator' elevator.span_fraction_start = 0.09 elevator.span_fraction_end = 0.92 elevator.deflection = 0.0 * Units.deg elevator.chord_fraction = 0.3 wing.append_control_surface(elevator) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Vertical_Tail() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 # wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.spans.projected = 7.777 wing.total_length = wing.spans.projected # wing.chords.root = 8.19 wing.chords.tip = 0.95 wing.chords.mean_aerodynamic = 4.0 wing.areas.reference = 27.316 # wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [[28.79, 0, 1.54]] wing.aerodynamic_center = [0, 0, 0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # Wing Segments segment = SUAVE.Components.Wings.Segment() segment.tag = 'root' segment.percent_span_location = 0.0 segment.twist = 0. * Units.deg segment.root_chord_percent = 1. segment.dihedral_outboard = 0 * Units.degrees segment.sweeps.quarter_chord = 63.63 * Units.degrees segment.thickness_to_chord = .1 wing.append_segment(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'segment_1' segment.percent_span_location = 0.194 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.540 segment.dihedral_outboard = 0. * Units.degrees segment.sweeps.quarter_chord = 30.0 * Units.degrees segment.thickness_to_chord = .1 wing.append_segment(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'segment_2' segment.percent_span_location = 1.0 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.175 segment.dihedral_outboard = 0.0 * Units.degrees segment.sweeps.quarter_chord = 51.0 * Units.degrees segment.thickness_to_chord = .1 wing.append_segment(segment) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 6 fuselage.seat_pitch = 31. * Units.inches fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 #44.0 fuselage.lengths.total = 38.02 #58.4 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 #4. fuselage.heights.maximum = 3.74 #4. # fuselage.heights.at_quarter_length = 3.74 # Not correct fuselage.heights.at_three_quarters_length = 3.65 # Not correct fuselage.heights.at_wing_root_quarter_chord = 3.74 # Not correct fuselage.areas.side_projected = 142.1948 #4.* 59.8 # Not correct fuselage.areas.wetted = 446.718 #688.64 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 #4.0 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # This origin is overwritten by compute_component_centers_of_gravity(base,compute_propulsor_origin=True) turbofan.origin = [[13.72, 4.86, -1.9], [13.72, -4.86, -1.9]] #compute engine areas Awet = 1.1 * np.pi * turbofan.nacelle_diameter * turbofan.engine_length #Assign engine areas turbofan.areas.wetted = Awet # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2 * 24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. #Engine setup for noise module # add to network turbofan.thrust = thrust turbofan.core_nozzle_diameter = 0.92 turbofan.fan_nozzle_diameter = 1.659 turbofan.engine_height = 0.5 #Engine centerline heigh above the ground plane turbofan.exa = 1 #distance from fan face to fan exit/ fan diameter) turbofan.plug_diameter = 0.1 #dimater of the engine plug turbofan.geometry_xe = 1. # Geometry information for the installation effects function turbofan.geometry_ye = 1. # Geometry information for the installation effects function turbofan.geometry_Ce = 2. # Geometry information for the installation effects function #size the turbofan turbofan_sizing(turbofan, mach_number, altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Fuel # ------------------------------------------------------------------ fuel = SUAVE.Components.Physical_Component() vehicle.fuel = fuel fuel.mass_properties.mass = vehicle.mass_properties.max_takeoff - vehicle.mass_properties.max_fuel fuel.origin = vehicle.wings.main_wing.mass_properties.center_of_gravity fuel.mass_properties.center_of_gravity = vehicle.wings.main_wing.aerodynamic_center # ------------------------------------------------------------------ # Landing Gear # ------------------------------------------------------------------ landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 1 #number of nose landing gear landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear = landing_gear # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.operating_empty = 62746.4 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.max_zero_fuel = 62732.0 # kg #0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.center_of_gravity = [ 15.30987849, 0. , -0.48023939] # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Landing Gear # ------------------------------------------------------------------ #used for noise calculations landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 #number of main landing gear units landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear=landing_gear # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.1 wing.span_efficiency = 0.9 wing.spans.projected = 34.32 wing.chords.root = 7.760 * Units.meter wing.chords.tip = 0.782 * Units.meter wing.chords.mean_aerodynamic = 4.235 * Units.meter wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [13.61,0,-1.27] wing.aerodynamic_center = [0,0,0] #[3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Flaps # ------------------------------------------------------------------ wing.flaps.chord = 0.30 wing.flaps.span_start = 0.10 # -> wing.flaps.area = 97.1112 wing.flaps.span_end = 0.75 wing.flaps.type = 'double_slotted' # -> wing.flaps.number_slots = 2 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 # wing.sweeps.quarter_chord = 40 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.2 wing.span_efficiency = 0.9 wing.spans.projected = 14.2 wing.chords.root = 4.7 wing.chords.tip = .955 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.areas.exposed = 59.354 # Exposed area of the horizontal tail wing.areas.wetted = 64.976 # Wetted area of the horizontal tail wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [32.83,0,1.14] wing.aerodynamic_center = [0,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 # wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.777 # wing.chords.root = 8.19 wing.chords.tip = 0.95 wing.chords.mean_aerodynamic = 4.0 wing.areas.reference = 27.316 # wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [28.79,0,1.54] wing.aerodynamic_center = [0,0,0] #[2,0,0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers #fuselage.number_coach_seats = 200. fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 #44.0 fuselage.lengths.total = 38.02 #58.4 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 #4. fuselage.heights.maximum = 3.74 #4. # fuselage.heights.at_quarter_length = 3.74 # Not correct fuselage.heights.at_three_quarters_length = 3.65 # Not correct fuselage.heights.at_wing_root_quarter_chord = 3.74 # Not correct fuselage.areas.side_projected = 142.1948 #4.* 59.8 # Not correct fuselage.areas.wetted = 446.718 #688.64 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 #4.0 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # This origin is overwritten by compute_component_centers_of_gravity(base,compute_propulsor_origin=True) turbofan.origin = [[13.72, 4.86,-1.9],[13.72, -4.86,-1.9]] #compute engine areas Awet = 1.1*np.pi*turbofan.nacelle_diameter*turbofan.engine_length #Assign engine areas turbofan.areas.wetted = Awet # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. #Engine setup for noise module # add to network turbofan.thrust = thrust turbofan.core_nozzle_diameter = 0.92 turbofan.fan_nozzle_diameter = 1.659 turbofan.engine_height = 0.5 #Engine centerline heigh above the ground plane turbofan.exa = 1 #distance from fan face to fan exit/ fan diameter) turbofan.plug_diameter = 0.1 #dimater of the engine plug turbofan.geometry_xe = 1. # Geometry information for the installation effects function turbofan.geometry_ye = 1. # Geometry information for the installation effects function turbofan.geometry_Ce = 2. # Geometry information for the installation effects function #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 # kg vehicle.mass_properties.operating_empty = 62746.4 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.center_of_gravity = [60 * Units.feet, 0, 0] vehicle.mass_properties.moments_of_inertia.tensor = [[10 ** 5, 0, 0],[0, 10 ** 6, 0,],[0,0, 10 ** 7]] # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweep = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.16 wing.span_efficiency = 0.9 wing.spans.projected = 35.66 wing.chords.root = 6.81 wing.chords.tip = 1.09 wing.chords.mean_aerodynamic = 4.235 wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = -4.0 * Units.degrees wing.origin = [20,0,0] wing.aerodynamic_center = [3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 wing.sweep = 30 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.4 wing.span_efficiency = 0.9 wing.spans.projected = 14.146 wing.chords.root = 3.28 wing.chords.tip = 1.31 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [50,0,0] wing.aerodynamic_center = [2,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweep = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.877 wing.chords.root = 6.60 wing.chords.tip = 1.65 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [50,0,0] wing.aerodynamic_center = [2,0,0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 fuselage.lengths.total = 38.02 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 fuselage.heights.maximum = 3.74 fuselage.heights.at_quarter_length = 3.74 fuselage.heights.at_three_quarters_length = 3.74 fuselage.heights.at_wing_root_quarter_chord = 3.74 fuselage.areas.side_projected = 142.1948 fuselage.areas.wetted = 446.718 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 #4.0 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbo_fan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_BWB_450' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 823000. * Units.lb vehicle.mass_properties.takeoff = 823000. * Units.lb vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 00. * Units.kilogram # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 7840. * 2 * Units.feet**2 vehicle.passengers = 450. vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 289.**2 / (7840. * 2) wing.thickness_to_chord = 0.15 wing.taper = 0.0138 wing.spans.projected = 289.0 * Units.feet wing.chords.root = 145.0 * Units.feet wing.chords.tip = 3.5 * Units.feet wing.chords.mean_aerodynamic = 80. * Units.feet wing.areas.reference = 7840. * 2 * Units.feet**2 wing.sweeps.quarter_chord = 33. * Units.degrees wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.dihedral = 2.5 * Units.degrees wing.origin = [[0.,0.,0]] wing.aerodynamic_center = [0,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_1' segment.percent_span_location = 0.0 segment.twist = 0. * Units.deg segment.root_chord_percent = 1. segment.dihedral_outboard = 0. * Units.degrees segment.sweeps.quarter_chord = 40.0 * Units.degrees segment.thickness_to_chord = 0.165 segment.vsp_mesh = Data() segment.vsp_mesh.inner_radius = 4. segment.vsp_mesh.outer_radius = 4. segment.vsp_mesh.inner_length = .14 segment.vsp_mesh.outer_length = .14 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_2' segment.percent_span_location = 0.052 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.921 segment.dihedral_outboard = 0. * Units.degrees segment.sweeps.quarter_chord = 52.5 * Units.degrees segment.thickness_to_chord = 0.167 segment.vsp_mesh = Data() segment.vsp_mesh.inner_radius = 4. segment.vsp_mesh.outer_radius = 4. segment.vsp_mesh.inner_length = .14 segment.vsp_mesh.outer_length = .14 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_3' segment.percent_span_location = 0.138 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.76 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 36.9 * Units.degrees segment.thickness_to_chord = 0.171 segment.vsp_mesh = Data() segment.vsp_mesh.inner_radius = 4. segment.vsp_mesh.outer_radius = 4. segment.vsp_mesh.inner_length = .14 segment.vsp_mesh.outer_length = .14 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_4' segment.percent_span_location = 0.221 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.624 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 30.4 * Units.degrees segment.thickness_to_chord = 0.175 segment.vsp_mesh = Data() segment.vsp_mesh.inner_radius = 4. segment.vsp_mesh.outer_radius = 2.8 segment.vsp_mesh.inner_length = .14 segment.vsp_mesh.outer_length = .14 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_5' segment.percent_span_location = 0.457 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.313 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 30.85 * Units.degrees segment.thickness_to_chord = 0.118 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_6' segment.percent_span_location = 0.568 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.197 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 34.3 * Units.degrees segment.thickness_to_chord = 0.10 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_7' segment.percent_span_location = 0.97 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.086 segment.dihedral_outboard = 73. * Units.degrees segment.sweeps.quarter_chord = 55. * Units.degrees segment.thickness_to_chord = 0.10 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'tip' segment.percent_span_location = 1 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.0241 segment.dihedral_outboard = 0. * Units.degrees segment.sweeps.quarter_chord = 0. * Units.degrees segment.thickness_to_chord = 0.10 wing.Segments.append(segment) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan1' # setup turbofan.number_of_engines = 3.0 turbofan.bypass_ratio = 8.1 turbofan.engine_length = 289. * Units.inches turbofan.nacelle_diameter = 3.96 * Units.meters #turbofan.cooling_ratio = 1.0 turbofan.origin = [[133.0 *Units.feet, 25.0*Units.feet, 6.5*Units.feet],[145.0 *Units.feet, 0.0*Units.feet, 6.5*Units.feet],[133.0 *Units.feet, -25.0*Units.feet, 6.5*Units.feet]] # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.1 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 23.0 #compressor.hub_to_tip_ratio = 0.325 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # setup combustor.efficiency = 1.0 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1592. * Units.kelvin 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.58 # add to network turbofan.append(fan) # ------------------------------------------------------------------ #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2.0*512000 * Units.N thrust.bypass_ratio = 8.4 #design sizing conditions altitude = 0. * Units.km mach_number = 0.01 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) #turbofan.size(mach_number,altitude) #computing the engine length and diameter compute_turbofan_geometry(turbofan,None) vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = "Embraer_E190" # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 51800.0 # kg vehicle.mass_properties.operating_empty = 27837.0 # kg vehicle.mass_properties.takeoff = 50989.0 # 51800. # kg vehicle.mass_properties.max_zero_fuel = 40900.0 # kg vehicle.mass_properties.cargo = 0.0 * Units.kg vehicle.mass_properties.max_payload = 13063.0 * Units.kg vehicle.mass_properties.max_fuel = 12971.0 vehicle.mass_properties.center_of_gravity = [60 * Units.feet, 0, 0] # Not correct vehicle.mass_properties.moments_of_inertia.tensor = [ [10 ** 5, 0, 0], [0, 10 ** 6, 0], [0, 0, 10 ** 7], ] # Not Correct # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92.00 vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = "main_wing" wing.aspect_ratio = 8.4 wing.sweep = 23.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.span_efficiency = 1.0 wing.spans.projected = 27.8 wing.chords.root = 5.203 wing.chords.tip = 1.460 wing.chords.mean_aerodynamic = 3.680 wing.areas.reference = 92.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [20, 0, 0] wing.aerodynamic_center = [3, 0, 0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = "horizontal_stabilizer" wing.aspect_ratio = 5.5 wing.sweep = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 wing.spans.projected = 11.958 wing.chords.root = 3.030 wing.chords.tip = 0.883 wing.chords.mean_aerodynamic = 2.3840 wing.areas.reference = 26.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [35, 0, 0] wing.aerodynamic_center = [2, 0, 0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = "vertical_stabilizer" wing.aspect_ratio = 1.7 # wing.sweep = 35 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.span_efficiency = 0.9 wing.spans.projected = 5.270 # wing.chords.root = 4.70 wing.chords.tip = 1.45 wing.chords.mean_aerodynamic = 3.36 wing.areas.reference = 16.0 # wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [35, 0, 0] wing.aerodynamic_center = [2, 0, 0] wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = "fuselage" fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 fuselage.fineness.nose = 2.0 fuselage.fineness.tail = 3.0 fuselage.lengths.nose = 6.0 fuselage.lengths.tail = 9.0 fuselage.lengths.cabin = 21.24 fuselage.lengths.total = 36.24 fuselage.lengths.fore_space = 0.0 fuselage.lengths.aft_space = 0.0 fuselage.width = 3.18 fuselage.heights.maximum = 4.18 # fuselage.heights.at_quarter_length = 3.18 # Not correct fuselage.heights.at_three_quarters_length = 3.18 # Not correct fuselage.heights.at_wing_root_quarter_chord = 4.00 # Not correct fuselage.areas.side_projected = 239.20 fuselage.areas.wetted = 327.01 fuselage.areas.front_projected = 8.0110 fuselage.effective_diameter = 3.18 fuselage.differential_pressure = 10 ** 5 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = "turbo_fan" gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 # set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air # add working fluid to the network gt_engine.working_fluid = working_fluid # Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = "ram" # add ram to the network gt_engine.ram = ram # Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = "inlet nozzle" inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # turbofan.fan_nozzle_pressure_ratio = 0.98 #0.98 # add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle # Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = "lpc" low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 # add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor # Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = "hpc" high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 # add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor # Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag = "lpt" low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 # add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine # Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag = "hpt" high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 # add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine # Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = "Comb" combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # add the combustor to the network gt_engine.combustor = combustor # Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = "core nozzle" core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 # add the core nozzle to the network gt_engine.core_nozzle = core_nozzle # Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = "fan nozzle" fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 # add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle # Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = "fan" fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 # add the fan to the network gt_engine.fan = fan # Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = "compute_thrust" # total design thrust (includes all the engines) thrust.total_design = 37278.0 * Units.N # Newtons # design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0.0 # add thrust to the network gt_engine.thrust = thrust # size the turbofan turbofan_sizing(gt_engine, mach_number, altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_BWB_450' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 823000. * Units.lb vehicle.mass_properties.takeoff = 823000. * Units.lb vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 0. * Units.kilogram # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 15680. * Units.feet**2 vehicle.passengers = 450. vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 289.**2 / (7840. * 2) wing.thickness_to_chord = 0.15 wing.taper = 0.0138 wing.span_efficiency = 0.95 wing.spans.projected = 289.0 * Units.feet wing.chords.root = 145.0 * Units.feet wing.chords.tip = 3.5 * Units.feet wing.chords.mean_aerodynamic = 86. * Units.feet wing.areas.reference = 15680. * Units.feet**2 wing.sweeps.quarter_chord = 33. * Units.degrees wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.dihedral = 2.5 * Units.degrees wing.origin = [0.,0.,0] wing.aerodynamic_center = [0,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_1' segment.percent_span_location = 0.0 segment.twist = 0. * Units.deg segment.root_chord_percent = 1. segment.dihedral_outboard = 0. * Units.degrees segment.sweeps.quarter_chord = 30.0 * Units.degrees segment.thickness_to_chord = 0.165 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_2' segment.percent_span_location = 0.052 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.921 segment.dihedral_outboard = 0. * Units.degrees segment.sweeps.quarter_chord = 52.5 * Units.degrees segment.thickness_to_chord = 0.167 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_3' segment.percent_span_location = 0.138 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.76 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 36.9 * Units.degrees segment.thickness_to_chord = 0.171 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_4' segment.percent_span_location = 0.221 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.624 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 30.4 * Units.degrees segment.thickness_to_chord = 0.175 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_5' segment.percent_span_location = 0.457 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.313 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 30.85 * Units.degrees segment.thickness_to_chord = 0.118 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_6' segment.percent_span_location = 0.568 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.197 segment.dihedral_outboard = 1.85 * Units.degrees segment.sweeps.quarter_chord = 34.3 * Units.degrees segment.thickness_to_chord = 0.10 wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_7' segment.percent_span_location = 0.97 segment.twist = 0. * Units.deg segment.root_chord_percent = 0.086 segment.dihedral_outboard = 73. * Units.degrees segment.sweeps.quarter_chord = 55. * Units.degrees segment.thickness_to_chord = 0.10 wing.Segments.append(segment) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan1' # setup turbofan.number_of_engines = 3.0 turbofan.bypass_ratio = 8.1 turbofan.engine_length = 289. * Units.inches turbofan.nacelle_diameter = 3.96 * Units.meters turbofan.origin = [[133.0 *Units.feet, 25.0*Units.feet, 6.5*Units.feet],[145.0 *Units.feet, 0.0*Units.feet, 6.5*Units.feet],[133.0 *Units.feet, -25.0*Units.feet, 6.5*Units.feet]] # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.1 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 23.0 #compressor.hub_to_tip_ratio = 0.325 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # setup combustor.efficiency = 1.0 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1592. * Units.kelvin 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.58 #fan.hub_to_tip_ratio = 0.325 # add to network turbofan.append(fan) # ------------------------------------------------------------------ #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 3.0*512000 * Units.N thrust.bypass_ratio = 8.4 #design sizing conditions altitude = 0. * Units.km mach_number = 0.01 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) #computing the engine length and diameter compute_turbofan_geometry(turbofan,None) vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def energy_network(): # ------------------------------------------------------------------ # Evaluation Conditions # ------------------------------------------------------------------ # --- Conditions ones_1col = np.ones([1,1]) # setup conditions conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() ''' conditions.frames = Data() conditions.freestream = Data() conditions.aerodynamics = Data() conditions.propulsion = Data() conditions.weights = Data() conditions.energies = Data() ''' # self.conditions = conditions # freestream conditions conditions.freestream.mach_number = ones_1col*0.8 conditions.freestream.pressure = ones_1col*20000. conditions.freestream.temperature = ones_1col*215. conditions.freestream.density = ones_1col*0.8 conditions.freestream.dynamic_viscosity = ones_1col* 0.000001475 conditions.freestream.altitude = ones_1col* 10. conditions.freestream.gravity = ones_1col*9.81 conditions.freestream.gamma = ones_1col*1.4 conditions.freestream.Cp = 1.4*287.87/(1.4-1) conditions.freestream.R = 287.87 conditions.M = conditions.freestream.mach_number conditions.T = conditions.freestream.temperature conditions.p = conditions.freestream.pressure conditions.freestream.speed_of_sound = ones_1col* np.sqrt(conditions.freestream.Cp/(conditions.freestream.Cp-conditions.freestream.R)*conditions.freestream.R*conditions.freestream.temperature) #300. conditions.freestream.velocity = conditions.M * conditions.freestream.speed_of_sound conditions.velocity = conditions.M * conditions.freestream.speed_of_sound conditions.q = 0.5*conditions.freestream.density*conditions.velocity**2 conditions.g0 = conditions.freestream.gravity # propulsion conditions conditions.propulsion.throttle = ones_1col*1.0 # ------------------------------------------------------------------ # Design/sizing conditions # ------------------------------------------------------------------ # --- Conditions ones_1col = np.ones([1,1]) # setup conditions conditions_sizing = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() ''' conditions_sizing.frames = Data() conditions_sizing.freestream = Data() conditions_sizing.aerodynamics = Data() conditions_sizing.propulsion = Data() conditions_sizing.weights = Data() conditions_sizing.energies = Data() ''' # self.conditions = conditions # freestream conditions conditions_sizing.freestream.mach_number = ones_1col*0.8 conditions_sizing.freestream.pressure = ones_1col*26499.73156529 conditions_sizing.freestream.temperature = ones_1col*223.25186491 conditions_sizing.freestream.density = ones_1col*0.41350854 conditions_sizing.freestream.dynamic_viscosity = ones_1col* 1.45766126e-05 #*1.789*10**(-5) conditions_sizing.freestream.altitude = ones_1col* 10000. #* 0.5 conditions_sizing.freestream.gravity = ones_1col*9.81 conditions_sizing.freestream.gamma = ones_1col*1.4 conditions_sizing.freestream.Cp = 1.4*287.87/(1.4-1) conditions_sizing.freestream.R = 287.87 conditions_sizing.freestream.speed_of_sound = 299.53150968 conditions_sizing.freestream.velocity = conditions_sizing.freestream.mach_number * conditions_sizing.freestream.speed_of_sound # propulsion conditions conditions_sizing.propulsion.throttle = ones_1col*1.0 state_sizing = Data() state_sizing.numerics = Data() state_sizing.conditions = conditions_sizing state_off_design=Data() state_off_design.numerics=Data() state_off_design.conditions=conditions # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbo_fan' # setup turbofan.bypass_ratio = 5.4 turbofan.number_of_engines = 2.0 turbofan.engine_length = 2.5 turbofan.nacelle_diameter = 1.580 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 # 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
def vehicle_setup(): """This is the full physical definition of the vehicle, and is designed to be independent of the analyses that are selected.""" # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737-800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # Vehicle level mass properties # The maximum takeoff gross weight is used by a number of methods, most notably the weight # method. However, it does not directly inform mission analysis. vehicle.mass_properties.max_takeoff = 79015.8 * Units.kilogram # The takeoff weight is used to determine the weight of the vehicle at the start of the mission vehicle.mass_properties.takeoff = 79015.8 * Units.kilogram # Operating empty may be used by various weight methods or other methods. Importantly, it does # not constrain the mission analysis directly, meaning that the vehicle weight in a mission # can drop below this value if more fuel is needed than is available. vehicle.mass_properties.operating_empty = 62746.4 * Units.kilogram # The maximum zero fuel weight is also used by methods such as weights vehicle.mass_properties.max_zero_fuel = 62732.0 * Units.kilogram # Cargo weight typically feeds directly into weights output and does not affect the mission vehicle.mass_properties.cargo = 10000. * Units.kilogram # Envelope properties # These values are typical FAR values for a transport of this type vehicle.envelope.ultimate_load = 3.75 vehicle.envelope.limit_load = 2.5 # Vehicle level parameters # The vehicle reference area typically matches the main wing reference area vehicle.reference_area = 124.862 * Units['meters**2'] # Number of passengers, control settings, and accessories settings are used by the weights # methods vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Landing Gear # ------------------------------------------------------------------ # The settings here can be used for noise analysis, but are not used in this tutorial landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 # Number of main landing gear landing_gear.nose_units = 1 # Number of nose landing gear landing_gear.main_wheels = 2 # Number of wheels on the main landing gear landing_gear.nose_wheels = 2 # Number of wheels on the nose landing gear vehicle.landing_gear = landing_gear # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ # This main wing is approximated as a simple trapezoid. A segmented wing can also be created if # desired. Segmented wings appear in later tutorials, and a version of the 737 with segmented # wings can be found in the SUAVE testing scripts. # SUAVE allows conflicting geometric values to be set in terms of items such as aspect ratio # when compared with span and reference area. Sizing scripts may be used to enforce # consistency if desired. wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 # Quarter chord sweep is used as the driving sweep in most of the low fidelity analysis methods. # If a different known value (such as leading edge sweep) is given, it should be converted to # quarter chord sweep and added here. In some cases leading edge sweep will be used directly as # well, and can be entered here too. wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.1 wing.spans.projected = 34.32 * Units.meter wing.chords.root = 7.760 * Units.meter wing.chords.tip = 0.782 * Units.meter wing.chords.mean_aerodynamic = 4.235 * Units.meter wing.areas.reference = 124.862 * Units['meters**2'] wing.twists.root = 4.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [[13.61, 0, -1.27]] * Units.meter wing.vertical = False wing.symmetric = True # The high lift flag controls aspects of maximum lift coefficient calculations wing.high_lift = True # The dynamic pressure ratio is used in stability calculations wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Main Wing Control Surfaces # ------------------------------------------------------------------ # Information in this section is used for high lift calculations and when conversion to AVL # is desired. # Deflections will typically be specified separately in individual vehicle configurations. flap = SUAVE.Components.Wings.Control_Surfaces.Flap() flap.tag = 'flap' flap.span_fraction_start = 0.20 flap.span_fraction_end = 0.70 flap.deflection = 0.0 * Units.degrees # Flap configuration types are used in computing maximum CL and noise flap.configuration_type = 'double_slotted' flap.chord_fraction = 0.30 wing.append_control_surface(flap) slat = SUAVE.Components.Wings.Control_Surfaces.Slat() slat.tag = 'slat' slat.span_fraction_start = 0.324 slat.span_fraction_end = 0.963 slat.deflection = 0.0 * Units.degrees slat.chord_fraction = 0.1 wing.append_control_surface(slat) aileron = SUAVE.Components.Wings.Control_Surfaces.Aileron() aileron.tag = 'aileron' aileron.span_fraction_start = 0.7 aileron.span_fraction_end = 0.963 aileron.deflection = 0.0 * Units.degrees aileron.chord_fraction = 0.16 wing.append_control_surface(aileron) # Add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Horizontal_Tail() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 wing.sweeps.quarter_chord = 40.0 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.2 wing.spans.projected = 14.2 * Units.meter wing.chords.root = 4.7 * Units.meter wing.chords.tip = 0.955 * Units.meter wing.chords.mean_aerodynamic = 3.0 * Units.meter wing.areas.reference = 32.488 * Units['meters**2'] wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [[32.83 * Units.meter, 0, 1.14 * Units.meter]] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # Add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Vertical_Tail() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweeps.quarter_chord = 25. * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.spans.projected = 7.777 * Units.meter wing.chords.root = 8.19 * Units.meter wing.chords.tip = 0.95 * Units.meter wing.chords.mean_aerodynamic = 4.0 * Units.meter wing.areas.reference = 27.316 * Units['meters**2'] wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [[28.79 * Units.meter, 0, 1.54 * Units.meter]] # meters wing.vertical = True wing.symmetric = False # The t tail flag is used in weights calculations wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # Add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' # Number of coach seats is used in some weights methods fuselage.number_coach_seats = vehicle.passengers # The seats abreast can be used along with seat pitch and the number of coach seats to # determine the length of the cabin if desired. fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 * Units.meter # Fineness ratios are used to determine VLM fuselage shape and sections to use in OpenVSP # output fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. # Nose and tail lengths are used in the VLM setup fuselage.lengths.nose = 6.4 * Units.meter fuselage.lengths.tail = 8.0 * Units.meter fuselage.lengths.total = 38.02 * Units.meter # Fore and aft space are added to the cabin length if the fuselage is sized based on # number of seats fuselage.lengths.fore_space = 6. * Units.meter fuselage.lengths.aft_space = 5. * Units.meter fuselage.width = 3.74 * Units.meter fuselage.heights.maximum = 3.74 * Units.meter fuselage.effective_diameter = 3.74 * Units.meter fuselage.areas.side_projected = 142.1948 * Units['meters**2'] fuselage.areas.wetted = 446.718 * Units['meters**2'] fuselage.areas.front_projected = 12.57 * Units['meters**2'] # Maximum differential pressure between the cabin and the atmosphere fuselage.differential_pressure = 5.0e4 * Units.pascal # Heights at different longitudinal locations are used in stability calculations and # in output to OpenVSP fuselage.heights.at_quarter_length = 3.74 * Units.meter fuselage.heights.at_three_quarters_length = 3.65 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.74 * Units.meter # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ turbofan = SUAVE.Components.Energy.Networks.Turbofan() # For some methods, the 'turbofan' tag is still necessary. This will be changed in the # future to allow arbitrary tags. turbofan.tag = 'turbofan' # High-level setup turbofan.number_of_engines = 2 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 * Units.meter turbofan.nacelle_diameter = 2.05 * Units.meter turbofan.origin = [[13.72, 4.86, -1.9], [13.72, -4.86, -1.9]] * Units.meter # Approximate the wetted area turbofan.areas.wetted = 1.1 * np.pi * turbofan.nacelle_diameter * turbofan.engine_length # Establish the correct working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # Components use estimated efficiencies. Estimates by technology level can be # found in textbooks such as those by J.D. Mattingly # ------------------------------------------------------------------ # Component 1 - Ram # Converts freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.append(ram) # ------------------------------------------------------------------ # Component 2 - Inlet Nozzle # Create component inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet_nozzle' # Specify performance inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # Add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # Create component compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # Specify performance compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # Add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # Create component compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # Specify performance compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # Add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # Create component turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # Specify performance turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # Add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # Create component turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # Specify performance turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # Add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # Create component combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # Specify performance combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1450 # K combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # Add to network turbofan.append(combustor) # ------------------------------------------------------------------ # Component 8 - Core Nozzle # Create component nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() nozzle.tag = 'core_nozzle' # Specify performance nozzle.polytropic_efficiency = 0.95 nozzle.pressure_ratio = 0.99 # Add to network turbofan.append(nozzle) # ------------------------------------------------------------------ # Component 9 - Fan Nozzle # Create component nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() nozzle.tag = 'fan_nozzle' # Specify performance nozzle.polytropic_efficiency = 0.95 nozzle.pressure_ratio = 0.99 # Add to network turbofan.append(nozzle) # ------------------------------------------------------------------ # Component 10 - Fan # Create component fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' # Specify performance fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 # Add to network turbofan.append(fan) # ------------------------------------------------------------------ # Component 11 - thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' # Design thrust is used to determine mass flow at full throttle thrust.total_design = 2 * 24000. * Units.N #Newtons # Add to network turbofan.thrust = thrust # Design sizing conditions are also used to determine mass flow altitude = 35000.0 * Units.ft mach_number = 0.78 # Determine turbofan behavior at the design condition turbofan_sizing(turbofan, mach_number, altitude) # Add turbofan network to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def engine_caluclations(altitude, bypass, mach_number, num_engine, thrust_total): # initialize the gas turbine network gt_engine = Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = num_engine gt_engine.bypass_ratio = bypass # gt_engine.engine_length = 5.2 gt_engine.nacelle_diameter = 3.5 # set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air # add working fluid to the network gt_engine.working_fluid = working_fluid # Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add ram to the network gt_engine.ram = ram # Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # turbofan.fan_nozzle_pressure_ratio = 0.98 #0.98 # add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle # Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.90 low_pressure_compressor.pressure_ratio = 1.5 # add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor # Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.90 # FIXME high_pressure_compressor.pressure_ratio = 14 # add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor # Component 5 :low pressure turbine low_pressure_turbine = Turbine_saga.Turbine() low_pressure_turbine.tag = 'lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.89 # add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine # Component 5 :high pressure turbine high_pressure_turbine = Turbine_saga.Turbine() high_pressure_turbine.tag = 'hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.89 # add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine # Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.995 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1450 combustor.pressure_ratio = 0.96 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # add the combustor to the network gt_engine.combustor = combustor # Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 # add the core nozzle to the network gt_engine.core_nozzle = core_nozzle # Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 # add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle # Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.89 fan.pressure_ratio = 1.5 # add the fan to the network gt_engine.fan = fan # Component 10 : Payload power draw generator = Generator() generator.tag = 'generator' generator.power_draw = 1 / gt_engine.number_of_engines gt_engine.generator = generator # Engine setup for noise module gt_engine.core_nozzle_diameter = 0.92 gt_engine.fan_nozzle_diameter = 1.659 gt_engine.engine_height = 1.35 # Engine centerline heigh above the ground plane gt_engine.exa = 1 # distance from fan face to fan exit/ fan diameter) gt_engine.plug_diameter = 0.1 # dimater of the engine plug gt_engine.geometry_xe = 1. # Geometry information for the installation effects function gt_engine.geometry_ye = 1. # Geometry information for the installation effects function gt_engine.geometry_Ce = 2. # Geometry information for the installation effects function # Define OPR OPR = fan.pressure_ratio * high_pressure_compressor.pressure_ratio * low_pressure_compressor.pressure_ratio # Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' # total design thrust (includes all the engines) thrust.total_design = thrust_total # should be just a pointer not a number # add thrust to the network gt_engine.thrust = thrust gt_engine.OPR = OPR # print thrust # size the turbofan turbofan_sizing(gt_engine, mach_number, altitude) compute_turbofan_geometry(gt_engine, None) return gt_engine
def energy_network(): # ------------------------------------------------------------------ # Evaluation Conditions # ------------------------------------------------------------------ # Conditions ones_1col = np.ones([1, 1]) alt = 10.0 # Setup conditions planet = SUAVE.Attributes.Planets.Earth() atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() atmo_data = atmosphere.compute_values(alt, 0, True) working_fluid = SUAVE.Attributes.Gases.Air() conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() # freestream conditions conditions.freestream.altitude = ones_1col * alt conditions.freestream.mach_number = ones_1col * 0.8 conditions.freestream.pressure = ones_1col * atmo_data.pressure conditions.freestream.temperature = ones_1col * atmo_data.temperature conditions.freestream.density = ones_1col * atmo_data.density conditions.freestream.dynamic_viscosity = ones_1col * atmo_data.dynamic_viscosity conditions.freestream.gravity = ones_1col * planet.compute_gravity(alt) conditions.freestream.isentropic_expansion_factor = ones_1col * working_fluid.compute_gamma( atmo_data.temperature, atmo_data.pressure) conditions.freestream.Cp = ones_1col * working_fluid.compute_cp( atmo_data.temperature, atmo_data.pressure) conditions.freestream.R = ones_1col * working_fluid.gas_specific_constant conditions.freestream.speed_of_sound = ones_1col * atmo_data.speed_of_sound conditions.freestream.velocity = conditions.freestream.mach_number * conditions.freestream.speed_of_sound conditions.velocity = conditions.freestream.mach_number * conditions.freestream.speed_of_sound conditions.q = 0.5 * conditions.freestream.density * conditions.velocity**2 conditions.g0 = conditions.freestream.gravity # propulsion conditions conditions.propulsion.throttle = ones_1col * 1.0 # ------------------------------------------------------------------ # Design/sizing conditions # ------------------------------------------------------------------ # Conditions ones_1col = np.ones([1, 1]) alt_size = 10000.0 # Setup conditions planet = SUAVE.Attributes.Planets.Earth() atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() atmo_data = atmosphere.compute_values(alt_size, 0, True) working_fluid = SUAVE.Attributes.Gases.Air() conditions_sizing = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics( ) # freestream conditions conditions_sizing.freestream.altitude = ones_1col * alt_size conditions_sizing.freestream.mach_number = ones_1col * 0.8 conditions_sizing.freestream.pressure = ones_1col * atmo_data.pressure conditions_sizing.freestream.temperature = ones_1col * atmo_data.temperature conditions_sizing.freestream.density = ones_1col * atmo_data.density conditions_sizing.freestream.dynamic_viscosity = ones_1col * atmo_data.dynamic_viscosity conditions_sizing.freestream.gravity = ones_1col * planet.compute_gravity( alt_size) conditions_sizing.freestream.isentropic_expansion_factor = ones_1col * working_fluid.compute_gamma( atmo_data.temperature, atmo_data.pressure) conditions_sizing.freestream.Cp = ones_1col * working_fluid.compute_cp( atmo_data.temperature, atmo_data.pressure) conditions_sizing.freestream.R = ones_1col * working_fluid.gas_specific_constant conditions_sizing.freestream.speed_of_sound = ones_1col * atmo_data.speed_of_sound conditions_sizing.freestream.velocity = conditions_sizing.freestream.mach_number * conditions_sizing.freestream.speed_of_sound conditions_sizing.velocity = conditions_sizing.freestream.mach_number * conditions_sizing.freestream.speed_of_sound conditions_sizing.q = 0.5 * conditions_sizing.freestream.density * conditions_sizing.velocity**2 conditions_sizing.g0 = conditions_sizing.freestream.gravity # propulsion conditions conditions_sizing.propulsion.throttle = ones_1col * 1.0 state_sizing = Data() state_sizing.numerics = Data() state_sizing.conditions = conditions_sizing state_off_design = Data() state_off_design.numerics = Data() state_off_design.conditions = conditions # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # Instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.bypass_ratio = 5.4 turbofan.number_of_engines = 2.0 turbofan.engine_length = 2.5 turbofan.nacelle_diameter = 1.580 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737_800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 10000. * Units.kilogram # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 # Not set wing.thickness_to_chord = 0.1 # Not set wing.taper = 0.1 wing.span_efficiency = 0.9 wing.spans.projected = 34.32 wing.chords.root = 7.760 * Units.meter wing.chords.tip = 0.782 * Units.meter wing.chords.mean_aerodynamic = 4.235 * Units.meter wing.areas.reference = 124.862 # Not set wing.sweeps.quarter_chord = 25. * Units.degrees wing.twists.root = 4.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.dihedral = 2.5 * Units.degrees wing.origin = [13.61, 0, -1.27] wing.aerodynamic_center = [0, 0, 0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 # Not set wing.thickness_to_chord = 0.08 # Not set wing.taper = 0.2 wing.span_efficiency = 0.9 wing.spans.projected = 14.2 wing.chords.root = 4.70 wing.chords.tip = 0.955 wing.chords.mean_aerodynamic = 2.5 wing.areas.reference = 42.65 wing.twists.root = 0.0 * Units.degrees # Not set wing.twists.tip = 0.0 * Units.degrees # Not set wing.sweeps.quarter_chord = 40.0 * Units.degrees wing.origin = [32.83, 0, 1.14] wing.aerodynamic_center = [0, 0, 0] wing.dihedral = 8.63 * Units.degrees wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweeps.quarter_chord = 25. * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.77 wing.chords.root = 8.19 wing.chords.tip = 0.95 wing.chords.mean_aerodynamic = 4.0 wing.areas.reference = 27.316 wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [28.79, 0, 1.54] wing.aerodynamic_center = [0, 0, 0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.57 fuselage.fineness.tail = 3.2 fuselage.lengths.nose = 8.0 fuselage.lengths.tail = 12. fuselage.lengths.cabin = 28.85 fuselage.lengths.total = 38.02 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.76 fuselage.heights.maximum = 3.76 fuselage.heights.at_quarter_length = 3.76 fuselage.heights.at_three_quarters_length = 3.65 fuselage.heights.at_wing_root_quarter_chord = 3.76 fuselage.areas.side_projected = 142.1948 fuselage.areas.wetted = 446.718 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.76 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 4.1 turbofan.nacelle_diameter = 0.85 turbofan.origin = [[13.72, 4.86, -1.9], [13.72, -4.86, -1.9]] # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2 * 24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan, mach_number, altitude) #computing the engine length and diameter compute_turbofan_geometry(turbofan, None) print "sls thrust : ", turbofan.sealevel_static_thrust print "engine length : ", turbofan.engine_length # add gas turbine network gt_engine to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Embraer_E190AR' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties (http://www.embraercommercialaviation.com/AircraftPDF/E190_Weights.pdf) vehicle.mass_properties.max_takeoff = 51800. # kg vehicle.mass_properties.operating_empty = 27837. # kg vehicle.mass_properties.takeoff = 51800. # kg vehicle.mass_properties.max_zero_fuel = 40900. # kg vehicle.mass_properties.max_payload = 13063. # kg vehicle.mass_properties.max_fuel = 12971. # kg vehicle.mass_properties.cargo = 0.0 # kg vehicle.mass_properties.center_of_gravity = [[16.8, 0, 1.6]] vehicle.mass_properties.moments_of_inertia.tensor = [[10**5, 0, 0], [ 0, 10**6, 0, ], [0, 0, 10**7]] # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92. vehicle.passengers = 106 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.areas.reference = 92.0 wing.aspect_ratio = 8.4 wing.chords.root = 6.2 wing.chords.tip = 1.44 wing.sweeps.quarter_chord = 23.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.dihedral = 5.00 * Units.deg wing.spans.projected = 28.72 wing.origin = [[13.0, 0, -1.50]] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.areas.exposed = 0.80 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.dynamic_pressure_ratio = 1.0 segment = SUAVE.Components.Wings.Segment() segment.tag = 'root' segment.percent_span_location = 0.0 segment.twist = 4. * Units.deg segment.root_chord_percent = 1. segment.thickness_to_chord = .11 segment.dihedral_outboard = 5. * Units.degrees segment.sweeps.quarter_chord = 20.6 * Units.degrees wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'yehudi' segment.percent_span_location = 0.348 segment.twist = (4. - segment.percent_span_location * 4.) * Units.deg segment.root_chord_percent = 0.60 segment.thickness_to_chord = .11 segment.dihedral_outboard = 4 * Units.degrees segment.sweeps.quarter_chord = 24.1 * Units.degrees wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'section_2' segment.percent_span_location = 0.961 segment.twist = (4. - segment.percent_span_location * 4.) * Units.deg segment.root_chord_percent = 0.25 segment.thickness_to_chord = .11 segment.dihedral_outboard = 70. * Units.degrees segment.sweeps.quarter_chord = 50. * Units.degrees wing.Segments.append(segment) segment = SUAVE.Components.Wings.Segment() segment.tag = 'Tip' segment.percent_span_location = 1. segment.twist = (4. - segment.percent_span_location * 4.) * Units.deg segment.root_chord_percent = 0.070 segment.thickness_to_chord = .11 segment.dihedral_outboard = 0. segment.sweeps.quarter_chord = 0. wing.Segments.append(segment) # control surfaces ------------------------------------------- flap = SUAVE.Components.Wings.Control_Surfaces.Flap() flap.tag = 'flap' flap.span_fraction_start = 0.11 flap.span_fraction_end = 0.85 flap.deflection = 0.0 * Units.deg flap.chord_fraction = 0.28 flap.configuration_type = 'double_slotted' wing.append_control_surface(flap) slat = SUAVE.Components.Wings.Control_Surfaces.Slat() slat.tag = 'slat' slat.span_fraction_start = 0.324 slat.span_fraction_end = 0.963 slat.deflection = 1.0 * Units.deg slat.chord_fraction = 0.1 wing.append_control_surface(slat) wing = wing_planform(wing) wing.areas.exposed = 0.80 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Horizontal_Tail() wing.tag = 'horizontal_stabilizer' wing.areas.reference = 26.0 wing.aspect_ratio = 5.5 wing.sweeps.quarter_chord = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.dihedral = 8.4 * Units.degrees wing.origin = [[31, 0, 0.44]] wing.vertical = False wing.symmetric = True wing.high_lift = False wing = wing_planform(wing) wing.areas.exposed = 0.9 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.dynamic_pressure_ratio = 0.90 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Vertical_Tail() wing.tag = 'vertical_stabilizer' wing.areas.reference = 16.0 wing.aspect_ratio = 1.7 wing.sweeps.quarter_chord = 35. * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.dihedral = 0.00 wing.origin = [[30.4, 0, 1.675]] wing.vertical = True wing.symmetric = False wing.high_lift = False wing = wing_planform(wing) wing.areas.exposed = 0.9 * wing.areas.wetted wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.dynamic_pressure_ratio = 1.00 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.origin = [[0, 0, 0]] fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 30. * Units.inches fuselage.fineness.nose = 1.28 fuselage.fineness.tail = 3.48 fuselage.lengths.nose = 6.0 fuselage.lengths.tail = 9.0 fuselage.lengths.cabin = 21.24 fuselage.lengths.total = 36.24 fuselage.lengths.fore_space = 0. fuselage.lengths.aft_space = 0. fuselage.width = 3.01 * Units.meters fuselage.heights.maximum = 3.35 fuselage.heights.at_quarter_length = 3.35 fuselage.heights.at_three_quarters_length = 3.35 fuselage.heights.at_wing_root_quarter_chord = 3.35 fuselage.areas.side_projected = 239.20 fuselage.areas.wetted = 327.01 fuselage.areas.front_projected = 8.0110 fuselage.effective_diameter = 3.18 fuselage.differential_pressure = 10**5 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.origin = [[12.0, 4.38, -2.1], [12.0, -4.38, -2.1]] gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 gt_engine.inlet_diameter = 2.0 #compute engine areas) Amax = (np.pi / 4.) * gt_engine.nacelle_diameter**2. Awet = 1.1 * np.pi * gt_engine.nacelle_diameter * gt_engine.engine_length # 1.1 is simple coefficient #Assign engine area gt_engine.areas.wetted = Awet #set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air() #add working fluid to the network gt_engine.working_fluid = working_fluid #Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram #Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 #add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle #Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 #add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor #Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 #add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor #Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag = 'lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 #add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine #Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag = 'hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 #add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine #Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() #add the combustor to the network gt_engine.combustor = combustor #Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle #Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 #add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle #Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 #add the fan to the network gt_engine.fan = fan #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 37278.0 * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan turbofan_sizing(gt_engine, mach_number, altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) fuel = SUAVE.Components.Physical_Component() vehicle.fuel = fuel fuel.mass_properties.mass = vehicle.mass_properties.max_takeoff - vehicle.mass_properties.max_fuel fuel.origin = vehicle.wings.main_wing.mass_properties.center_of_gravity fuel.mass_properties.center_of_gravity = vehicle.wings.main_wing.aerodynamic_center # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737-800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 * Units.kilogram vehicle.mass_properties.takeoff = 79015.8 * Units.kilogram vehicle.mass_properties.operating_empty = 62746.4 * Units.kilogram vehicle.mass_properties.takeoff = 79015.8 * Units.kilogram vehicle.mass_properties.max_zero_fuel = 62732.0 * Units.kilogram vehicle.mass_properties.cargo = 10000. * Units.kilogram # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 * Units['meters**2'] vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Landing Gear # ------------------------------------------------------------------ # used for noise calculations landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 #number of main landing gear units landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear = landing_gear # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.43 wing.sweeps.quarter_chord = 17.45 * Units.deg wing.thickness_to_chord = 0.1164 wing.taper = 0.235 wing.span_efficiency = 0.9 wing.spans.projected = 28.08 * Units.meter wing.chords.root = 5.28 * Units.meter wing.chords.tip = 1.26 * Units.meter wing.chords.mean_aerodynamic = 3.81 * Units.meter wing.areas.reference = 124.862 * Units['meters**2'] wing.twists.root = 2.0 * Units.degrees wing.twists.tip = -2.5 * Units.degrees wing.origin = [13.61, 0, -1.27] # meters wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Flaps # ------------------------------------------------------------------ wing.flaps.chord = 0.30 # 30% of the chord wing.flaps.span_start = 0.10 # 10% of the span wing.flaps.span_end = 0.75 wing.flaps.type = 'double_slotted' # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 wing.sweeps.quarter_chord = 40 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.2 wing.span_efficiency = 0.9 wing.spans.projected = 14.2 * Units.meter wing.chords.root = 4.7 * Units.meter wing.chords.tip = .955 * Units.meter wing.chords.mean_aerodynamic = 8.0 * Units.meter wing.areas.reference = 32.488 * Units['meters**2'] wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [32.83, 0, 1.14] # meters wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweeps.quarter_chord = 25. * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.777 * Units.meter wing.chords.root = 8.19 * Units.meter wing.chords.tip = 0.95 * Units.meter wing.chords.mean_aerodynamic = 4.0 * Units.meter wing.areas.reference = 27.316 * Units['meters**2'] wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [28.79, 0, 1.54] # meters wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 * Units.meter fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 * Units.meter fuselage.lengths.tail = 8.0 * Units.meter fuselage.lengths.cabin = 28.85 * Units.meter fuselage.lengths.total = 38.02 * Units.meter fuselage.lengths.fore_space = 6. * Units.meter fuselage.lengths.aft_space = 5. * Units.meter fuselage.width = 3.74 * Units.meter fuselage.heights.maximum = 3.74 * Units.meter fuselage.effective_diameter = 3.74 * Units.meter fuselage.areas.side_projected = 142.1948 * Units['meters**2'] fuselage.areas.wetted = 446.718 * Units['meters**2'] fuselage.areas.front_projected = 12.57 * Units['meters**2'] fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure fuselage.heights.at_quarter_length = 3.74 * Units.meter fuselage.heights.at_three_quarters_length = 3.65 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.74 * Units.meter # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 * Units.meter turbofan.nacelle_diameter = 2.05 * Units.meter turbofan.origin = [[13.72, 4.86, -1.9], [13.72, -4.86, -1.9]] # meters #compute engine areas turbofan.areas.wetted = 1.1 * np.pi * turbofan.nacelle_diameter * turbofan.engine_length # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # setup combustor.efficiency = 0.99 combustor.turbine_inlet_temperature = 1450 # K 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2 * 24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. #Engine setup for noise module # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan, mach_number, altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def engine_caluclations(altitude, bypass, mach_number, num_engine, thrust_total): # initialize the gas turbine network gt_engine = Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = num_engine gt_engine.bypass_ratio = bypass # gt_engine.engine_length = 5.2 gt_engine.nacelle_diameter = 3.5 # set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air # add working fluid to the network gt_engine.working_fluid = working_fluid # Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add ram to the network gt_engine.ram = ram # Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # turbofan.fan_nozzle_pressure_ratio = 0.98 #0.98 # add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle # Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.90 low_pressure_compressor.pressure_ratio = 1.5 # add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor # Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.90 # FIXME high_pressure_compressor.pressure_ratio = 14 # add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor # Component 5 :low pressure turbine low_pressure_turbine = Turbine_saga.Turbine() low_pressure_turbine.tag = 'lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.89 # add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine # Component 5 :high pressure turbine high_pressure_turbine = Turbine_saga.Turbine() high_pressure_turbine.tag = 'hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.89 # add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine # Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.995 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1450 combustor.pressure_ratio = 0.96 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # add the combustor to the network gt_engine.combustor = combustor # Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 # add the core nozzle to the network gt_engine.core_nozzle = core_nozzle # Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 # add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle # Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.89 fan.pressure_ratio = 1.5 # add the fan to the network gt_engine.fan = fan # Component 10 : Payload power draw generator = Generator() generator.tag = 'generator' generator.power_draw = 1 / gt_engine.number_of_engines gt_engine.generator = generator # Engine setup for noise module gt_engine.core_nozzle_diameter = 0.92 gt_engine.fan_nozzle_diameter = 1.659 gt_engine.engine_height = 1.35 # Engine centerline heigh above the ground plane gt_engine.exa = 1 # distance from fan face to fan exit/ fan diameter) gt_engine.plug_diameter = 0.1 # dimater of the engine plug gt_engine.geometry_xe = 1. # Geometry information for the installation effects function gt_engine.geometry_ye = 1. # Geometry information for the installation effects function gt_engine.geometry_Ce = 2. # Geometry information for the installation effects function # Define OPR OPR = fan.pressure_ratio * high_pressure_compressor.pressure_ratio * low_pressure_compressor.pressure_ratio # Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' # total design thrust (includes all the engines) thrust.total_design = thrust_total # should be just a pointer not a number # add thrust to the network gt_engine.thrust = thrust gt_engine.OPR = OPR # print thrust # size the turbofan turbofan_sizing(gt_engine, mach_number, altitude) compute_turbofan_geometry(gt_engine, None) return gt_engine
def base_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'E170' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 37200. * Units.kg vehicle.mass_properties.operating_empty = 20736. * Units.kg vehicle.mass_properties.takeoff = 37200. * Units.kg vehicle.mass_properties.max_zero_fuel = 30140. * Units.kg vehicle.mass_properties.cargo = 0.0 * Units.kg vehicle.mass_properties.max_payload = 9404.0 * Units.kg vehicle.mass_properties.max_fuel = 9428.0 * Units.kg # vehicle.mass_properties.center_of_gravity = [11., 0., 0.] vehicle.mass_properties.center_of_gravity = [12.925 + 0.15 * 3.194, 0., 0.] # envelope properties vehicle.envelope.ultimate_load = 2.5 * 1.5 vehicle.envelope.limit_load = 2.5 # basic parameters vehicle.reference_area = 72.72 * Units['meters**2'] vehicle.passengers = 72 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.6 wing.sweeps.quarter_chord = 23.0 * Units.deg # 22.5 wing.thickness_to_chord = 0.11 wing.taper = 0.3275 #0.28 wing.span_efficiency = 0.96 wing.spans.projected = 26.0 * Units.meter wing.chords.root = 4.2138 * Units.meter #5.428 * Units.meter wing.chords.tip = 1.380 * Units.meter wing.chords.mean_aerodynamic = 3.194 * Units.meter # 3.806 wing.areas.reference = 72.72 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [10.36122, 0, 0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.flaps.type = "double_slotted" wing.flaps.chord = 0.280 wing.dynamic_pressure_ratio = 1.0 wing.flaps.span_start = 0.13 wing.flaps.span_end = 0.75 wing_planform(wing) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 4.3 wing.sweeps.quarter_chord = 30.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.3707 wing.span_efficiency = 0.9 wing.spans.projected = 10.000 * Units.meter wing.chords.root = 3.394 * Units.meter wing.chords.tip = 1.258 * Units.meter wing.chords.mean_aerodynamic = 2.4895 * Units.meter wing.areas.reference = 23.25 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [24.6, 0, 0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 wing_planform(wing) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' # equal to E190 data wing.aspect_ratio = 1.7 wing.sweeps.quarter_chord = 35 * Units.deg wing.thickness_to_chord = 0.12 wing.taper = 0.26 wing.span_efficiency = 0.90 wing.spans.projected = 5.2153 * Units.meter wing.chords.root = 5.5779 * Units.meter wing.chords.tip = 1.4547 * Units.meter wing.chords.mean_aerodynamic = 3.9192 * Units.meter wing.areas.reference = 16.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [23.9, 0, 0] wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 wing_planform(wing) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 # fuselage.fineness.nose = 2.0 # fuselage.fineness.tail = 3.0 # fuselage.lengths.nose = 6.00 * Units.meter fuselage.lengths.tail = 9.00 * Units.meter fuselage.lengths.cabin = 14.90 * Units.meter fuselage.lengths.total = 29.90 * Units.meter fuselage.lengths.fore_space = 0. * Units.meter fuselage.lengths.aft_space = 0. * Units.meter fuselage.width = 3.000 * Units.meter fuselage.heights.maximum = 3.400 * Units.meter fuselage.areas.side_projected = 80.000 * Units[ 'meters**2'] # 197.35 * Units['meters**2'] fuselage.areas.wetted = 280.00 * Units['meters**2'] # 269.80 fuselage.areas.front_projected = 8.0110 * Units['meters**2'] # 8.0110 fuselage.effective_diameter = 3.2 fuselage.differential_pressure = 8.965 * Units.psi fuselage.heights.at_quarter_length = 3.4 * Units.meter fuselage.heights.at_three_quarters_length = 3.4 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.4 * Units.meter # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.0 gt_engine.engine_length = 3.1 * Units.meter gt_engine.nacelle_diameter = 1.64 * Units.meter gt_engine.origin = [[9.721, 3.984, -1], [9.721, -3.984, -1]] # meters # compute engine areas gt_engine.areas.wetted = 1.1 * 3.14159265359 * gt_engine.nacelle_diameter * gt_engine.engine_length #set the working fluid for the network gt_engine.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram # ------------------------------------------------------------------ # Component 2 - Inlet Nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.90 # add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 7.50 # add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag = 'lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 # add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag = 'hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 # add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine # ------------------------------------------------------------------ # Component 7 - Combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # add the combustor to the network gt_engine.combustor = combustor # ------------------------------------------------------------------ # Component 8 - Core Nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.98 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle # ------------------------------------------------------------------ # Component 9 - Fan Nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.98 # add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle # ------------------------------------------------------------------ # Component 10 - Fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.625 # add the fan to the network gt_engine.fan = fan # ------------------------------------------------------------------ # Component 11 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 27550.0 * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan turbofan_sizing(gt_engine, mach_number, altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) # ------------------------------------------------------------------ # now add weights objects vehicle.landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() vehicle.control_systems = SUAVE.Components.Physical_Component() vehicle.electrical_systems = SUAVE.Components.Physical_Component() vehicle.avionics = SUAVE.Components.Energy.Peripherals.Avionics() vehicle.passenger_weights = SUAVE.Components.Physical_Component() vehicle.furnishings = SUAVE.Components.Physical_Component() vehicle.air_conditioner = SUAVE.Components.Physical_Component() vehicle.fuel = SUAVE.Components.Physical_Component() vehicle.apu = SUAVE.Components.Physical_Component() vehicle.hydraulics = SUAVE.Components.Physical_Component() vehicle.optionals = SUAVE.Components.Physical_Component() vehicle.wings[ 'vertical_stabilizer'].rudder = SUAVE.Components.Physical_Component() # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Embraer_E190AR' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties (http://www.embraercommercialaviation.com/AircraftPDF/E190_Weights.pdf) vehicle.mass_properties.max_takeoff = 51800. # kg vehicle.mass_properties.operating_empty = 27837. # kg vehicle.mass_properties.takeoff = 51800. # kg vehicle.mass_properties.max_zero_fuel = 40900. # kg vehicle.mass_properties.max_payload = 13063. # kg vehicle.mass_properties.max_fuel = 12971. # kg vehicle.mass_properties.cargo = 0.0 # kg vehicle.mass_properties.center_of_gravity = [16.8, 0, 1.6]#[[60 * Units.feet, 0, 0]] # Not correct vehicle.mass_properties.moments_of_inertia.tensor = [[10 ** 5, 0, 0],[0, 10 ** 6, 0,],[0,0, 10 ** 7]] # Not Correct # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92. vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.areas.reference = 92.0 wing.aspect_ratio = 8.4 wing.sweeps.quarter_chord = 23.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.dihedral = 5.00 wing.origin = [13,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.flaps.type = 'double_slotted' wing.flaps.chord = 0.28 wing.flaps.span_start = 0.11 wing.flaps.span_end = 0.85 wing = wing_planform(wing) wing.areas.exposed = 0.80 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.span_efficiency = 1.0 wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.areas.reference = 26.0 wing.aspect_ratio = 5.5 wing.sweeps.quarter_chord = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.dihedral = 8.00 wing.origin = [32,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = False wing = wing_planform(wing) wing.areas.exposed = 0.9 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.span_efficiency = 0.90 wing.dynamic_pressure_ratio = 0.90 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.areas.reference = 16.0 wing.aspect_ratio = 1.7 wing.sweeps.quarter_chord = 35. * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.dihedral = 0.00 wing.origin = [32,0,0] wing.vertical = True wing.symmetric = False wing.high_lift = False wing = wing_planform(wing) wing.areas.exposed = 0.9 * wing.areas.wetted wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.span_efficiency = 0.90 wing.dynamic_pressure_ratio = 1.00 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.origin = [[0,0,0]] fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 fuselage.fineness.nose = 2.0 fuselage.fineness.tail = 3.0 fuselage.lengths.nose = 6.0 fuselage.lengths.tail = 9.0 fuselage.lengths.cabin = 21.24 fuselage.lengths.total = 36.24 fuselage.lengths.fore_space = 0. fuselage.lengths.aft_space = 0. fuselage.width = 3.18 fuselage.heights.maximum = 4.18 fuselage.heights.at_quarter_length = 3.18 fuselage.heights.at_three_quarters_length = 3.18 fuselage.heights.at_wing_root_quarter_chord = 4.00 fuselage.areas.side_projected = 239.20 fuselage.areas.wetted = 327.01 fuselage.areas.front_projected = 8.0110 fuselage.effective_diameter = 3.18 fuselage.differential_pressure = 10**5 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 #compute engine areas) Amax = (np.pi/4.)*gt_engine.nacelle_diameter**2. Awet = 1.1*np.pi*gt_engine.nacelle_diameter*gt_engine.engine_length # 1.1 is simple coefficient #Assign engine areas gt_engine.areas.wetted = Awet #set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air() #add working fluid to the network gt_engine.working_fluid = working_fluid #Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram #Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 #add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle #Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 #add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor #Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 #add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor #Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag='lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 #add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine #Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag='hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 #add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine #Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() #add the combustor to the network gt_engine.combustor = combustor #Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle #Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 #add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle #Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 #add the fan to the network gt_engine.fan = fan #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 37278.0* Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan turbofan_sizing(gt_engine,mach_number,altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) fuel =SUAVE.Components.Physical_Component() vehicle.fuel =fuel fuel.mass_properties.mass =vehicle.mass_properties.max_takeoff-vehicle.mass_properties.max_fuel fuel.origin =vehicle.wings.main_wing.mass_properties.center_of_gravity fuel.mass_properties.center_of_gravity=vehicle.wings.main_wing.aerodynamic_center # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.operating_empty = 62746.4 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.max_zero_fuel = 62732.0 # kg #0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.center_of_gravity = [ 15.30987849, 0. , -0.48023939] # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Landing Gear # ------------------------------------------------------------------ #used for noise calculations landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 #number of main landing gear units landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear=landing_gear # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.1 wing.span_efficiency = 0.9 wing.spans.projected = 34.32 wing.chords.root = 7.760 * Units.meter wing.chords.tip = 0.782 * Units.meter wing.chords.mean_aerodynamic = 4.235 * Units.meter wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [13.61,0,-1.27] wing.aerodynamic_center = [0,0,0] #[3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Flaps # ------------------------------------------------------------------ wing.flaps.chord = 0.30 wing.flaps.span_start = 0.10 # -> wing.flaps.area = 97.1112 wing.flaps.span_end = 0.75 wing.flaps.type = 'double_slotted' # -> wing.flaps.number_slots = 2 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 # wing.sweeps.quarter_chord = 40 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.2 wing.span_efficiency = 0.9 wing.spans.projected = 14.2 # wing.chords.root = 4.7 wing.chords.tip = .955 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 # wing.areas.exposed = 199.7792 # Exposed area of the horizontal tail wing.areas.wetted = 249.724 # Wetted area of the horizontal tail wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [32.83,0,1.14] wing.aerodynamic_center = [0,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 # wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.777 # wing.chords.root = 8.19 wing.chords.tip = 0.95 wing.chords.mean_aerodynamic = 4.0 wing.areas.reference = 27.316 # wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [28.79,0,1.54] wing.aerodynamic_center = [0,0,0] #[2,0,0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers #fuselage.number_coach_seats = 200. fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 #44.0 fuselage.lengths.total = 38.02 #58.4 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 #4. fuselage.heights.maximum = 3.74 #4. # fuselage.heights.at_quarter_length = 3.74 # Not correct fuselage.heights.at_three_quarters_length = 3.65 # Not correct fuselage.heights.at_wing_root_quarter_chord = 3.74 # Not correct fuselage.areas.side_projected = 142.1948 #4.* 59.8 # Not correct fuselage.areas.wetted = 446.718 #688.64 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 #4.0 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # This origin is overwritten by compute_component_centers_of_gravity(base,compute_propulsor_origin=True) turbofan.origin = [[13.72, 4.86,-1.9],[13.72, -4.86,-1.9]] #compute engine areas Awet = 1.1*np.pi*turbofan.nacelle_diameter*turbofan.engine_length #Assign engine areas turbofan.areas.wetted = Awet # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. #Engine setup for noise module # add to network turbofan.thrust = thrust turbofan.core_nozzle_diameter = 0.92 turbofan.fan_nozzle_diameter = 1.659 turbofan.engine_height = 0.5 #Engine centerline heigh above the ground plane turbofan.exa = 1 #distance from fan face to fan exit/ fan diameter) turbofan.plug_diameter = 0.1 #dimater of the engine plug turbofan.geometry_xe = 1. # Geometry information for the installation effects function turbofan.geometry_ye = 1. # Geometry information for the installation effects function turbofan.geometry_Ce = 2. # Geometry information for the installation effects function #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def engine(): #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 #set the working fluid for the network gt_engine.working_fluid = SUAVE.Attributes.Gases.Air #Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram #Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 #add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle #Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 #add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor #Component 4: high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 #add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor #Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag='lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 #add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine #Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag='hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 #add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine #Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() #add the combustor to the network gt_engine.combustor = combustor #Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle #Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 #add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle #Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 #add the fan to the network gt_engine.fan = fan #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 52700.0* Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan turbofan_sizing(gt_engine,mach_number,altitude) return gt_engine
def energy_network(): # ------------------------------------------------------------------ # Evaluation Conditions # ------------------------------------------------------------------ # Conditions ones_1col = np.ones([1,1]) alt = 10.0 # Setup conditions planet = SUAVE.Attributes.Planets.Earth() atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() atmo_data = atmosphere.compute_values(alt,0,True) working_fluid = SUAVE.Attributes.Gases.Air() conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() # freestream conditions conditions.freestream.altitude = ones_1col*alt conditions.freestream.mach_number = ones_1col*0.8 conditions.freestream.pressure = ones_1col*atmo_data.pressure conditions.freestream.temperature = ones_1col*atmo_data.temperature conditions.freestream.density = ones_1col*atmo_data.density conditions.freestream.dynamic_viscosity = ones_1col*atmo_data.dynamic_viscosity conditions.freestream.gravity = ones_1col*planet.compute_gravity(alt) conditions.freestream.isentropic_expansion_factor = ones_1col*working_fluid.compute_gamma(atmo_data.temperature,atmo_data.pressure) conditions.freestream.Cp = ones_1col*working_fluid.compute_cp(atmo_data.temperature,atmo_data.pressure) conditions.freestream.R = ones_1col*working_fluid.gas_specific_constant conditions.freestream.speed_of_sound = ones_1col*atmo_data.speed_of_sound conditions.freestream.velocity = conditions.freestream.mach_number*conditions.freestream.speed_of_sound conditions.velocity = conditions.freestream.mach_number*conditions.freestream.speed_of_sound conditions.q = 0.5*conditions.freestream.density*conditions.velocity**2 conditions.g0 = conditions.freestream.gravity # propulsion conditions conditions.propulsion.throttle = ones_1col*1.0 # ------------------------------------------------------------------ # Design/sizing conditions # ------------------------------------------------------------------ # Conditions ones_1col = np.ones([1,1]) alt_size = 10000.0 # Setup conditions planet = SUAVE.Attributes.Planets.Earth() atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() atmo_data = atmosphere.compute_values(alt_size,0,True) working_fluid = SUAVE.Attributes.Gases.Air() conditions_sizing = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() # freestream conditions conditions_sizing.freestream.altitude = ones_1col*alt_size conditions_sizing.freestream.mach_number = ones_1col*0.8 conditions_sizing.freestream.pressure = ones_1col*atmo_data.pressure conditions_sizing.freestream.temperature = ones_1col*atmo_data.temperature conditions_sizing.freestream.density = ones_1col*atmo_data.density conditions_sizing.freestream.dynamic_viscosity = ones_1col*atmo_data.dynamic_viscosity conditions_sizing.freestream.gravity = ones_1col*planet.compute_gravity(alt_size) conditions_sizing.freestream.isentropic_expansion_factor = ones_1col*working_fluid.compute_gamma(atmo_data.temperature,atmo_data.pressure) conditions_sizing.freestream.Cp = ones_1col*working_fluid.compute_cp(atmo_data.temperature,atmo_data.pressure) conditions_sizing.freestream.R = ones_1col*working_fluid.gas_specific_constant conditions_sizing.freestream.speed_of_sound = ones_1col*atmo_data.speed_of_sound conditions_sizing.freestream.velocity = conditions_sizing.freestream.mach_number*conditions_sizing.freestream.speed_of_sound conditions_sizing.velocity = conditions_sizing.freestream.mach_number*conditions_sizing.freestream.speed_of_sound conditions_sizing.q = 0.5*conditions_sizing.freestream.density*conditions_sizing.velocity**2 conditions_sizing.g0 = conditions_sizing.freestream.gravity # propulsion conditions conditions_sizing.propulsion.throttle = ones_1col*1.0 state_sizing = Data() state_sizing.numerics = Data() state_sizing.conditions = conditions_sizing state_off_design = Data() state_off_design.numerics = Data() state_off_design.conditions = conditions # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # Instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.bypass_ratio = 5.4 turbofan.number_of_engines = 2.0 turbofan.engine_length = 2.5 turbofan.nacelle_diameter = 1.580 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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
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 #Build an dsize the turbofan to get sls sthrust turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network gt_engine to the vehicle 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
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Embraer_E190' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 38600. * Units.kg vehicle.mass_properties.operating_empty = 21157. * Units.kg vehicle.mass_properties.takeoff = 38600. * Units.kg vehicle.mass_properties.max_zero_fuel = 30900. * Units.kg vehicle.mass_properties.cargo = 0.0 * Units.kg vehicle.mass_properties.max_payload = 9743.0 * Units.kg vehicle.mass_properties.max_fuel = 9335.0 * Units.kg vehicle.mass_properties.center_of_gravity = [14.85, 0, 0] # envelope properties vehicle.envelope.ultimate_load = 3.75 vehicle.envelope.limit_load = 2.50 # basic parameters vehicle.reference_area = 72.72 * Units['meters**2'] vehicle.passengers = 72 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.6 wing.sweeps.quarter_chord = 23.0 * Units.deg # 22.5 wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.span_efficiency = 1.0 # wing.spans.projected = 26.0 * Units.meter wing.chords.root = 5.428 * Units.meter # 5.203 wing.chords.tip = 1.380 * Units.meter # 1.460 wing.chords.mean_aerodynamic = 3.806 * Units.meter wing.areas.reference = 72.72 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [10.36122,0,0] # wing.vertical = False wing.symmetric = True wing.high_lift = True wing.flaps.type = "double_slotted" wing.flaps.chord = 0.280 * Units.meter # wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 4.3 #5.5 wing.sweeps.quarter_chord = 30.0 * Units.deg #34.5 wing.thickness_to_chord = 0.3707 #0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 # wing.spans.projected = 10.000 * Units.meter wing.chords.root = 3.394 * Units.meter wing.chords.tip = 1.258 * Units.meter wing.chords.mean_aerodynamic = 2.4895 * Units.meter wing.areas.reference = 23.25 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [24.6,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' # equal to E190 data wing.aspect_ratio = 1.7 wing.sweeps.quarter_chord = 35 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.span_efficiency = 0.9 wing.spans.projected = 5.270 * Units.meter wing.chords.root = 4.70 * Units.meter wing.chords.tip = 1.45 * Units.meter wing.chords.mean_aerodynamic = 3.36 * Units.meter wing.areas.reference = 16.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [23.9,0,0] wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 # fuselage.fineness.nose = 2.0 # fuselage.fineness.tail = 3.0 # fuselage.lengths.nose = 6.82 * Units.meter fuselage.lengths.tail = 10.67 * Units.meter fuselage.lengths.cabin = 18.23 * Units.meter fuselage.lengths.total = 29.90 * Units.meter fuselage.lengths.fore_space = 0. * Units.meter fuselage.lengths.aft_space = 0. * Units.meter fuselage.width = 2.955 * Units.meter fuselage.heights.maximum = 3.361 * Units.meter fuselage.areas.side_projected = 203.32 * Units['meters**2'] fuselage.areas.wetted = 277.96 * Units['meters**2'] fuselage.areas.front_projected = 31.2 * Units['meters**2'] # 8.0110 fuselage.effective_diameter = 3.18 fuselage.differential_pressure = 10**5 * Units.pascal fuselage.heights.at_quarter_length = 3.35 * Units.meter fuselage.heights.at_three_quarters_length = 3.35 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.50 * Units.meter # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2 turbofan.bypass_ratio = 5.0 turbofan.engine_length = 3.1 * Units.meter turbofan.nacelle_diameter = 1.64395 * Units.meter turbofan.origin = [[9.721, 3.984,-1],[9.721,-3.984,-1]] # meters #compute engine areas turbofan.areas.wetted = 1.1*np.pi*turbofan.nacelle_diameter*turbofan.engine_length # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.9 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 10.0 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # setup combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 # K 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 52700.0 * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. #Engine setup for noise module # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # ------------------------------------------------------------------ #now add weights objects vehicle.landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() vehicle.control_systems = SUAVE.Components.Physical_Component() vehicle.electrical_systems = SUAVE.Components.Physical_Component() vehicle.avionics = SUAVE.Components.Energy.Peripherals.Avionics() vehicle.passenger_weights = SUAVE.Components.Physical_Component() vehicle.furnishings = SUAVE.Components.Physical_Component() vehicle.air_conditioner = SUAVE.Components.Physical_Component() vehicle.fuel = SUAVE.Components.Physical_Component() vehicle.apu = SUAVE.Components.Physical_Component() vehicle.hydraulics = SUAVE.Components.Physical_Component() vehicle.optionals = SUAVE.Components.Physical_Component() vehicle.wings['vertical_stabilizer'].rudder = SUAVE.Components.Physical_Component() # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): vehicle = SUAVE.Vehicle() #print vehicle vehicle.mass_properties.max_zero_fuel = 238780*Units.kg vehicle.mass_properties.max_takeoff = 833000.*Units.lbs vehicle.design_mach_number = 0.92 vehicle.design_range = 6560 * Units.miles vehicle.design_cruise_alt = 35000.0 * Units.ft vehicle.envelope.limit_load = 2.5 vehicle.envelope.ultimate_load = 3.75 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "longe range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.areas.reference = 5500.0 * Units.feet**2 wing.spans.projected = 196.0 * Units.feet wing.chords.mean_aerodynamic = 27.3 * Units.feet wing.chords.root = 42.9 * Units.feet #54.5ft wing.chords.tip = 14.7 * Units.feet wing.sweeps.quarter_chord = 42.0 * Units.deg # Leading edge wing.sweeps.leading_edge = 42.0 * Units.deg # Same as the quarter chord sweep (ignore why EMB) wing.taper = wing.chords.tip / wing.chords.root wing.aspect_ratio = wing.spans.projected**2/wing.areas.reference wing.symmetric = True wing.vertical = False wing.origin = [[58.6* Units.feet ,0,3.6* Units.feet ]] wing.aerodynamic_center = np.array([112.2*Units.feet,0.,0.])-wing.origin[0]#16.16 * Units.meters,0.,0,]) wing.dynamic_pressure_ratio = 1.0 wing.ep_alpha = 0.0 span_location_mac = compute_span_location_from_chord_length(wing, wing.chords.mean_aerodynamic) mac_le_offset = .8*np.sin(wing.sweeps.leading_edge)*span_location_mac #assume that 80% of the chord difference is from leading edge sweep wing.mass_properties.center_of_gravity[0] = .3*wing.chords.mean_aerodynamic+mac_le_offset wing.thickness_to_chord = 0.14 Mach = np.array([0.198]) conditions = Data() conditions.weights = Data() conditions.lift_curve_slope = datcom(wing,Mach) conditions.weights.total_mass = np.array([[vehicle.mass_properties.max_takeoff]]) wing.CL_alpha = conditions.lift_curve_slope vehicle.reference_area = wing.areas.reference # control surfaces ------------------------------------------- flap = SUAVE.Components.Wings.Control_Surfaces.Flap() flap.tag = 'flap' flap.span_fraction_start = 0.15 flap.span_fraction_end = 0.324 flap.deflection = 1.0 * Units.deg flap.chord_fraction = 0.19 wing.append_control_surface(flap) slat = SUAVE.Components.Wings.Control_Surfaces.Slat() slat.tag = 'slat' slat.span_fraction_start = 0.324 slat.span_fraction_end = 0.963 slat.deflection = 1.0 * Units.deg slat.chord_fraction = 0.1 wing.append_control_surface(slat) vehicle.append_component(wing) main_wing_CLa = wing.CL_alpha main_wing_ar = wing.aspect_ratio # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Horizontal_Tail() wing.tag = 'horizontal_stabilizer' wing.areas.reference = 1490.55* Units.feet**2 wing.areas.wetted = 1490.55 * Units.feet ** 2 wing.areas.exposed = 1490.55 * Units.feet ** 2 wing.spans.projected = 71.6 * Units.feet wing.sweeps.quarter_chord = 44.0 * Units.deg # leading edge wing.sweeps.leading_edge = 44.0 * Units.deg # Same as the quarter chord sweep (ignore why EMB) wing.taper = 7.5/32.6 wing.aspect_ratio = wing.spans.projected**2/wing.areas.reference wing.origin = [[187.0* Units.feet,0,0]] wing.symmetric = True wing.vertical = False wing.dynamic_pressure_ratio = 0.95 wing.ep_alpha = 2.0*main_wing_CLa/np.pi/main_wing_ar wing.aerodynamic_center = [trapezoid_ac_x(wing), 0.0, 0.0] wing.CL_alpha = datcom(wing,Mach) wing.thickness_to_chord = 0.1 vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Vertical_Tail() wing.tag = 'vertical_stabilizer' wing.spans.exposed = 32.4 * Units.feet wing.chords.root = 38.7 * Units.feet # vertical.chords.fuselage_intersect wing.chords.tip = 13.4 * Units.feet wing.sweeps.quarter_chord = 50.0 * Units.deg # Leading Edge wing.x_root_LE1 = 180.0 * Units.feet wing.symmetric = False wing.exposed_root_chord_offset = 13.3 * Units.feet wing = extend_to_ref_area(wing) wing.areas.reference = wing.extended.areas.reference wing.areas.wetted = wing.areas.reference wing.areas.exposed = wing.areas.reference wing.spans.projected = wing.extended.spans.projected wing.chords.root = 14.9612585185 dx_LE_vert = wing.extended.root_LE_change wing.taper = 0.272993077083 wing.origin = [[wing.x_root_LE1 + dx_LE_vert,0.,0.]] wing.aspect_ratio = (wing.spans.projected**2)/wing.areas.reference wing.effective_aspect_ratio = 2.2 wing.symmetric = False wing.aerodynamic_center = np.array([trapezoid_ac_x(wing),0.0,0.0]) wing.dynamic_pressure_ratio = .95 Mach = np.array([0.198]) wing.CL_alpha = 0. wing.ep_alpha = 0. wing.thickness_to_chord = 0.1 vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.lengths.total = 229.7 * Units.feet fuselage.areas.side_projected = 4696.16 * Units.feet**2 #used for cnbeta fuselage.heights.maximum = 26.9 * Units.feet #used for cnbeta fuselage.heights.at_quarter_length = 26.0 * Units.feet #used for cnbeta fuselage.heights.at_three_quarters_length = 19.7 * Units.feet #used for cnbeta fuselage.heights.at_wing_root_quarter_chord = 23.8 * Units.feet #used for cnbeta fuselage.x_root_quarter_chord = 77.0 * Units.feet #used for cmalpha fuselage.lengths.total = 229.7 * Units.feet fuselage.width = 20.9 * Units.feet fuselage.areas.wetted = 688.64 * Units.feet**2 fuselage.differential_pressure = 5.0e4 * Units.pascal vehicle.append_component(fuselage) vehicle.mass_properties.center_of_gravity=np.array([[112.2,0,0]]) * Units.feet # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 4.0 turbofan.bypass_ratio = 4.8 turbofan.engine_length = 3.934 turbofan.nacelle_diameter = 2.428 turbofan.origin = [[36.56, 22, -1.9], [27, 12, -1.9],[36.56, -22, -1.9], [27, -12, -1.9]] # compute engine areas Awet = 1.1 * np.pi * turbofan.nacelle_diameter * turbofan.engine_length # Assign engine areas turbofan.areas.wetted = Awet # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' # total design thrust (includes all the engines) # picked lower range of 747-400 at https://en.wikipedia.org/wiki/Boeing_747 thrust.total_design = 4 * 276000. * Units.N # Newtons # design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.92 isa_deviation = 0. # Engine setup for noise module # add to network turbofan.thrust = thrust # size the turbofan turbofan_sizing(turbofan, mach_number, altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) #configuration.mass_properties.zero_fuel_center_of_gravity=np.array([76.5,0,0])*Units.feet #just put a number here that got the expected value output; may want to change fuel =SUAVE.Components.Physical_Component() fuel.origin =wing.origin fuel.mass_properties.center_of_gravity =wing.mass_properties.center_of_gravity fuel.mass_properties.mass =vehicle.mass_properties.max_takeoff-vehicle.mass_properties.max_zero_fuel #find zero_fuel_center_of_gravity cg =vehicle.mass_properties.center_of_gravity MTOW =vehicle.mass_properties.max_takeoff fuel_cg =fuel.origin+fuel.mass_properties.center_of_gravity fuel_mass =fuel.mass_properties.mass sum_moments_less_fuel=(cg*MTOW-fuel_cg*fuel_mass) vehicle.fuel = fuel vehicle.mass_properties.zero_fuel_center_of_gravity = sum_moments_less_fuel/vehicle.mass_properties.max_zero_fuel return vehicle
def base_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Embraer_E190' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 52000 #79090#. # kg vehicle.mass_properties.operating_empty = 27837. # kg vehicle.mass_properties.takeoff = 52000 #50989. #51800. # kg vehicle.mass_properties.max_zero_fuel = 42977. #60899.3 # kg vehicle.mass_properties.cargo = 0.0 * Units.kg vehicle.mass_properties.max_payload = 13063. * Units.kg vehicle.mass_properties.max_fuel = 12971. vehicle.mass_properties.center_of_gravity = [18. , 0, 0] vehicle.mass_properties.moments_of_inertia.tensor = [[10 ** 5, 0, 0],[0, 10 ** 6, 0,],[0,0, 10 ** 7]] # Not Correct # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92.00 vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.4 wing.sweep = 23.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.span_efficiency = 1.0 wing.spans.projected = 27.8 wing.chords.root = 5.203 wing.chords.tip = 1.460 wing.chords.mean_aerodynamic = 3.680 wing.areas.reference = 92.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [13.2,0,0] # Need to fix # wing.aerodynamic_center = [3,0,0] # Need to fix ---> MUST INCLUDE A SIZING CALL, TO GENERATE PLANFORM wing.vertical = False wing.symmetric = True wing.high_lift = True wing.flaps.type = "double_slotted" wing.flaps.chord = 0.280 wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 5.5 wing.sweep = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 wing.spans.projected = 11.958 wing.chords.root = 3.030 wing.chords.tip = 0.883 wing.chords.mean_aerodynamic = 2.3840 wing.areas.reference = 26.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [31.,0,0] # need to fix # wing.aerodynamic_center = [3,0,0] # Need to fix ---> MUST INCLUDE A SIZING CALL, TO GENERATE PLANFORM wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.7 # wing.sweep = 35 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.span_efficiency = 0.9 wing.spans.projected = 5.270 # wing.chords.root = 4.70 wing.chords.tip = 1.45 wing.chords.mean_aerodynamic = 3.36 wing.areas.reference = 16.0 # wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [29.5,0,0] # wing.aerodynamic_center = [3,0,0] # Need to fix ---> MUST INCLUDE A SIZING CALL, TO GENERATE PLANFORM wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.origin=[0,0,0] fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 fuselage.fineness.nose = 2.0 fuselage.fineness.tail = 3.0 fuselage.lengths.nose = 6.0 fuselage.lengths.tail = 9.0 fuselage.lengths.cabin = 21.24 fuselage.lengths.total = 36.24 fuselage.lengths.fore_space = 0. fuselage.lengths.aft_space = 0. fuselage.width = 3.18 fuselage.heights.maximum = 3.50 fuselage.heights.at_quarter_length = 3.35 fuselage.heights.at_three_quarters_length = 3.35 fuselage.heights.at_wing_root_quarter_chord = 3.50 fuselage.areas.side_projected = 239.20 fuselage.areas.wetted = 327.01 fuselage.areas.front_projected = 8.0110 fuselage.effective_diameter = 3.18 fuselage.differential_pressure = 10**5 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 #set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air #add working fluid to the network gt_engine.working_fluid = working_fluid #Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram #Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # turbofan.fan_nozzle_pressure_ratio = 0.98 #0.98 #add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle #Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 #add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor #Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 #add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor #Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag='lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 #add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine #Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag='hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 #add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine #Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() #add the combustor to the network gt_engine.combustor = combustor #Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle #Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 #add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle #Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 #add the fan to the network gt_engine.fan = fan #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 52700.0* Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan turbofan_sizing(gt_engine,mach_number,altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) #now add weights objects landing_gear=SUAVE.Components.Landing_Gear.Landing_Gear() vehicle.landing_gear=landing_gear control_systems=SUAVE.Components.Physical_Component() vehicle.control_systems=control_systems electrical_systems=SUAVE.Components.Physical_Component() vehicle.electrical_systems=electrical_systems avionics=SUAVE.Components.Energy.Peripherals.Avionics() vehicle.avionics=avionics passengers=SUAVE.Components.Physical_Component() vehicle.passenger_weights=passengers furnishings=SUAVE.Components.Physical_Component() vehicle.furnishings=furnishings air_conditioner=SUAVE.Components.Physical_Component() vehicle.air_conditioner=air_conditioner fuel=SUAVE.Components.Physical_Component() vehicle.fuel=fuel apu=SUAVE.Components.Physical_Component() vehicle.apu=apu hydraulics=SUAVE.Components.Physical_Component() vehicle.hydraulics=hydraulics optionals=SUAVE.Components.Physical_Component() vehicle.optionals=optionals rudder=SUAVE.Components.Physical_Component() vehicle.wings['vertical_stabilizer'].rudder=rudder # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 # kg vehicle.mass_properties.operating_empty = 62746.4 # kg vehicle.mass_properties.takeoff = 79015.8 # kg vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.center_of_gravity = [60 * Units.feet, 0, 0] # Not correct vehicle.mass_properties.moments_of_inertia.tensor = [[10**5, 0, 0], [ 0, 10**6, 0, ], [0, 0, 10**7] ] # Not Correct # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweep = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.16 wing.span_efficiency = 0.9 wing.spans.projected = 35.66 wing.chords.root = 6.81 wing.chords.tip = 1.09 wing.chords.mean_aerodynamic = 4.235 wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = -4.0 * Units.degrees wing.origin = [20, 0, 0] wing.aerodynamic_center = [3, 0, 0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 # wing.sweep = 30 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.4 wing.span_efficiency = 0.9 wing.spans.projected = 14.146 # wing.chords.root = 3.28 wing.chords.tip = 1.31 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 # wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [50, 0, 0] wing.aerodynamic_center = [2, 0, 0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 # wing.sweep = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.877 # wing.chords.root = 6.60 wing.chords.tip = 1.65 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 # wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [50, 0, 0] wing.aerodynamic_center = [2, 0, 0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' #fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 #44.0 fuselage.lengths.total = 38.02 #58.4 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 #4. fuselage.heights.maximum = 3.74 #4. # fuselage.heights.at_quarter_length = 4. # Not correct fuselage.heights.at_three_quarters_length = 4. # Not correct fuselage.heights.at_wing_root_quarter_chord = 4. # Not correct fuselage.areas.side_projected = 3.74 * 38.02 #4.* 59.8 # Not correct fuselage.areas.wetted = 446.718 #688.64 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 #4.0 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbo_fan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2 * 24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan, mach_number, altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def base_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015. # kg vehicle.mass_properties.takeoff = 79015. # kg vehicle.mass_properties.max_zero_fuel = 75000. vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.payload = 16300. * Units.kilogram vehicle.mass_properties.max_payload = 20500. # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium-range" # ------------------------------------------------------------------ # Landing gear # ------------------------------------------------------------------ #vehicle.landing_gear = Data() #vehicle.landing_gear.main_tire_diameter = 1.12000 * Units.m #vehicle.landing_gear.nose_tire_diameter = 0.6858 * Units.m #vehicle.landing_gear.main_strut_length = 1.8 * Units.m #vehicle.landing_gear.nose_strut_length = 1.3 * Units.m #vehicle.landing_gear.main_units = 2 #number of main landing gear units #vehicle.landing_gear.nose_units = 1 #number of nose landing gear #vehicle.landing_gear.main_wheels = 2 #number of wheels on the main landing gear #vehicle.landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 #number of main landing gear units landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear = landing_gear #vehicle.append_component(landing_gear) # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweep = 25. * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.16 wing.span_efficiency = 0.9 wing.spans.projected = 35.66 wing.chords.root = 6.81 wing.chords.tip = 1.09 wing.chords.mean_aerodynamic = 4.235 wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = -4.0 * Units.degrees wing.origin = [20, 0, 0] wing.aerodynamic_center = [3, 0, 0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Flaps # ------------------------------------------------------------------ wing.flaps.chord = 0.30 wing.flaps.span_start = 0.10 # -> wing.flaps.area = 97.1112 wing.flaps.span_end = 0.75 wing.flaps.type = 'double_sloted' # -> wing.flaps.number_slots = 2 # wing sizing SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform(wing) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 wing.sweep = 30 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.4 wing.span_efficiency = 0.9 wing.spans.projected = 14.146 wing.chords.root = 3.28 wing.chords.tip = 1.31 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [50, 0, 0] wing.aerodynamic_center = [2, 0, 0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweep = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.877 wing.chords.root = 6.60 wing.chords.tip = 1.65 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [50, 0, 0] wing.aerodynamic_center = [2, 0, 0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 fuselage.lengths.total = 38.02 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 fuselage.heights.maximum = 3.74 fuselage.heights.at_quarter_length = 3.74 fuselage.heights.at_three_quarters_length = 3.74 fuselage.heights.at_wing_root_quarter_chord = 3.74 fuselage.areas.side_projected = 142.1948 fuselage.areas.wetted = 446.718 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 #Engine setup for noise module turbofan.core_nozzle_diameter = 0.92 turbofan.fan_nozzle_diameter = 1.659 turbofan.engine_height = 0.5 #Engine centerline heigh above the ground plane turbofan.exa = 1 #distance from fan face to fan exit/ fan diameter) turbofan.plug_diameter = 0.1 #dimater of the engine plug turbofan.geometry_xe = 1. # Geometry information for the installation effects function turbofan.geometry_ye = 1. # Geometry information for the installation effects function turbofan.geometry_Ce = 2. # Geometry information for the installation effects function #compute engine areas Awet = 1.1 * np.pi * turbofan.nacelle_diameter * turbofan.engine_length #assign engine areas turbofan.areas.wetted = Awet # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag = 'high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 # for noise fan.rotation = 1940 #(Need to be calculated based on the thrust level) # add to network turbofan.append(fan) # ------------------------------------------------------------------ #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2 * 24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan, mach_number, altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Embraer_E190' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 51800.0 * Units.kg vehicle.mass_properties.operating_empty = 29100.0 * Units.kg vehicle.mass_properties.takeoff = 51800.0 * Units.kg vehicle.mass_properties.max_zero_fuel = 45600.0 * Units.kg vehicle.mass_properties.cargo = 0.0 * Units.kg vehicle.mass_properties.max_payload = 11786. * Units.kg vehicle.mass_properties.max_fuel = 12970. * Units.kg # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92.00 vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.4 wing.sweeps.quarter_chord = 22.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.16 wing.span_efficiency = 1.0 wing.spans.projected = 27.8 * Units.meter wing.chords.root = 5.7057 * Units.meter wing.chords.tip = 0.9129 * Units.meter wing.chords.mean_aerodynamic = 3.8878 * Units.meter wing.areas.reference = 92.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [20.,0,0] # meters wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 5.5 wing.sweeps.quarter_chord = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 wing.spans.projected = 11.958 * Units.meter wing.chords.root = 3.9175 * Units.meter wing.chords.tip = 0.4309 * Units.meter wing.chords.mean_aerodynamic = 2.6401 * Units.meter wing.areas.reference = 26.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [50,0,0] # meters wing.aerodynamic_center = [2,0,0] # meters wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.7 wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.12 wing.taper = 0.10 wing.span_efficiency = 0.9 wing.spans.projected = 5.2153 * Units.meter wing.chords.root = 5.5779 * Units.meter wing.chords.tip = 0.5577 * Units.meter wing.chords.mean_aerodynamic = 3.7524 * Units.meter wing.areas.reference = 16.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [50,0,0] # meters wing.aerodynamic_center = [2,0,0] # meters wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 * Units.meters fuselage.fineness.nose = 2.0 fuselage.fineness.tail = 3.0 fuselage.lengths.nose = 6.0 * Units.meter fuselage.lengths.tail = 9.0 * Units.meter fuselage.lengths.cabin = 21.24 * Units.meter fuselage.lengths.total = 36.24 * Units.meter fuselage.lengths.fore_space = 0. * Units.meter fuselage.lengths.aft_space = 0. * Units.meter fuselage.width = 3.0 * Units.meter fuselage.heights.maximum = 3.4 * Units.meter fuselage.heights.at_quarter_length = 3.4 * Units.meter fuselage.heights.at_three_quarters_length = 3.4 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.4 * Units.meter fuselage.areas.side_projected = 239.20 * Units['meters**2'] fuselage.areas.wetted = 327.01 * Units['meters**2'] fuselage.areas.front_projected = 8.0110 * Units['meters**2'] fuselage.effective_diameter = 3.2 * Units.meter fuselage.differential_pressure = 10**5 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 # set the working fluid for the network gt_engine.working_fluid = SUAVE.Attributes.Gases.Air() # Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add ram to the network gt_engine.ram = ram # Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.99 # add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle # Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 # add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor # Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 # add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor # Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag='lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.99 # add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine # Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag='hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.99 # add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine # Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # add the combustor to the network gt_engine.combustor = combustor # Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 # add the core nozzle to the network gt_engine.core_nozzle = core_nozzle # Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.98 # add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle # Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 # add the fan to the network gt_engine.fan = fan # Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' # total design thrust (includes all the engines) thrust.total_design = 37278.0* Units.N #Newtons # design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust # size the turbofan turbofan_sizing(gt_engine,mach_number,altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def simple_sizing(nexus): configs = nexus.vehicle_configurations base = configs.base # find conditions air_speed = nexus.missions.base.segments['cruise_2'].air_speed altitude = 18.5 * Units.km #nexus.missions.base.segments['climb_8'].altitude_end #FIXME atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream = atmosphere.compute_values(altitude) freestream0 = atmosphere.compute_values(6000. * Units.ft) # cabin altitude diff_pressure = np.max(freestream0.pressure - freestream.pressure, 0) fuselage = base.fuselages['fuselage'] fuselage.differential_pressure = diff_pressure # now size engine mach_number = air_speed / freestream.speed_of_sound # now add to freestream data object freestream.velocity = air_speed freestream.mach_number = mach_number freestream.gravity = 9.81 conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() # assign conditions in form for propulsor sizing conditions.freestream = freestream # conditions.weights.vehicle_mass_rate = -200 * Units['kg/s'] for config in configs: config.wings.horizontal_stabilizer.areas.reference = (26.0 / 92.0) * config.wings.main_wing.areas.reference for wing in config.wings: wing = SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform(wing) wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference fuselage = config.fuselages['fuselage'] fuselage.differential_pressure = diff_pressure turbofan_sizing(config.propulsors['turbofan'], mach_number, altitude) compute_turbofan_geometry(config.propulsors['turbofan'], conditions) # engine_length, nacelle_diameter, areas.wette # diff the new data config.store_diff() # ------------------------------------------------------------------ # Landing Configuration # ------------------------------------------------------------------ landing = nexus.vehicle_configurations.landing landing_conditions = Data() landing_conditions.freestream = Data() # landing weight # landing.mass_properties.landing = 0.85 * config.mass_properties.takeoff # Landing CL_max altitude = nexus.missions.base.segments[-1].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() p, T, rho, a, mu = atmosphere.compute_values(altitude) landing_conditions.freestream.velocity = nexus.missions.base.segments['descent_final'].air_speed landing_conditions.freestream.density = rho landing_conditions.freestream.dynamic_viscosity = mu / rho CL_max_landing, CDi = compute_max_lift_coeff(landing, landing_conditions) landing.maximum_lift_coefficient = CL_max_landing # diff the new data landing.store_diff() # Takeoff CL_max takeoff = nexus.vehicle_configurations.takeoff takeoff_conditions = Data() takeoff_conditions.freestream = Data() altitude = nexus.missions.base.airport.altitude atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() p, T, rho, a, mu = atmosphere.compute_values(altitude) takeoff_conditions.freestream.velocity = nexus.missions.base.segments.climb_1.air_speed takeoff_conditions.freestream.density = rho takeoff_conditions.freestream.dynamic_viscosity = mu / rho max_CL_takeoff, CDi = compute_max_lift_coeff(takeoff, takeoff_conditions) takeoff.maximum_lift_coefficient = max_CL_takeoff takeoff.store_diff() # Base config CL_max base = nexus.vehicle_configurations.base base_conditions = Data() base_conditions.freestream = Data() altitude = nexus.missions.base.airport.altitude atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() p, T, rho, a, mu = atmosphere.compute_values(altitude) base_conditions.freestream.velocity = nexus.missions.base.segments.climb_1.air_speed base_conditions.freestream.density = rho base_conditions.freestream.dynamic_viscosity = mu / rho max_CL_base, CDi = compute_max_lift_coeff(base, base_conditions) base.maximum_lift_coefficient = max_CL_base base.store_diff() # done! return nexus
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737-800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015.8 * Units.kilogram vehicle.mass_properties.takeoff = 79015.8 * Units.kilogram vehicle.mass_properties.operating_empty = 62746.4 * Units.kilogram vehicle.mass_properties.takeoff = 79015.8 * Units.kilogram vehicle.mass_properties.max_zero_fuel = 62732.0 * Units.kilogram vehicle.mass_properties.cargo = 10000. * Units.kilogram # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 * Units['meters**2'] vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Landing Gear # ------------------------------------------------------------------ # used for noise calculations landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 #number of main landing gear units landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear = landing_gear # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.1 wing.taper = 0.1 wing.span_efficiency = 0.9 wing.spans.projected = 34.32 * Units.meter wing.chords.root = 7.760 * Units.meter wing.chords.tip = 0.782 * Units.meter wing.chords.mean_aerodynamic = 4.235 * Units.meter wing.areas.reference = 124.862 * Units['meters**2'] wing.twists.root = 4.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [13.61,0,-1.27] # meters wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Flaps # ------------------------------------------------------------------ wing.flaps.chord = 0.30 # 30% of the chord wing.flaps.span_start = 0.10 # 10% of the span wing.flaps.span_end = 0.75 wing.flaps.type = 'double_slotted' # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 wing.sweeps.quarter_chord = 40 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.2 wing.span_efficiency = 0.9 wing.spans.projected = 14.2 * Units.meter wing.chords.root = 4.7 * Units.meter wing.chords.tip = .955 * Units.meter wing.chords.mean_aerodynamic = 8.0 * Units.meter wing.areas.reference = 32.488 * Units['meters**2'] wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [32.83,0,1.14] # meters wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweeps.quarter_chord = 25. * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.777 * Units.meter wing.chords.root = 8.19 * Units.meter wing.chords.tip = 0.95 * Units.meter wing.chords.mean_aerodynamic = 4.0 * Units.meter wing.areas.reference = 27.316 * Units['meters**2'] wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [28.79,0,1.54] # meters wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 * Units.meter fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 * Units.meter fuselage.lengths.tail = 8.0 * Units.meter fuselage.lengths.cabin = 28.85 * Units.meter fuselage.lengths.total = 38.02 * Units.meter fuselage.lengths.fore_space = 6. * Units.meter fuselage.lengths.aft_space = 5. * Units.meter fuselage.width = 3.74 * Units.meter fuselage.heights.maximum = 3.74 * Units.meter fuselage.effective_diameter = 3.74 * Units.meter fuselage.areas.side_projected = 142.1948 * Units['meters**2'] fuselage.areas.wetted = 446.718 * Units['meters**2'] fuselage.areas.front_projected = 12.57 * Units['meters**2'] fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure fuselage.heights.at_quarter_length = 3.74 * Units.meter fuselage.heights.at_three_quarters_length = 3.65 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.74 * Units.meter # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 * Units.meter turbofan.nacelle_diameter = 2.05 * Units.meter turbofan.origin = [[13.72, 4.86,-1.9],[13.72, -4.86,-1.9]] # meters #compute engine areas turbofan.areas.wetted = 1.1*np.pi*turbofan.nacelle_diameter*turbofan.engine_length # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # setup combustor.efficiency = 0.99 combustor.turbine_inlet_temperature = 1450 # K 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. #Engine setup for noise module # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network turbofan to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def simple_sizing(nexus): configs = nexus.vehicle_configurations #find conditions air_speed = nexus.missions.base.segments['cruise'].air_speed altitude = nexus.missions.base.segments['climb_5'].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream = atmosphere.compute_values(altitude) #now size engine mach_number = air_speed/freestream.speed_of_sound #now add to freestream data object freestream.velocity = air_speed freestream.mach_number = mach_number freestream.gravity = 9.81 conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() #assign conditions in form for propulsor sizing conditions.freestream = freestream HT_volume = 1.42542 * Units.less # E170 VT_volume = 0.11458 * Units.less # E170 lht = 14.24 * Units.m lvt = 13.54 * Units.m for config in configs: wing_planform(config.wings.main_wing) config.wings.horizontal_stabilizer.areas.reference = (HT_volume/lht)*(config.wings.main_wing.areas.reference * 3.194) config.wings.vertical_stabilizer.areas.reference = (VT_volume/lvt)*(config.wings.main_wing.areas.reference * 26.0) SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_fuel_volume(config.wings.main_wing) nexus.summary.available_fuel = config.wings.main_wing.fuel_volume * 803.0 * 1.0197 for wing in config.wings: wing_planform(wing) wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted turbofan_sizing(config.propulsors['turbofan'], mach_number=mach_number, altitude=altitude) compute_turbofan_geometry(config.propulsors['turbofan'], conditions) config.propulsors['turbofan'].nacelle_diameter = config.propulsors['turbofan'].nacelle_diameter * 1.1462135 config.propulsors['turbofan'].engine_length = config.propulsors['turbofan'].engine_length * 1.24868 config.propulsors['turbofan'].areas.wetted = 1.1*np.pi * (config.propulsors['turbofan'].engine_length * config.propulsors['turbofan'].nacelle_diameter) # ------------------------------------------------------------------ # Landing Configuration # ------------------------------------------------------------------ landing = nexus.vehicle_configurations.landing landing_conditions = Data() landing_conditions.freestream = Data() # landing weight landing.mass_properties.landing = 0.863 * config.mass_properties.takeoff # Landing CL_max altitude = nexus.missions.base.segments[-1].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream_landing = atmosphere.compute_values(altitude) landing_conditions.freestream.velocity = nexus.missions.base.segments['descent_3'].air_speed landing_conditions.freestream.density = freestream_landing.density landing_conditions.freestream.dynamic_viscosity = freestream_landing.dynamic_viscosity CL_max_landing,CDi = compute_max_lift_coeff(landing, landing_conditions) landing.maximum_lift_coefficient = CL_max_landing #Takeoff CL_max takeoff = nexus.vehicle_configurations.takeoff takeoff_conditions = Data() takeoff_conditions.freestream = Data() altitude = nexus.missions.base.airport.altitude freestream_takeoff = atmosphere.compute_values(altitude) takeoff_conditions.freestream.velocity = nexus.missions.base.segments.climb_1.air_speed takeoff_conditions.freestream.density = freestream_takeoff.density takeoff_conditions.freestream.dynamic_viscosity = freestream_takeoff.dynamic_viscosity max_CL_takeoff, CDi = compute_max_lift_coeff(takeoff, takeoff_conditions) takeoff.maximum_lift_coefficient = max_CL_takeoff #Base config CL_max base = nexus.vehicle_configurations.base base_conditions = Data() base_conditions.freestream = takeoff_conditions.freestream max_CL_base, CDi = compute_max_lift_coeff(base, base_conditions) base.maximum_lift_coefficient = max_CL_base return nexus
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 #Build an dsize the turbofan to get sls sthrust turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network gt_engine to the vehicle 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.sweeps.quarter_chord = .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.sweeps.quarter_chord = 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.sweeps.quarter_chord = 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
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Embraer_E190' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 51800.0 * Units.kg vehicle.mass_properties.operating_empty = 29100.0 * Units.kg vehicle.mass_properties.takeoff = 51800.0 * Units.kg vehicle.mass_properties.max_zero_fuel = 45600.0 * Units.kg vehicle.mass_properties.cargo = 0.0 * Units.kg vehicle.mass_properties.max_payload = 11786. * Units.kg vehicle.mass_properties.max_fuel = 12970. * Units.kg # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92.00 vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.4 wing.sweeps.quarter_chord = 22.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.16 wing.span_efficiency = 1.0 wing.spans.projected = 27.8 * Units.meter wing.chords.root = 5.7057 * Units.meter wing.chords.tip = 0.9129 * Units.meter wing.chords.mean_aerodynamic = 3.8878 * Units.meter wing.areas.reference = 92.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [20., 0, 0] # meters wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 5.5 wing.sweeps.quarter_chord = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 wing.spans.projected = 11.958 * Units.meter wing.chords.root = 3.9175 * Units.meter wing.chords.tip = 0.4309 * Units.meter wing.chords.mean_aerodynamic = 2.6401 * Units.meter wing.areas.reference = 26.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [50, 0, 0] # meters wing.aerodynamic_center = [2, 0, 0] # meters wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.7 wing.sweeps.quarter_chord = 25 * Units.deg wing.thickness_to_chord = 0.12 wing.taper = 0.10 wing.span_efficiency = 0.9 wing.spans.projected = 5.2153 * Units.meter wing.chords.root = 5.5779 * Units.meter wing.chords.tip = 0.5577 * Units.meter wing.chords.mean_aerodynamic = 3.7524 * Units.meter wing.areas.reference = 16.0 * Units['meters**2'] wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.wetted wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [50, 0, 0] # meters wing.aerodynamic_center = [2, 0, 0] # meters wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 4 fuselage.seat_pitch = 0.7455 * Units.meters fuselage.fineness.nose = 2.0 fuselage.fineness.tail = 3.0 fuselage.lengths.nose = 6.0 * Units.meter fuselage.lengths.tail = 9.0 * Units.meter fuselage.lengths.cabin = 21.24 * Units.meter fuselage.lengths.total = 36.24 * Units.meter fuselage.lengths.fore_space = 0. * Units.meter fuselage.lengths.aft_space = 0. * Units.meter fuselage.width = 3.0 * Units.meter fuselage.heights.maximum = 3.4 * Units.meter fuselage.heights.at_quarter_length = 3.4 * Units.meter fuselage.heights.at_three_quarters_length = 3.4 * Units.meter fuselage.heights.at_wing_root_quarter_chord = 3.4 * Units.meter fuselage.areas.side_projected = 239.20 * Units['meters**2'] fuselage.areas.wetted = 327.01 * Units['meters**2'] fuselage.areas.front_projected = 8.0110 * Units['meters**2'] fuselage.effective_diameter = 3.2 * Units.meter fuselage.differential_pressure = 10**5 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ # initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 # set the working fluid for the network gt_engine.working_fluid = SUAVE.Attributes.Gases.Air() # Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add ram to the network gt_engine.ram = ram # Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.99 # add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle # Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 # add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor # Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 # add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor # Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag = 'lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.99 # add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine # Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag = 'hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.99 # add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine # Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() # add the combustor to the network gt_engine.combustor = combustor # Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 # add the core nozzle to the network gt_engine.core_nozzle = core_nozzle # Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.98 # add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle # Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 # add the fan to the network gt_engine.fan = fan # Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag = 'compute_thrust' # total design thrust (includes all the engines) thrust.total_design = 37278.0 * Units.N #Newtons # design sizing conditions altitude = 35000.0 * Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust # size the turbofan turbofan_sizing(gt_engine, mach_number, altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def base_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'Boeing_737800' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 79015. # kg vehicle.mass_properties.takeoff = 79015. # kg vehicle.mass_properties.max_zero_fuel = 75000. vehicle.mass_properties.cargo = 10000. * Units.kilogram vehicle.mass_properties.payload = 16300. * Units.kilogram vehicle.mass_properties.max_payload = 20500. # envelope properties vehicle.envelope.ultimate_load = 2.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 124.862 vehicle.passengers = 170 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium-range" # ------------------------------------------------------------------ # Landing gear # ------------------------------------------------------------------ #vehicle.landing_gear = Data() #vehicle.landing_gear.main_tire_diameter = 1.12000 * Units.m #vehicle.landing_gear.nose_tire_diameter = 0.6858 * Units.m #vehicle.landing_gear.main_strut_length = 1.8 * Units.m #vehicle.landing_gear.nose_strut_length = 1.3 * Units.m #vehicle.landing_gear.main_units = 2 #number of main landing gear units #vehicle.landing_gear.nose_units = 1 #number of nose landing gear #vehicle.landing_gear.main_wheels = 2 #number of wheels on the main landing gear #vehicle.landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear() landing_gear.tag = "main_landing_gear" landing_gear.main_tire_diameter = 1.12000 * Units.m landing_gear.nose_tire_diameter = 0.6858 * Units.m landing_gear.main_strut_length = 1.8 * Units.m landing_gear.nose_strut_length = 1.3 * Units.m landing_gear.main_units = 2 #number of main landing gear units landing_gear.nose_units = 1 #number of nose landing gear landing_gear.main_wheels = 2 #number of wheels on the main landing gear landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear vehicle.landing_gear=landing_gear #vehicle.append_component(landing_gear) # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 10.18 wing.sweep = 25. * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.16 wing.span_efficiency = 0.9 wing.spans.projected = 35.66 wing.chords.root = 6.81 wing.chords.tip = 1.09 wing.chords.mean_aerodynamic = 4.235 wing.areas.reference = 124.862 wing.twists.root = 4.0 * Units.degrees wing.twists.tip = -4.0 * Units.degrees wing.origin = [20,0,0] wing.aerodynamic_center = [3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.dynamic_pressure_ratio = 1.0 # ------------------------------------------------------------------ # Flaps # ------------------------------------------------------------------ wing.flaps.chord = 0.30 wing.flaps.span_start = 0.10 # -> wing.flaps.area = 97.1112 wing.flaps.span_end = 0.75 wing.flaps.type = 'double_sloted' # -> wing.flaps.number_slots = 2 # wing sizing SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform(wing) # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 6.16 wing.sweep = 30 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.4 wing.span_efficiency = 0.9 wing.spans.projected = 14.146 wing.chords.root = 3.28 wing.chords.tip = 1.31 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.twists.root = 3.0 * Units.degrees wing.twists.tip = 3.0 * Units.degrees wing.origin = [50,0,0] wing.aerodynamic_center = [2,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.91 wing.sweep = 25 * Units.deg wing.thickness_to_chord = 0.08 wing.taper = 0.25 wing.span_efficiency = 0.9 wing.spans.projected = 7.877 wing.chords.root = 6.60 wing.chords.tip = 1.65 wing.chords.mean_aerodynamic = 8.0 wing.areas.reference = 32.488 wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [50,0,0] wing.aerodynamic_center = [2,0,0] wing.vertical = True wing.symmetric = False wing.t_tail = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle vehicle.append_component(wing) # ------------------------------------------------------------------ # Fuselage # ------------------------------------------------------------------ fuselage = SUAVE.Components.Fuselages.Fuselage() fuselage.tag = 'fuselage' fuselage.number_coach_seats = vehicle.passengers fuselage.seats_abreast = 6 fuselage.seat_pitch = 1 fuselage.fineness.nose = 1.6 fuselage.fineness.tail = 2. fuselage.lengths.nose = 6.4 fuselage.lengths.tail = 8.0 fuselage.lengths.cabin = 28.85 fuselage.lengths.total = 38.02 fuselage.lengths.fore_space = 6. fuselage.lengths.aft_space = 5. fuselage.width = 3.74 fuselage.heights.maximum = 3.74 fuselage.heights.at_quarter_length = 3.74 fuselage.heights.at_three_quarters_length = 3.74 fuselage.heights.at_wing_root_quarter_chord = 3.74 fuselage.areas.side_projected = 142.1948 fuselage.areas.wetted = 446.718 fuselage.areas.front_projected = 12.57 fuselage.effective_diameter = 3.74 fuselage.differential_pressure = 5.0e4 * Units.pascal # Maximum differential pressure # add to vehicle vehicle.append_component(fuselage) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #instantiate the gas turbine network turbofan = SUAVE.Components.Energy.Networks.Turbofan() turbofan.tag = 'turbofan' # setup turbofan.number_of_engines = 2.0 turbofan.bypass_ratio = 5.4 turbofan.engine_length = 2.71 turbofan.nacelle_diameter = 2.05 #Engine setup for noise module turbofan.core_nozzle_diameter = 0.92 turbofan.fan_nozzle_diameter = 1.659 turbofan.engine_height = 0.5 #Engine centerline heigh above the ground plane turbofan.exa = 1 #distance from fan face to fan exit/ fan diameter) turbofan.plug_diameter = 0.1 #dimater of the engine plug turbofan.geometry_xe = 1. # Geometry information for the installation effects function turbofan.geometry_ye = 1. # Geometry information for the installation effects function turbofan.geometry_Ce = 2. # Geometry information for the installation effects function #compute engine areas Awet = 1.1*np.pi*turbofan.nacelle_diameter*turbofan.engine_length #assign engine areas turbofan.areas.wetted = Awet # working fluid turbofan.working_fluid = SUAVE.Attributes.Gases.Air() # ------------------------------------------------------------------ # Component 1 - Ram # to convert freestream static to stagnation quantities # instantiate ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' # add to the network turbofan.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.98 inlet_nozzle.pressure_ratio = 0.98 # add to network turbofan.append(inlet_nozzle) # ------------------------------------------------------------------ # Component 3 - Low Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'low_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 1.14 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 4 - High Pressure Compressor # instantiate compressor = SUAVE.Components.Energy.Converters.Compressor() compressor.tag = 'high_pressure_compressor' # setup compressor.polytropic_efficiency = 0.91 compressor.pressure_ratio = 13.415 # add to network turbofan.append(compressor) # ------------------------------------------------------------------ # Component 5 - Low Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='low_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 6 - High Pressure Turbine # instantiate turbine = SUAVE.Components.Energy.Converters.Turbine() turbine.tag='high_pressure_turbine' # setup turbine.mechanical_efficiency = 0.99 turbine.polytropic_efficiency = 0.93 # add to network turbofan.append(turbine) # ------------------------------------------------------------------ # Component 7 - Combustor # instantiate combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'combustor' # 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 # for noise fan.rotation = 1940 #(Need to be calculated based on the thrust level) # add to network turbofan.append(fan) # ------------------------------------------------------------------ #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 2*24000. * Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add to network turbofan.thrust = thrust #size the turbofan turbofan_sizing(turbofan,mach_number,altitude) # add gas turbine network gt_engine to the vehicle vehicle.append_component(turbofan) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle
def simple_sizing(nexus): configs = nexus.vehicle_configurations base = configs.base #find conditions air_speed = nexus.missions.base.segments['cruise'].air_speed altitude = nexus.missions.base.segments['climb_5'].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() freestream = atmosphere.compute_values(altitude) freestream0 = atmosphere.compute_values(6000. * Units.ft) #cabin altitude diff_pressure = np.max(freestream0.pressure - freestream.pressure, 0) fuselage = base.fuselages['fuselage'] fuselage.differential_pressure = diff_pressure #now size engine mach_number = air_speed / freestream.speed_of_sound #now add to freestream data object freestream.velocity = air_speed freestream.mach_number = mach_number freestream.gravity = 9.81 conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics( ) #assign conditions in form for propulsor sizing conditions.freestream = freestream for config in configs: config.wings.horizontal_stabilizer.areas.reference = ( 26.0 / 92.0) * config.wings.main_wing.areas.reference for wing in config.wings: wing = SUAVE.Methods.Geometry.Two_Dimensional.Planform.wing_planform( wing) wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference fuselage = config.fuselages['fuselage'] fuselage.differential_pressure = diff_pressure turbofan_sizing(config.propulsors['turbofan'], mach_number, altitude) compute_turbofan_geometry(config.propulsors['turbofan'], conditions) # diff the new data #config.store_diff() # ------------------------------------------------------------------ # Landing Configuration # ------------------------------------------------------------------ landing = nexus.vehicle_configurations.landing landing_conditions = Data() landing_conditions.freestream = Data() # landing weight landing.mass_properties.landing = 0.85 * config.mass_properties.takeoff # Landing CL_max altitude = nexus.missions.base.segments[-1].altitude_end atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() p, T, rho, a, mu = atmosphere.compute_values(altitude) landing_conditions.freestream.velocity = nexus.missions.base.segments[ 'descent_3'].air_speed landing_conditions.freestream.density = rho landing_conditions.freestream.dynamic_viscosity = mu / rho CL_max_landing, CDi = compute_max_lift_coeff(landing, landing_conditions) landing.maximum_lift_coefficient = CL_max_landing # diff the new data #landing.store_diff() #Takeoff CL_max takeoff = nexus.vehicle_configurations.takeoff takeoff_conditions = Data() takeoff_conditions.freestream = Data() altitude = nexus.missions.base.airport.altitude atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() p, T, rho, a, mu = atmosphere.compute_values(altitude) takeoff_conditions.freestream.velocity = nexus.missions.base.segments.climb_1.air_speed takeoff_conditions.freestream.density = rho takeoff_conditions.freestream.dynamic_viscosity = mu / rho max_CL_takeoff, CDi = compute_max_lift_coeff(takeoff, takeoff_conditions) takeoff.maximum_lift_coefficient = max_CL_takeoff #takeoff.store_diff() #Base config CL_max base = nexus.vehicle_configurations.base base_conditions = Data() base_conditions.freestream = Data() altitude = nexus.missions.base.airport.altitude atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() p, T, rho, a, mu = atmosphere.compute_values(altitude) base_conditions.freestream.velocity = nexus.missions.base.segments.climb_1.air_speed base_conditions.freestream.density = rho base_conditions.freestream.dynamic_viscosity = mu / rho max_CL_base, CDi = compute_max_lift_coeff(base, base_conditions) base.maximum_lift_coefficient = max_CL_base #base.store_diff() # done! return nexus
def vehicle_setup(): # ------------------------------------------------------------------ # Initialize the Vehicle # ------------------------------------------------------------------ vehicle = SUAVE.Vehicle() vehicle.tag = 'EMBRAER E190AR' # ------------------------------------------------------------------ # Vehicle-level Properties # ------------------------------------------------------------------ # mass properties vehicle.mass_properties.max_takeoff = 51800.0 # kg vehicle.mass_properties.operating_empty = 29100.0 # kg vehicle.mass_properties.takeoff = 51800.0 # kg ## vehicle.mass_properties.max_zero_fuel = 0.9 * vehicle.mass_properties.max_takeoff vehicle.mass_properties.cargo = 0. * Units.kilogram vehicle.mass_properties.center_of_gravity = [60 * Units.feet, 0, 0] # Not correct vehicle.mass_properties.moments_of_inertia.tensor = [[10 ** 5, 0, 0],[0, 10 ** 6, 0,],[0,0, 10 ** 7]] # Not Correct # envelope properties vehicle.envelope.ultimate_load = 3.5 vehicle.envelope.limit_load = 1.5 # basic parameters vehicle.reference_area = 92.0 vehicle.passengers = 114 vehicle.systems.control = "fully powered" vehicle.systems.accessories = "medium range" # ------------------------------------------------------------------ # Main Wing # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Main_Wing() wing.tag = 'main_wing' wing.aspect_ratio = 8.4 wing.sweep = 23.0 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.28 wing.span_efficiency = 1.0 ## wing.spans.projected = 27.8 ## ## wing.chords.root = 5.203 ## wing.chords.tip = 1.460 ## wing.chords.mean_aerodynamic = 3.680 wing.areas.reference = 92.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [13.2,0,0] # Need to fix ## wing.aerodynamic_center = [3,0,0] wing.vertical = False wing.symmetric = True wing.high_lift = True wing.flaps.type = "double_slotted" wing.flaps.chord = 0.280 wing.dynamic_pressure_ratio = 1.0 # add to vehicle size_planform(wing) vehicle.append_component(wing) # ------------------------------------------------------------------ # Horizontal Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'horizontal_stabilizer' wing.aspect_ratio = 5.5 wing.sweep = 34.5 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.11 wing.span_efficiency = 0.9 ## wing.spans.projected = 11.958 ## ## wing.chords.root = 3.030 ## wing.chords.tip = 0.883 ## wing.chords.mean_aerodynamic = 2.3840 wing.areas.reference = 26.0 wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 2.0 * Units.degrees wing.twists.tip = 2.0 * Units.degrees wing.origin = [31.,0,0] # need to fix ## wing.aerodynamic_center = [2,0,0] wing.vertical = False wing.symmetric = True wing.dynamic_pressure_ratio = 0.9 # add to vehicle size_planform(wing) vehicle.append_component(wing) # ------------------------------------------------------------------ # Vertical Stabilizer # ------------------------------------------------------------------ wing = SUAVE.Components.Wings.Wing() wing.tag = 'vertical_stabilizer' wing.aspect_ratio = 1.7 # wing.sweep = 35 * Units.deg wing.thickness_to_chord = 0.11 wing.taper = 0.31 wing.span_efficiency = 0.9 ## wing.spans.projected = 5.270 # ## ## wing.chords.root = 4.70 ## wing.chords.tip = 1.45 ## wing.chords.mean_aerodynamic = 3.36 wing.areas.reference = 16.0 # wing.areas.wetted = 2.0 * wing.areas.reference wing.areas.exposed = 0.8 * wing.areas.wetted wing.areas.affected = 0.6 * wing.areas.reference wing.twists.root = 0.0 * Units.degrees wing.twists.tip = 0.0 * Units.degrees wing.origin = [29.5,0,0] ## wing.aerodynamic_center = [2,0,0] wing.vertical = True wing.symmetric = False wing.dynamic_pressure_ratio = 1.0 # add to vehicle size_planform(wing) vehicle.append_component(wing) # ------------------------------------------------------------------ # Turbofan Network # ------------------------------------------------------------------ #initialize the gas turbine network gt_engine = SUAVE.Components.Energy.Networks.Turbofan() gt_engine.tag = 'turbofan' gt_engine.number_of_engines = 2.0 gt_engine.bypass_ratio = 5.4 gt_engine.engine_length = 2.71 gt_engine.nacelle_diameter = 2.05 gt_engine.position[1] = 4.50 #compute engine areas Awet = 1.1*np.pi*gt_engine.nacelle_diameter*gt_engine.engine_length #assign engine areas gt_engine.areas.wetted = Awet #set the working fluid for the network working_fluid = SUAVE.Attributes.Gases.Air #add working fluid to the network gt_engine.working_fluid = working_fluid #Component 1 : ram, to convert freestream static to stagnation quantities ram = SUAVE.Components.Energy.Converters.Ram() ram.tag = 'ram' #add ram to the network gt_engine.ram = ram #Component 2 : inlet nozzle inlet_nozzle = SUAVE.Components.Energy.Converters.Compression_Nozzle() inlet_nozzle.tag = 'inlet nozzle' inlet_nozzle.polytropic_efficiency = 0.98 inlet_nozzle.pressure_ratio = 0.98 # turbofan.fan_nozzle_pressure_ratio = 0.98 #0.98 #add inlet nozzle to the network gt_engine.inlet_nozzle = inlet_nozzle #Component 3 :low pressure compressor low_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() low_pressure_compressor.tag = 'lpc' low_pressure_compressor.polytropic_efficiency = 0.91 low_pressure_compressor.pressure_ratio = 1.9 #add low pressure compressor to the network gt_engine.low_pressure_compressor = low_pressure_compressor #Component 4 :high pressure compressor high_pressure_compressor = SUAVE.Components.Energy.Converters.Compressor() high_pressure_compressor.tag = 'hpc' high_pressure_compressor.polytropic_efficiency = 0.91 high_pressure_compressor.pressure_ratio = 10.0 #add the high pressure compressor to the network gt_engine.high_pressure_compressor = high_pressure_compressor #Component 5 :low pressure turbine low_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() low_pressure_turbine.tag='lpt' low_pressure_turbine.mechanical_efficiency = 0.99 low_pressure_turbine.polytropic_efficiency = 0.93 #add low pressure turbine to the network gt_engine.low_pressure_turbine = low_pressure_turbine #Component 5 :high pressure turbine high_pressure_turbine = SUAVE.Components.Energy.Converters.Turbine() high_pressure_turbine.tag='hpt' high_pressure_turbine.mechanical_efficiency = 0.99 high_pressure_turbine.polytropic_efficiency = 0.93 #add the high pressure turbine to the network gt_engine.high_pressure_turbine = high_pressure_turbine #Component 6 :combustor combustor = SUAVE.Components.Energy.Converters.Combustor() combustor.tag = 'Comb' combustor.efficiency = 0.99 combustor.alphac = 1.0 combustor.turbine_inlet_temperature = 1500 combustor.pressure_ratio = 0.95 combustor.fuel_data = SUAVE.Attributes.Propellants.Jet_A() #add the combustor to the network gt_engine.combustor = combustor #Component 7 :core nozzle core_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() core_nozzle.tag = 'core nozzle' core_nozzle.polytropic_efficiency = 0.95 core_nozzle.pressure_ratio = 0.99 #add the core nozzle to the network gt_engine.core_nozzle = core_nozzle #Component 8 :fan nozzle fan_nozzle = SUAVE.Components.Energy.Converters.Expansion_Nozzle() fan_nozzle.tag = 'fan nozzle' fan_nozzle.polytropic_efficiency = 0.95 fan_nozzle.pressure_ratio = 0.99 #add the fan nozzle to the network gt_engine.fan_nozzle = fan_nozzle #Component 9 : fan fan = SUAVE.Components.Energy.Converters.Fan() fan.tag = 'fan' fan.polytropic_efficiency = 0.93 fan.pressure_ratio = 1.7 #add the fan to the network gt_engine.fan = fan #Component 10 : thrust (to compute the thrust) thrust = SUAVE.Components.Energy.Processes.Thrust() thrust.tag ='compute_thrust' #total design thrust (includes all the engines) thrust.total_design = 37278.0* Units.N #Newtons #design sizing conditions altitude = 35000.0*Units.ft mach_number = 0.78 isa_deviation = 0. # add thrust to the network gt_engine.thrust = thrust #size the turbofan #create conditions object for sizing the turbofan atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976() conditions = atmosphere.compute_values(altitude) turbofan_sizing(gt_engine,mach_number,altitude) compute_turbofan_geometry(gt_engine, conditions) # add gas turbine network gt_engine to the vehicle vehicle.append_component(gt_engine) # ------------------------------------------------------------------ # Vehicle Definition Complete # ------------------------------------------------------------------ return vehicle