This paper describes a general simulation tool for district heating systems. The purpose is to study the performance of different real-time control strategies for district heating management. A short description of the basic principles of district heating systems as well as some of the managerial considerations is given. Simulation is commonly used within the domain of district heating, both as a strategical decision support tool and as a operational optimisation tool. However, since approaches to distributed real-time control strategies are very rare within the domain of district heating, current simulation tools lack support for such studies. To improve this situation a simulation tool has been developed which integrates existing models of the various entities in a district heating system in a novel way.