Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks

Package with models for district network

Information

This package contains models of distribution networks that are used to build example models of DHC systems.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalParallel UnidirectionalParallel Hydronic network for unidirectional parallel DHC system
Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalSeries UnidirectionalSeries Hydronic network for unidirectional series DHC system
Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.BaseClasses BaseClasses Package with base classes that are used by multiple models

Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalParallel Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalParallel

Hydronic network for unidirectional parallel DHC system

Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalParallel

Information

This model represents a two-pipe distribution network with built-in computation of the pipe diameters based on the pressure drop per pipe length at nominal flow rate.

Extends from Experimental.DHC.Networks.BaseClasses.PartialDistribution2Pipe (Partial model for two-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
IntegernCon Number of connections
replaceable model Model_pipDisBaseClasses.PipeAutosize (ro...Model for distribution pipe
IntegeriConDpSennConIndex of the connection where the pressure drop is measured
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference at each connection
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/m]
LengthlDis[nCon] Length of the distribution pipe before each connection (supply only, not counting return line) [m]
LengthlCon[nCon] Length of each connection pipe (supply only, not counting return line) [m]
LengthlEnd Length of the end of the distribution line (supply only, not counting return line) [m]
LengthdhDis[nCon] Hydraulic diameter of the distribution pipe before each connection [m]
LengthdhDisRet[nCon] Hydraulic diameter of the distribution pipe before each connection [m]
LengthdhCon[nCon] Hydraulic diameter of each connection pipe [m]
LengthdhEnd Hydraulic diameter of the end of the distribution line [m]
Nominal condition
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line before the first connection [kg/s]
MassFlowRatemCon_flow_nominal[nCon] Nominal mass flow rate in each connection line [kg/s]
MassFlowRatemEnd_flow_nominalmDis_flow_nominal - sum(mCon...Nominal mass flow rate in the end of the distribution line [kg/s]
MassFlowRatemDisCon_flow_nominal[nCon]cat(1, {mDis_flow_nominal}, ...Nominal mass flow rate in the distribution line before each connection [kg/s]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Nominal condition
Timetau5*60Time constant at nominal flow for dynamic energy and momentum balance [s]

Connectors

TypeNameDescription
FluidPorts_aports_aCon[nCon]Connection return ports
FluidPorts_bports_bCon[nCon]Connection supply ports
FluidPort_aport_aDisSupDistribution supply inlet port
FluidPort_bport_bDisSupDistribution supply outlet port
replaceable model Model_pipDisModel for distribution pipe
FluidPort_bport_bDisRetDistribution return outlet port
FluidPort_aport_aDisRetDistribution return inlet port
output RealOutputdpPressure difference at given location (measured) [Pa]
output RealOutputdH_flow[nCon]Difference in enthalpy flow rate between connection supply and return [W]
output RealOutputmCon_flow[nCon]Connection supply mass flow rate (measured) [kg/s]

Modelica definition

model UnidirectionalParallel "Hydronic network for unidirectional parallel DHC system" extends Experimental.DHC.Networks.BaseClasses.PartialDistribution2Pipe( tau=5*60, redeclare BaseClasses.ConnectionParallelAutosize con[nCon]( each final dp_length_nominal=dp_length_nominal, final lDis=lDis, final lCon=lCon, final dhDis=dhDis, final dhDisRet=dhDisRet, final dhCon=dhCon), redeclare model Model_pipDis = BaseClasses.PipeAutosize ( roughness=7e-6, fac=1.5, final dp_length_nominal=dp_length_nominal, final dh(fixed=true)=dhEnd, final length=2*lEnd)); parameter Real dp_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate"; parameter Modelica.SIunits.Length lDis[nCon] "Length of the distribution pipe before each connection (supply only, not counting return line)"; parameter Modelica.SIunits.Length lCon[nCon] "Length of each connection pipe (supply only, not counting return line)"; parameter Modelica.SIunits.Length lEnd "Length of the end of the distribution line (supply only, not counting return line)"; parameter Modelica.SIunits.Length dhDis[nCon]( each fixed=false, each start=0.2, each min=0.01) "Hydraulic diameter of the distribution pipe before each connection"; parameter Modelica.SIunits.Length dhDisRet[nCon]( each fixed=false, each start=0.2, each min=0.01) "Hydraulic diameter of the distribution pipe before each connection"; parameter Modelica.SIunits.Length dhCon[nCon]( each fixed=false, each start=0.2, each min=0.01) "Hydraulic diameter of each connection pipe"; parameter Modelica.SIunits.Length dhEnd( fixed=false, start=0.2, min=0.01) "Hydraulic diameter of the end of the distribution line"; end UnidirectionalParallel;

Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalSeries Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalSeries

Hydronic network for unidirectional series DHC system

Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalSeries

Information

This model represents a one-pipe distribution network with built-in computation of the pipe diameter based on the pressure drop per pipe length at nominal flow rate.

Modeling considerations

Note that dhDis needs to be vectorized, even if the same value is computed for each array element in case of a one-pipe network. This is because the pipe diameter is computed at initialization by the model Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.BaseClasses.ConnectionSeriesAutosize which is instantiated for each connection. So the initialization system of equations would be overdetermined if using a parameter binding with a scalar variable.

Extends from DHC.Networks.BaseClasses.PartialDistribution1Pipe (Partial model for one-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
IntegernCon Number of connections
replaceable model Model_pipDisBaseClasses.PipeAutosize (ro...Model for distribution pipe
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference at each connection
Booleanshow_TOutfalseSet to true to output temperature at connection outlet
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/m]
LengthlDis[nCon] Length of the distribution pipe before each connection [m]
LengthlCon[nCon] Length of each connection pipe (supply only, not counting return line) [m]
LengthlEnd Length of the end of the distribution line (after last connection) [m]
LengthdhDis[nCon] Hydraulic diameter of the distribution pipe before each connection [m]
LengthdhCon[nCon] Hydraulic diameter of each connection pipe [m]
LengthdhEnd Hydraulic diameter of of the end of the distribution line (after last connection) [m]
Nominal condition
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line [kg/s]
MassFlowRatemCon_flow_nominal[nCon] Nominal mass flow rate in each connection line [kg/s]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Nominal condition
Timetau5*60Time constant at nominal flow for dynamic energy and momentum balance [s]

Connectors

TypeNameDescription
FluidPorts_aports_aCon[nCon]Connection return ports
FluidPorts_bports_bCon[nCon]Connection supply ports
FluidPort_aport_aDisSupDistribution supply inlet port
FluidPort_bport_bDisSupDistribution supply outlet port
replaceable model Model_pipDisModel for distribution pipe
output RealOutputdH_flow[nCon]Difference in enthalpy flow rate between connection supply and return [W]
output RealOutputmCon_flow[nCon]Connection supply mass flow rate (measured) [kg/s]
output RealOutputmByp_flow[nCon]Bypass mass flow rate [kg/s]
output RealOutputTOut[nCon]Temperature in distribution line at each connection outlet [K]

Modelica definition

model UnidirectionalSeries "Hydronic network for unidirectional series DHC system" extends DHC.Networks.BaseClasses.PartialDistribution1Pipe( tau=5*60, redeclare BaseClasses.ConnectionSeriesAutosize con[nCon]( each final dp_length_nominal=dp_length_nominal, final lDis=lDis, final lCon=lCon, final dhDis=dhDis, final dhCon=dhCon), redeclare model Model_pipDis = BaseClasses.PipeAutosize ( roughness=7e-6, fac=1.5, final dp_length_nominal=dp_length_nominal, final dh(fixed=true)=dhEnd, final length=lEnd)); parameter Real dp_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate"; parameter Modelica.SIunits.Length lDis[nCon] "Length of the distribution pipe before each connection"; parameter Modelica.SIunits.Length lCon[nCon] "Length of each connection pipe (supply only, not counting return line)"; parameter Modelica.SIunits.Length lEnd "Length of the end of the distribution line (after last connection)"; parameter Modelica.SIunits.Length dhDis[nCon]( each fixed=false, each start=0.2, each min=0.01) "Hydraulic diameter of the distribution pipe before each connection"; parameter Modelica.SIunits.Length dhCon[nCon]( each fixed=false, each start=0.2, each min=0.01) "Hydraulic diameter of each connection pipe"; parameter Modelica.SIunits.Length dhEnd( fixed=false, start=0.2, min=0.01) "Hydraulic diameter of of the end of the distribution line (after last connection)"; end UnidirectionalSeries;