Buildings.Experimental.DHC.Networks.Combined.BaseClasses

Package with base classes for Buildings.Experimental.DHC.Networks.Combined

Information

This package contains base classes that are used to construct the models in Buildings.Experimental.DHC.Networks.Combined.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelAutosize ConnectionParallelAutosize Model for connecting an agent to the DHC system
Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelStandard ConnectionParallelStandard Model for connecting an agent to the DHC system
Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesAutosize ConnectionSeriesAutosize Model for connecting an agent to the DHC system
Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesStandard ConnectionSeriesStandard Model for connecting an agent to the DHC system
Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeAutosize PipeAutosize Pipe model parameterized with pressure drop per pipe length
Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeStandard PipeStandard Pipe model parameterized with hydraulic diameter

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelAutosize Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelAutosize

Model for connecting an agent to the DHC system

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelAutosize

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.

Extends from ConnectionParallelStandard (Model for connecting an agent to the DHC system).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipDisPipeAutosize (roughness=7e-6... 
replaceable model Model_pipConPipeAutosize (roughness=2.5e... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
LengthlDis Length of the distribution pipe before the connection [m]
LengthlCon Length of the connection pipe (supply only, not counting return line) [m]
LengthdhDis Hydraulic diameter of the distribution pipe [m]
LengthdhCon Hydraulic diameter of the connection pipe [m]
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/m]
LengthdhDisRet Hydraulic diameter of the return 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
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_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
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 ConnectionParallelAutosize "Model for connecting an agent to the DHC system" extends ConnectionParallelStandard( tau=5*60, redeclare replaceable model Model_pipDis = PipeAutosize ( roughness=7e-6, fac=1.5, dh(fixed=true)=dhDis, final length=lDis, final dp_length_nominal=dp_length_nominal), pipDisRet(dh=dhDisRet), redeclare replaceable model Model_pipCon = PipeAutosize ( roughness=2.5e-5, fac=2, final length=2*lCon, final dh(fixed=true)=dhCon, final dp_length_nominal=dp_length_nominal)); 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"; end ConnectionParallelAutosize;

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelStandard Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelStandard

Model for connecting an agent to the DHC system

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelStandard

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 parameterized with the hydraulic diameter.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipDisPipeStandard (roughness=7e-6... 
replaceable model Model_pipConPipeStandard (roughness=2.5e... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
LengthlDis Length of the distribution pipe before the connection [m]
LengthlCon Length of the connection pipe (supply only, not counting return line) [m]
LengthdhDis Hydraulic diameter of the distribution pipe [m]
LengthdhCon Hydraulic diameter of the connection 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
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_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
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 ConnectionParallelStandard "Model for connecting an agent to the DHC system" extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe ( tau=5*60, redeclare replaceable model Model_pipDis = PipeStandard ( roughness=7e-6, fac=1.5, final length=lDis, final dh=dhDis), redeclare replaceable model Model_pipCon = PipeStandard ( roughness=2.5e-5, fac=2, final length=2*lCon, final dh=dhCon)); parameter Modelica.Units.SI.Length lDis "Length of the distribution pipe before the connection"; parameter Modelica.Units.SI.Length lCon "Length of the connection pipe (supply only, not counting return line)"; parameter Modelica.Units.SI.Length dhDis "Hydraulic diameter of the distribution pipe"; parameter Modelica.Units.SI.Length dhCon "Hydraulic diameter of the connection pipe"; end ConnectionParallelStandard;

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesAutosize Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesAutosize

Model for connecting an agent to the DHC system

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesAutosize

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.

Extends from ConnectionSeriesStandard (Model for connecting an agent to the DHC system).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipDisPipeAutosize (roughness=7e-6... 
replaceable model Model_pipConPipeAutosize (roughness=2.5e... 
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]
LengthlCon Length of the connection pipe (supply only, not counting return line) [m]
LengthdhDis Hydraulic diameter of the distribution pipe [m]
LengthdhCon Hydraulic diameter of the connection pipe [m]
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/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 ConnectionSeriesAutosize "Model for connecting an agent to the DHC system" extends ConnectionSeriesStandard( tau=5*60, redeclare replaceable model Model_pipDis = PipeAutosize ( roughness=7e-6, fac=1.5, final length=lDis, final dh(fixed=true)=dhDis, final dp_length_nominal=dp_length_nominal), redeclare replaceable model Model_pipCon = PipeAutosize ( roughness=2.5e-5, fac=2, final length=2*lCon, final dh(fixed=true)=dhCon, final dp_length_nominal=dp_length_nominal)); parameter Real dp_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate"; end ConnectionSeriesAutosize;

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesStandard Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesStandard

Model for connecting an agent to the DHC system

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesStandard

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 parameterized with the hydraulic diameter.

Extends from Buildings.Experimental.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_pipDisPipeStandard (roughness=7e-6... 
replaceable model Model_pipConPipeStandard (roughness=2.5e... 
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]
LengthlCon Length of the connection pipe (supply only, not counting return line) [m]
LengthdhDis Hydraulic diameter of the distribution pipe [m]
LengthdhCon Hydraulic diameter of the connection 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 ConnectionSeriesStandard "Model for connecting an agent to the DHC system" extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection1Pipe ( tau=5*60, redeclare replaceable model Model_pipDis = PipeStandard ( roughness=7e-6, fac=1.5, final length=lDis, final dh=dhDis), redeclare replaceable model Model_pipCon = PipeStandard ( roughness=2.5e-5, fac=2, final length=2*lCon, final dh=dhCon)); parameter Modelica.Units.SI.Length lDis "Length of the distribution pipe before the connection"; parameter Modelica.Units.SI.Length lCon "Length of the connection pipe (supply only, not counting return line)"; parameter Modelica.Units.SI.Length dhDis "Hydraulic diameter of the distribution pipe"; parameter Modelica.Units.SI.Length dhCon "Hydraulic diameter of the connection pipe"; end ConnectionSeriesStandard;

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeAutosize Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeAutosize

Pipe model parameterized with pressure drop per pipe length

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeAutosize

Information

This model is similar to Buildings.Fluid.FixedResistances.HydraulicDiameter except for the modifications below which allow to use this model for computing the hydraulic diameter at initialization, based on the pressure drop per pipe length at nominal flow rate.

Extends from Buildings.Fluid.FixedResistances.PressureDrop (Fixed flow resistance with dp and m_flow as parameter).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Lengthdh Hydraulic diameter (assuming a round cross section area) [m]
Realdp_length_nominal250Pressure drop per pipe length at nominal flow rate [Pa/m]
Lengthlength Length of the pipe [m]
RealReC4000Reynolds number where transition to turbulence starts
Lengthroughness2.5e-5Absolute roughness of pipe, with a default for a smooth steel pipe (PE100: 7E-6) [m]
Realfac2Factor to take into account resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominaldp_length_nominal*lengthPressure drop at nominal mass flow rate [Pa]
Velocityv_nominalm_flow_nominal/(rho_default*...Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh) [m/s]
Transition to laminar
RealdeltaMeta_default*dh/4*Modelica.Co...Fraction of nominal mass flow rate where transition to turbulent occurs
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

model PipeAutosize "Pipe model parameterized with pressure drop per pipe length" extends Buildings.Fluid.FixedResistances.PressureDrop( final deltaM = eta_default*dh/4*Modelica.Constants.pi*ReC/m_flow_nominal_pos, final dp_nominal=dp_length_nominal*length); parameter Modelica.Units.SI.Length dh( fixed=false, start=0.05, min=0.01) "Hydraulic diameter (assuming a round cross section area)"; parameter Real dp_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate"; parameter Modelica.Units.SI.Length length "Length of the pipe"; parameter Real ReC(min=0)=4000 "Reynolds number where transition to turbulence starts"; parameter Modelica.Units.SI.Velocity v_nominal=m_flow_nominal/(rho_default* ARound) "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; parameter Modelica.Units.SI.Length roughness(min=0) = 2.5e-5 "Absolute roughness of pipe, with a default for a smooth steel pipe (PE100: 7E-6)"; parameter Real fac(min=1) = 2 "Factor to take into account resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal"; final parameter Modelica.Units.SI.PressureDifference dpStraightPipe_nominal( displayUnit="Pa")= Modelica.Fluid.Pipes.BaseClasses.WallFriction.Detailed.pressureLoss_m_flow( m_flow=m_flow_nominal, rho_a=rho_default, rho_b=rho_default, mu_a=mu_default, mu_b=mu_default, length=length, diameter=dh, roughness=roughness, m_flow_small=m_flow_small) "Pressure loss of a straight pipe at m_flow_nominal"; Modelica.Units.SI.Velocity v=m_flow/(rho_default*ARound) "Flow velocity (assuming a round cross section area)"; protected parameter Modelica.Units.SI.Area ARound=dh^2*Modelica.Constants.pi/4 "Cross sectional area (assuming a round cross section area)"; parameter Medium.ThermodynamicState state_default= Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, X=Medium.X_default[1:Medium.nXi]) "Default state"; parameter Modelica.Units.SI.Density rho_default=Medium.density(state_default) "Density at nominal condition"; parameter Modelica.Units.SI.DynamicViscosity mu_default= Medium.dynamicViscosity(state_default) "Dynamic viscosity at nominal condition"; initial equation dp_nominal = fac*dpStraightPipe_nominal; end PipeAutosize;

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeStandard Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeStandard

Pipe model parameterized with hydraulic diameter

Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeStandard

Information

This model is similar to Buildings.Fluid.FixedResistances.HydraulicDiameter except that a binding equation is provided to compute the nominal fluid velocity from the hydraulic diameter (as opposed to the hydraulic diameter being computed from the nominal fluid velocity in the original model).

Extends from Buildings.Fluid.FixedResistances.HydraulicDiameter (Fixed flow resistance with hydraulic diameter and m_flow as parameter).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Lengthdhsqrt(4*m_flow_nominal/rho_de...Hydraulic diameter (assuming a round cross section area) [m]
Lengthlength Length of the pipe [m]
RealReC4000Reynolds number where transition to turbulence starts
Lengthroughness2.5e-5Absolute roughness of pipe, with a default for a smooth steel pipe (dummy if use_roughness = false) [m]
Realfac2Factor to take into account resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Velocityv_nominalm_flow_nominal*4/(rho_defaul...Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh) [m/s]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

model PipeStandard "Pipe model parameterized with hydraulic diameter" extends Buildings.Fluid.FixedResistances.HydraulicDiameter( dp(nominal=1E5), final linearized=false, final v_nominal=m_flow_nominal * 4 / (rho_default * dh^2 * Modelica.Constants.pi)); end PipeStandard;