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

Advances in heat exchanger models #79

Merged
merged 21 commits into from
Sep 25, 2024
Merged
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
4 changes: 2 additions & 2 deletions docs/src/propulsion/gascalc.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ engine.gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)

engine.gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)

engine.gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)
engine.gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t, hvap)

engine.gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)
engine.gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t, hvap)

engine.gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)

Expand Down
6 changes: 4 additions & 2 deletions example/cryo_input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ name = "TASOPT Model with cryo fuel and HX"
fuel_in_wingcen = false # Is fuel stored in wing center box?
fuel_usability_factor = 0.90 # fraction of max fuel volume that is usable

fuel_enthalpy_vaporization = 0.0 #J/kg, latent heat of vaporization of fuel

[Fuel.Storage]
tank_placement = "rear" #Location of tank in fuselage. Choices are "front", "rear", or "both".

Expand Down Expand Up @@ -482,8 +484,8 @@ name = "TASOPT Model with cryo fuel and HX"
[Propulsion.HeatExchangers] #Default model does not have heat exchangers in the propulsion system
recirculation_flag = 1
recirculation_temperature = 200
latent_heat = 0
core_inner_diameter = 0.564
core_inner_diameter = 0.2
added_mass_frac = 1.0

precooler_order = 1
precooler_effectiveness = 0
Expand Down
3 changes: 2 additions & 1 deletion example/example_regional.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

fuel_temp = 280.0
fuel_density = 817.0 #kg/m3
fuel_enthalpy_vaporization = 0.0 #J/kg, latent heat of vaporization of fuel

[Mission]
N_missions = 1 # Number of missions to be modeled (first mission is the design mission)
Expand Down Expand Up @@ -447,8 +448,8 @@
[Propulsion.HeatExchangers] #Default model does not have heat exchangers in the propulsion system
recirculation_flag = 0
recirculation_temperature = 0
latent_heat = 0
core_inner_diameter = 0
added_mass_frac = 0.0

precooler_order = 0
precooler_effectiveness = 0
Expand Down
3 changes: 2 additions & 1 deletion example/example_widebody.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

fuel_temp = 280.0
fuel_density = 810.0 #kg/m3
fuel_enthalpy_vaporization = 0.0 #J/kg, latent heat of vaporization of fuel

[Mission]
N_missions = 1 # Number of missions to be modeled (first mission is the design mission)
Expand Down Expand Up @@ -451,8 +452,8 @@
[Propulsion.HeatExchangers] #Default model does not have heat exchangers in the propulsion system
recirculation_flag = 0
recirculation_temperature = 0
latent_heat = 0
core_inner_diameter = 0
added_mass_frac = 0.0

precooler_order = 0
precooler_effectiveness = 0
Expand Down
3 changes: 2 additions & 1 deletion src/IO/default_input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

fuel_temp = 280.0
fuel_density = 817.0 #kg/m3
fuel_enthalpy_vaporization = 0.0 #J/kg, latent heat of vaporization of fuel

[Fuel.Storage] #Default fuselage fuel storage parameters for cryogenic fuels
tank_placement = "rear" #Location of tank in fuselage. Choices are "front", "rear", or "both".
Expand Down Expand Up @@ -502,8 +503,8 @@
[Propulsion.HeatExchangers] #Default model does not have heat exchangers in the propulsion system
recirculation_flag = 0
recirculation_temperature = 0
latent_heat = 0
core_inner_diameter = 0
added_mass_frac = 0.0

precooler_order = 0
precooler_effectiveness = 0
Expand Down
5 changes: 4 additions & 1 deletion src/IO/read_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ end
pari[iifwing] = readfuel("fuel_in_wing")
pari[iifwcen] = readfuel("fuel_in_wingcen")
parg[igrWfmax] = readfuel("fuel_usability_factor")
pare[iehvap, :, :] .= readfuel("fuel_enthalpy_vaporization") #Heat of vaporization of the fuel
pare[iehvapcombustor, :, :] .= readfuel("fuel_enthalpy_vaporization") #Heat of vaporization of fuel, if vaporized in combustor

# Setup mission variables
ranges = readmis("range")
Expand Down Expand Up @@ -921,9 +923,10 @@ dweight = dprop["Weight"]

HEx = readprop("HeatExchangers")
dHEx = dprop["HeatExchangers"]
parg[igHXaddmassfrac] = read_input("added_mass_frac", HEx, dHEx)

pare[iefrecirc, :, :] .= read_input("recirculation_flag", HEx, dHEx)
pare[ierecircT, :, :] .= read_input("recirculation_temperature", HEx, dHEx)
pare[iehlat, :, :] .= read_input("latent_heat", HEx, dHEx)
pare[ieDi, :, :] .= read_input("core_inner_diameter", HEx, dHEx)

pare[iePreCorder, :, :] .= read_input("precooler_order", HEx, dHEx)
Expand Down
14 changes: 8 additions & 6 deletions src/engine/gascalc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ function gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)
end # gas_delhd

"""
gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)
gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t, hvap)
Calculates fuel/air mass fraction in combustion with specified start and end temperatures to,t .
Calculates mass fractions of post-combustion constituents
Expand All @@ -583,13 +583,14 @@ Calculates mass fractions of post-combustion constituents
- `to`: starting air temperatur
- `tf`: starting fuel temperature
- `t`: temperature of combustion products
- `hvap`: fuel enthalpy of vaporization
**Output:**
`f`: fuel/air mass fraction
`lambda(.)`: mass fractions for combustion product constituents
"""
function gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)
function gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t, hvap)

nm = n - 1
so, s_t, ho, h_t, cpo, ro = gassum(alpha, nm, to)
Expand All @@ -599,7 +600,7 @@ function gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)

#---- add on fuel contribution to hf and hc, which gassum cannot index via ifuel
si, s_t, hi, h_t, cpi, ri = gasfun(ifuel, tf)
hf = hf + hi * beta[n]
hf = hf + (hi - hvap) * beta[n]

#sb, s_t, hb, h_t, cpb, rb = gasfun(ifuel, t)
#hc = hc + hb * gamma[n] #Add contribution from unburnt fuel when etab < 1
Expand All @@ -617,7 +618,7 @@ function gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)
end # gas_burn

"""
gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)
gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t, hvap)
Same as gas_burn, but also returns derivatives.
Expand All @@ -631,6 +632,7 @@ Same as gas_burn, but also returns derivatives.
- `to`: starting air temperatur
- `tf`: starting fuel temperature
- `t`: temperature of combustion products
- `hvap`: fuel enthalpy of vaporization
**Output:**
`f`: fuel/air mass fraction
Expand All @@ -641,7 +643,7 @@ Same as gas_burn, but also returns derivatives.
`l_t`:
"""
function gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)
function gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t, hvap)

nm = n - 1
so, s_t, ho, ho_to, cpo, ro = gassum(alpha, nm, to)
Expand All @@ -651,7 +653,7 @@ function gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)

#---- add on fuel contribution to hf and hc, which gassum cannot index via ifuel
si, s_t, hi, hi_tf, cpi, ri = gasfun(ifuel, tf)
hf = hf + hi * beta[n]
hf = hf + (hi - hvap) * beta[n]
hf_tf = hf_tf + hi_tf * beta[n]

#sb, s_t, hb, hb_t, cpb, rb = gasfun(ifuel, t)
Expand Down
Loading