modelDHN_Pipe_L4

Model of a DHN pipe for efficient largescale simulations

Information

Purpose of model

A simple model of a discretized pipe for district heating networks. The number of control volumes can be set with a parameter. It consists of two fluid ports and one heat port per control volume. It is based on the three balance equations of energy, mass and momentum. There is one dynamic energy balance per control volume. The heat capacity of the pipe wall is considered. The mass balance is static. The momentum balance is static, but mass flow states can be activated to improve the numerics of large-scale simulations. Further explanations can be found in Westphal et. al. Constant fluid properties are assumed for this control volume. Pressure losses due to friction are considered and calculated with a model of the fluid dissipation library (Darcy-Weisbach equation). Pressure changes due to gravity are not considered. Heat losses are considered with a heat loss per meter depending on the temperature difference. A temperature source is implemented in this model and connected to the heat ports of the control volume. The control volume is connected to two fluid ports.

The control volume is discretized with an upwind scheme. For the implementation of the occuring case distinction the semiLinear operator is used. A number between 100 and 1000 control volumes per kilo meter is suitable for a district heating network simulation. If a large number of states appear in the DHN simulations due to a large number of control volumes the sparse solver should be activated. In Dymola this can be for example done with the command: Advanced.Translation.SparseActivate=true. This will improve the simulation speed significantly. Also the appearance of implicit non-linear systems of equations should be avoided.

The physical effects described are implemented in the control volume model used in this component.

Level of detail, physical effects considered, and physical insight

L4 (defined in the CodingConventions)

  • static mass balance
  • constant fluid properties
  • dynamic and discretized energy balances
  • consideration of pressure losses due to friction but not pressure differences due to gravity
  • consideration of heat losses
  • reverse flow is supported

Interfaces

Governing Equations

Mass balance: m_in+m_out=0

Energy balance: (V_pipe+V_pipe_w)/N_cv*rho*der(u) =m_flow*(h_in-h_out) + Q_flow_loss (for N_cv control volumes)

Heat transport:  Q_flow=-u*l/N_cv*(T[i]-heatPort[i].T) for N_cv control volumes

References

The model was used in several publications:

[1] Westphal, J.; Brunnemann, J.; Speerforck, A.; Enabling the dynamic simulation of an unaggregated, meshed district heating network with several thousand substations;Energy; 2025

[2]Vieth, J.; Westphal, J.; Speerforck, A.; District heating network topology optimization and optimal co-planning using dynamic simulations; Advances in Applied Energy; 2025

Version History

Model was created by Jan Westphal (j.westphal@tuhh.de) August 2025

Parameters

TypeNameDefaultDescription
SI.Lengthd0.1Inner diameter of the pipe
SI.Densityrho983Density of the fluid
Realk1e-3Surface factor of the pipe
SI.MassFlowRatem_flow_nom15Nominal mass flow rate
Realdelta_p_nom150Nominal pressure drop over the pipe
SI.SpecificHeatCapacitycp4183Specific heat capacity of water
SI.Lengthl10Length of the pipe
RealL100
BooleanMassFlowStatefalse
IntegerN_cv10
Realu0.3
SI.MassFlowRatem_flow_start1
SI.Densityrho_pipe960
SI.SpecificHeatCapacityc_pipe1900
SI.Lengthwall_thickness0.0026
SI.VolumeV_pipe_wallModelica.Constants.pi*(((d + 2*wall_thickness)/2)^2 - (d/2)^2)*l
BooleanuseInputfalse

Connectors

TypeNameDefaultDescription
TransiEnt.Basics.Interfaces.Thermal.FluidPortIn_simpleinlet
TransiEnt.Basics.Interfaces.Thermal.FluidPortOut_simpleoutlet
Modelica.Blocks.Interfaces.RealInputsoilTemp

Components

TypeNameDefaultDescription
SI.HeatFlowRateQ_flow_loss
SI.PressureDifferencedelta_p_fric
Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperature[N_cv]UndergroundTemperature
Modelica.Blocks.Sources.RealExpressionTemperature
TransiEnt.Components.Heat.VolumesValvesFittings.Pipes.ControlVolumeL4_HeatLosscontrolVolumeL4_HeatLoss