Buildings.DHC.Networks.Connections

Package containing various configurations for connecting network participants to a distribution network

Information

This package contains hydronic connection models that allow an agent to connect to the distribution network.

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

Package Content

Name Description
Buildings.DHC.Networks.Connections.Connection1PipePlugFlow_v Connection1PipePlugFlow_v Model for connecting an agent to the DHC system
Buildings.DHC.Networks.Connections.Connection1Pipe_R Connection1Pipe_R Model for connecting an agent to the DHC system
Buildings.DHC.Networks.Connections.Connection2PipePlugFlow_v Connection2PipePlugFlow_v Model for connecting an agent to a two-pipe distribution network, using plug flow pipe models in the main line
Buildings.DHC.Networks.Connections.Connection2Pipe_R Connection2Pipe_R Model for connecting an agent to the DHC system
Buildings.DHC.Networks.Connections.Examples Examples This package contains example models

Buildings.DHC.Networks.Connections.Connection1PipePlugFlow_v Buildings.DHC.Networks.Connections.Connection1PipePlugFlow_v

Model for connecting an agent to the DHC system

Buildings.DHC.Networks.Connections.Connection1PipePlugFlow_v

Information

This model represents the supply and return lines to connect an agent (e.g. an energy transfer station) to a one-pipe main distribution system. A plug flow pipe model Buildings.Fluid.FixedResistances.PlugFlowPipe that includes pressure drop, heat transfer, and transport delays is used in the main distribution line, but not in the connection to the building, as the latter is typically short.

Extends from Buildings.DHC.Networks.BaseClasses.PartialConnection1Pipe (Partial model for connecting an agent to a one-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipDisBuildings.Fluid.FixedResista... 
replaceable model Model_pipConBuildings.Fluid.FixedResista... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
Booleanshow_TOutfalseSet to true to output temperature at connection outlet
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line [kg/s]
MassFlowRatemCon_flow_nominal Nominal mass flow rate in the connection line [kg/s]
LengthlDis Length of the distribution pipe before the connection [m]
Velocityv_nominal1.5Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh) [m/s]
Heightroughness2.5e-5Average height of surface asperities (default: smooth steel pipe) [m]
SpecificHeatCapacitycPip2300Specific heat of pipe wall material. 2300 for PE, 500 for steel [J/(kg.K)]
DensityrhoPip930Density of pipe wall material. 930 for PE, 8000 for steel [kg/m3]
Lengththickness0.0035Pipe wall thickness [m]
Pipe
LengthdIns Thickness of pipe insulation, used to compute R [m]
ThermalConductivitykIns Heat conductivity of pipe insulation, used to compute R [W/(m.K)]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Conservation 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
replaceable model Model_pipDis 
replaceable model Model_pipCon 
FluidPort_aport_aDisDistribution inlet port
FluidPort_bport_bDisDistribution outlet port
FluidPort_aport_aConConnection return port
FluidPort_bport_bConConnection supply port
output RealOutputmCon_flowConnection supply mass flow rate (measured) [kg/s]
output RealOutputdH_flowDifference in enthalpy flow rate between connection supply and return [W]
output RealOutputmByp_flowBypass mass flow rate [kg/s]
output RealOutputTOutTemperature in distribution line at connection outlet [K]
HeatPort_aheatPortDisHeat transfer to and from the distribution pipe

Modelica definition

model Connection1PipePlugFlow_v "Model for connecting an agent to the DHC system" extends Buildings.DHC.Networks.BaseClasses.PartialConnection1Pipe( tau=5*60, redeclare replaceable model Model_pipDis = Buildings.Fluid.FixedResistances.PlugFlowPipe ( final length=lDis, final dIns=dIns, final kIns=kIns, v_nominal=v_nominal, roughness=roughness, cPip=cPip, rhoPip=rhoPip, thickness=thickness), redeclare replaceable model Model_pipCon = Buildings.Fluid.FixedResistances.LosslessPipe); parameter Modelica.Units.SI.Length dIns "Thickness of pipe insulation, used to compute R"; parameter Modelica.Units.SI.ThermalConductivity kIns "Heat conductivity of pipe insulation, used to compute R"; parameter Modelica.Units.SI.Length lDis "Length of the distribution pipe before the connection"; parameter Modelica.Units.SI.Velocity v_nominal=1.5 "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; parameter Modelica.Units.SI.Height roughness=2.5e-5 "Average height of surface asperities (default: smooth steel pipe)"; parameter Modelica.Units.SI.SpecificHeatCapacity cPip=2300 "Specific heat of pipe wall material. 2300 for PE, 500 for steel"; parameter Modelica.Units.SI.Density rhoPip=930 "Density of pipe wall material. 930 for PE, 8000 for steel"; parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortDis "Heat transfer to and from the distribution pipe"; equation connect(pipDis.heatPort, heatPortDis); end Connection1PipePlugFlow_v;

Buildings.DHC.Networks.Connections.Connection1Pipe_R Buildings.DHC.Networks.Connections.Connection1Pipe_R

Model for connecting an agent to the DHC system

Buildings.DHC.Networks.Connections.Connection1Pipe_R

Information

This model represents the supply and return lines to connect an agent (e.g., an energy transfer station) to a one-pipe main distribution system. The instances of the pipe model are autosized based on the pressure drop per pipe length at nominal flow rate based on the model Buildings.DHC.Networks.Pipes.PipeAutosize for the distribution line. The connection to the building as the length is typically relatively short so a losssless pipe is considered.

Extends from Buildings.DHC.Networks.BaseClasses.PartialConnection1Pipe (Partial model for connecting an agent to a one-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipDisPipes.PipeAutosize (roughnes... 
replaceable model Model_pipConBuildings.Fluid.FixedResista... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
Booleanshow_TOutfalseSet to true to output temperature at connection outlet
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line [kg/s]
MassFlowRatemCon_flow_nominal Nominal mass flow rate in the connection line [kg/s]
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/m]
LengthlDis Length of the distribution pipe before the connection [m]
LengthdhDis Hydraulic diameter of the distribution pipe [m]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Conservation 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
replaceable model Model_pipDis 
replaceable model Model_pipCon 
FluidPort_aport_aDisDistribution inlet port
FluidPort_bport_bDisDistribution outlet port
FluidPort_aport_aConConnection return port
FluidPort_bport_bConConnection supply port
output RealOutputmCon_flowConnection supply mass flow rate (measured) [kg/s]
output RealOutputdH_flowDifference in enthalpy flow rate between connection supply and return [W]
output RealOutputmByp_flowBypass mass flow rate [kg/s]
output RealOutputTOutTemperature in distribution line at connection outlet [K]

Modelica definition

model Connection1Pipe_R "Model for connecting an agent to the DHC system" extends Buildings.DHC.Networks.BaseClasses.PartialConnection1Pipe( tau=5*60, redeclare replaceable model Model_pipDis = Pipes.PipeAutosize ( roughness = 7e-6, final length = lDis, dh(fixed=true) = dhDis, final dp_length_nominal = dp_length_nominal), redeclare replaceable model Model_pipCon = Buildings.Fluid.FixedResistances.LosslessPipe, pipDis(fac=1)); parameter Real dp_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate"; parameter Modelica.Units.SI.Length lDis "Length of the distribution pipe before the connection"; parameter Modelica.Units.SI.Length dhDis "Hydraulic diameter of the distribution pipe"; end Connection1Pipe_R;

Buildings.DHC.Networks.Connections.Connection2PipePlugFlow_v Buildings.DHC.Networks.Connections.Connection2PipePlugFlow_v

Model for connecting an agent to a two-pipe distribution network, using plug flow pipe models in the main line

Buildings.DHC.Networks.Connections.Connection2PipePlugFlow_v

Information

This model represents the supply and return lines to connect an agent (e.g. an energy transfer station) to a two-pipe main distribution system. A plug flow pipe model Buildings.Fluid.FixedResistances.PlugFlowPipe that includes pressure drop, heat transfer, and transport delays is used in the main distribution line, but not in the connection to the building, as the latter is typically short.

Extends from Buildings.DHC.Networks.BaseClasses.PartialConnection2Pipe (Partial model for connecting an agent to a two-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable model Model_pipDisSupPartialTwoPortInterfaceInterface for inlet pipe for the distribution supply
replaceable model Model_pipDisRetPartialTwoPortInterfaceInterface for outlet pipe for the distribution return
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipConFluid.FixedResistances.Lossl... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
LengthlDis Length of the distribution pipe before the connection [m]
LengthdIns Thickness of pipe insulation, used to compute R [m]
ThermalConductivitykIns Heat conductivity of pipe insulation, used to compute R [W/(m.K)]
Velocityv_nominal1.5Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh) [m/s]
Heightroughness2.5e-5Average height of surface asperities (default: smooth steel pipe) [m]
SpecificHeatCapacitycPip2300Specific heat of pipe wall material. 2300 for PE, 500 for steel [J/(kg.K)]
DensityrhoPip930Density of pipe wall material. 930 for PE, 8000 for steel [kg/m3]
Lengththickness0.0035Pipe wall thickness [m]
Nominal condition
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line [kg/s]
MassFlowRatemCon_flow_nominal Nominal mass flow rate in the 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
Timetau10Time constant at nominal flow for dynamic energy and momentum balance [s]

Connectors

TypeNameDescription
replaceable model Model_pipDisSupInterface for inlet pipe for the distribution supply
replaceable model Model_pipDisRetInterface for outlet pipe for the distribution return
FluidPort_aport_aDisSupDistribution supply inlet port
FluidPort_bport_bDisSupDistribution supply outlet port
FluidPort_aport_aDisRetDistribution return inlet port
FluidPort_bport_bDisRetDistribution return outlet port
FluidPort_bport_bConConnection supply port
FluidPort_aport_aConConnection return port
replaceable model Model_pipCon 
output RealOutputmCon_flowConnection supply mass flow rate [kg/s]
output RealOutputdpPressure drop accross the connection (measured) [Pa]
output RealOutputdH_flowDifference in enthalpy flow rate between connection supply and return [W]
HeatPort_aheatPortDisHeat transfer to or from surroundings for distribution pipe(positive if pipe is colder than surrounding)
HeatPort_aheatPortRetHeat transfer to or from surroundings for return pipe (positive if pipe is colder than surrounding)

Modelica definition

model Connection2PipePlugFlow_v "Model for connecting an agent to a two-pipe distribution network, using plug flow pipe models in the main line" extends Buildings.DHC.Networks.BaseClasses.PartialConnection2Pipe( redeclare model Model_pipDisSup = Buildings.Fluid.FixedResistances.PlugFlowPipe ( final length = lDis, final dIns = dIns, final kIns = kIns, v_nominal = v_nominal, roughness = roughness, cPip = cPip, rhoPip = rhoPip, thickness = thickness), redeclare model Model_pipDisRet = Buildings.Fluid.FixedResistances.PlugFlowPipe ( final length = lDis, final dIns = dIns, final kIns = kIns, v_nominal = v_nominal, roughness = roughness, cPip = cPip, rhoPip = rhoPip, thickness = thickness), redeclare model Model_pipCon = Fluid.FixedResistances.LosslessPipe); parameter Modelica.Units.SI.Length lDis "Length of the distribution pipe before the connection"; parameter Modelica.Units.SI.Length dIns "Thickness of pipe insulation, used to compute R"; parameter Modelica.Units.SI.ThermalConductivity kIns "Heat conductivity of pipe insulation, used to compute R"; parameter Modelica.Units.SI.Velocity v_nominal = 1.5 "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; parameter Modelica.Units.SI.Height roughness = 2.5e-5 "Average height of surface asperities (default: smooth steel pipe)"; parameter Modelica.Units.SI.SpecificHeatCapacity cPip = 2300 "Specific heat of pipe wall material. 2300 for PE, 500 for steel"; parameter Modelica.Units.SI.Density rhoPip = 930 "Density of pipe wall material. 930 for PE, 8000 for steel"; parameter Modelica.Units.SI.Length thickness = 0.0035 "Pipe wall thickness"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortDis "Heat transfer to or from surroundings for distribution pipe(positive if pipe is colder than surrounding)"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortRet "Heat transfer to or from surroundings for return pipe (positive if pipe is colder than surrounding)"; equation connect(pipDisSup.heatPort, heatPortDis); connect(pipDisRet.heatPort, heatPortRet); end Connection2PipePlugFlow_v;

Buildings.DHC.Networks.Connections.Connection2Pipe_R Buildings.DHC.Networks.Connections.Connection2Pipe_R

Model for connecting an agent to the DHC system

Buildings.DHC.Networks.Connections.Connection2Pipe_R

Information

This model represents the supply and return lines to connect an agent (e.g., an energy transfer station) to a two-pipe main distribution system. The instances of the pipe model are autosized based on the pressure drop per pipe length at nominal flow rate based on the model Buildings.DHC.Networks.Pipes.PipeAutosize for the distribution line. The connection to the building as the length is typically relatively short so a losssless pipe is considered.

Extends from Buildings.DHC.Networks.BaseClasses.PartialConnection2Pipe (Partial model for connecting an agent to a two-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable model Model_pipDisSupPartialTwoPortInterfaceInterface for inlet pipe for the distribution supply
replaceable model Model_pipDisRetPartialTwoPortInterfaceInterface for outlet pipe for the distribution return
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipConFluid.FixedResistances.Lossl... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/m]
LengthdhDisRet Hydraulic diameter of the return distribution pipe [m]
LengthlDis Length of the distribution pipe before the connection [m]
LengthdhDis Hydraulic diameter of the distribution pipe [m]
Nominal condition
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line [kg/s]
MassFlowRatemCon_flow_nominal Nominal mass flow rate in the 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
replaceable model Model_pipDisSupInterface for inlet pipe for the distribution supply
replaceable model Model_pipDisRetInterface for outlet pipe for the distribution return
FluidPort_aport_aDisSupDistribution supply inlet port
FluidPort_bport_bDisSupDistribution supply outlet port
FluidPort_aport_aDisRetDistribution return inlet port
FluidPort_bport_bDisRetDistribution return outlet port
FluidPort_bport_bConConnection supply port
FluidPort_aport_aConConnection return port
replaceable model Model_pipCon 
output RealOutputmCon_flowConnection supply mass flow rate [kg/s]
output RealOutputdpPressure drop accross the connection (measured) [Pa]
output RealOutputdH_flowDifference in enthalpy flow rate between connection supply and return [W]

Modelica definition

model Connection2Pipe_R "Model for connecting an agent to the DHC system" extends Buildings.DHC.Networks.BaseClasses.PartialConnection2Pipe( tau=5*60, redeclare replaceable model Model_pipDisSup = Pipes.PipeAutosize ( roughness = 7e-6, dh(fixed=true) = dhDis, final length = lDis, final dp_length_nominal = dp_length_nominal), redeclare replaceable model Model_pipDisRet = Pipes.PipeAutosize ( roughness=7e-6, dh(fixed=true) = dhDisRet, final length=lDis, final dp_length_nominal=dp_length_nominal), redeclare model Model_pipCon = Fluid.FixedResistances.LosslessPipe, pipDisSup(fac=1), pipDisRet(fac=1)); parameter Real dp_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate"; parameter Modelica.Units.SI.Length dhDisRet "Hydraulic diameter of the return distribution pipe"; parameter Modelica.Units.SI.Length lDis "Length of the distribution pipe before the connection"; parameter Modelica.Units.SI.Length dhDis "Hydraulic diameter of the distribution pipe"; end Connection2Pipe_R;