Buildings.DHC.Networks.Pipes

Package containing pipe models used within district network modeling

Information

This package contains pipe models specific for distribution networks.

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

Package Content

Name Description
Buildings.DHC.Networks.Pipes.PipeAutosize PipeAutosize Pipe model parameterized with pressure drop per pipe length
Buildings.DHC.Networks.Pipes.PipeStandard PipeStandard Pipe model parameterized with hydraulic diameter
Buildings.DHC.Networks.Pipes.Validation Validation Validation models for Pipes

Buildings.DHC.Networks.Pipes.PipeAutosize Buildings.DHC.Networks.Pipes.PipeAutosize

Pipe model parameterized with pressure drop per pipe length

Buildings.DHC.Networks.Pipes.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]
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.01, min=0.001) "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.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 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 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.DHC.Networks.Pipes.PipeStandard Buildings.DHC.Networks.Pipes.PipeStandard

Pipe model parameterized with hydraulic diameter

Buildings.DHC.Networks.Pipes.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;