# Cross-Junction (TL)

Cross-junction in a thermal liquid network

**Library:**Simscape / Fluids / Thermal Liquid / Pipes & Fittings

## Description

The Cross-Junction (TL) block represents a four-way
junction in an thermal liquid network. The block abstracts the fluid interactions
depending on the direction of flow at each port, where ports **A** and
**C** are the main line and ports **B** and
**D** are the branch line. The block defines four unique flow
configurations: diverging flow, converging flow, perpendicular flow, and colliding flow.
All four configurations can occur in the same block during a simulation. You only need
to supply parameters for each condition that the block experiences. The block conserves
mass such that

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

where *ṁ _{i}* is the mass flow
rate for a given port,

*i*.

The possible flow configurations are:

Diverging flow — Flow enters at node 1 and exits at nodes 2, 3, and 4.

Converging flow — Flow enters at nodes 1, 2, and 4 and exits at node 3.

Perpendicular flow — Flow enters at nodes 1 and 2 and exits at nodes 3 and 4.

Colliding flow — Flow enters at nodes 1 and 3 and exits at nodes 2 and 4.

This figure demonstrates these configurations.

The block takes advantage of simplifying assumptions to reduce the total number of
parameters that you need to provide. The block treats the junction as symmetrical about
both the horizontal and vertical planes such that *A _{1}* =

*A*, and

_{3}*A*=

_{2}*A*, where

_{4}*A*is the area of the corresponding port in the figure. Using this symmetry, the block assumes the loss coefficients from 1 to 2 and from 1 to 4 are identical during diverging, converging, and colliding flow.

_{1,2,3,4}During simulation, the block continually checks the direction of flow at each port and
compares the result to the four possible flow configurations. When the block determines
the flow configuration, it adjusts the node that each port corresponds to. For example,
when the block experiences diverging flow where the fluid enters at port
**C** and exits at ports **A**,
**B**, and **D**, it assigns node 1 to port
**C** as in the figure.

If you use two-element vectors to specify the flow coefficients, the block uses the
first or second element depending on whether node 1 aligns with the main line or the
branch line. The first element corresponds to node 1 at port **A** or
**C**, and the second element corresponds to node 1 at port
**B** or **D**. The block determines which
coefficient and which vector element to use, then computes the pressure difference to
conserve momentum such that

$${p}_{i}-{p}_{1}={I}_{i}+\frac{\raisebox{1ex}{${k}_{i}$}\!\left/ \!\raisebox{-1ex}{$2$}\right.{\dot{m}}_{i}\sqrt{{\dot{m}}_{i}^{2}+{\dot{m}}_{threshold}^{2}}}{\overline{\rho}{A}_{i}^{2}},$$

where:

$$\overline{\rho}$$ is the average fluid density.

*p*is the pressure for a given port,_{i}*i*.*p*is the pressure at node 1._{1}*k*is the flow coefficient that the block assigns to a given port,_{i}*i*. This value can be either the turning flow or straight flow coefficient, depending on the port.*I*is the fluid inertia for a given port,_{i}*i*.

The block calculates the inertia for each port as

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

The block uses mode charts to determine the value of
*k _{i}*. This table describes the
conditions and coefficients for each operational mode.

Flow Scenario | ṁ_{A} | ṁ_{B} | ṁ_{C} | ṁ_{D} | k_{A} | k_{B} | k_{C} | k_{D} |
---|---|---|---|---|---|---|---|---|

Diverging from node A | >ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | 0 | k_{div,turning,main} | k_{div,straight,main} | k_{div,turning,main} |

Diverging from node B | <-ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | k_{div,turning,side} | 0 | k_{div,turning,side} | k_{div,straight,side} |

Diverging from node C | <-ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | k_{div,straight,main} | k_{div,turning,main} | 0 | k_{div,turning,main} |

Diverging from node D | <-ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | k_{div,turning,side} | k_{div,straight,side} | k_{div,turning,side} | 0 |

Converging to node A | <-ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | 0 | k_{conv,turning,main} | k_{conv,straight,main} | k_{conv,turning,main} |

Converging to node B | >ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | k_{conv,turing,side} | 0 | k_{conv,turing,side} | k_{conv,straight,side} |

Converging to node C | >ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | k_{conv,straight,main} | k_{conv,turning,main} | 0 | k_{conv,turning,main} |

Converging to node D | >ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | k_{conv,turing,side} | k_{conv,straight,side} | k_{conv,turing,side} | 0 |

Perpendicular with main entry A | >ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | 0 | k_{perp,turning
in,main} | k_{perp,straight,main} | k_{perp,turning
out,main} |

Perpendicular with main entry B | <-ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | k_{perp,turning
out,side} | 0 | k_{perp,turning
in,side} | k_{perp,turning
straight,side} |

Perpendicular with main entry C | <-ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | >ṁ_{thresh} | k_{perp,straight,main} | k_{perp,turning
out,main} | 0 | k_{perp,turning
in,main} |

Perpendicular with main entry D | >ṁ_{thresh} | <-ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | k_{perp,turning
in,side} | k_{perp,turning
straight,side} | k_{perp,turning
out,side} | 0 |

Colliding from main to branch | >ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | 0 | k_{coll,turning,main} | k_{coll,straight,main} | k_{coll,turning,main} |

Colliding from branch to main | <-ṁ_{thresh} | >ṁ_{thresh} | <-ṁ_{thresh} | >ṁ_{thresh} | k_{coll,turning,side} | 0 | k_{coll,turning,side} | k_{coll,straight,side} |

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

The flow is stagnant when the mass flow rate conditions do not match any defined flow scenario. The block uses these parameters to calculate the flow coefficients.

*k*and_{div,straight,main}*k*are the first and second elements_{div,straight,side}**Diverging flow straight loss coefficient**parameter, respectively.*k*and_{div,turning,main}*k*are the first and second elements_{div,turning,side}**Diverging flow turning loss coefficient**parameter, respectively.*k*and_{conv,straight,main}*k*are the first and second elements_{conv,straight,side}**Converging flow straight loss coefficient**parameter, respectively.*k*and_{conv,turning,main}*k*are the first and second elements_{conv,turning,side}**Converging flow turning loss coefficient**parameter, respectively.*k*and_{perp,straight,main}*k*are the first and second elements_{perp,straight,side}**Perpendicular flow straight loss coefficient**parameter, respectively.*k*and_{perp,turning in,main}*k*are the first and second elements_{perp,turning in,side}**Perpendicular flow straight loss coefficient**parameter, respectively.*k*and_{perp,turning out,main}*k*are the first and second elements_{perp,turning out,side}**Perpendicular flow straight loss coefficient**parameter, respectively.*k*and_{coll,straight,main}*k*are the first and second elements_{coll,straight,side}**Colliding flow straight loss coefficient**parameter, respectively.*k*and_{coll,turning,main}*k*are the first and second elements_{coll,turning,side}**Colliding flow turning loss coefficient**parameter, respectively.

The block conserves energy such that

$${\phi}_{A}+{\phi}_{B}+{\phi}_{C}+{\phi}_{D}=0.$$

## Ports

### Conserving

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2022b**