**5. Conclusions**

This paper deals with transients in circular pipes, where the accumulation of heat into surrounding material has been considered in detail. Model is a combination of the analytic description of a heat transfer between the fluid and the solid wall, simple advection scheme, turbulent diffusion, and a

finite element scheme dealing with the circular wall in which the shape functions are based on the steady-state solution. Method of lines is used for time integration. The new model represents an effective numerical solution to the thermal wave propagation problem, which includes advanced evaluation of thermal inertia of the pipe's wall and the axial diffusion that is caused by turbulence. The diffusion coefficient evaluation is mainly proportional to flow velocity.

Overall, it can be said that strong accumulation affects the thermal wave propagation for a stretched period of time in comparison with the non-accumulation case. The effect of the re-accumulation is not only dependent on the pure amount of re-accumulated heat, but also on the particular way this event happens. In other words, to capture the event accurately is to focus on the proper evaluation of the innermost surface temperature of the pipe's wall because it directly affects the rate in which the temperature of the fluid changes. The discretization of both axial and radial direction must go hand in hand to improve the solution. During comparison with the fine models from Fluent and STAR-CCM+, deployment of positive weights in the diffusion coefficient evaluation are always necessary to match the simulated data. This means that turbulent diffusion plays a role in temperature wave propagation. Presence of physical diffusion also reduces unphysical oscillation on sharp interfaces. Gravity is shown to resemble the behavior of an additional axial diffusion as well. The new model resembles the transient behavior of the accumulating pipe wall with highly comparable results to the equivalent, very fine models from Fluent and STAR-CCM+, which should represent the ideal physics-based modeling. The validation with a branched real system needs to be done in the future.

The composite model had run faster in OpenModelica than in Julia possibly because of a non-optimized jacobian evaluation. It might be possible to speed up the Julia execution using function definition macros from Differential Equations package, which could be able to derive symbolic jacobian automatically. The model can be extended by pressure loss evaluation, which would allow simulation of whole DH grids based on Kirchhoff laws. Regularization of mass flows would be necessary here to avoid singularities (division by zero) in the nodes.

The future work should aim at a self-identification algorithm using inlet/outlet temperature signals from real installations to calibrate the appropriate weights in the model. It may be possible to generalize the approach for more complex configurations, such as twin-pipes, buried pipes, and so on. An optimization algorithm can be used to find the matrix coefficient describing the radial heat dynamics. A background from machine learning may be utilized for such an endeavor. The scaling of the new model, when used for simulation of whole grids with automatic mass flow evaluation in each branch based on the pressure drops between individual nodes, is also part of the future work.

**Author Contributions:** Conceptualization, L.K.; Data curation, L.K. and R.C.; Formal analysis, L.K.; Funding acquisition, J.P.; Investigation, L.K.; Methodology, L.K. and R.C.; Project administration, J.P.; Software, L.K. and R.C.; Supervision, J.P.; Validation, L.K. and R.C.; Visualization, L.K., R.C., and J.P.; Writing-original draft, L.K. and J.P.; Writing-review & editing, L.K.

**Funding:** This paper has been supported by the project "Computer Simulations for Effective Low-Emission Energy" funded as project No. CZ.02.1.01/0.0/0.0/16\_026/0008392 by Operational Programme Research, Development and Education, Priority axis 1: Strengthening capacity for high-quality research.

**Conflicts of Interest:** The authors declare no conflict of interest.
