Skip to content

Commit

Permalink
Update steam_turbine.jl
Browse files Browse the repository at this point in the history
simplify defaults processing for steam turbine.
  • Loading branch information
rathod-b committed Aug 17, 2023
1 parent 54b335f commit 651330c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/core/steam_turbine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,11 @@ function SteamTurbine(d::Dict; avg_boiler_fuel_load_mmbtu_per_hour::Union{Float6

defaults = stm_defaults_response["default_inputs"]
for (k, v) in custom_st_inputs
if k == :size_class && isnothing(v)
setproperty!(st, k, defaults[string(k)])
if k == :size_class && isnothing(v) # size class is outside "default_inputs" key.
setproperty!(st, k, stm_defaults_response[string(k)])
elseif isnan(v)
if !(k == :inlet_steam_temperature_degF && !isnan(st.inlet_steam_superheat_degF))
try
setproperty!(st, k, defaults[string(k)])
catch
setproperty!(st, k, defaults["default_inputs"][string(k)])
end
setproperty!(st, k, defaults[string(k)])
else
@warn("Steam turbine inlet temperature will be calculated from inlet pressure and specified superheat")
end
Expand Down

0 comments on commit 651330c

Please sign in to comment.