Buildings.Obsolete.Fluid.FixedResistances.BaseClasses

Information

This package contains base classes that are used to construct the models in Buildings.Obsolete.Fluid.FixedResistances.

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

Package Content

Name Description
Buildings.Obsolete.Fluid.FixedResistances.BaseClasses.PlugFlowCore PlugFlowCore Pipe model using spatialDistribution for temperature delay with modified delay tracker
Buildings.Obsolete.Fluid.FixedResistances.BaseClasses.Validation Validation Collection of validation models

Buildings.Obsolete.Fluid.FixedResistances.BaseClasses.PlugFlowCore Buildings.Obsolete.Fluid.FixedResistances.BaseClasses.PlugFlowCore

Pipe model using spatialDistribution for temperature delay with modified delay tracker

Buildings.Obsolete.Fluid.FixedResistances.BaseClasses.PlugFlowCore

Information

Pipe with heat loss using the time delay based heat losses and plug flow for the transport delay of the fluid.

Implementation

The spatialDistribution operator is used for the temperature wave propagation through the length of the pipe. This operator is contained in BaseClasses.PlugFlow.

This model does not include thermal inertia of the pipe wall. The wall inertia is implemented in PlugFlowPipe, which uses this model.
The removal of the thermal inertia with a mixing volume can be desirable in the case where mixing volumes are added manually at the pipe junctions.

The model PlugFlowHeatLoss implements a heat loss in design direction, but leaves the enthalpy unchanged in opposite flow direction. Therefore it is used in front of and behind the time delay.

References

Full details on the model implementation and experimental validation can be found in:

van der Heijde, B., Fuchs, M., Ribas Tugores, C., Schweiger, G., Sartor, K., Basciotti, D., Müller, D., Nytsch-Geusen, C., Wetter, M. and Helsen, L. (2017).
Dynamic equation-based thermo-hydraulic pipe model for district heating and cooling systems.
Energy Conversion and Management, vol. 151, p. 158-169. doi: 10.1016/j.enconman.2017.08.072.

Extends from Buildings.Obsolete.BaseClasses.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions), Buildings.Fluid.Interfaces.PartialTwoPort (Partial component with two ports).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Lengthdh Hydraulic diameter (assuming a round cross section area) [m]
Lengthlength Pipe length [m]
RealR Thermal resistance per unit length from fluid to boundary temperature [(m.K)/W]
RealC Thermal capacity per unit length of pipe [J/(K.m)]
Realfac1Factor to take into account flow resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal
Lengththickness Pipe wall thickness [m]
RealReC4000Reynolds number where transition to turbulence starts
Nominal condition
Velocityv_nominal Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh) [m/s]
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Geometry
Heightroughness2.5e-5Average height of surface asperities (default: smooth steel pipe) [m]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
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
Initialization
TemperatureT_start_inMedium.T_defaultInitialization temperature at pipe inlet [K]
TemperatureT_start_outMedium.T_defaultInitialization temperature at pipe outlet [K]
BooleaninitDelayfalseInitialize delay for a constant mass flow rate if true, otherwise start from 0
MassFlowRatem_flow_start0[kg/s]

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)
HeatPort_aheatPortHeat port to connect environment (positive heat flow for heat loss to surroundings)

Modelica definition

model PlugFlowCore "Pipe model using spatialDistribution for temperature delay with modified delay tracker" extends Buildings.Obsolete.BaseClasses.ObsoleteModel; extends Buildings.Fluid.Interfaces.PartialTwoPort; constant Boolean homotopyInitialization = true "= true, use homotopy method"; parameter Modelica.Units.SI.Length dh "Hydraulic diameter (assuming a round cross section area)"; parameter Modelica.Units.SI.Velocity v_nominal "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; parameter Modelica.Units.SI.Length length(min=0) "Pipe length"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal(min=0) "Nominal mass flow rate"; parameter Modelica.Units.SI.MassFlowRate m_flow_small(min=0) = 1E-4*abs( m_flow_nominal) "Small mass flow rate for regularization of zero flow"; parameter Modelica.Units.SI.Height roughness=2.5e-5 "Average height of surface asperities (default: smooth steel pipe)"; parameter Real R(unit="(m.K)/W") "Thermal resistance per unit length from fluid to boundary temperature"; parameter Real C(unit="J/(K.m)") "Thermal capacity per unit length of pipe"; parameter Real fac=1 "Factor to take into account flow resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal"; parameter Boolean from_dp=false "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Modelica.Units.SI.Length thickness(min=0) "Pipe wall thickness"; parameter Modelica.Units.SI.Temperature T_start_in=Medium.T_default "Initialization temperature at pipe inlet"; parameter Modelica.Units.SI.Temperature T_start_out=Medium.T_default "Initialization temperature at pipe outlet"; parameter Boolean initDelay=false "Initialize delay for a constant mass flow rate if true, otherwise start from 0"; parameter Modelica.Units.SI.MassFlowRate m_flow_start=0; parameter Real ReC=4000 "Reynolds number where transition to turbulence starts"; parameter Boolean linearized = false "= true, use linear relation between m_flow and dp for any flow rate"; Buildings.Fluid.FixedResistances.HydraulicDiameter res( redeclare final package Medium = Medium, final dh=dh, final m_flow_nominal=m_flow_nominal, final from_dp=from_dp, final length=length, final roughness=roughness, final fac=fac, final ReC=ReC, final v_nominal=v_nominal, final allowFlowReversal=allowFlowReversal, final show_T=false, final homotopyInitialization=homotopyInitialization, final linearized=linearized, dp(nominal=fac*200*length)) "Pressure drop calculation for this pipe"; Buildings.Fluid.FixedResistances.BaseClasses.PlugFlow del( redeclare final package Medium = Medium, final m_flow_small=m_flow_small, final dh=dh, final length=length, final allowFlowReversal=allowFlowReversal, final T_start_in=T_start_in, final T_start_out=T_start_out) "Model for temperature wave propagation"; Buildings.Fluid.FixedResistances.BaseClasses.PlugFlowHeatLoss heaLos_a( redeclare final package Medium = Medium, final C=C, final R=R, final m_flow_small=m_flow_small, final T_start=T_start_in, final m_flow_nominal=m_flow_nominal, final m_flow_start=m_flow_start, final show_T=false, final show_V_flow=false) "Heat loss for flow from port_b to port_a"; Buildings.Fluid.FixedResistances.BaseClasses.PlugFlowHeatLoss heaLos_b( redeclare final package Medium = Medium, final C=C, final R=R, final m_flow_small=m_flow_small, final T_start=T_start_out, final m_flow_nominal=m_flow_nominal, final m_flow_start=m_flow_start, final show_T=false, final show_V_flow=false) "Heat loss for flow from port_a to port_b"; Buildings.Fluid.Sensors.MassFlowRate senMasFlo( redeclare final package Medium = Medium) "Mass flow sensor"; Buildings.Fluid.FixedResistances.BaseClasses.PlugFlowTransportDelay timDel( final length=length, final dh=dh, final rho=rho_default, final initDelay=initDelay, final m_flow_nominal=m_flow_nominal, final m_flow_start=m_flow_start) "Time delay"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort "Heat port to connect environment (positive heat flow for heat loss to surroundings)"; protected parameter Modelica.Units.SI.Density rho_default=Medium.density_pTX( p=Medium.p_default, T=Medium.T_default, X=Medium.X_default) "Default density (e.g., rho_liquidWater = 995, rho_air = 1.2)"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation connect(senMasFlo.m_flow, timDel.m_flow); connect(heaLos_a.heatPort, heatPort); connect(heaLos_b.heatPort, heatPort); connect(timDel.tauRev, heaLos_a.tau); connect(timDel.tau, heaLos_b.tau); connect(port_a, heaLos_a.port_b); connect(heaLos_a.port_a, senMasFlo.port_a); connect(heaLos_b.port_b, port_b); connect(del.port_a, res.port_b); connect(senMasFlo.port_b, res.port_a); connect(heaLos_b.port_a, del.port_b); end PlugFlowCore;