PartialFlow¶
Water ports as arrays, one element per connection: the inlets mix, every outlet leaves at TOut; with pressure-driven flows, the inlets meet in a pressure node of small compliance
FastSmoothBuildings.Hydronics.PartialFlow, partial model (source)
Purpose
Base class of the water components with one inlet and one outlet. Each port is an array with one element per
connection (nPorts_a, nPorts_b): the inlets mix, every outlet leaves at
TOut, and all inlets share the pressure pIn of the inlet node.
Equations
Flow through the component, from the inlets: ṁ = ∑i
ṁa,i (m_flow).
Mixed inlet temperature, with δ = m_flow_small and T̄a the mean
of the inlet temperatures:
Tin = (∑i wi Ta,i + δ T̄a) / (∑i wi + δ),
where wi = ṁa,i with set flows and
wi = positivePart(ṁa,i, δ) with pressure-driven flows.
At zero flow the inlet takes the mean inlet temperature, and TIn stays defined.
The flow that carries the inlet water through the component, used by the energy balances of the extending
classes, is mTra = ṁ with set flows and
positivePart(ṁ, δ) with pressure-driven flows, so that a flow reversing while the
pressures settle carries no water backwards through the balance.
Set flows and pressure-driven flows
- Set flows (
pressureDriven = false):pIn= 0. - Pressure-driven flows: the inlet node is a pressure state of small compliance,
τhyd Ghyd dpin/dt = ṁ +
∑j ṁb,j, with τhyd =
tauHydand Ghyd =GHyd. WhenGHydis the conductance of the outlets, as the extending classes set it, the pressure of the node settles with the time constanttauHyd.
Extending classes
An extending class gives TOut and, with pressure-driven flows, the flow of every outlet
port_b[j].m_flow from pIn and the pressure port_b[j].p of the node
downstream. With set flows it adds the mass balance
(PartialConserving), or leaves it to
the circuit when the component is the reference of its circuit
(Boiler,
HeatPump).
Parameters¶
| Parameter | Type | Unit | Default | Description |
|---|---|---|---|---|
| nPorts_a | Integer | 1 | Number of connections of the inlet | |
| nPorts_b | Integer | 1 | Number of connections of the outlet | |
| m_flow_small | Real | kg/s | 1e-6 | Flow below which the inlet takes the mean inlet temperature |
| pressureDriven | Boolean | false | true: flows from the pressures of the circuit (closed loop); false: flows set by the valves (optimal control) | |
| tauHyd | Real | s | 5 | Time constant of the pressure of the inlet node (pressure-driven flows) |
| GHyd | Real | kg/(s.Pa) | 1e-4 | Conductance scaling the compliance of the inlet node |
Revisions¶
- October 2026: moved from trano's
FastModel.Hydronics.