Flight segments
Flight segments are the Python-implemented, base building blocks for the mission definition.
They can be used as parts in phase definition.
A segment simulation starts at the flight parameters (altitude, speed, mass…) reached at the end of the previous simulated segment. The segment simulation ends when its target is reached (or if it cannot be reached).
Sections:
Segment types
In the following, the description of each segment type links to the documentation of the
Python implementation.
All parameters of the Python constructor can be set in the mission file (except for
propulsion
and reference_area
that are set within the mission module).
Most of these parameters are scalars and can be set as described here.
The segment target is a special parameter, detailed in further section.
Other special parameters are detailed in last section.
Available segments are:
start
segment
New in version 1.4.0.
Parameters
isa_offset / name / target
start
is a special segment to be used at the beginning of the mission definition to
specify the starting point of the mission, preferably by defining variables so it can be
controlled from FAST-OAD input file.
With no start
specified, the mission is assumed to start at altitude 0.0, speed 0.0.
Note
The start
segment allows to define the aircraft mass at the beginning of the mission.
Yet it is possible to define aircraft mass at some intermediate phase (e.g. takeoff) using
the mass_input segment.
Important
In any case, a variable for input mass has to be defined once and only once in the whole mission.
Example:
phases:
start_phase:
- segment: start
target:
true_airspeed: 0.0 # hard-coded value
altitude:
value: my:altitude:variable # variable definition WITH associated default value
unit: ft
default: 100.0
mass:
value: my:mass:variable # variable definition WITHOUT associated default value
unit: kg # (will have to be set by another module or by FAST-OAD
# input file)
...
missions:
main_mission:
parts:
- phase: start_phase
- ...
See also
Python documentation: Start
mass_input
segment
New in version 1.4.0.
Parameters
isa_offset / name / target
The start segment allows to define aircraft mass at the beginning of the mission, but it is sometimes needed to define the aircraft mass at some point in the mission. The typical example would be the need to specify a takeoff weight that is expected to be achieved after the taxi-out phase.
The mass_input
segment is designed to address this need. It will ensure this mass is
achieved at the specify instant in the mission by setting the start mass input accordingly.
Example:
# For setting mass at the end of taxi-out:
phases:
taxi-out:
parts:
- segment: taxi
...
- segment: mass_input
target:
mass:
value: my:MTOW:variable
unit: kg
Warning
Currently, FAST-OAD assumes the fuel consumption before the mass_input
segment is
independent of aircraft mass, which is considered true in a phase such as taxi. Assuming
otherwise would require to solve an additional inner loop. Since it does not correspond to
any use case we currently know of, it has been decided to stick to the simple case.
See also
Python documentation: MassTargetSegment
speed_change
segment
Parameters
altitude_bounds / engine_setting / interrupt_if_getting_further_from_target / isa_offset / load_factor / mach_bounds / maximum_CL / name / polar / polar_modifier / propulsion / reference_area / target / thrust_rate / time_step
A speed_change
segment simulates an acceleration or deceleration flight part, at constant
altitude and thrust rate. It ends when the target speed (mach, true_airspeed or
equivalent_airspeed) is reached.
Example:
segment: speed_change
polar: data:aerodynamics:aircraft:takeoff # High-lift devices are ON
engine_setting: takeoff
thrust_rate: 1.0 # Full throttle
target:
# altitude: constant # Assumed by default
equivalent_airspeed: # Acceleration up to EAS = 250 knots
value: 250
unit: kn
See also
Python documentation: SpeedChangeSegment
altitude_change
segment
Parameters
altitude_bounds / engine_setting / interrupt_if_getting_further_from_target / isa_offset / load_factor / mach_bounds / maximum_CL / maximum_flight_level / name / polar / polar_modifier / propulsion / reference_area / target / thrust_rate / time_step
An altitude_change
segment simulates a climb or descent flight part at constant thrust rate.
Typically, it ends when the target altitude is reached.
But also, a target speed, or CL, can be set, while keeping another speed constant (e.g. climbing up to Mach 0.8 while keeping equivalent_airspeed constant).
Examples:
segment: altitude_change
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: idle
thrust_rate: 0.15 # Idle throttle
target: # Descent down to 10000. feet at constant EAS
altitude:
value: 10000.
unit: ft
equivalent_airspeed: constant
segment: altitude_change
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: climb
thrust_rate: 0.93 # Climb throttle
target: # Climb up to Mach 0.78 at constant EAS
equivalent_airspeed: constant
mach: 0.78
segment: altitude_change
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: climb
thrust_rate: 0.93 # Climb throttle
target: # Climb at constant Mach up to the flight
mach: constant # level that provides maximum lift/drag
altitude: # at current mass.
value: optimal_flight_level
maximum_CL: 0.6 # Limitation on lift coefficient.
# The altitude will be limited to the closest
# flight level within the CL limitation.
segment: altitude_change
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: climb
thrust_rate: 0.93 # Climb throttle
target:
mach: constant # Climb at constant Mach until target CL
CL: 0.55 # is reached.
See also
Python documentation: AltitudeChangeSegment
cruise
segment
Parameters
altitude_bounds / climb_segment / engine_setting / interrupt_if_getting_further_from_target / isa_offset / load_factor / mach_bounds / maximum_CL / maximum_flight_level / name / polar / polar_modifier / propulsion / reference_area / target / time_step
A cruise
segment simulates a flight part at constant speed and altitude, and regulated
thrust rate (drag is compensated).
Optionally, target altitude can be set to optimal_flight_level
. In such case, cruise will
be preceded by a climb segment that will put the aircraft at the altitude that will minimize the
fuel consumption for the whole segment (including the prepending climb).
This option is available because the altitude_change segment segment can reach an altitude
that will optimize the lift/drag ratio at current mass, but the obtained altitude will not
guaranty an optimal fuel consumption for the whole cruise.
It ends when the target ground distance is covered (including the distance covered during prepending climb, if any).
Examples:
segment: cruise
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: cruise
target:
# altitude: constant # Not needed, because assumed by default
ground_distance: # Cruise for 2000 nautical miles
value: 2000
unit: NM
segment: cruise
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: cruise
target:
altitude: optimal_flight_level # Commands a prepending climb, id needed
ground_distance: # Cruise for 2000 nautical miles
value: 2000
unit: NM
See also
Python documentation: ClimbAndCruiseSegment
optimal_cruise
segment
Parameters
altitude_bounds / engine_setting / interrupt_if_getting_further_from_target / isa_offset / load_factor / mach_bounds / maximum_CL / name / polar / polar_modifier / propulsion / reference_area / target / time_step
An optimal_cruise
segment simulates a cruise climb, i.e. a cruise where the aircraft
climbs gradually to keep being at altitude of maximum lift/drag ratio.
The optimal_cruise
segment can be realised at a constant lift coefficient using the parameter maximum_CL
.
It assumed the segment actually starts at altitude of maximum lift/drag ratio or the altitude given by maximum_CL
, which can be
achieved with an altitude_change segment segment with optimal_altitude
as target
altitude and maximum_CL
as parameter.
The common way to optimize the fuel consumption for commercial aircraft is a step climb cruise. Such segment will be implemented in the future.
Example:
segment: optimal_cruise
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
engine_setting: cruise
maximum_CL: 0.6
target:
ground_distance: # Cruise for 2000 nautical miles
value: 2000
unit: NM
See also
Python documentation: OptimalCruiseSegment
holding
segment
Parameters
altitude_bounds / engine_setting / interrupt_if_getting_further_from_target / isa_offset / load_factor / mach_bounds / maximum_CL / name / polar / polar_modifier / propulsion / reference_area / target / time_step
A holding
segment simulates a flight part at constant speed and altitude, and regulated
thrust rate (drag is compensated). It ends when the target time is covered.
Example:
segment: holding
polar: data:aerodynamics:aircraft:cruise # High speed aerodynamic polar
target:
# altitude: constant # Not needed, because assumed by default
time:
value: 20 # 20 minutes holding
unit: min
See also
Python documentation: HoldSegment
taxi
segment
Parameters
altitude_bounds / engine_setting / interrupt_if_getting_further_from_target / isa_offset / mach_bounds / maximum_CL / name / polar / polar_modifier / propulsion / reference_area / target / thrust_rate / time_step / true_airspeed
A taxi
segment simulates the mission parts between gate and takeoff or landing, at constant
thrust rate. It ends when the target time is covered.
Example:
segment: taxi
thrust_rate: 0.3
target:
time:
value: 300 # taxi for 300 seconds (5 minutes)
See also
Python documentation: TaxiSegment
transition
segment
Parameters
altitude_bounds / engine_setting / interrupt_if_getting_further_from_target / isa_offset / mach_bounds / maximum_CL / name / polar / polar_modifier / propulsion / reference_area / target / thrust_rate / time_step / true_airspeed
A transition
segment is intended to “fill the gaps” when some flight part is not available
for computation or is needed to be assessed without spending CPU time.
It can be used in various ways:
Target definition
The most simple way is specifying a target with absolute and/or relative parameters. The second and last point of the flight segment will simply uses these values.
Example:
segment: transition # Rough simulation of a takeoff
target:
delta_time: 60 # 60 seconds after start point
delta_altitude: # 35 ft above start point
value: 35
unit: ft
delta_mass: -80.0 # 80kg lost from start point (implicitly 80kg consumed fuel)
true_airspeed: 85 # 85m/s at end of segment.
Usage of a mass ratio
As seen above, it is possible to force a mass evolution of a certain amount by specifying
delta_mass
.
It is also possible to specify a mass ratio. This can be done outside the target, as a segment parameter.
Example:
segment: transition # Rough climb simulation
mass_ratio: 0.97 # Aircraft end mass will be 97% of total start mass
target:
altitude: 10000.
mach: 0.78
delta_ground_distance: # 250 km after start point.
value: 250
unit: km
Reserve mass ratio
Another segment parameter is reserve_mass_ratio
. When using this parameter, another flight
point is added to computed segment, where the aircraft mass is decreased by a fraction of the mass
that remains at the end of the segment (including this reserve consumption).
Typically, it will be used as last segment to compute a reserve based on the Zero-Fuel-Weight mass.
Example:
segment: transition # Rough reserve simulation
reserve_mass_ratio: 0.06
target:
altitude: 0.
mach: 0.
Mass change without fuel consumption
New in version 1.8.2.
Using delta_mass
allows to simulate a fuel consumption equivalent to the mass loss.
For cases where mass variation should be simulated without fuel consumption, it is possible to set
to False
the parameter fuel_is_consumed
.
Example:
segment: transition
target:
delta_mass: -100.
fuel_is_consumed: False
See also
Python documentation: DummyTransitionSegment
ground_speed_change
segment
New in version 1.5.0.
This segment is used specifically during accelerating or decelerating parts while still on the ground.
The friction force with the ground is accounted in the equation of movements.
Whilst on the ground, the key wheels_friction
is used to define the friction coefficient.
The segment ends when the target velocity is reached.
Example:
segment: ground_speed_change
wheels_friction: 0.03
target:
equivalent_airspeed:
value: data:mission:operational:takeoff:Vr
See also
Python documentation: GroundSpeedChangeSegment
rotation
segment
New in version 1.5.0.
This segment is used to represent a rotation while still on the ground. This segment is specifically used for takeoff. The specific keys are (in addition to wheel friction coefficient):
rotation_rate
in (rad/s) is the rotation speed used to realise the manoeuvre (by default 3deg/s, compliant with CS-25 )
alpha_limit
(in rad) is the maximum angle of attack possible before tail strike (by default 13.5deg).
The segment ends when lift equals weight. Therefore, no target needs to be set.
Example:
segment: rotation
wheels_friction: 0.03
rotation_rate:
value: 0.0523
alpha_limit:
value: 0.3489
See also
Python documentation: RotationSegment
end_of_takeoff
segment
New in version 1.5.0.
This segment is used at the end of the takeoff phase, between lift off and before reaching the safety altitude. The target sets the safety altitude. Because this phase is quite dynamic, it is a good practice to lower the time step at least to 0.05s for a good accuracy on takeoff distance.
Example:
segment: end_of_takeoff
time_step: 0.05
target:
delta_altitude:
value: 35
unit: ft
See also
Python documentation: EndOfTakeoffSegment
takeoff
segment
New in version 1.5.0.
This segment is the sequence of ground_speed_change segment, rotation segment and end_of_takeoff segment.
The parameters for this segment are the same as for its 3 components, except that:
time_step
is used only for ground_speed_change segment and rotation segment.time step for end_of_takeoff segment is driven by the additional parameter
end_time_step
target speed at end of ground_speed_change segment is driven by the additional parameter
rotation_equivalent_airspeed
the target of
takeoff
segment is the target of end_of_takeoff segment, meaning it sets the safety altitude.
Example:
segment: takeoff
wheels_friction: 0.03
rotation_equivalent_airspeed:
value: data:mission:operational:takeoff:Vr
rotation_rate:
value: 0.0523
units: rad/s
rotation_alpha_limit:
value: 0.3489
units: rad
end_time_step: 0.05
target:
delta_altitude:
value: 35
unit: ft
See also
Python documentation: TakeOffSequence
Special segment parameters
Most of segment parameters must be set with a unique value, which can be done in several ways, as described here.
There are some special parameters that are detailed below.
target
parameter
Applies to
altitude_change / breguet / cruise / end_of_takeoff / ground_speed_change / holding / mass_input / optimal_cruise / rotation / speed_change / start / takeoff / taxi / transition
The target of a flight segment is a set of parameters that drives the end of the segment simulation.
Possible target parameters are the available fields of
FlightPoint
. The actually useful parameters depend on the
segment.
Each parameter can be set the usual way, generally with a numeric value or
a variable name, but it can also be a string. The most common string value is constant
that tells the parameter value should be kept constant and equal to the start value.
In any case, please refer to the documentation of the flight segment.
Absolute and relative values
Amost all target parameters are considered as absolute values, i.e. the target is considered reached if the named parameter gets equal to the provided value.
They can also be specified as relative values, meaning that the target is considered reached if the
named parameter gets equal to the provided value added to start value. To do so, the parameter
name will be preceded by delta_
.
Examples:
target:
altitude: # Target will be reached at 35000 ft.
value: 35000
unit: ft
target:
delta_altitude: # Target will be 5000 ft above the start altitude of the segment.
value: 5000
unit: ft
Important
There are 2 exceptions : ground_distance
and time
are always considered as
relative values. Therefore, delta_ground_distance
and delta_time
will have the
same effect.
engine_setting
parameter
Applies to
altitude_change / breguet / cruise / end_of_takeoff / ground_speed_change / holding / optimal_cruise / rotation / speed_change / takeoff / taxi
Expected value for engine_setting
are takeoff
, climb
, cruise
or idle
This setting can be used by a model like the “rubber engine” propulsion model (see class RubberEngine). It roughly links the “turbine inlet temperature” (a.k.a. T4) to the flight conditions.
If another propulsion model is used, this parameter may become irrelevant, and then can be omitted.
polar
parameter(s)
Applies to
altitude_change / breguet / cruise / end_of_takeoff / ground_speed_change / holding / optimal_cruise / rotation / speed_change / takeoff / taxi
The aerodynamic polar defines the relation between lift and drag coefficients (respectively CL and CD). This parameter is composed of two vectors of same size, one for CL, and one for CD.
The polar
parameter has 2 sub-keys that are CL
and CD
.
A basic example would be:
segment: cruise
polar:
CL: [0.0, 0.5, 1.0]
CD: [0.01, 0.03, 0.12]
But generally, polar values will be obtained through variable names, because they will be computed during the process, or provided in the input file. This should give:
segment: cruise
polar:
CL: data:aerodynamics:aircraft:cruise:CL
CD: data:aerodynamics:aircraft:cruise:CD
Additionally, a convenience feature is proposes, which assumes CL and CD are provided
by variables with same names, except one ends with :CL
and the other one by :CD
.
In such case, providing only the common prefix is enough.
Therefore, the next example is equivalent to the previous one:
segment: cruise
polar: data:aerodynamics:aircraft:cruise