示例#1
0
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
示例#2
0
文件: Procedure.py 项目: michK/SUAVE
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
示例#3
0
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
示例#4
0
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
示例#5
0
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
示例#6
0
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
示例#7
0
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 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