modelJunction
Extends from Buildings.Fluid.BaseClasses.PartialThreeWayResistance (Flow splitter with partial resistance model at each port).
Information
Model of a flow junction with an optional fixed resistance in each flow leg and an optional mixing volume at the junction.
The pressure drop is implemented using the model Buildings.Fluid.FixedResistances.PressureDrop. If its nominal pressure drop is set to zero, then the pressure drop model will be removed. For example, the pressure drop declaration
m_flow_nominal={ 0.1, 0.1, -0.2},
dp_nominal = {500, 0, -6000}
would model a flow mixer that has the nominal flow rates and associated pressure drops
as shown in the figure below. Note that port_3 is set to negative values.
The negative values indicate that at the nominal conditions, fluid is leaving the component.
If
energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState,
then at the flow junction, a fluid volume is modeled.
The fluid volume is implemented using the model
Buildings.Fluid.Delays.DelayFirstOrder.
The fluid volume has the size
V = sum(abs(m_flow_nominal[:])/3)*tau/rho_nominal
where tau is a parameter and rho_nominal is the density
of the medium in the volume at nominal condition.
Setting energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial
can help reducing the size of the nonlinear
system of equations.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Real | n | 2 | Flow exponent, n=1 for laminar, n=2 for turbulent |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Modelica.Units.SI.MassFlowRate | mDyn_flow_nominal (from PartialThreeWayResistance) | Nominal mass flow rate for dynamic momentum and energy balance | |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start (from LumpedVolumeDeclarations) | fill(0, Medium.nC) | Start value of trace substances |
| Medium.ExtraProperty[Medium.nC] | C_nominal (from LumpedVolumeDeclarations) | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Dynamics | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Dynamics › Nominal condition | |||
| Modelica.Units.SI.Time | tau (from PartialThreeWayResistance) | 10 | Time constant at nominal flow for dynamic energy and momentum balance |
| Advanced | |||
| Boolean | from_dp (from PartialThreeWayResistance) | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_1 (from PartialThreeWayResistance) | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_1 |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_2 (from PartialThreeWayResistance) | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_2 |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_3 (from PartialThreeWayResistance) | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_3 |
| Boolean | verifyFlowReversal (from PartialThreeWayResistance) | false | =true, to assert that the flow does not reverse when portFlowDirection_* does not equal Bidirectional |
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialThreeWayResistance) | Small mass flow rate for checking flow reversal | |
| Boolean | linearized | false | = true, use linear relation between m_flow and dp for any flow rate |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal | Mass flow rate. Set negative at outflowing ports. | |
| Modelica.Units.SI.Pressure | dp_nominal | Pressure drop at nominal mass flow rate, set to zero or negative number at outflowing ports. | |
| Transition to laminar | |||
| Real | deltaM | 0.3 | Fraction of nominal mass flow rate where transition to turbulent occurs |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_1 (from PartialThreeWayResistance) | First port, typically inlet | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_2 (from PartialThreeWayResistance) | Second port, typically outlet | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_3 (from PartialThreeWayResistance) | Third port, can be either inlet or outlet |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Fluid.Interfaces.PartialTwoPortInterface | res1 (from PartialThreeWayResistance) | ||
| Buildings.Fluid.Interfaces.PartialTwoPortInterface | res2 (from PartialThreeWayResistance) | ||
| Buildings.Fluid.Interfaces.PartialTwoPortInterface | res3 (from PartialThreeWayResistance) | ||
| Buildings.Fluid.Delays.DelayFirstOrder | vol (from PartialThreeWayResistance) | Fluid volume to break algebraic loop |
Revisions
-
June 17, 2026, by Michael Wetter:
Updated implementation to allow a flow coefficientnthat is different from2. This allows use of the model for not fully turbulent flow.
This is for Buildings, #4620. -
April 14, 2020, by Michael Wetter:
ChangedhomotopyInitializationto a constant.
This is for IBPSA, #1341. -
February 26, 2020, by Michael Wetter:
Changed icon to display its operating state.
This is for #1294. -
March 26, 2018 by Filip Jorissen:
Removedfinal allowFlowReversal=truefrom all resistances since this overrides the default simplification when the flow is not bidirectional. This change can lead to smaller algebraic loops. This is for issue 898. -
December 1, 2016, by Michael Wetter:
Renamed model fromSplitterFixedResistanceDpMtoFlowJunctionand removed the parametersuse_dh,dhandReC.
This is for issue 451. -
October 14, 2016 by Michael Wetter:
Added to Annex 60 library.
Updated comment for parameteruse_dh.
This is for issue 451. -
Removed parameter
dynamicBalancethat overwrote the setting ofenergyDynamicsandmassDynamics. This is for Annex 60, issue 411. -
February 1, 2012 by Michael Wetter:
Expanded documentation. -
August 4, 2011 by Michael Wetter:
Addedfinal allowFlowReversal=trueto all resistances since it is impractical to avoid flow reversal in large flow networks where such a setting may be useful. -
June 11, 2008 by Michael Wetter:
Based class on Buildings.Fluid.BaseClasses.PartialThreeWayFixedResistance. -
July 20, 2007 by Michael Wetter:
First implementation.