Skip to content

Commit

Permalink
added hold times to inputs for tank
Browse files Browse the repository at this point in the history
  • Loading branch information
ngomezve committed May 30, 2024
1 parent a5c236a commit 69d2b82
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
6 changes: 4 additions & 2 deletions example/cryo_input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,21 @@ name = "TASOPT Model with cryo fuel and HX"
fuselage_clearance = "0.3 ft"
additional_mass_fraction = 0.25
weld_efficiency = 0.9
ullage_fraction = 0.1 #minimum ullage fraction at tank venting pressure
ullage_fraction = 0.05 #minimum ullage fraction at tank venting pressure
heat_leak_factor = 1.3 #Factor to account for heat leakage through structural elements, piping, etc (qfac > 1)
SL_temperature_for_tank = "288.2 K"

#Tank pressure design parameters
pressure_rise_factor = 2.0 #Factor to account for stratification in homogenous tank model (pfac >= 1)
pressure_venting = "2 atm"
pressure_initial = "1.2 atm"
hold_departure = "0 h"
hold_arrival = "0 h"

inner_vessel_material = "Al-2219-T87"
inner_vessel_support_angle = "80 deg"

#Insulation options: "rohacell41S", "polyurethane27", "polyurethane32", "polyurethane35", "vacuum", "mylar"
#Insulation options: "rohacell41S", "polyurethane27", "polyurethane32", "polyurethane35", "vacuum", "mylar", "microspheres"
size_insulation = true #Flag to decide whether to size insulation for boiloff
insulation_material = ["polyurethane32", "polyurethane32", "polyurethane32"]
insulation_segment_base_thickness = [0.05, 0.05, 0.05] #m
Expand Down
16 changes: 11 additions & 5 deletions src/IO/default_input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,27 @@
fuel_density = 817.0 #kg/m3

[Fuel.Storage] #Default fuselage fuel storage parameters for cryogenic fuels
tank_placement = "front" #Location of tank in fuselage. Choices are "front", "rear", or "both".
tank_placement = "rear" #Location of tank in fuselage. Choices are "front", "rear", or "both".

tank_aspect_ratio = 2.0
fuselage_clearance = "0.3 ft"
tank_pressure = "2 atm"
additional_mass_fraction = 0.1
additional_mass_fraction = 0.25
weld_efficiency = 0.9
ullage_fraction = 0.1
ullage_fraction = 0.05 #minimum ullage fraction at tank venting pressure
heat_leak_factor = 1.3 #Factor to account for heat leakage through structural elements, piping, etc (qfac > 1)
SL_temperature_for_tank = "288.2 K"

#Tank pressure design parameters
pressure_rise_factor = 2.0 #Factor to account for stratification in homogenous tank model (pfac >= 1)
pressure_venting = "2 atm"
pressure_initial = "1.2 atm"
hold_departure = "0 h"
hold_arrival = "0 h"

inner_vessel_material = "Al-2219-T87"
inner_vessel_support_angle = "80 deg"

#Insulation options: "rohacell41S", "polyurethane27", "polyurethane32", "polyurethane35", "vacuum"
#Insulation options: "rohacell41S", "polyurethane27", "polyurethane32", "polyurethane35", "vacuum", "mylar", "microspheres"
size_insulation = true #Flag to decide whether to size insulation for boiloff
insulation_material = ["polyurethane32", "polyurethane32", "polyurethane32"]
insulation_segment_base_thickness = [0.05, 0.05, 0.05] #m
Expand Down
3 changes: 3 additions & 0 deletions src/IO/read_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Density(x) = convertDensity(parse_unit(x)...)
Area(x) = convertArea(parse_unit(x)...)
Vol(x) = convertVolume(parse_unit(x)...)
Angle(x) = convertAngle(parse_unit(x)...)
Time(x) = convertTime(parse_unit(x)...)
Temp(x) = convertTemp(parse_unit(x)...)

"""
Expand Down Expand Up @@ -364,6 +365,8 @@ if pari[iifwing] == 0 #If fuel is stored in fuselage

fuse_tank.pvent = Pressure(readfuel_storage("pressure_venting"))
fuse_tank.pinitial = Pressure(readfuel_storage("pressure_initial"))
fuse_tank.t_hold_orig = Time(readfuel_storage("hold_departure"))
fuse_tank.t_hold_dest = Time(readfuel_storage("hold_arrival"))

fuse_tank.ftankadd = readfuel_storage("additional_mass_fraction")
fuse_tank.ew = readfuel_storage("weld_efficiency")
Expand Down
14 changes: 7 additions & 7 deletions src/IO/save_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -621,14 +621,14 @@ function savemodel(fname, pari, parg, parm, para, pare, parpt, parmot, pargen)
@printf(io, "# Geometry - stored in parg array:\n")
@printf(io, "# --------------------------------\n")
for (i,val) in enumerate(parg)
@printf(io, "parg[%d] = %20f # %s\n", i, val, i<291 ? iglabels[i] : "" )
@printf(io, "parg[%d] = %20.20f # %s\n", i, val, i<291 ? iglabels[i] : "" )
end

@printf(io, "# --------------------------------\n")
@printf(io, "# Mission - stored in parm array:\n")
@printf(io, "# --------------------------------\n")
for (i,val) in enumerate(parm)
@printf(io, "parm[%d] = %20f \n", i, val)
@printf(io, "parm[%d] = %20.20f \n", i, val)
end

@printf(io, "# --------------------------------\n")
Expand All @@ -639,7 +639,7 @@ function savemodel(fname, pari, parg, parm, para, pare, parpt, parmot, pargen)
for i = 1:l
@printf(io, "para[%d, :] .= [", i)
for j = 1:m
@printf(io, "%f, ", para[i, j])
@printf(io, "%20.20f, ", para[i, j])
end
@printf(io, "]\n")
end
Expand All @@ -651,7 +651,7 @@ function savemodel(fname, pari, parg, parm, para, pare, parpt, parmot, pargen)
for i = 1:l
@printf(io, "pare[%d, :] .= [", i)
for j = 1:m
@printf(io, "%20f, ", pare[i, j])
@printf(io, "%20.20f, ", pare[i, j])
end
@printf(io, "]\n")
end
Expand All @@ -660,20 +660,20 @@ function savemodel(fname, pari, parg, parm, para, pare, parpt, parmot, pargen)
@printf(io, "# Powertrain-stored in parpt array:\n")
@printf(io, "# ---------------------------------\n")
for (i,val) in enumerate(parpt)
@printf(io, "parpt[%d] = %20f \n", i, val)
@printf(io, "parpt[%d] = %20.20f \n", i, val)
end

@printf(io, "# ---------------------------------\n")
@printf(io, "# Motor - stored in parmot array:\n")
@printf(io, "# ---------------------------------\n")
for (i,val) in enumerate(parmot)
@printf(io, "parmot[%d] = %20f \n", i, val)
@printf(io, "parmot[%d] = %20.20f \n", i, val)
end
@printf(io, "# ---------------------------------\n")
@printf(io, "# Generator-stored in pargen array:\n")
@printf(io, "# ---------------------------------\n")
for (i,val) in enumerate(pargen)
@printf(io, "pargen[%d] = %20f \n", i, val)
@printf(io, "pargen[%d] = %20.20f \n", i, val)
end
end

Expand Down
6 changes: 5 additions & 1 deletion src/misc/aircraft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ mutable struct fuselage_tank

pvent::Float64
pinitial::Float64
t_hold_orig::Float64
t_hold_dest::Float64
TSLtank::Float64

rhofuel::Float64
Tfuel::Float64
rhofuelgas::Float64
Expand All @@ -38,7 +42,7 @@ mutable struct fuselage_tank
ullage_frac::Float64
qfac::Float64
pfac::Float64
TSLtank::Float64

fuselage_tank() = new("", "", false, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, [], [], [], StructuralAlloy("Al-2219-T87"), StructuralAlloy("Al-2219-T87"), 0.0, 0.0, [], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
end

Expand Down
2 changes: 1 addition & 1 deletion src/sizing/wsize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ function wsize(ac; itermax=35,
para[iaPAfinf, :] .= PAfinf

#Use homogeneous tank model to calculate required venting
_, _, _, _, _, _, _, Mvents, _, _ = CryoTank.analyze_TASOPT_tank(ac)
_, _, _, _, _, _, _, Mvents, _, _ = CryoTank.analyze_TASOPT_tank(ac, fuse_tank.t_hold_orig, fuse_tank.t_hold_dest)
parg[igWfvent] = Mvents[end] * gee #Store total fuel weight that is vented
end

Expand Down

0 comments on commit 69d2b82

Please sign in to comment.