# Y-Junction (TL)

**Libraries:**

Simscape /
Fluids /
Thermal Liquid /
Pipes & Fittings

## Description

The Y-Junction (TL) block models a Y-junction consisting of a main branch and a side
branch in an thermal liquid network. The path between ports **A** and
**B** is the main branch. The path between ports
**A** and **C** or between ports
**B** and **C** is the side branch. The side
branch extends from the main branch at an angle specified by the value of the
**Junction angle between (A-C)** parameter.

### Flow Direction

The flow is *converging* when the flow through port
**C** merges into the main flow. The flow is
*diverging* when the branch flow splits from the main flow.

The block uses mode charts to determine each loss coefficient for a given flow
configuration. This
table
describes the conditions and coefficients when the **Loss coefficient
model** parameter is `Custom`

.

Flow Scenario | ṁ_{A} | ṁ_{B} | ṁ_{C} | K_{A} | K_{B} | K_{C} |
---|---|---|---|---|---|---|

Stagnant | – | – | – | 1 or last valid value | 1 or last valid value | 1 or last valid value |

Diverging from node A | >ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | 0 | K_{main,div} | K_{side,div} |

Diverging from node B | <-ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | K_{main,div} | 0 | K_{side,div} |

Converging to node A | <-ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | 0 | K_{main,conv} | K_{side,conv} |

Converging to node B | >ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | K_{main,conv} | 0 | K_{side,conv} |

Converging to node C (branch) | >ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | (K +
_{main,conv}K)/2_{side,conv} | (K +
_{main,conv}K)/2_{side,conv} | 0 |

Diverging from node C (branch) | <-ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | (K +
_{main,div}K)/2_{side,div} | (K +
_{main,div}K)/2_{side,div} | 0 |

This table describes the conditions and coefficients when the **Loss coefficient
model** parameter is ```
Idel'chik
correlation
```

.

Flow Scenario | ṁ_{A} | ṁ_{B} | ṁ_{C} | K_{A} | K_{B} | K_{C} |
---|---|---|---|---|---|---|

Stagnant | – | – | – | 1 or last valid value | 1 or last valid value | 1 or last valid value |

Diverging from node A — Invalid | >ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | 0 | 1 | 1 |

Diverging from node B | <-ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | K_{main,div} | 0 | K_{side,div} |

Converging to node A — Invalid | <-ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | 0 | 1 | 1 |

Converging to node B | >ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | K_{main,conv} | 0 | K_{side,conv} |

Converging to node C (branch) — Invalid | >ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | 1 | 1 | 0 |

Diverging from node C (branch) — Invalid | <-ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | 1 | 1 | 0 |

In stagnant flow, the mass flow rate conditions do not match any defined flow scenario. Stagnant flow is permitted at the start of the simulation, but the block does not revert to stagnant flow after it has achieved another mode. The mass flow rate threshold, which is the point at which the flow in the pipe begins to reverse direction, is

$${\dot{m}}_{thresh}={\mathrm{Re}}_{c}\upsilon \overline{\rho}\sqrt{\frac{\pi}{4}{A}_{\mathrm{min}}},$$

where:

*Re*_{c}is the**Critical Reynolds number**parameter, beyond which the transitional flow regime begins.*ν*is the fluid viscosity.$$\overline{\rho}$$ is the average fluid density.

*A*is the smallest cross-sectional area in the pipe junction._{min}

### Idel'chik Correlation Coefficient Model

When you set the **Loss coefficient model** parameter to
`Idel'chik correlation`

, the block calculates the pipe
loss coefficients according to [2].

**Flow Configuration**

The block supports two flow configurations between the main branch from ports
**A** and **B** and the side branch from
port **C**. The side branch is offset from the main branch at
an angle *α*, which is the value of the **Junction
angle between (A-C)** parameter.

In a converging flow, the flow enters at ports **A** and
**C** and exits at port **B**.

In a diverging flow, the flow enters at port **B** and exits at ports
**A** and **C**.

You can control the block behavior in a prohibited flow configuration by using the
**Report when flow configuration is invalid** parameter. If
the **Report when flow configuration is invalid** parameter is
set to `None`

or `Warning`

,
the model continues to run in the prohibited flow configuration, but the results
may not be correct.

**Converging Flow**

For a converging flow, the block calculates the loss coefficient of the side
branch between ports **C** and **B** using a
simplified version of Idel'chik that assumes the area of the main branch is
constant. The loss coefficient of the side branch is

$${K}_{side,conv}=\left[1+{\left(\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\frac{{A}_{B}}{{A}_{C}}\right)}^{2}-2\left(\frac{{A}_{B}}{{A}_{A}}\right){\left(1-\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\right)}^{2}-2\ast \mathrm{cos}\alpha \ast \frac{{A}_{B}}{{A}_{C}}{\left(\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\right)}^{2}\right]{\left[\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\frac{{A}_{C}}{{A}_{B}}\right]}^{-2},$$

where:

$${\dot{m}}_{A},{\dot{m}}_{B},{\dot{m}}_{C}$$ are the mass flow rates from rates at ports

**A**,**B**, and**C**, respectively.*A*,_{A}*A*,_{B}*A*are fitting coefficients for ports_{C}**A**,**B**, and**C**, respectively.

The block calculates the loss coefficient of the main branch between ports
**A** and **B** using a simplified version
of Idel'chik that assumes the main branch area is constant and $${\text{Q}}_{C}={Q}_{B}+{Q}_{S}$$, where *Q* is the volumetric flow rate
through the specified port. The main branch loss coefficient is

$${K}_{main,conv}=\left[1-{\left(1-\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\right)}^{2}-2\ast \mathrm{cos}\alpha \ast \frac{{A}_{B}}{{A}_{C}}{\left(\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\right)}^{2}\right]{\left[1-{\left(\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\right)}^{2}\right]}^{-1}.$$

**Diverging Flow**

For a diverging flow, the block calculates the loss coefficient of the side
branch between ports **C** and **B** as

$${K}_{side,div}=A\prime \left[1+{\left(\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\frac{{A}_{B}}{{A}_{C}}\right)}^{2}-2\ast \mathrm{cos}\alpha \ast \frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\frac{{A}_{B}}{{A}_{C}}\right]{\left[\frac{{\dot{m}}_{C}}{{\dot{m}}_{B}}\frac{{A}_{C}}{{A}_{B}}\right]}^{-2},$$

where

$$\text{A'=}\frac{1}{2}\left[1+\mathrm{tanh}\left(\frac{4\left({R}_{{A}^{\prime}}-0.8\right)}{0.8}\right)\right]+\frac{0.9}{2}\left[1-\mathrm{tanh}\left(\frac{4\left({R}_{{A}^{\prime}}-0.8\right)}{0.8}\right)\right]$$

and

$${R}_{{A}^{\prime}}=\frac{\sqrt{{\dot{m}}_{C}^{2}+{\dot{m}}_{thresh}^{2}}}{\sqrt{{\dot{m}}_{B}^{2}+{\dot{m}}_{thresh}^{2}}}.$$

The block calculates the loss coefficient of the main branch between ports
**A** and **B** as

$${K}_{main,div}=0.4{\left(1-\frac{{\dot{m}}_{A}}{{\dot{m}}_{B}}\frac{{A}_{B}}{{A}_{A}}\right)}^{2}{\left(\frac{{\dot{m}}_{A}}{{\dot{m}}_{B}}\right)}^{-2}.$$

### Custom Y-Junction

When you set the **Loss coefficient model** parameter to
`Custom`

, the block calculates the pipe loss
coefficient at each port, *K*, based on the user-defined loss
parameters for converging and diverging flow and mass flow rate at each port. You
must specify *K _{main,conv}*,

*K*,

_{main,div}*K*, and

_{side,conv}*K*as the

_{side,div}**Main branch converging loss coefficient**,

**Main branch diverging loss coefficient**,

**Side branch converging loss coefficient**, and

**Side branch diverging loss coefficient**parameters, respectively. The custom loss coefficient model behavior for the Y-junction is the same as for the custom T-junction.

### Mass and Momentum Balance

The block conserves mass in the junction such that

$${\dot{m}}_{A}+{\dot{m}}_{B}+{\dot{m}}_{C}=0.$$

Flow through the pipe junction behaves according to the momentum
conservation equations between ports **A**, **B**,
and **C**:

$$\begin{array}{l}{p}_{A}-{p}_{I}={I}_{A}+\frac{{K}_{A}}{2\overline{\rho}{A}_{{}_{main}}^{2}}{\dot{m}}_{A}\sqrt{{\dot{m}}_{A}^{2}+{\dot{m}}_{thresh}^{2}}\\ {p}_{B}-{p}_{I}={I}_{B}+\frac{{K}_{B}}{2\overline{\rho}{A}_{{}_{main}}^{2}}{\dot{m}}_{B}\sqrt{{\dot{m}}_{B}^{2}+{\dot{m}}_{thresh}^{2}}\\ {p}_{C}-{p}_{I}={I}_{C}+\frac{{K}_{C}}{2\overline{\rho}{A}_{{}_{side}}^{2}}{\dot{m}}_{C}\sqrt{{\dot{m}}_{C}^{2}+{\dot{m}}_{thresh}^{2}}\end{array}$$

where *I* represents the fluid inertia, and

$$\begin{array}{l}{I}_{A}={\ddot{m}}_{A}\frac{\sqrt{\pi \cdot {A}_{side}}}{{A}_{main}}\\ {I}_{B}={\ddot{m}}_{B}\frac{\sqrt{\pi \cdot {A}_{side}}}{{A}_{main}}\\ {I}_{C}={\ddot{m}}_{C}\frac{\sqrt{\pi \cdot {A}_{main}}}{{A}_{side}}\end{array}$$

*A _{main}* is the

**Main branch area (A-B)**parameter and

*A*is the

_{side}**Side branch area (C)**parameter.

### Energy Balance

The block balances energy such that

$${\varphi}_{A}+{\varphi}_{B}+{\varphi}_{C}=0,$$

where:

*ϕ*is the energy flow rate at port_{A}**A**.*ϕ*is the energy flow rate at port_{B}**B**.*ϕ*is the energy flow rate at port_{C}**C**.

### Variables

To set the priority and initial target values for the block variables prior to simulation, use
the **Initial Targets** section in the block dialog box or
Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Nominal values provide a way to specify the expected magnitude of a variable in a model.
Using system scaling based on nominal values increases the simulation robustness. Nominal
values can come from different sources, one of which is the **Nominal
Values** section in the block dialog box or Property Inspector. For more
information, see Modify Nominal Values for a Block Variable.

## Ports

### Conserving

## Parameters

## References

[1] Idel’chik, I. E. *Handbook of hydraulic resistance: Coefficients of local resistance and
of friction*. Jerusalem: Israel Program for Scientific Translations,
1966.

## Extended Capabilities

## Version History

**Introduced in R2023a**