# Boeing 737-800

## Boeing 737-800 Analysis Tutorial

The tutorial shows how the user can set up a conventional aircraft configuration and a mission the aircraft is to fly and then simulate the aircraft’s performance over the defined mission. The code is divided into a number of functions that are called from the main function. The descriptions in the functions clearly explain the function’s inputs and outputs and the actions performed on the functions.

### Steps to simulate the aircraft’s performance over a mission :

1) Locate the tutorial script folder, /Tutorials, from your project folder as described in the Download guide. If using the command line, cd to this directory. 2) Open the tut_mission_B737.py script in your favorite editor or IDE. 2) The script is setup to run the B737 on its design mission. Run it in your IDE. If using the command line use the command

`` \$python tut_mission_B737_800.py  ``

3) A few plots depicting the variation of the different aircraft performance parameters (Cl,Cd,etc) over the course of the mission are shown.

### Important Functions :

The script is divided into a set of functions that setup different aspects of the modeling process. The important functions are:

#### vehicle_setup()

function is where the aircraft’s geometry is specified.

##### Setting up a wing

The code below shows how the main wing of the aircraft is set up. The basic geometric inputs that define the wing are specified. Then the wing is then appended to the vehicle, which is an instance of the aircraft class.

In SUAVE units are identified through the use of a units package called Pint. Notice, that for the wing sweep that the units are specified in degrees through *Units.deg. To get results into a desired unit use /Units.deg.

The wing sweep is defined as the sweep of the quarter chord. Additionally, a symmetric wing means that it is symmetric about the root, i.e. there is right and left side.

``````
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

vehicle.append_component(wing)

``````
##### Setting up the fuselage

Similar to the wing above, the code below illustrates how a fuselage can be added to the vehicle. Again the user is required to specify the basic fuselage geometric parameters and then add the fuselage object to the vehicle.

``````
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

vehicle.append_component(fuselage)
``````
##### Setting up the propulsion system

The aircraft uses a turbofan engine. This engine can be constructed piece by piece using the energy network framework. We instantiate the network as shown below.

``````# ------------------------------------------------------------------
#   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()

``````

Next the components of the turbofan are initialized and added to the engine as shown in the energy networks section. The turbofan is composed of an inlet diffuser (nozzle), low and high pressure compressors, a combustor, a fan, a low and high pressure turbine and exit nozzles for the core and the fan.

Finally the network is added to the aircraft as shown below.

``````#size the turbofan
turbofan_sizing(turbofan,mach_number,altitude)

#computing the engine length and diameter
compute_engine_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)
``````

#### Data Structure Visualization

The data structure associated with the Boeing 737-800 can be visualized here.

This visualization shows the hierarchy of data in a SUAVE vehicle. Some of the values are defaulted, for example costs. This is because we are not performing cost analysis on the Boeing 737-800. Additionally, this snapshot of the data structure was taken prior to analysis. Therefore weights have not been calculated and are not part of the data. During the mission analysis component weights will be determined and weights will be populated.

#### configs_setup()

The aircraft geometry created is converted into configurations that can be used to make simple modifications to the geometric parameters while not modifying the aircraft geometry completely. An example of the use of this feature is when high-lift devices need to be deployed during landing and takeoff. Thus a landing and takeoff configuration can be added as shown below and then during say the flaps and slats settings can be set differently for each of the configurations.

``````# ------------------------------------------------------------------
#   Cruise Configuration
# ------------------------------------------------------------------

config = SUAVE.Components.Configs.Config(base_config)
config.tag = 'cruise'

configs.append(config)

# ------------------------------------------------------------------
#   Takeoff Configuration
# ------------------------------------------------------------------

config = SUAVE.Components.Configs.Config(base_config)
config.tag = 'takeoff'

config.wings['main_wing'].flaps.angle = 20. * Units.deg
config.wings['main_wing'].slats.angle = 25. * Units.deg

config.V2_VS_ratio = 1.21
config.maximum_lift_coefficient = 2.

configs.append(config)
``````

#### mission_setup()

To modify the baseline mission that the aircraft flies, go to the mission_setup() function and add or delete segments of the mission

``````segment = Segments.Cruise.Constant_Speed_Constant_Altitude(base_segment)
segment.tag = "cruise"

segment.analyses.extend( analyses.cruise )

segment.air_speed  = 230.412 * Units['m/s']
segment.distance   = 4666.08 * Units.km
mission.append_segment(segment)
``````

#### base_analysis()

Also to leverage SUAVE’s multifidelity capability and use a different fidelity analysis for any of the disciplines (aerodynamics,propulsion, stability, etc), the base_analysis function can be modified by switching out an analysis module for a different one.

### Other Functions :

#### main()

The main function is the driver function for the mission simulation. It calls the various routines in the appropriate order in order to set up the geometry and the mission, evaluate the performance of the aircraft over the mission and return the results.

#### full_setup()

This function (called from the main() function) sets up the aircraft geometry, configs and the missions the aircraft is to be analysed for by calling the vehicle_setup, configs_setup, analyses_setup, mission_setup and missions_setup functions.

#### simple_sizing()

The simple sizing function sizes the aircraft’s geometric components based on the geometric inputs specified by the user in the vehicle_setup() function.

#### base_analysis()

The method takes in the vehicle and assigns different analysis methods (for aero, propulsion, weights, stability) to the analyses object.

#### analyses_setup()

This functions takes in the base analysis and sets up different analysis methods for different configurations.

#### missions_setup()

This method allows the user to set up a variety of missions that need to be evaluated for an aircraft.

#### plot_mission()

This is a post processing function that takes in the results data structure and generates the necessary plots.

### RESULTS

The plots shown below should be generated if the mission analysis executes correctly. The results show the aerodynamic, propulsion and mission properties of the B737-800 for the defined mission.

### Modifying the Aircraft’s Geometry or Mission :

Suppose we want to simulate a high span variant of the B737-800. The span is increased to 40.0 m. We assume the wing chords, sweep, taper ratio, thickness to chord ratio remain the same. Thus changing the span only changes the aspect ratio and the wing area.

Now we try to fly the aircraft at a lower cruise speed of 200m/s at a cruise altitude of 25000 ft

1) To update the geometry, scroll to the vehicle_setup() function

2) Modify the parameters of the main wing

``````wing.aspect_ratio            = 10.12
wing.spans.projected         = 40.0
wing.areas.reference         = 158.0
``````

You may also need to update the reference area for the aircraft.

``````vehicle.reference_area         =     158.0
``````

3) Update the mission parameters by moving to the mission_setup() function

4) First update the end altitude of the final climb segment. Although the original script has the altitude stated in m, courtesy of the Units package it is easy to modify the altitude to 25,000ft without worrying about the units conversion as shown below.

``````segment = Segments.Climb.Constant_Speed_Constant_Rate(base_segment)
segment.tag = "climb_3"

segment.analyses.extend( analyses.cruise )

segment.altitude_end = 25000 * Units.ft
segment.air_speed    = 226.0  * Units['m/s']
segment.climb_rate   = 3.0    * Units['m/s']

mission.append_segment(segment)
``````

5) Next update the cruise segment velocity to the new speed value

``````segment = Segments.Cruise.Constant_Speed_Constant_Altitude(base_segment)
segment.tag = "cruise"

segment.analyses.extend( analyses.cruise )

segment.air_speed  = 200.0 * Units['m/s']
segment.distance   = 4666.08 * Units.km
mission.append_segment(segment)
``````

6) Now go back and run the mission for the updated geometry and mission using the steps specified in ‘Steps to run the aircraft on a mission’