Skip to content

Commit

Permalink
feat[WIP]: Add working terminal temperatures for all streams for use …
Browse files Browse the repository at this point in the history
…in terminal match feasibility tests
  • Loading branch information
avinashresearch1 committed Jul 13, 2024
1 parent 02cd497 commit a88e712
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Streams/streams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ mutable struct ColdStream <: AbstractStream
T_in <= T_out || error("Supply and Target temperature don't match stream type")
mcp >= 0.0 || error("mcp values negative") # Can be zero if stream doesn't exist in one period.
h > smallest_value || error("values infeasible")
push!(add_user_data, "Working Terminal T" => T_out)
new(name, Float64(T_in), Float64(T_out), Float64(mcp), Float64(h), add_user_data, calc)
end
end
Expand Down
22 changes: 21 additions & 1 deletion src/SubProblems/Network_generation/starting_point_generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,30 @@ end
@variable(model, 0.0 <= t[all_e_tuple_vec])
@variable(model, 0.0 <= f[stream_e_tuple_vec])

# Initialize all the Working Terminal Temperatures to T_out:
for (k,v) in prob.all_dict
v = prob.all_dict["H2"]
push!(v.add_user_data, "Working Terminal T" => v.T_out)
end

#TODO:
function test_terminal_match()

"""
Test if the `matching_stream` can be feasibly placed as the terminal serial heat exchanger of the `stream`
"""
function test_terminal_match(stream_name::String, matching_stream_name::String)
end

function _test_terminal_match(stream::Union{ColdStream}, matching_stream::Union{HotStream, SimpleHotUtility})
end

stream_name = "C2"
matching_stream_name = "ST"

stream = prob.all_dict[stream_name]
matching_stream = prob.all_dict[matching_stream_name]


function get_utility_match_start_vals()
end
utils_dict = merge(prob.cold_utilities_dict, prob.hot_utilities_dict)
Expand Down

0 comments on commit a88e712

Please sign in to comment.