Skip to content

Commit

Permalink
store HEXs in engine
Browse files Browse the repository at this point in the history
removed HXs array from wsize
  • Loading branch information
ngomezve committed Jan 15, 2025
1 parent a23ba51 commit 7b2196d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/misc/engine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ $TYPEDFIELDS
weight_model_name::String = ""
"""Weight model to be used by TASOPT"""
weight_model::Function = (x->x)

Check warning on line 17 in src/misc/engine.jl

View check run for this annotation

Codecov / codecov/patch

src/misc/engine.jl#L17

Added line #L17 was not covered by tests

"""Heat exchanger parameters and data"""
heat_exchangers::Vector{Any} = []
end

"""
Expand Down
9 changes: 4 additions & 5 deletions src/sizing/wsize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ function wsize(ac; itermax=35,
parg[igxftank] = xftank
parg[igxftankaft] = xftankaft

# Initialize heat exchanger storage and reset engine values
HXs = []
# Reset engine values for heat exchangers
resetHXs(pare)

# -------------------------------------------------------
Expand Down Expand Up @@ -785,10 +784,10 @@ function wsize(ac; itermax=35,
ipdes = ipcruise1 #Design point: start of cruise

if iterw > 2 #Only include heat exchangers after second iteration
HXs = hxdesign!(pare, pari, ipdes, HXs, rlx = 0.5) #design and off-design HX performance
engine.heat_exchangers = hxdesign!(pare, pari, ipdes, engine.heat_exchangers, rlx = 0.5) #design and off-design HX performance

#Find and store maximum HX outer diameter to check fit in engine
for HX in HXs
for HX in engine.heat_exchangers
if HX.type == "PreC"
parg[igdHXPreC] = HX.HXgeom.D_o
elseif HX.type == "InterC"
Expand Down Expand Up @@ -850,7 +849,7 @@ function wsize(ac; itermax=35,
enginecalc!(ac, case, imission, ip, initeng, iterw)

#Calculate engine mass properties
engineweight!(ac, HXs)
engineweight!(ac, engine.heat_exchangers)

mission!(ac, imission, Ldebug)

Expand Down

0 comments on commit 7b2196d

Please sign in to comment.