Simulation and optimisation of district heating and cooling networks requires efficient and realistic models of the individual network elements in order to correctly represent heat losses or gains, temperature propagation and pressure drops. Due to more recent thermal networks incorporating meshing decentralised heat and cold sources, the system often has to deal with variable temperatures and mass flow rates, with flow reversal occurring more frequently. This paper presents the mathematical derivation and software implementation in Modelica of a thermo-hydraulic model for thermal networks that meets the above requirements and compares it to both experimental data and a commonly used model. Good correspondence between experimental data from a controlled test set-up and simulations using the presented model was found. Compared to measurement data from a real district heating network, the simulation results led to a larger error than in the controlled test set-up, but the general trend is still approximated closely and the model yields results similar to a pipe model from the Modelica Standard Library. However, the presented model simulates 1.7 (for low number of volumes) to 68 (for highly discretized pipes) times faster than a conventional model for a realistic test case. A working implementation of the presented model is made openly available within the IBPSA Modelica Library. The model is robust in the sense that grid size and time step do not need to be adapted to the flow rate, as is the case in finite volume models.

1 avan der Heijde, Brahm1 aFuchs, Marcus1 aTugores, Carles, Ribas1 aSchweiger, Gerald1 aSartor, Kevin1 aBasciotti, Daniele1 aMuller, Dirk1 aNytsch-Geusen, Christoph1 aWetter, Michael1 aHelsen, Lieve uhttps://simulationresearch.lbl.gov/publications/dynamic-equation-based-thermo01769nas a2200121 4500008003900000245010800039210006900147520127800216100002001494700001801514700003101532856008401563 2015 d00aDesign choices for thermofluid flow components and systems that are exported as Functional Mockup Units0 aDesign choices for thermofluid flow components and systems that 3 aThis paper discusses design decisions for exporting Modelica thermofluid flow components as Functional Mockup Units. The purpose is to provide guidelines that will allow building energy simulation programs and HVAC equipment manufacturers to effectively use FMUs for modeling of HVAC components and systems. We provide an analysis for direct input-output dependencies of such components and discuss how these dependencies can lead to algebraic loops that are formed when connecting thermofluid flow components. Based on this analysis, we provide recommendations that increase the computing efficiency of such components and systems that are formed by connecting multiple components. We explain what code optimizations are lost when providing thermofluid flow components as FMUs rather than Modelica code. We present an implementation of a package for FMU export of such components, explain the rationale for selecting the connector variables of the FMUs and finally provide computing benchmarks for different design choices. It turns out that selecting temperature rather than specific enthalpy as input and output signals does not lead to a measurable increase in computing time, but selecting nine small FMUs rather than a large FMU increases computing time by 70%

1 aWetter, Michael1 aFuchs, Marcus1 aNouidui, Thierry, Stephane uhttps://simulationresearch.lbl.gov/publications/design-choices-thermofluid-flow