# Junction¶

## Create Function¶

create_junction(net, pn_bar, tfluid_k, height_m=0, name=None, index=None, in_service=True, type='junction', geodata=None, **kwargs)

Adds one junction in table net[“junction”]. Junctions are the nodes of the network that all other elements connect to.

Parameters
• net (pandapipesNet) – The pandapipes network in which the element is created

• pn_bar (float) – The nominal pressure in [bar]. Used as an initial value for pressure calculation.

• tfluid_k (float) – The fluid temperature in [K]. Used as parameter for gas calculations and as initial value for temperature calculations.

• height_m (float, default 0) – Height of node above sea level in [m]

• name (string, default None) – The name for this junction

• index (int, default None) – Force a specified ID if it is available. If None, the index one higher than the highest already existing index is selected.

• in_service (boolean, default True) – True for in_service or False for out of service

• type (string, default "junction") – not used yet - Designed for type differentiation on pandas lookups (e.g. household connection vs. crossing)

• geodata ((x,y)-tuple, default None) – Coordinates used for plotting

• kwargs – Additional keyword arguments will be added as further columns to the net[“junction”] table

Returns

index - The unique ID of the created element

Return type

int

Example
>>> create_junction(net, pn_bar=5, tfluid_k=320)

## Component Table Data¶

net.junction

 Parameter Datatype Value Range Explanation name string Name of the junction pn_bar float $$>$$ 0 Rated pressure of the junction [bar]. Also the initial value for the calculation. tfluid_k float $$\ge$$ 0 Fluid temperature at junction [K] height_m float $$\ge$$ 0 The height above sea level of the junction [m] in_service boolean True / False Specifies if the bus is in service. type string p or t or pt Type variable to classify junctions

net.junction_geodata

 Parameter Datatype Explanation x float x coordinate of bus location y float y coordinate of bus location

## Physical Model¶

The equations added by a junction correspond to a mass flow balance for hydraulic calculations.

\begin{align*} \sum_{n=0}^N \dot{m}_{in_n} - \sum_{l=0}^M \dot{m}_{out_l} = 0 \end{align*}

For temperature calculations, the thermal power carried by the incoming fluids is balanced:

\begin{align*} \sum_{n=0}^N \dot{m}_{in_n}c_p T_{in_n} - \sum_{l=0}^M \dot{m}_{out_l} c_p T_{m} = 0 \end{align*}

## Result Table Data¶

net.res_junction

 Parameter Datatype Explanation p_bar float The junction pressure [bar] t_k float The junction temperature [K]