Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6a43be5
work in progress: change SEAT_PITCH from option to variable. Move som…
xjjiang Aug 18, 2026
282ffbe
Merge branch 'main' into Var_SEAT_PITCH
xjjiang Aug 18, 2026
ef0928a
work in progress: minor updates
xjjiang Aug 18, 2026
c2fc23f
bug fix
xjjiang Aug 18, 2026
2140b66
work in progress: set SEAT_PITCH in model
xjjiang Aug 18, 2026
0bef6cc
move number of seats earlier for later reference
xjjiang Aug 18, 2026
b790c96
minor update
xjjiang Aug 18, 2026
b7b0d27
added Aircraft.Design.TYPE to test_save_results
xjjiang Aug 18, 2026
6a483a0
work in progress
xjjiang Aug 18, 2026
51d935f
minor update
xjjiang Aug 18, 2026
e9b79a6
Merge branch 'OpenMDAO:main' into Var_SEAT_PITCH
xjjiang Aug 19, 2026
bdf2c3d
Merge branch 'main' into Var_SEAT_PITCH
xjjiang Aug 20, 2026
e498a6d
Merge branch 'main' into Var_SEAT_PITCH
xjjiang Aug 24, 2026
db6122d
Merge branch 'OpenMDAO:main' into Var_SEAT_PITCH
xjjiang Aug 25, 2026
6292d3c
work in progress: check whether there are central mounted engines
xjjiang Aug 25, 2026
95f7e9a
Merge branch 'Var_SEAT_PITCH' of github.com:xjjiang/om-Aviary into Va…
xjjiang Aug 25, 2026
730ce34
minor update
xjjiang Aug 25, 2026
c315951
removed unnecessary warning messages
xjjiang Aug 25, 2026
0d89d13
Merge branch 'OpenMDAO:main' into Var_SEAT_PITCH
xjjiang Aug 26, 2026
a3ac2ce
Merge branch 'OpenMDAO:main' into Var_SEAT_PITCH
xjjiang Aug 27, 2026
8ff3f9a
Merge branch 'OpenMDAO:main' into Var_SEAT_PITCH
xjjiang Aug 27, 2026
5784b06
removed unnecessary code per Jason's request
xjjiang Aug 27, 2026
d76cce2
Merge branch 'Var_SEAT_PITCH' of github.com:xjjiang/om-Aviary into Va…
xjjiang Aug 27, 2026
323563f
Merge branch 'OpenMDAO:main' into Var_SEAT_PITCH
xjjiang Aug 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aviary/interface/test/sizing_results_for_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,12 @@
"unitless",
"<class 'float'>"
],
[
"aircraft:design:type",
"TRANSPORT",
"unitless",
"<enum 'AircraftTypes'>"
],
[
"aircraft:fuselage:simple_layout",
true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ aircraft:crew_and_payload:cargo_container_mass_scaler,1.0,unitless
aircraft:crew_and_payload:design:num_business_class,76,unitless
aircraft:crew_and_payload:design:num_economy_class,200,unitless
aircraft:crew_and_payload:design:num_first_class,24,unitless
aircraft:crew_and_payload:design:num_seats_abreast_business,0,unitless
aircraft:crew_and_payload:design:num_seats_abreast_economy,0,unitless
aircraft:crew_and_payload:design:num_seats_abreast_first,0,unitless
aircraft:crew_and_payload:design:seat_pitch_business,0,inch
aircraft:crew_and_payload:design:seat_pitch_economy,0,inch
aircraft:crew_and_payload:design:seat_pitch_first,0,inch
aircraft:crew_and_payload:design:num_seats_abreast_business,5,unitless
aircraft:crew_and_payload:design:num_seats_abreast_economy,6,unitless
aircraft:crew_and_payload:design:num_seats_abreast_first,4,unitless
aircraft:crew_and_payload:design:seat_pitch_business,39.0,inch
aircraft:crew_and_payload:design:seat_pitch_economy,32.0,inch
aircraft:crew_and_payload:design:seat_pitch_first,61.0,inch
aircraft:crew_and_payload:flight_crew_mass_scaler,1.0,unitless
aircraft:crew_and_payload:mass_per_passenger,165.0,lbm
aircraft:crew_and_payload:misc_cargo,0.0,lbm
Expand Down
121 changes: 26 additions & 95 deletions aviary/subsystems/geometry/flops_based/fuselage.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_BUSINESS)
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_FIRST)
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY)
add_aviary_option(self, Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS)
add_aviary_option(self, Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST)
add_aviary_option(self, Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY)
add_aviary_option(self, Aircraft.Engine.NUM_ENGINES)
add_aviary_option(self, Settings.VERBOSITY)

Expand All @@ -187,6 +184,9 @@ def setup(self):
add_aviary_input(self, Aircraft.Fuselage.SEAT_WIDTH_BUSINESS)
add_aviary_input(self, Aircraft.Fuselage.SEAT_WIDTH_FIRST)
add_aviary_input(self, Aircraft.Fuselage.SEAT_WIDTH_ECONOMY)
add_aviary_input(self, Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS)
add_aviary_input(self, Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST)
add_aviary_input(self, Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY)

add_aviary_output(self, Aircraft.Fuselage.LENGTH, units='ft')
add_aviary_output(self, Aircraft.Fuselage.PASSENGER_COMPARTMENT_LENGTH, units='ft')
Expand All @@ -211,52 +211,6 @@ def compute(self, inputs, outputs):
Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY
]

# The 200 was derived from B757 - the largest single aisle western desig.
if num_economy_class_pax > 200:
if num_seat_abreast_economy <= 0:
num_seat_abreast_economy = 8
Comment thread
xjjiang marked this conversation as resolved.
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY ='
f'{num_seat_abreast_economy}'
)
if num_first_class_pax > 0 and num_seat_abreast_first <= 0:
num_seat_abreast_first = num_seat_abreast_economy - 2
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_FIRST = '
f'{num_seat_abreast_first}'
)
if num_business_class_pax > 0 and num_seat_abreast_business <= 0:
num_seat_abreast_business = num_seat_abreast_economy - 2
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_BASINESS = '
f'{num_seat_abreast_business}'
)

if num_seat_abreast_first <= 0 and num_first_class_pax > 0:
num_seat_abreast_first = 4
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_FIRST = '
f'{num_seat_abreast_first}'
)
if num_seat_abreast_economy <= 0 and num_economy_class_pax > 0:
num_seat_abreast_economy = 6
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY = '
f'{num_seat_abreast_economy}'
)
if num_seat_abreast_business <= 0 and num_business_class_pax > 0:
num_seat_abreast_business = 5
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_BUSINESS = '
f'{num_seat_abreast_business}'
)

# Though these are not user definable, the values here are typical for most transport
aisle_width_first_class = 20.0 # inch
aisle_width_business_class = 19.0 # inch
Expand All @@ -266,13 +220,6 @@ def compute(self, inputs, outputs):
# Also, if the number of passengers abreast was not specified, then set it to 5 because 6
# is too much for a typical short range transport.
if num_economy_class_pax < 60:
if num_seat_abreast_economy <= 0:
num_seat_abreast_economy = 5
if verbosity > Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY = '
f'{num_seat_abreast_economy}'
)
aisle_width_economy_class = 15.0

if num_seat_abreast_economy > 6:
Expand All @@ -290,21 +237,9 @@ def compute(self, inputs, outputs):
if num_seat_abreast_economy > 6:
aisle_width_economy_class = 15.0

seat_pitch_first = self.options[Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST][0]
if seat_pitch_first <= 0 and num_first_class_pax > 0:
seat_pitch_first = 38.0 # inch
if verbosity > Verbosity.BRIEF:
print('Set Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST = 38.0 inches')
seat_pitch_business = self.options[Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS][0]
if seat_pitch_business <= 0 and num_business_class_pax > 0:
seat_pitch_business = 36.0 # inch
if verbosity > Verbosity.BRIEF:
print('Set Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS = 36.0 inches')
seat_pitch_economy = self.options[Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY][0]
if seat_pitch_economy <= 0 and num_economy_class_pax > 0:
seat_pitch_economy = 34.0 # inch
if verbosity > Verbosity.BRIEF:
print('Set Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY = 34.0 inches')
seat_pitch_first = inputs[Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST][0]
seat_pitch_business = inputs[Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS][0]
seat_pitch_economy = inputs[Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY][0]

# set maximum number of galleys based on statistics (this block is not from FLOPS)
num_pax = num_first_class_pax + num_business_class_pax + num_economy_class_pax
Expand Down Expand Up @@ -401,8 +336,11 @@ def compute(self, inputs, outputs):

# Calculate the passenger compartment length

num_engines = self.options[Aircraft.Engine.NUM_ENGINES][0]
eng_flag = num_engines - 2 * int(num_engines / 2) # a center mounted engine if 1.
num_engines = self.options[Aircraft.Engine.NUM_ENGINES]
# eng_flag = num_engines - 2 * int(num_engines / 2) # a center mounted engine if 1.
eng_flag = int(
any(x % 2 != 0 for x in num_engines)
) # there is at least one center mounted engine if 1.
first_class_len = num_first_class_pax * seat_pitch_first / num_seat_abreast_first
business_class_len = (
num_business_class_pax * seat_pitch_business / num_seat_abreast_business
Expand All @@ -420,6 +358,7 @@ def compute(self, inputs, outputs):
num_doors = 1 + int((pax_compart_length / 50.0) * num_seat_abreast_economy / 6.0)

# Final passenger compartment length
# assume all central engines are aligned along the same line relative to the fuselage
pax_compart_length = (pax_compart_length + num_doors * 2.96) * fuselage_multiplier
fuselage_length = pax_compart_length + 25.0 * eng_flag + 40.0
outputs[Aircraft.Fuselage.PASSENGER_COMPARTMENT_LENGTH] = pax_compart_length
Expand Down Expand Up @@ -629,16 +568,19 @@ def initialize(self):
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_BUSINESS)
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_FIRST)
add_aviary_option(self, Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY)
add_aviary_option(self, Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS)
add_aviary_option(self, Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST)
add_aviary_option(self, Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY)
add_aviary_option(self, Aircraft.BWB.MAX_NUM_BAYS)
add_aviary_option(self, Aircraft.BWB.MAX_BAY_WIDTH)
add_aviary_option(self, Aircraft.Fuselage.CABIN_SIDEWALL_LENGTH_MIN)

def setup(self):
add_aviary_input(self, Aircraft.BWB.PASSENGER_LEADING_EDGE_SWEEP, units='deg')
add_aviary_input(self, Aircraft.Fuselage.SIDEBODY_THICKNESS_TO_CHORD, units='unitless')
self.add_input(
'Rear_spar_percent_chord', 0.7, units='unitless', desc='RSPCHD at fuselage centerline'
)
add_aviary_input(self, Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS)
add_aviary_input(self, Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST)
add_aviary_input(self, Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY)
add_aviary_input(self, Aircraft.BWB.REAR_SPAR_PERCENT_CHORD_CENTERLINE)
add_aviary_input(self, Aircraft.BWB.REAR_SPAR_PERCENT_CHORD_ROOT)

Expand Down Expand Up @@ -671,32 +613,24 @@ def compute(self, inputs, outputs):
width_galley = 36.0 # inch
width_closet = 12.0 # inch

num_business_class_pax = self.options[Aircraft.CrewPayload.Design.NUM_BUSINESS_CLASS]
num_first_class_pax = self.options[Aircraft.CrewPayload.Design.NUM_FIRST_CLASS]
num_economy_class_pax = self.options[Aircraft.CrewPayload.Design.NUM_ECONOMY_CLASS]

# Establish defaults for Number of Passengers Abreast
# and Seat Pitch for First, Business and Economy classes

num_seat_abreast_business = self.options[
Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_BUSINESS
]
if num_seat_abreast_business <= 0:
num_seat_abreast_business = 5
num_seat_abreast_first = self.options[Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_FIRST]
if num_seat_abreast_first <= 0:
num_seat_abreast_first = 4
num_seat_abreast_economy = self.options[
Aircraft.CrewPayload.Design.NUM_SEATS_ABREAST_ECONOMY
]
if num_seat_abreast_economy <= 0:
num_seat_abreast_economy = 6

seat_pitch_business = self.options[Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS][0]
if seat_pitch_business <= 0:
seat_pitch_business = 39.0 # inch
seat_pitch_first = self.options[Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST][0]
if seat_pitch_first <= 0:
seat_pitch_first = 61.0 # inch
seat_pitch_economy = self.options[Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY][0]
if seat_pitch_economy <= 0:
seat_pitch_economy = 32.0 # inch

seat_pitch_business = inputs[Aircraft.CrewPayload.Design.SEAT_PITCH_BUSINESS][0]
seat_pitch_first = inputs[Aircraft.CrewPayload.Design.SEAT_PITCH_FIRST][0]
seat_pitch_economy = inputs[Aircraft.CrewPayload.Design.SEAT_PITCH_ECONOMY][0]

# Determine unit seat areas for each type of passenger
area_seat_business = bay_width_nom * seat_pitch_business / 12.0 / num_seat_abreast_business
Expand All @@ -705,9 +639,6 @@ def compute(self, inputs, outputs):

# Find the number of lavatories, galleys and closets based on the
# number of passengers for each class and the area for each
num_business_class_pax = self.options[Aircraft.CrewPayload.Design.NUM_BUSINESS_CLASS]
num_first_class_pax = self.options[Aircraft.CrewPayload.Design.NUM_FIRST_CLASS]
num_economy_class_pax = self.options[Aircraft.CrewPayload.Design.NUM_ECONOMY_CLASS]
num_lavas = (
int(0.99 + num_first_class_pax / 16.0)
+ int(0.99 + num_business_class_pax / 24.0)
Expand Down
Loading
Loading