To simulate district heating networks, in this project the simulation environment Dymola was used. The goal was to run simulation of district heating network and at the same time have good network representation to easily change between different models and also change between doing simulation and optimization. Different models had to be created in Dymola and tested to ensure they work accordingly. The method was to first implement new models for consumers, pipes and producers. The new models were first tested on a component level and later used to simulate larger networks.
There are existing models in the Modelica standard library that could be used to simulate networks although they are not suitable to simulate larger networks. The major part of the thesis was the implementation of a new pipe model. The pipe model in the Modelica standard library is based on the finite volume method and this is not suitable to use in large networks, since the method is unnecessary complex. The new pipe model is based on the spatialDistribution operator from Modelica standard library. The spatialDistribution operator is based on a plug-flow approach which is less complex. The simulations showed that the new pipe model had the wanted characteristics with a reduced complexity to make it possible to simulate larger networks.
A heat loss implementation was introduced for the new pipe. The implementation was simulated and compared to data from an existing district heating network. The results from the simulation showed that the simulated and measured data differed very little.
Pressure driven networks with loops, branches, several producers was possible to be simulated using the new components. The simulation time for a complex network with 100 consumers was below two minutes. At the current state 100 consumers is the highest amount of consumer models a simulation can handle, but improvements can be made.
The results showed that the new implemented models were able to simulate larger district heating networks that included both pressure and heat loss. There is also room to add more complexity into the models.