Tutorial 15 - Vehicle#
Welcome to this tutorial outlining the Vehicle creation process in RCAIDE. This guide will walk you through the code, explain its components, and highlight where modifications can be made to customize the simulation for different vehicle designs. It is a further refinement of tutorial 1 for the purposes of an optimization problem. The reader is encouraged to subsequently refer to tutorial 01 for the full context and the oterh tutorials in Optimize for more information on optimization problems.
1. Header and Imports#
The Imports section is divided into two parts: general-purpose Python libraries and simulation-specific libraries. Note the specific imports used vehcile design including design_turbofan, wing_planform, and segment_properties.
[1]:
import RCAIDE
from RCAIDE.Framework.Core import Units
from RCAIDE.Library.Methods.Powertrain.Propulsors.Turbofan import design_turbofan
from RCAIDE.Library.Methods.Geometry.Planform import wing_planform, segment_properties
from RCAIDE.Library.Plots import *
# python imports
import numpy as np
from copy import deepcopy
[2]:
def setup():
base_vehicle = vehicle_setup()
configs = configs_setup(base_vehicle)
return configs
[ ]:
Vehicle Setup#
The ``vehicle_setup`` function defines the baseline configuration of the aircraft. This section builds the vehicle step-by-step by specifying its components, geometric properties, and high-level parameters. This tutorial models an Embraer E190AR aircraft.
1. Creating the Vehicle Instance#
The setup begins by creating a vehicle instance and assigning it a tag. The tag is a unique string identifier used to reference the vehicle during analysis or in post-processing steps.
2. Defining High-Level Vehicle Parameters#
The high-level parameters describe the aircraft’s key operational characteristics, such as:
Maximum Takeoff Weight: The heaviest allowable weight of the aircraft for safe flight.
Operating Empty Weight: The aircraft weight without fuel, passengers, or payload.
Payload: The weight of cargo and passengers.
Max Zero Fuel Weight: The maximum weight of the aircraft excluding fuel.
Flight Envelope: These values are used to define the standard conditions the aircraft will operate under. These values are also used in certain analyses, for instance weight.
Units for these parameters can be converted automatically using the Units module to ensure consistency and reduce errors.
3. Main Wing Setup#
The main wing is added using the ``Main_Wing`` class. This designation ensures that the primary lifting surface is recognized correctly by the analysis tools. Key properties of the wing include:
Area: The total wing surface area.
Span: The length of the wing from tip to tip.
Aspect Ratio: A ratio of span to average chord, determining wing efficiency.
Segments: Divisions of the wing geometry (e.g., root and tip sections).
Control Surfaces: High-lift devices like flaps and ailerons, defined by span fractions and deflections.
Different segments are defined for the wing, which allows the user to define the wing geometry in a more detailed manner, for instance wing sweep that is dependent on percent of span. Most of the wing segemtn parameters are based on percentage of span or chord. This allows for the aircraft to be easily scaled by changing the driving parameters, such as wing span and root chord length. Segemnts are created and added with the following steps:
Create the segment component
Define segment properties including span percentage, sweep, twist, and dihedral, and chord.
Add the segment to the wing using the ``append_component`` method.
4. Horizontal and Vertical Stabilizers#
The stabilizers provide stability and control for the aircraft:
Horizontal Stabilizer: Defined using the
Horizontal_Tailclass. It follows a similar setup to the main wing but acts as a stabilizing surface.Vertical Stabilizer: Defined using the
Vertical_Tailclass, with an additional option to designate the tail as a T-tail for weight calculations.
Segments are added to the stabilizers in a similar manner to the main wing.
6. Fuselage Definition#
The fuselage is modeled by specifying its geometric parameters, such as:
Length: The overall length of the aircraft body.
Width: The widest part of the fuselage cross-section.
Height: The height of the fuselage.
These values influence drag calculations and overall structural weight.
Segments are again added to the fuselage in a similar manner to the main wing.
7. Energy Network: Turbofan Engine#
The energy network models the propulsion system, in this case, a turbofan engine. The turbofan network determines the engine’s thrust, bypass ratio, and fuel type. These parameters are essential for performance and fuel efficiency analyses.
[3]:
def vehicle_setup():
#------------------------------------------------------------------------------------------------------------------------------------
# ################################################# Vehicle-level Properties ########################################################
#------------------------------------------------------------------------------------------------------------------------------------
vehicle = RCAIDE.Vehicle()
vehicle.tag = 'Embraer_E190AR'
# 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.flight_envelope.ultimate_load = 3.5
vehicle.flight_envelope.positive_limit_load = 1.5
# basic parameters
vehicle.reference_area = 92.
vehicle.passengers = 106
vehicle.systems.control = "fully powered"
vehicle.systems.accessories = "medium range"
#------------------------------------------------------------------------------------------------------------------------------------
# ######################################################## Wings ####################################################################
#------------------------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------
# Main Wing
# ------------------------------------------------------------------
wing = RCAIDE.Library.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.]]
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 = RCAIDE.Library.Components.Wings.Segments.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.append_segment(segment)
segment = RCAIDE.Library.Components.Wings.Segments.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.append_segment(segment)
segment = RCAIDE.Library.Components.Wings.Segments.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 = 40. * Units.degrees
wing.append_segment(segment)
segment = RCAIDE.Library.Components.Wings.Segments.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.append_segment(segment)
# Fill out more segment properties automatically
wing = segment_properties(wing)
# Add flap
flap = RCAIDE.Library.Components.Wings.Control_Surfaces.Flap()
flap.tag = 'flap'
flap.span_fraction_start = 0.108
flap.span_fraction_end = 0.63
flap.deflection = 0.0 * Units.deg
flap.chord_fraction = 0.18
flap.configuration_type = 'single_slotted'
wing.append_control_surface(flap)
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 = RCAIDE.Library.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.2
wing.dihedral = 8.4 * Units.degrees
wing.origin = [[31,0,1.5]]
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 = RCAIDE.Library.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 = RCAIDE.Library.Components.Fuselages.Tube_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
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_0'
segment.percent_x_location = 0.0000
segment.percent_z_location = -0.00144
segment.height = 0.0100
segment.width = 0.0100
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_1'
segment.percent_x_location = 0.00576
segment.percent_z_location = -0.00144
segment.height = 0.7500
segment.width = 0.6500
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_2'
segment.percent_x_location = 0.02017
segment.percent_z_location = 0.00000
segment.height = 1.52783
segment.width = 1.20043
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_3'
segment.percent_x_location = 0.03170
segment.percent_z_location = 0.00000
segment.height = 1.96435
segment.width = 1.52783
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_4'
segment.percent_x_location = 0.04899
segment.percent_z_location = 0.00431
segment.height = 2.72826
segment.width = 1.96435
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_5'
segment.percent_x_location = 0.07781
segment.percent_z_location = 0.00861
segment.height = 3.49217
segment.width = 2.61913
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_6'
segment.percent_x_location = 0.10375
segment.percent_z_location = 0.01005
segment.height = 3.70130
segment.width = 3.05565
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_7'
segment.percent_x_location = 0.16427
segment.percent_z_location = 0.01148
segment.height = 3.92870
segment.width = 3.71043
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_8'
segment.percent_x_location = 0.22478
segment.percent_z_location = 0.01148
segment.height = 3.92870
segment.width = 3.92870
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_9'
segment.percent_x_location = 0.69164
segment.percent_z_location = 0.01292
segment.height = 3.81957
segment.width = 3.81957
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_10'
segment.percent_x_location = 0.71758
segment.percent_z_location = 0.01292
segment.height = 3.81957
segment.width = 3.81957
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_11'
segment.percent_x_location = 0.78098
segment.percent_z_location = 0.01722
segment.height = 3.49217
segment.width = 3.71043
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_12'
segment.percent_x_location = 0.85303
segment.percent_z_location = 0.02296
segment.height = 3.05565
segment.width = 3.16478
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_13'
segment.percent_x_location = 0.91931
segment.percent_z_location = 0.03157
segment.height = 2.40087
segment.width = 1.96435
fuselage.append_segment(segment)
# Segment
segment = RCAIDE.Library.Components.Fuselages.Segments.Segment()
segment.tag = 'segment_14'
segment.percent_x_location = 1.00
segment.percent_z_location = 0.04593
segment.height = 1.09130
segment.width = 0.21826
fuselage.append_segment(segment)
# add to vehicle
vehicle.append_component(fuselage)
#------------------------------------------------------------------------------------------------------------------------------------
# Landing Gear
#------------------------------------------------------------------------------------------------------------------------------------
main_gear = RCAIDE.Library.Components.Landing_Gear.Main_Landing_Gear()
main_gear.tire_diameter = 1.12000 * Units.m
main_gear.strut_length = 1.8 * Units.m
main_gear.units = 2 # Number of main landing gear
main_gear.wheels = 2 # Number of wheels on the main landing gear
vehicle.append_component(main_gear)
nose_gear = RCAIDE.Library.Components.Landing_Gear.Nose_Landing_Gear()
nose_gear.tire_diameter = 0.6858 * Units.m
nose_gear.units = 1 # Number of nose landing gear
nose_gear.wheels = 2 # Number of wheels on the nose landing gear
nose_gear.strut_length = 1.3 * Units.m
vehicle.append_component(nose_gear)
#------------------------------------------------------------------------------------------------------------------------------------
# Fuel Network
#------------------------------------------------------------------------------------------------------------------------------------
#initialize the fuel network
net = RCAIDE.Framework.Networks.Fuel()
#------------------------------------------------------------------------------------------------------------------------------------
# Fuel Distrubition Line
#------------------------------------------------------------------------------------------------------------------------------------
fuel_line = RCAIDE.Library.Components.Powertrain.Distributors.Fuel_Line()
#------------------------------------------------------------------------------------------------------------------------------------
# Fuel Tank & Fuel
#------------------------------------------------------------------------------------------------------------------------------------
fuel_tank = RCAIDE.Library.Components.Powertrain.Sources.Fuel_Tanks.Fuel_Tank()
fuel_tank.origin = [[13.0,0,-1.]]
fuel = RCAIDE.Library.Attributes.Propellants.Jet_A()
fuel.mass_properties.mass = vehicle.mass_properties.max_takeoff-vehicle.mass_properties.max_fuel
fuel.origin = [[13.0,0,-1.]]
fuel.mass_properties.center_of_gravity = [[13.0,0,-1.]]
fuel.internal_volume = fuel.mass_properties.mass/fuel.density
fuel_tank.fuel = fuel
fuel_line.fuel_tanks.append(fuel_tank)
#------------------------------------------------------------------------------------------------------------------------------------
# Propulsor
#------------------------------------------------------------------------------------------------------------------------------------
turbofan = RCAIDE.Library.Components.Powertrain.Propulsors.Turbofan()
turbofan.tag = 'starboard_propulsor'
turbofan.length = 2.71
turbofan.bypass_ratio = 5.4
turbofan.design_altitude = 35000.0*Units.ft
turbofan.design_mach_number = 0.78
turbofan.design_thrust = 37278.0* Units.N/2
# Nacelle
nacelle = RCAIDE.Library.Components.Nacelles.Body_of_Revolution_Nacelle()
nacelle.diameter = 2.05
nacelle.length = 2.71
nacelle.tag = 'nacelle_1'
nacelle.inlet_diameter = 2.0
nacelle.origin = [[12.0,4.38,-2.1]]
nacelle.areas.wetted = 1.1*np.pi*nacelle.diameter*nacelle.length
nacelle_airfoil = RCAIDE.Library.Components.Airfoils.NACA_4_Series_Airfoil()
nacelle_airfoil.NACA_4_Series_code = '2410'
nacelle.append_airfoil(nacelle_airfoil)
turbofan.nacelle = nacelle
# fan
fan = RCAIDE.Library.Components.Powertrain.Converters.Fan()
fan.tag = 'fan'
fan.polytropic_efficiency = 0.93
fan.pressure_ratio = 1.7
turbofan.fan = fan
# working fluid
turbofan.working_fluid = RCAIDE.Library.Attributes.Gases.Air()
ram = RCAIDE.Library.Components.Powertrain.Converters.Ram()
ram.tag = 'ram'
turbofan.ram = ram
# inlet nozzle
inlet_nozzle = RCAIDE.Library.Components.Powertrain.Converters.Compression_Nozzle()
inlet_nozzle.tag = 'inlet nozzle'
inlet_nozzle.polytropic_efficiency = 0.98
inlet_nozzle.pressure_ratio = 0.98
turbofan.inlet_nozzle = inlet_nozzle
# low pressure compressor
low_pressure_compressor = RCAIDE.Library.Components.Powertrain.Converters.Compressor()
low_pressure_compressor.tag = 'lpc'
low_pressure_compressor.polytropic_efficiency = 0.91
low_pressure_compressor.pressure_ratio = 1.9
turbofan.low_pressure_compressor = low_pressure_compressor
# high pressure compressor
high_pressure_compressor = RCAIDE.Library.Components.Powertrain.Converters.Compressor()
high_pressure_compressor.tag = 'hpc'
high_pressure_compressor.polytropic_efficiency = 0.91
high_pressure_compressor.pressure_ratio = 10.0
turbofan.high_pressure_compressor = high_pressure_compressor
# low pressure turbine
low_pressure_turbine = RCAIDE.Library.Components.Powertrain.Converters.Turbine()
low_pressure_turbine.tag ='lpt'
low_pressure_turbine.mechanical_efficiency = 0.99
low_pressure_turbine.polytropic_efficiency = 0.93
turbofan.low_pressure_turbine = low_pressure_turbine
# high pressure turbine
high_pressure_turbine = RCAIDE.Library.Components.Powertrain.Converters.Turbine()
high_pressure_turbine.tag ='hpt'
high_pressure_turbine.mechanical_efficiency = 0.99
high_pressure_turbine.polytropic_efficiency = 0.93
turbofan.high_pressure_turbine = high_pressure_turbine
# combustor
combustor = RCAIDE.Library.Components.Powertrain.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 = RCAIDE.Library.Attributes.Propellants.Jet_A()
turbofan.combustor = combustor
# core nozzle
core_nozzle = RCAIDE.Library.Components.Powertrain.Converters.Expansion_Nozzle()
core_nozzle.tag = 'core nozzle'
core_nozzle.polytropic_efficiency = 0.95
core_nozzle.pressure_ratio = 0.99
core_nozzle.diameter = 0.92
turbofan.core_nozzle = core_nozzle
# fan nozzle
fan_nozzle = RCAIDE.Library.Components.Powertrain.Converters.Expansion_Nozzle()
fan_nozzle.tag = 'fan nozzle'
fan_nozzle.polytropic_efficiency = 0.95
fan_nozzle.pressure_ratio = 0.99
fan_nozzle.diameter = 1.659
turbofan.fan_nozzle = fan_nozzle
# design turbofan
design_turbofan(turbofan)
# append propulsor to network
net.propulsors.append(turbofan)
#------------------------------------------------------------------------------------------------------------------------------------
# Port Propulsor
#------------------------------------------------------------------------------------------------------------------------------------
# copy turbofan
turbofan_2 = deepcopy(turbofan)
turbofan_2.tag = 'port_propulsor'
turbofan_2.origin = [[12.0,-4.38,-1.1]] # change origin
turbofan_2.nacelle.origin = [[12.0,-4.38,-2.1]]
# append propulsor to network
net.propulsors.append(turbofan_2)
#------------------------------------------------------------------------------------------------------------------------------------
# Assign propulsors to fuel line
fuel_line.assigned_propulsors = [[turbofan.tag, turbofan_2.tag]]
#------------------------------------------------------------------------------------------------------------------------------------
# Append fuel line to fuel line to network
net.fuel_lines.append(fuel_line)
# Append energy network to aircraft
vehicle.append_energy_network(net)
return vehicle
Configurations Setup#
The ``configs_setup`` function defines the different vehicle configurations (referred to as configs) used during the simulation. Configurations allow for modifications to the baseline vehicle, such as altering control surface settings, without redefining the entire vehicle.
1. Base Configuration#
The base configuration serves as the foundation for all other configurations. It is defined to match the baseline vehicle created in the vehicle_setup function. Configurations in RCAIDE are created as containers using RCAIDE Data classes. These classes provide additional functionality, such as the ability to append new configurations or modifications.
2. Cruise Configuration#
The cruise configuration demonstrates that new configurations can inherit properties directly from existing configurations (e.g., the base config). This avoids redundancy and ensures consistency across configurations.
The cruise configuration typically reflects the clean flight condition, with no high-lift devices like flaps or slats deployed.
3. Takeoff Configuration#
The takeoff configuration is the first configuration that introduces changes to the baseline vehicle. It shows how specific vehicle parameters, such as flap and slat settings, can be modified. For example:
Flap Deflection: Flaps are deployed to increase lift during takeoff.
Slat Deployment: Slats may also be deployed to improve low-speed aerodynamic performance.
This highlights the flexibility of vehicle configurations for different phases of flight.
4. Remaining Configurations#
The remaining configurations, such as climb, approach, and landing, follow a similar pattern:
Climb: Partial deployment of flaps/slats to optimize lift and drag during ascent.
Approach: Greater flap and slat deployment for low-speed descent.
Landing: Maximum flap and slat deflection for increased lift and drag, enabling a controlled descent and touchdown.
Each configuration is built upon the previous one or the base configuration, ensuring modularity and easy customization.
[4]:
def configs_setup(vehicle):
# ------------------------------------------------------------------
# Initialize Configurations
# ------------------------------------------------------------------
configs = RCAIDE.Library.Components.Configs.Config.Container()
base_config = RCAIDE.Library.Components.Configs.Config(vehicle)
base_config.tag = 'base'
configs.append(base_config)
# ------------------------------------------------------------------
# Cruise Configuration
# ------------------------------------------------------------------
config = RCAIDE.Library.Components.Configs.Config(base_config)
config.tag = 'cruise'
configs.append(config)
# ------------------------------------------------------------------
# Takeoff Configuration
# ------------------------------------------------------------------
config = RCAIDE.Library.Components.Configs.Config(base_config)
config.tag = 'takeoff'
config.networks.fuel.propulsors['starboard_propulsor'].fan.angular_velocity = 3470. * Units.rpm
config.networks.fuel.propulsors['port_propulsor'].fan.angular_velocity = 3470. * Units.rpm
configs.append(config)
# ------------------------------------------------------------------
# Cutback Configuration
# ------------------------------------------------------------------
config = RCAIDE.Library.Components.Configs.Config(base_config)
config.tag = 'cutback'
config.networks.fuel.propulsors['starboard_propulsor'].fan.angular_velocity = 2780. * Units.rpm
config.networks.fuel.propulsors['port_propulsor'].fan.angular_velocity = 2780. * Units.rpm
configs.append(config)
# ------------------------------------------------------------------
# Landing Configuration
# ------------------------------------------------------------------
config = RCAIDE.Library.Components.Configs.Config(base_config)
config.tag = 'landing'
config.networks.fuel.propulsors['starboard_propulsor'].fan.angular_velocity = 2030. * Units.rpm
config.networks.fuel.propulsors['port_propulsor'].fan.angular_velocity = 2030. * Units.rpm
config.landing_gears.main_gear.gear_extended = True
config.landing_gears.nose_gear.gear_extended = True
configs.append(config)
# ------------------------------------------------------------------
# Short Field Takeoff Configuration
# ------------------------------------------------------------------
config = RCAIDE.Library.Components.Configs.Config(base_config)
config.tag = 'short_field_takeoff'
config.networks.fuel.propulsors['starboard_propulsor'].fan.angular_velocity = 3470. * Units.rpm
config.networks.fuel.propulsors['port_propulsor'].fan.angular_velocity = 3470. * Units.rpm
config.landing_gears.main_gear.gear_extended = True
config.landing_gears.nose_gear.gear_extended = True
configs.append(config)
# done!
return configs