Skip to content

Writing an Ideal Heat Source component #415

Answered by fwitte
panosz asked this question in Q&A
Discussion options

You must be logged in to vote

So having a source and a sink in combination has the same total amount of connections as with the heat exchanger simple approach. There should not be any difference, because the equations will also be the same. If you want to go with source/sink instead of the heat exchanger you can use a referencing constraint:

from tespy.connections import Ref

[...]

c_to_sink = Connection(...)
c_from_source = Connection(...)

c_from_source.set_attr(m=Ref(c_to_sink, 1, 0))

Effectively that is what the heat exchanger simple does in the background. If you want to avoid the pressure warning message (it is only a waring message letting you know, there is something uncommon, so nothing to worry in your spec…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fwitte
Comment options

Comment options

You must be logged in to vote
2 replies
@fwitte
Comment options

Answer selected by fwitte
@fwitte
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants