Valve
Create Function
For creating a single valve:
For creating multiple valves at once:
Component Table Data
net.valve
Parameter 
Datatype 
Value Range 
Explanation 
name 
string 
Name of the valve 

from_junction 
integer 
\(>\) 0 
Index of junction at which the valve starts 
to_junction 
integer 
\(>\) 0 
Index of junction at which the valve ends 
diameter_m 
float 
\(\gt\) 0 
Inner diameter of the pipe [m] 
opened 
boolean 
True / False 
Indicates if the valve is opened 
loss_coefficient 
float 
\(\geq\) 0 
An additional pressure loss coefficient 
type 
string 
Type variable to classify junctions 
Physical Model
A valve is an edge component which can be used to connect or disconnect network sections. The valve can be modelled as ideal component, which is either fully open or closed causing no losses. However, a pressure loss coefficient can be imposed as well. This property considers a specific loss caused by the component when opened and models internal pressure losses. There are no losses when the component is closed.
The valve is considered as branch element with no length and is modelled accordingly.
Result Table Data
For incompressible media:
net.res_valve
Parameter 
Datatype 
Explanation 
v_mean_m_per_s 
float 
The mean valve velocity [m/s] 
p_from_bar 
float 
Pressure at “from”junction [bar] 
p_to_bar 
float 
Pressure at “to”junction [bar] 
t_from_k 
float 
Temperature at “from”junction [K] 
t_to_k 
float 
Temperature at “to”junction [K] 
mdot_from_kg_per_s 
float 
Mass flow into valve [kg/s] 
mdot_to_kg_per_s 
float 
Mass flow out of valve [kg/s] 
vdot_norm_m3_per_s 
float 
Norm volume flow [m^3/s] 
For compressible media:
net.res_valve
Parameter 
Datatype 
Explanation 
v_from_m_per_s 
float 
The velocity at the valve entry [m/s] 
v_to_m_per_s 
float 
The velocity at the valve exit [m/s] 
v_mean_m_per_s 
float 
The mean valve velocity [m/s] 
p_from_bar 
float 
Pressure at “from”junction [bar] 
p_to_bar 
float 
Pressure at “to”junction [bar] 
t_from_k 
float 
Temperature at “from”junction [K] 
t_to_k 
float 
Temperature at “to”junction [K] 
mdot_from_kg_per_s 
float 
Mass flow into valve [kg/s] 
mdot_to_kg_per_s 
float 
Mass flow out of valve [kg/s] 
vdot_norm_m3_per_s 
float 
Norm volume flow [m^3/s] 
reynolds 
float 
Average Reynolds number 
lambda 
float 
Average valve friction factor 
normfactor_from 
float 
Normfactor to calculate real gas velocity at “from”junction (only for gas flows) 
normfactor_to 
float 
Normfactor to calculate real gas velocity at “to”junction (only for gas flows) 