Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit limit as an input #63

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions example/cryo_input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,19 @@ name = "TASOPT Model with cryo fuel and HX"
[Mission]
N_missions = 1 # Number of missions to be modeled (first mission is the design mission)
pax = 180 # Number of passengers in each mission
max_pax = 189 # Maximum number of passengers for aircarft
# defines the maximum payload carrying capacity of the aircraft

range = "3000.0 nmi" # Design Range

weight_per_pax = "215.0 lbf" # Specify weight per passenger -
# includes luggage [lbm or lbf or kg or N]
# judging you if you use imperial units but wtvs

exit_limit = 189 # Maximum number of passengers that can sit in the cabin

max_pax = 230 # Defines the maximum payload carrying capacity of the aircraft
# It is the maximum payload that the aircraft can carry (including cargo),
# as an equivalent number of passengers

fuel_reserves = 0.20 # W_reserveFuel / W_fuelburned

Nlift = 3.0 # Max vertical load factor for wing bending loads
Expand Down
10 changes: 7 additions & 3 deletions example/example_regional.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,19 @@
[Mission]
N_missions = 1 # Number of missions to be modeled (first mission is the design mission)
pax = 118 # Number of passengers in each mission
max_pax = 122 # Maximum number of passengers for aircarft
# defines the maximum payload carrying capacity of the aircraft


range = "2200.0 nmi"
# Design Range + second mission range
weight_per_pax = "215.0 lbf" # Specify weight per passenger -
# includes luggage [lbm or lbf or kg or N]
# judging you if you use imperial units but wtvs

exit_limit = 122 # Maximum number of passengers that can sit in the cabin

max_pax = 122 # Defines the maximum payload carrying capacity of the aircraft
# It is the maximum payload that the aircraft can carry (including cargo),
# as an equivalent number of passengers

fuel_reserves = 0.05 # W_reserveFuel / W_fuelburned

Nlift = 3.0 # Max vertical load factor for wing bending loads
Expand Down
8 changes: 6 additions & 2 deletions example/example_widebody.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,19 @@
[Mission]
N_missions = 1 # Number of missions to be modeled (first mission is the design mission)
pax = 370 # Number of passengers in each mission
max_pax = 450 # Maximum number of passengers for aircarft
# defines the maximum payload carrying capacity of the aircraft

range = "7800.0 nmi" # Design Range

weight_per_pax = "230.0 lbf" # Specify weight per passenger -
# includes luggage [lbm or lbf or kg or N]
# judging you if you use imperial units but wtvs

exit_limit = 450 # Maximum number of passengers that can sit in the cabin

max_pax = 450 # Defines the maximum payload carrying capacity of the aircraft
# It is the maximum payload that the aircraft can carry (including cargo),
# as an equivalent number of passengers

fuel_reserves = 0.07 # W_reserveFuel / W_fuelburned

Nlift = 3.0 # Max vertical load factor for wing bending loads
Expand Down
8 changes: 6 additions & 2 deletions src/IO/default_input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@

[Mission]
N_missions = 2 # Number of missions to be modeled (first mission is the design mission)
max_pax = 230 # Maximum number of passengers for aircarft
# defines the maximum payload carrying capacity of the aircraft

range = ["3000.0 nmi", "2000.0 nmi"] # Design Range + second mission range

Expand All @@ -101,6 +99,12 @@
# includes luggage [lbm or lbf or kg or N]
# judging you if you use imperial units but wtvs

exit_limit = 189 # Maximum number of passengers that can sit in the cabin

max_pax = 230 # Defines the maximum payload carrying capacity of the aircraft
# It is the maximum payload that the aircraft can carry (including cargo),
# as an equivalent number of passengers

fuel_reserves = 0.20 # W_reserveFuel / W_fuelburned

Nlift = 3.0 # Max vertical load factor for wing bending loads
Expand Down
3 changes: 2 additions & 1 deletion src/IO/read_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Wpax = Force(readmis("weight_per_pax"))
parm[imWperpax, :] .= Wpax
parm[imWpay, :] .= pax * Wpax
parg[igWpaymax] = maxpax * Wpax
parg[igexitlimit] = readmis("exit_limit")
parg[igfreserve] = readmis("fuel_reserves")
parg[igVne] = Speed(readmis("Vne"))
parg[igNlift] = readmis("Nlift")
Expand Down Expand Up @@ -623,7 +624,7 @@ readvtail(x) = read_input(x, vtail, dvtail)
if calculate_cabin #Resize the cabin if desired, keeping deltas
@info "Fuselage and stabilizer layouts have been overwritten; deltas will be maintained."

update_fuse_for_pax!(pari, parg, parm, fuse_tank) #update fuselage dimensions
update_fuse_for_pax!(pari, parg, fuse_tank) #update fuselage dimensions
end
# ---------------------------------

Expand Down
4 changes: 3 additions & 1 deletion src/misc/index.inc
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@

const igWfvent = 310

const igtotal = 310
const igexitlimit = 311

const igtotal = 311

# indices for turbo-electric systems - really just the electrical machines
const ite_ratSM = 1
Expand Down
9 changes: 4 additions & 5 deletions src/structures/update_fuse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function update_fuse!(pari, parg)
end

"""
update_fuse_for_pax!(pari, parg, parm, fuse_tank)
update_fuse_for_pax!(pari, parg, fuse_tank)

Function to update the fuselage layout when the cabin length is not known a priori, for example if the radius is changed.
It sizes the cabin for the design number of passengers.
Expand All @@ -61,23 +61,22 @@ It sizes the cabin for the design number of passengers.
**Inputs:**
- `pari::Vector{Int64}`: vector with aircraft integer parameters
- `parg::Vector{Float64}`: vector with aircraft geometric and mass parameters
- `parm::Array{Float64}`: array with mission parameters
- `fuse_tank::struct`: structure of type `fuselage_tank` with cryogenic fuel tank parameters

**Outputs:**
No direct outputs; parameters in `parg` are modified.
"""
function update_fuse_for_pax!(pari, parg, parm, fuse_tank)
function update_fuse_for_pax!(pari, parg, fuse_tank)

seat_pitch = parg[igseatpitch]
seat_width = parg[igseatwidth]
aisle_halfwidth = parg[igaislehalfwidth]

if pari[iidoubledeck] == 1 #if the aircraft is a double decker
#passenger count to size cabin is half of the maximum
paxsize = ceil(parg[igWpaymax]/parm[imWperpax,1] / 2)
paxsize = ceil(parg[igexitlimit] / 2)
else
paxsize = parg[igWpaymax]/parm[imWperpax,1] #maximum number of passengers
paxsize = parg[igexitlimit] #maximum number of passengers from exit limit
end
#TODO this double deck model assumes that both decks have a width equal to the fuselage diameter;
#in reality, at least one deck must be narrower
Expand Down
1 change: 1 addition & 0 deletions test/default_sized.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ parg[306] = 0.76200000000000001066 #
parg[307] = 0.48259999999999997344 #
parg[308] = 0.25400000000000000355 #
parg[309] = 0.00000000000000000000 #
parg[310] = 189.000000000000000000 #
# --------------------------------
# Mission - stored in parm array:
# --------------------------------
Expand Down
1 change: 1 addition & 0 deletions test/regional_sized.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ parg[306] = 0.76200000000000001066 #
parg[307] = 0.48259999999999997344 #
parg[308] = 0.25400000000000000355 #
parg[309] = 0.00000000000000000000 #
parg[310] = 122.000000000000000000 #
# --------------------------------
# Mission - stored in parm array:
# --------------------------------
Expand Down
1 change: 0 additions & 1 deletion test/unit_test_structures.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@testset "structural components" begin

# Fuselage weight
Expand Down
1 change: 1 addition & 0 deletions test/wide_sized.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ parg[306] = 0.76200000000000001066 #
parg[307] = 0.48259999999999997344 #
parg[308] = 0.25400000000000000355 #
parg[309] = 0.00000000000000000000 #
parg[310] = 450.000000000000000000 #
# --------------------------------
# Mission - stored in parm array:
# --------------------------------
Expand Down
Loading