-
|
The total flow rate is a variable, and I cannot determine the size of the branch flow rate. So, is there a way that the Splitter component can be set with a split ratio? |
Beta Was this translation helpful? Give feedback.
Answered by
fwitte
Nov 11, 2025
Replies: 1 comment 2 replies
-
|
Hi @WangJ501, yes this can be done. There is no parameter directly associated with the from tespy.components import Source, Sink, SimpleHeatExchanger, Splitter
from tespy.connections import Connection, Ref
from tespy.networks import Network
nw = Network()
nw.units.set_defaults(
temperature="°C",
pressure="bar",
heat="kW"
)
water = Source("water inflow")
boiler = SimpleHeatExchanger("boiler")
splitter = Splitter("splitter")
steam1 = Sink("steam 1")
steam2 = Sink("steam 2")
c1 = Connection(water, "out1", boiler, "in1", label="c1")
c2 = Connection(boiler, "out1", splitter, "in1", label="c2")
c3 = Connection(splitter, "out1", steam1, "in1", label="c3")
c4 = Connection(splitter , "out2", steam2, "in1", label="c4")
nw.add_conns(c1, c2, c3, c4)
c1.set_attr(fluid={"water": 1}, p=50, T=25)
c2.set_attr(x=1)
c3.set_attr(m=Ref(c2, 0.9, 0)) # c3 mass flow is 90 % of c2 mass flow
boiler.set_attr(Q=100, dp=0)
nw.solve("design")Or you can reference c3 to c4, for example make them the same value: c3.set_attr(m=Ref(c4, 1, 0)) # c3 and c4 mass flow are equalBest |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
WangJ501
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @WangJ501,
yes this can be done. There is no parameter directly associated with the
SplitterorMergefor this, but you can reference one mass flow to another one like this: