Next Article in Journal
Is the EU’s Resource Base of Copper Ore Deposits Large? A Fuzzy Set Theory Approach
Next Article in Special Issue
A Method for Optimizing and Spatially Distributing Heating Systems by Coupling an Urban Energy Simulation Platform and an Energy System Model
Previous Article in Journal
Acknowledgment to Reviewers of Resources in 2020
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Experiences from City-Scale Simulation of Thermal Grids

Control Engineering Group, Luleå University of Technology, SE-97187 Luleå, Sweden
Optimation AB, SE-75309 Uppsala, Sweden
Institute for Software Technology, Graz University of Technology, 8010 Graz, Austria
Author to whom correspondence should be addressed.
Resources 2021, 10(2), 10;
Submission received: 17 December 2020 / Revised: 14 January 2021 / Accepted: 20 January 2021 / Published: 25 January 2021


Dynamic simulation of district heating and cooling networks has an increased importance in the transition towards renewable energy sources and lower temperature district heating grids, as both temporal and spatial behavior need to be considered. Even though much research and development has been performed in the field, there are several pitfalls and challenges towards dynamic district heating and cooling simulation for everyday use. This article presents the experiences from developing and working with a city-scale simulator of a district heating grid located in Luleå, Sweden. The grid model in the case study is a physics based white-box model, while consumer models are either data-driven black-box or gray-box models. The control system and operator models replicate the manual and automatic operation of the combined heat and power plant. Using the functional mock-up interface standard, a co-simulation environment integrates all the models. Further, the validation of the simulator is discussed. Lessons learned from the project are presented along with future research directions, corresponding to identified gaps and challenges.

1. Introduction

Sustainable energy systems rely on a wide range of energy sources such as biomass, wind, solar energy, combustion of waste fuel, and recovered energy from industrial plants and data centers [1,2]. An integral part of the utilization of renewable energy sources is to use the available energy as efficiently as possible. Several reports [3,4] point out that an increased district heating and cooling capacity in the European Union is key to reduced energy consumption and reduced green house gas emissions, where the goal is a reduction of the energy related CO 2 emissions by 40% in 2030 compared to the 1990 levels [5]. Currently, half of the total energy consumption in the European Union is for the purpose of heating and cooling [6], and it has been concluded that there is enough excess heat in the European Union to cover the heat demands of all buildings from the service sector to households. Previous research [7,8] has shown that from an economic perspective, the competitiveness of district heating as a means of decarbonization is sensitive to the density of the cities. District heating is mainly favorable in high density urban districts, whereas other technologies such as electrical heat pumps can be favorable in rural areas or less dense cities.
With current policies, the total energy supplied by district heating is estimated to increase by around 50% by 2050. Within the European Union, in the Nordic countries, Baltic countries, and Poland, district heating serves more than 50% of the households and around 12% European Union wide. To meet the demands of an increased utilization of renewable heat sources, the Fourth-Generation District Heating (4GDH) [9] networks include lower supply temperatures with the ability to recycle heat from low temperature sources and forming a smart energy system with the integration of, e.g., electricity and gas networks. This also has implications for how district heating networks are controlled, where it was shown, e.g., in [10] that large energy savings are possible using more advanced control strategies and efficient utilization of thermal storage units and building inertia.
To explore the possibilities and implications of novel types of district heating and cooling networks, the impact of renewable energy sources, and the corresponding control strategies, dynamic simulation of the thermal grid is considered an important aid in the process. Early results in this area are from 1990s and early 2000s, with examples such as [11,12]. More recently, several European Union projects have employed district heating and cooling simulation for their use cases, such as the Optimisation of District Heating and Cooling Systems project (OPTi) [13], which is used as a case study in this paper, and the New Generation of Intelligent Efficient District Cooling Systems project (INDIGO) [14], where a simulator is used for district cooling networks. Extensive research and development are also performed within the International Building Performance Simulation Association (IBPSA) [15] aiming to create a complete open source Modelica Framework for building and community energy system design and operation. Furthermore, several articles such as [16,17,18] deal with the concept of dynamic district heating models and simulation.
Common use cases for the simulation of district heating and cooling networks are operational optimization with regard to short-term production planning such as [18], considering the production rates and scheduling of production units, including optimization of thermal storage units. In [19], a dynamic simulator was used to explore the impact of supply temperature on a combined heat and power (CHP) plant. The integration and operation, including optimization of operation, of a seasonal storage were examined in [20]. A slightly different use case is [21], where a simulator was used for the evaluation of the safety risks with regard to safety in the case of network failures. Other articles deal with the demand response for district heating using district heating simulation tools [22]. In the previously mentioned INDIGO project, the simulator was used for the design of district cooling networks.
In this paper, the simulator developed within the Horizon 2020 OPTi project is presented as a case study, including a validation example and a discussion of the challenges and limitations encountered during the project. On the basis of the case study and references, research gaps and proposed relevant research directions are identified and analyzed. The concept of a digital twin is then presented, and it is shown that the case study fulfills the properties of a digital twin and how these properties relate to the challenges presented in the paper. Finally, conclusions are given.
The paper’s main contribution is to present results and lessons learned from a case study on dynamic city-scale district heating modeling and simulation. This includes a thorough discussion of modeling and simulation paradigms, automatic model generation, fidelity, computational performance, validation, and model calibration. In addition, this work complements the existing reviews of digital twins by identifying the requirements and specifics of digital twins for district heating and cooling systems.

2. Case Study: Dynamic City-Scale District Heating Simulation

As a practical example used in the article to illustrate the challenges of district heating and cooling simulation, the simulator developed within the OPTi project [13] is used. The project started in 2015 as a European Union Horizon 2020 project and was coordinated by Luleå University of Technology, Sweden. The project objective was to analyze and rethink the way district heating and cooling systems are architected and controlled. Within the project, OPTi-Sim, a dynamic city-scale district heating simulator, was developed to explore use cases like:
  • Validation of optimization based control methods;
  • Design of automated demand response schemes;
  • Exploiting the potential of passive-heat storage.
From the width of the scope, the size of the district heating grid, and the lack of measurements available, it was determined that a first principle model building on known physical relations was needed. Due to many different stakeholders in the project, this was also seen as an aid to facilitate mutual understanding. This choice had large implications with regard to the choice of methods and tools, accuracy, computational performance, and validation, where the specific challenges encountered are presented in the following sections.
To put things in perspective, the International Renewable Energy Agency (IRENA) categorizes power grid models using five different hierarchical levels [23], depending on the time scale, detail, and width of scope. The levels were originally aimed at electrical power grids, but can be easily adapted to the district heating and cooling context. A summary with some minor adaptions is found in Table 1.
Using the defined levels, the case study encompasses both the hydraulic and thermal dynamics and thus combines the two lowest levels. The experiences drawn from the case study relate mainly to this particular level of modeling, whereas other levels are touched on more briefly. The simulator was validated by replicating real-life scenarios, where the main objective was exploring alternative production and demand control strategies. Modelica was used as the modeling language, with industrial process components such as pumps and valves provided by commercial simulation libraries.
Three main data sources were used for the models:
  • Models based on Geographic Information System (GIS) data;
  • Models based on piping and instrumentation (P&I) diagrams and design data;
  • Models based on historical measurement data (data-driven models).
The piping of the thermal grid was automatically generated from GIS data, whereas production units and pumping stations were manually modeled and configured from P&I diagrams and data. Data-driven and gray box models for the heat load of consumers were generated from historical data. The GIS data of the DHC grid of Luleå span over >9000 consumers and >44,000 single pipes.
To enhance the computational performance, a topological optimization, known as aggregation, of the grid was performed based on the so-called German method described in [24]. The complete topological optimization procedure for the case study consisted of a pre-processing by pruning of erroneous data such as empty nodes or singular pipes, combined with several aggregation steps of merging nearby nodes and consumers, merging serial pipes, and merging of branches. Notably, this part of the case study consumed a large portion of the development resources.
To control the preprocessing and aggregation process, a graphical user interface (GUI) in MATLAB was developed, as seen in Figure 1. In the GUI, the thermal grid is represented as a network plot where the effect of the preprocessing is visualized. With the topological optimization steps and preprocessing described above, the full Luleå grid consisting of 44,752 single pipes and 9533 consumers was aggregated down to 3149 single pipes and 494 customers before simulation. The total number of simulated components was reduced by around 90 % . After optimization, the full city-scale grid could be simulated on a Core i7 Gen 5 laptop computer at around 2–3 times real-time speed.
Examples of the automatically generated grid can be seen in Figure 2, and an example of a production unit can be seen in Figure 3.
The buildings were clustered into seven building categories by the size and type of building, validated by measurements for each building category, for simulation of the consumer heat load. Due to the large amount of buildings and lack of measurements, it was deemed unfeasible to model each building individually.
The manual and automatic control of, e.g., the power plant, pump stations, and feed forward supply temperature was replicated from available diagrams and measurements. As an example, the pump control for the pumping station consisted mainly of two parts, one for safety and the other for regulation. The safety part ensures that the pump’s operational pressures do not violate the limits. The control system ensures that the pressure before the pump will not go below a certain limit and the pressure after the pump will not be higher than a threshold limit. This is achieved by the upper two PID controllers shown in Figure 4. Furthermore, the safety part will switch off the pump if the speed reaches the lowest allowed speed. The tracking of the optimal differential pressure of a selected critical point in the grid is performed by the regulation part.
To highlight some of the challenges encountered during the validation process, a period of 10 days in January exhibiting an outdoor temperature drop from −5 C to −30 C and a rebound to −15 C was used. Large temperature changes during winter, when the space heating demand is high, can be seen as the worst case scenario with regard to model validation, exhibiting the dynamic behavior of space heating demand and possibly exciting unmodeled behavior at the production side. Notably, due to the limited computational performance, simulating more than 10 calendar days was impractical.
The validation process was based on measurements from the Luleå district heating network. The validation example is focused on the required generated power, collected from time series from the plant data acquisition system. The total power equals the power supplied to the grid from the main combined heating and power plant, plus auxiliary energy units that are sometimes needed during the winter months. The inputs to the simulation were the outdoor temperature and time, where the latter was used in the consumer simulation. In Figure 5, the outdoor temperature, the actual total power, and the simulated total power are shown.
As is apparent from the figure, for certain periods of time, there is a good correspondence between measured and simulated power, whereas for other time periods, the deviation can be quite large, raising several important issues, such as:
  • What is the needed fidelity for the use case?
  • What is a good metric to evaluate the accuracy?
  • How can we account for human behavior such as manual control of production units?
  • How can we ensure that the model is up-to-date with the real process?
These questions do not have simple answers and largely depend on the use case, which means that the needed fidelity and the used metrics have to be defined in relation to the use case. This is directly related to the model validation and model update. In Section 5, the validation and update aspects are discussed, as well as which methods can be employed. For this particular case, it is hypothesized that the deviation stems mainly from the building models being too coarsely modeled, as not all buildings have measurements available for data-driven modeling or gray-box modeling or are only part of an aggregated building set. Thus, identifying the root cause of such a deviation is non-trivial, especially since there are relatively few measurements available in the grid.
The following sections conclude about the experiences from the modeling and simulation of the Luleå grid, including a discussion and proposed research directions with regard to the challenges encountered during the conducted work.

3. Modeling and Simulation

For any simulation project, there are several important decisions regarding modeling and simulation that need to be made. Here, the main choices are presented along with experiences, appropriate references, and proposed research directions.

3.1. Co-Simulation

The general approach to the modeling and simulation of large-scale systems can be distinguished between monolithic and co-simulation approaches [25]. In a monolithic simulation, the entire system is modeled and simulated in a single tool, whereas in the co-simulation approach’s separate tools for the respective subsystems are coupled together. The advancements in co-simulation, mostly using the functional mockup interface (FMI) standard [26], have greatly increased the capability of interconnecting models from different tools.
For the case study, the grid model was compiled as a so-called functional mockup unit (FMU) according to the FMI standard and was used seamlessly in conjunction with the representation of the control system and of the operator behavior simulation in MATLAB. The approach was considered essential due to many stakeholders with different backgrounds and areas of expertise. The integration of components was mostly straightforward, but some care needed to be taken—especially with regard to physically strongly coupled components. Here, such cases were avoided by compiling strongly physically coupled components, such as the district heating grid, into a single FMU. Otherwise, methods such as transmission line modeling [27] (TLM) might need to be used.
The cost of multiple software licenses provided a large hurdle with regard to prolonged use of the simulator outside of academia. Novel business models might be needed to deal with this issue when co-simulation finds a wider adoption.

3.2. Physical or Data-Driven Models

Recently, data-driven machine learning (ML) methods such as artificial neural networks (ANNs) have gained much popularity and attention. With an application to district heating, most machine learning models have been used for forecasting of heat demands, e.g., [28]. For the simulation and prediction of complex large-scale systems such a district heating and cooling network, there are several limitations of the most popular machine learning approaches that need to be addressed to make models fit aspects such as the interpretability of results, how to train a model for specific scenarios or designs not yet realized, and how persistent excitation properties can be guaranteed for proper identification of the system. A lack of measurements in the grid, as in the case study, also limits the feasibility of a data-driven approach.
A middle ground is to use so-called gray-box models, where a data-driven model can be used to complement a physics based model. Yet another interesting option is to use the physics based model as a reference to train a data-driven model, for cases where the data-driven model has desirable properties such as the propagation of uncertainties or fast execution time [29]. Needless to say, this requires that the physics based model is in place and correct in the first place.
For the case study, a physics based grid model was used. There were few measurements available in the grid, thus data scarcity, while the physics of water flow is well studied. The model was also used as an aid to augment the understanding of the physical process. On the consumer side, a mix of physics based, gray-box, and data-driven models was used.
To summarize, the data-driven approach provides interesting methods that are often used, e.g., for heat load prediction, but to the authors’ knowledge, there is no feasible way to model a whole district heating or cooling grid without explicitly using the known physics.

3.3. Acausal and Causal Modeling

Another important choice of modeling paradigms is between acausal and causal modeling. For causal modeling, represented by tools such as e.g., Simulink [30], there is always a direct causality as the models are functions with predefined outputs and inputs. For acausal modeling, however, there are also relations, such as the relation between the pressure drop and flow rate in a pipe. Equation based models are expressed in a way that is relatively easily interpretable for domain experts and engineers. Acausal and causal modeling for district heating simulation were thoroughly described and compared in [25].
For the case study, using acausal first principles methods was considered crucial by the participants, providing a common ground for discussions and the interoperability of tools. By using acausal equation based modeling, the reusability, adaptability, and extendability of models is increased compared to the causal modeling of dynamical systems.
It is the authors’ belief that equation based acausal modeling will continue to play an important role in the world of district heating and cooling simulation. There are however circumstances when a causal model is a better choice, such as for the control system, being causal in its nature, or when high quality causal models are readily available for some parts of a system. Notably, combining acausal and causal models from different modeling tools is enabled by a co-simulation approach.

3.4. District Heating Simulation Tools

The Modelica model language is widely used within both industry and the scientific community for modeling of district heating and cooling networks. Other non-domain specific tools such as MATLAB/Simulink [30] can also be used for district heating simulations, but are limited to causal modeling. Using Julia [31] for simulation has recently gained popularity due to its performance focused approach, where Modia [32] provides a Modelica-like domain specific extension of Julia for the modeling and simulation of physical systems, although in an early phase of development. The tool IDA Indoor Climate and Energy (IDA ICE) [33] has also been used for district heating simulation with better scalability performance than Modelica and Simulink for the presented use case in [34], but is lacking support for FMI. A comparison of the tools can be found in [25].
There are also several domain specific tools for district heating simulation, where a comprehensive overview of available simulation tools within district heating, and their features and limitations, can be found in [35,36]. Tools such as Termis [37], PSS SINCAL [38], TRNSYS [39], and Netsim [40] are widely used for the simulation of DHC networks. Most available domain specific tools are at the time of writing either (i) static, i.e., do not provide a representation of the dynamic behavior of the DHC system, (ii) specialized for a limited amount of use cases, or (iii) do not allow for co-simulation/interfacing with other software.
For the case study, the choice of the the Modelica model language was motivated by co-simulation capabilities and well established and validated model libraries. While Modelica has been the go-to language for modeling of district heating and cooling networks for some time, the engineer and researcher of tomorrow will have a wider array of interesting choices.
It is often mentioned that fully dynamic simulations are needed for the simulation of 4GDH systems, with a larger proportion of renewable and highly fluctuating energy sources [35]. However, this and other accuracy and fidelity related questions should not be assumed, but chosen in accordance to the project requirements; static models might well be appropriate in many cases. Comparisons between static and dynamic models for different scenarios and time and spatial resolutions would provide a valuable contribution to the scientific community.

3.5. Simulation Models

Components such as pipes, pumps, and valves are well represented in commercial and open-source industrial simulation libraries. While the equations describing these components are well known and verified, it should be noted that the oversimplification of, e.g., valve or pump characteristics can have a profound effect on the accuracy of the simulation. For the case study, the accuracy of the models was not considered as a limiting factor, instead the computational performance of the simulation was experienced as the major bottleneck.
Research with regard to individual simulation models for use in district heating simulation has been mainly focused on efficient and accurate pipe models, with examples in [41,42]. The pipe is a crucial model in fully dynamic district heating grid simulations, where the long pipe lengths require a spatial distribution, and as a consequence, model improvements resulting in increased computational performance or accuracy are highly important for the overall simulation. A comparison of different pipe models and their respective accuracies compared to actual measurements can be found in [43].
For the case study, a commercial model library, providing validated models, was used. While this provides convenience, there is also a trade-off between how general or specific the model is with regard to the use case. The scope of simulating a district heating and cooling system is relatively narrow compared to that of a general purpose process industrial model library, and using more specialized models might yield better performance at the cost of increased development time.
It is the authors’ experience that accuracy demands need to be carefully investigated with regard to the use cases, with model libraries chosen as a result of the imposed demands.

3.6. Simulation of Heat Consumption and Production

The simulation of heat load at the consumption and production side, including the simulation of produced heat from fluctuating sources that can depend on a multitude of different factors such as wind speed or server utilization, are important for realistic simulation results. There are many published methods for heat load prediction that can be employed for simulation such as [44,45]. Since the patterns are subject to social behavior, individual buildings can show erratic patterns that are hard to predict. Furthermore, specific consumers such as industrial plants are not always possible to predict from known data.
In the case study, consumer models both utilizing first principles and data-driven methods were used, rendering seven separate categories of consumers. There was however a significant scaling problem: while it might be possible to accurately predict the heat load of a single building, it is challenging to scale up to more than 9000 consumers. Based on this issue, the consumers were categorized into seven different types depending on the size and type of building.
A less researched area is how to accurately model production units affected by unknown control and safety structures and manual operation. How, e.g., operators choose to start peak load boilers can have a profound effect on the grid dynamics, but information about these procedures might not be available. While not as straightforward as heat load prediction, research in this direction might provide valuable insights.

3.7. Automatic Model Generation

Historically, most modeling efforts have involved manual efforts of replicating the physical reality from data and diagrams. This quickly becomes inefficient and error prone. The acquisition of relevant data can be a tedious process in itself and often requires a significant effort of preprocessing or converting the data in order to make them suitable for parameterizing the simulation models.
There exist several different formats for the data depending on the domain. Automatic model generation from GIS, as in the case study, and BIM data are covered in several articles [46,47,48], with an extension to also generate models from CAD diagrams in [16]. A promising approach, e.g., used for the forecasting of heating and cooling demands [49], is using CityGML: 3D city models. Native CityGML lacks the representation of energy relevant building parameters [49]. However, CityGML supports specific extensions, which are called Application Domain Extension (ADE) [50], and have been applied in various studies to calculate the energy demand at different scales [51].
Despite being an active research area and that the feasibility of automatic modeling has been shown, the lack of common standards make most solutions specific for the use case. Promising results within the standardization of the model specification using a metamodel concept such as SysML [52] and AutomationML [53] are proposed. In the general case, the choice of the data format is not a choice for the modeling engineer or researcher, but needs to be dealt with already at the planning and management stage.
Regardless of the data source, it can usually be assumed that not all relevant design data can be acquired. This raises an important question: How can the validity of a digital twin be ensured without complete underlying data? This process is called data enrichment and was discussed for building models, e.g., in [54,55]. It should be noted that the methods are dependent on standardized data, might require project specific adaptions, and there are no model-agnostic answers to the question.
The case study used GIS data for the automatic generation of the grid and consumers, whereas production units were modeled manually. It was experienced from the case study that the data acquisition and preprocessing of data consumed a large amount of time, and the results can seldom be reused. This is considered crucial for future usability and effectiveness with further research and industry adoption of standards, but also sharing of code and algorithms within the scientific community.

3.8. Topological Optimization

Before the thermal grid model can be generated, the topology is usually optimized for the proposed use case, with regard to the resolution of the grid, as described previously for the case study. This process, called aggregation, of pipes or consumers in the district heating grid has a profound impact on performance [24] and with an increased level also on the accuracy. The most popular methods for aggregation are the so-called Danish and German methods, respectively. A comparison of both methods and a discussion of the potentials and limitations of the aggregation methods on 4GDH systems can be found in [56]. The methods are focused mainly on static simulations, and in the Danish case, there is no support for multiple production units. It is also not straightforward to derive any objective properties with regard to the spatial or temporal resolution from the aggregation process for the presented methods.
For the case study, the algorithm was loosely based on the German method, where a significant amount of time was consumed for tweaking the algorithm for the use cases and finding a feasible trade-off between performance and accuracy.
It is suggested by the authors that aggregation methods be further researched with respect to the validity for 4GDH networks with fully dynamic simulation and multiple production units. Effective numerical methods can to some extent mitigate the need for aggregation methods from a computational performance standpoint.

3.9. Fidelity

The fidelity, such as the time scales of interest and the spatial resolution, needed for the use case has large implications on the requirements on the model and simulation related choices. Individual components are usually not specified with regard to fidelity, but rather by what features or simplifications that should be included. Relating these parameters and settings to, e.g., the time scales of interest can be challenging. With appropriate planning and requirement specification, these problems can be mitigated for many projects. However, this requires extra work and possibly different simulators for different parts of the project.
For the case study, it was apparent that the different stakeholders of the projects had different and sometimes contradictory requirements. On the substation level for example, dynamics with a time resolution of seconds can be of interest, while the spatial resolution of the grids is relatively unimportant. However, the degradation in computational performance caused by the stiffness of modeling fast dynamics can render the simulator useless for simulation scenarios ranging over long time spans.
Ideally, the same simulator could be used for different phases and stakeholders of projects. This would require that the model be automatically adapted to, e.g., the required spatial and time step resolution. For linear systems, different model reduction techniques are well developed [57], where, e.g., fast dynamics can automatically be reduced to static relationships. Model reduction is far less researched for differential algebraic systems, where the survey in [58] can serve as an introduction. To the authors’ knowledge, there are no implementations for commonly used modeling tools, and it is perceived that more research in this direction would be a valuable contribution.

4. Computational Performance

The largest obstacle with regard to usability in the case study was the computational performance. With scenarios possibly spanning over weeks, months, or even years, several orders of magnitude of increased simulation performance would have been desirable. Debugging models with regard to computational performance is often a tedious task that requires extensive knowledge from the developer.
As an example to highlight the volatility of computational performance, a grid model with 84 consumers was generated, running a simulation of 10,000 s within Dymola using the variable step size solver LSODAR. The inputs to the model were the heat load and return temperature of the consumers, varying slowly over time. The consumer model used a simplified approach where the mass flow rate was directly calculated from the inputs.
The first example used continuous input signals generated within the simulation model. The second examples used the same signals as in the first example, but sampled with a sampling time of 1 s, to emulate how input signals are often provided to the model. The third example was similar to the second example, except that for one of the consumers, the power input signal was filtered with a first-order filter with the time constant τ = 3 s, emulating how components with faster dynamics could be introduced to the system.
The results of the simulations are provided in Table 2. For the modeling expert or someone well versed in numerical computing, this should not come as a surprise: the second example limited the maximum step size for the variable step size solver; the third example made the system stiff, causing a severe degradation in computational performance. For the engineer or new practitioner, however, this might come as unpleasant news when small changes (from an engineering perspective) cause a large degradation in performance.

Numerical Methods

The nature of the problem is that a district heating or cooling grid poses several numerical challenges. Fluid networks are non-linear, and the problem is stiff due to the difference in the time constants between the pressure and temperature dynamics, as well as the faster dynamics that might appear at the consumer or production level. The model is hard to parallelize due to the strongly coupled nature of the system. Usually, there are also components that are discrete such as the simulation of the distributed control system (DCS).
The choice of solvers is usually limited by the choice of the tool used for modeling. For the Modelica language, using sparse solvers [59] or more efficient compilers as in [60] has been proposed. Using differential algebraic equation (DAE) system solvers rather than ODE solvers has also shown large improvements for power grid models [61]. Yet another promising approach is using quantized state system solvers (QSS) [62]. The stiffness of the problem can be addressed by using multirate solvers, where a summary of the state-of-the-art solvers and tools, including multirate techniques, for the Modelica language was published in [63]. However, as the article pointed out, while many of these concepts are promising even with current state-of-the-art tools and solvers, the performance is very limited as the model size grows to even moderately large.
Despite promising concepts, from an engineering perspective, an integrated approach is needed where all major problems causing numerical problems are addressed to a point where accuracy, robustness, and simulation speed are good enough for the employed tools and use cases. Using a co-simulation approach provides the possibility for using state-of-the-art solvers and methods from different tools—provided that they support co-simulation and that the co-simulation itself does not introduce other issues. Following up on promising concepts, it seems that the step from concept to deployment is large, likely due to the diversity and complex nature of hybrid DAE systems.
For the case study, a classic fixed step explicit fourth-order Runge–Kutta method as implemented in Dymola was eventually used. Despite many theoretical advantages of variable step size methods, in practice, it turned out that the overhead, and in some cases unpredictable behavior, of these methods was too large to provide an acceptable computational performance.
From the case study, as well as other projects conducted by the authors and the body of scientific work in this area, it was perceived that most work from previous projects could not be readily reused, so that the wheel must be reinvented again and again. A reference model that could be used for benchmarking numerical methods, aggregation methods, and so forth could be one way forward towards better knowledge transfer between projects, and in the longer run towards better performance.

5. Validation

A crucial step in modeling and model calibration is the validation of the resulting model. As stated in the literature, like, e.g., [64], model validation is the process of assessing the eligibility of a model and to what degree it represents the true model for a specific use. The validation data may not have been used in the modeling or the calibration and is in that sense new data for the model.
The basic setting for model validation is depicted in Figure 6, where the estimate of the output model can be used to assess the validity of the model. Using a metric on the deviation between the model or deriving a model error model [65] not only provides an understanding of the validity, but also a means to characterize the root cause for deviation and to compare different models with each other.
Reflecting back to the case study, validation and model calibration were shown to be time-consuming tasks. It was often experienced that there was a discrepancy between what the engineers considered important and the accuracy metrics. The accuracy of a simulation is often quantified by metrics such as the root mean squared error (RMSE) and mean absolute percentage error (MAPE), measuring the deviation of the simulated value compared to the measured value at fixed time instances, namely y y ^ . Reaching a sufficiently high accuracy for a complex system can in many cases be a difficult task. There exists a multitude of exogenous inputs d and design parameters that affect the dynamic behavior of a district heating network, which can only in part be acquired from data or modeled, denoted as d ^ . Examples are detailed pipe geometries, soil temperatures around the piping, consumer and operator behavior, and the automatic control of production units.
An important question raised in [66] was whether a higher accuracy results in a more useful simulator. Higher accuracy also goes hand-in-hand with higher complexity and usually comes with a loss of computational performance or with additional parameters that require calibration, making the simulator less useful from an engineering perspective. The required accuracy is determined by the purpose or the use case, and from a scientific perspective, the law of parsimony should be applied, meaning the simplest model for the intended use is also the right one, provided it gives the same answers as a model of higher accuracy and complexity.
Accuracy metrics such as RMSE do not take into account dynamic behavior, so that moderately delayed fast dynamics might be considered by the metric as a large deviation. There exist approaches to mitigate these shortcomings such as nonlinear alignment techniques (also referred to as dynamic time warping) [67], although not widely adopted by the scientific community. Furthermore, discrete events for cases like “when A happens, B should happen within a specified time frame” also cannot be captured by just measuring the deviation between the measurement and the simulation. Using other distance measures, such as the Levenshtein distance [68], which can be used to evaluate the order by which events occur, is one option. In the end, the lack of widespread adoption is a problem in itself with using any metric beyond the most common ones. Even when there are methods that are valid for individual components, the question of how to evaluate a complex model such as a district heating grid is largely unanswered.
Another validation related issue is the assessment of the need to update the model. The decision on the update can be based on the outcome from a simulation run in relation to the system it replicates, as shown in Figure 6. There, the observations y and y ^ can be used to establish a metric for the validity of the model, like, e.g., the root mean squares of y y ^ .
While this approach seems straightforward, there are a number of factors that drive the deviation y y ^ :
  • Unknown exogenous effects:
    A minority of the factors that affect the replicated system can be measured or observed, meaning that there is a deviation between d and d ^ , rendering a deviation between y and y ^ . While there is often a qualitative understanding of these effects, a quantitative description is usually lacking.
  • Modeling errors:
    Any model is only valid to a certain degree of accuracy and is therefore not perfectly replicating the real-life system, again rendering a deviation between y and y ^ .
  • Wear and tear:
    Any component operating in a real-life situation will be affected by wear and tear over its life-cycle, leading to maintenance action and eventual component replacement. Such degradation phenomena render similar effects like modeling errors, but occur gradually.
  • Undocumented realizations:
    In line with the modeling errors are undocumented realizations, which means that the real-life system deviates in realization from its documented specification. Such effects are already present when an initial validation of a model is performed, but will nevertheless affect the monitoring performance.
  • Unreported system changes:
    A system update is clearly necessary whenever a change in the real-life system occurs, like, e.g., replacement of components. The consequence is similar to the modeling errors.
Referring back to Figure 5, it can be seen that the overall behavior in the long term was well replicated, but in several instances, there were quite large deviations. Applying a typical measure for the fit like the normalized root mean squared error indicated a poor fit value, less than 90%, as expected. Nevertheless, from an engineering perspective on designing a control strategy for the supply of heat to the grid, the accuracy was deemed sufficient by practitioners in the field. Some of the reasons for the deviations were model errors in the building models, assuming that individual buildings for a certain category had the same heat load pattern and assuming a disturbance-free scenario. It is well known that individual buildings’ heat load pattern exhibits a stochastic behavior in the short term.
Consequently, a monitoring procedure needs to be resilient to these factors and render an appropriate decision on the update needs. An additional challenge in most actual district heating networks is the fact that there are few measurements available from the grid, often restricted to a handful of temperature and pressure sensors. While there is a tendency in the industry in general to include more sensors, in line with the vision of Industry 4.0 and the smart sensors concept [69], the current lack of measurements makes model calibration, validation, and update a difficult task.
Further complicating the calibration and update is the composition of the real-life system that is replicated. As seen in the principle sketch in Figure 7, the real-life system could be composed of physical system components that are well understood and for which models are available (white boxes) and physical components where partial or no knowledge of the behavior is available (gray and black boxes). Naturally, all those will interact and also be connected to software components like a control system. Already when performing model calibration, the interconnection between components plays a role in the quality of the calibration if it is primarily based on measurement data. Similarly, the interconnections need to be considered in the model update.
Thus, to be able to update the models with sufficient accuracy, the measurements need to be monitored, and informative data need to be used to update the model. Data from faulty sensors, equipment under maintenance, and un-modeled modes of operation need to be discarded—a non-trivial data analysis task. Furthermore, there are few methods for updating or calibrating DAE models from known data. It can be assumed that without model updates, the model accuracy will deteriorate with time due to, e.g., equipment wear or changes or new operating procedures. Promising work in this area, using the aforementioned AutomationML and FMI, was conducted in [70].
Methods for model calibration are well established, but are often focused on methods for a limited set of specified models (e.g., system identification for autoregressive-exogenous (ARX) and state space models) and are not suitable for calibration of models on DAE form. Some promising steps were undertaken by, e.g., [71,72] on model calibration for DAE models. However, there is still to little knowledge about the validity of these methods for dynamic model calibration in district heating grids.
While a model update can be understood as a model calibration, there are preceding steps before a calibration, or better said re-calibration, can take place
  • The need for a model update has to be determined. Similarly to model validation, it is important to understand if the deviation between the models and the real-life system is caused by a deprecation of the model. Thus, the current model needs to be monitored continuously during the operation and in relation to the real-life system.
  • When it is clear that a model update is necessary, the components that need updating have to be identified and located within the large-scale system. Clearly, multiple components may need updating simultaneously.
  • After identifying the component for updating, it needs to be determined how an update can occur. The update of parameters in a given model structure is most likely the most straightforward task where system identification or machine learning principles can be used. If the update requires structural changes, a pure data-driven approach might not be possible, and a re-generation of the component including calibration might be required.
Essentially, the model update requires a number of steps where there are several methodologies available that could be used in combination with each other. Each of these methods depends user selections that affect the performance of the methods. As soon as those methods need to be used in a tool chain, their effects on each other need to be understood and quantified. In this respect and as far as the authors are aware, there are no studies that have investigated the aggregation of established methods into tool chains automating the model update.
Clearly, there is a need for research in this direction and to propose automated methodologies and tool chains that reliably monitor and update models.

6. The Digital Twin

The concept of a digital twin is attributed to Michael Grieves in 2003 [73] and was popularized by the inclusion in NASA’s Modeling, Simulation, Information Technology & Processing Roadmap [74]. There, the following definition is provided
A Digital Twin is an integrated multiphysics, multiscale simulation of a vehicle or system that uses the best available physical models, sensor updates, fleet history, etc., to mirror the life of its corresponding flying twin. The Digital Twin is ultra-realistic and may consider one or more important and interdependent vehicle systems, including propulsion/energy storage, avionics, life support, vehicle structure, thermal management/TPS, etc.
While this is a useful vision, a more applicable approach for an industrial process was described in [75], comprising the following properties of a digital twin
  • The digital twin is the linked collection of the relevant digital artifacts including engineering data, operation data, and behavior descriptions via several simulation models. The simulation models making up the digital twin are specific for their intended use and apply the suitable fidelity for the problem to be solved.
  • The digital twin evolves along with the real system along the whole life-cycle and integrates the currently available knowledge about it.
  • The digital twin is not only used to describe the behavior, but also to derive solutions relevant for the real system, i.e., it provides functionalities for assisting systems to optimize operation and service. Thus, the digital twin extends the concept of model based systems engineering (MBSE) from engineering and manufacturing to the operation and service phases.
While not strictly required to fulfill this definition, enabling features to achieve the digital twin are that the model can be automatically generated from the data and that the model can be automatically updated from the data. The evolution of the digital twin can be seen as a way of addressing the weaknesses of many simulators, where the simulator provides a useful tool at certain stages, but often remains underutilized for early and late stages of the life-cycle. In [76], it was emphasized how data-driven methods used in conjunction with first principles model techniques can enhance models to adapt to changing dynamics and environmental characteristics. It is also concluded that error quantification and plug-and-play functionality in a modular approach are open research topics that are fundamental for the future of complex systems’ models.
Based on the definition above, we can distinguish three levels of the digital twin: (i) the digital twin that is a snapshot of the real process at a certain stage, (ii) the digital twin that can be regenerated from underlying data when the underlying process changes, and (iii) the digital twin that is continuously updated and regenerated along with the process as it evolves. The main components of the digital twin, including all previously defined levels, are:
  • Automatic model generation,
  • Models of the components, including control and user behavior,
  • Numerical methods for simulation, and
  • Model update functionality.
Concerning the current case study, the simulator fulfilled the properties of a digital twin having the focus on the analysis and optimization of both control and operation. While the simulator can be understood as one model, there were multiple simulation models for production, distribution, and consumer-side present and fully integrated to reflect the complete system behavior. The models were derived using automated model generation, and the models reflected all components including the control system, the user behavior, and the behavior of the human operators. The implementation of the simulator using FMUs enabled the integration of models from different modeling paradigms and the simulation of different operating scenarios, optimization schemes, and climatic conditions. Such a digital twin has the purpose of the so-called what-if analysis with a high level of flexibility in terms of the analyzed scenarios.
A lacking functionality is the integrated model update and the ability of the digital twin to track the real-life system properly in parallel during real-time operation. Further, the fidelity of the models varies in relation to the scenarios that can be analyzed. To give an example, the analysis of the energy used for heating on the overall system level is well replicated by the digital twin, while the energy used for heating at a specific individual building might not.
In order to reach a full city-scale digital twin with all the above-mentioned properties, several of the identified challenges in the paper still need to be addressed.

7. Conclusions

In this article, experiences from the modeling and simulation of district heating and cooling grids are presented, including a case study with practical examples. Research gaps and proposed relevant research directions are presented, drawing from the experiences.
It is shown how the concept of a digital twin relates to simulation and modeling in general and that it in its essence is a way to deal with the challenges and limitations identified in the paper.
It is perceived by the authors that while each individual component will need research and development for a simulator suitable for daily use, or a complete digital twin, the integration of the concepts is an equally important issue. The adoption of standards within the industry, by tool vendors, and by academia is considered crucial.
While some of the presented research and suggested research directions are strictly from a district heating and cooling perspective, the main body is applicable to process industrial modeling and simulation in general. It is the authors hope that the growing interest in the digital twin will result in moving the industry forward towards both digital and environmental sustainability.

Author Contributions

Conceptualization, J.S., W.B., G.S. and K.T.A.; methodology, J.S., W.B., G.S., K.T.A.; software, J.S., K.T.A.; validation, J.S., K.T.A.; formal analysis, W.B.; investigation, J.S., W.B.; G.S.; resources, J.S., W.B., K.T.A.; data curation, J.S., K.T.A.; writing—original draft preparation, J.S., W.B. and G.S.; writing—review and editing, J.S., W.B., G.S., K.T.A.; visualization, J.S., W.B., K.T.A.; supervision, W.B., G.S., K.T.A.; project administration, J.S., W.B., K.T.A.; funding acquisition, W.B., K.T.A. All authors have read and agreed to the published version of the manuscript.


This work was financially supported by the Swedish Energy Agency under Grant 43090-2, Cloudberry Datacenters, and ERA-Net Smart Energy Systems through the project FlexiSync, funded by the European Union’s Horizon 2020 research and innovation program under Grant Agreement No. 775970 (RegSys).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Due to GDPR regulations validation data cannot be shared.


The authors want to thank Luleå Energi AB for making information and data for the case study available.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Vad Mathiesen, B.D.; Connolly, D.; Lund, H.; Nielsen, M.P.; Schaltz, E.; Wenzel, H.; Bentsen, N.S.; Felby, C.; Kaspersen, P.; Ridjan, I.; et al. CEESA 100% Renewable Energy Transport Scenarios towards 2050: Coherent Energy and Environmental System Analysis: Technical Background Report Part 2; Department of Development and Planning, Aalborg University: Aalborg, Denmark, 2014. [Google Scholar]
  2. Wahlroos, M.; Pärssinen, M.; Manner, J.; Syri, S. Utilizing data center waste heat in district heating—Impacts on energy efficiency and prospects for low-temperature district heating networks. Energy 2017, 140, 1228–1238. [Google Scholar] [CrossRef]
  3. Doračić, B.; Novosel, T.; Pukšec, T.; Duić, N. Evaluation of excess heat utilization in district heating systems by implementing levelized cost of excess heat. Energies 2018, 11, 575. [Google Scholar] [CrossRef] [Green Version]
  4. Connolly, D.; Mathiesen, B.V.; Østergaard, P.A.; Möller, B.; Nielsen, S.; Lund, H.; Trier, D.; Persson, U.; Nilsson, D.; Werner, S. Heat Roadmap Europe 1: First Pre-Study for the EU27; Department of Planning, Aalborg University: Aalborg, Denmark, 2012. [Google Scholar]
  5. Statistical Office of the European Communities. Energy, Transport, and Environment Indicators; Office for Official Publications of the European Communities: Luxembourg, 2019. [Google Scholar]
  6. Colmenar-Santos, A.; Rosales-Asensio, E.; Borge-Diez, D.; Blanes-Peiró, J.J. District heating and cogeneration in the EU-28: Current situation, potential and proposed energy strategy for its generalisation. Renew. Sustain. Energy Rev. 2016, 62, 621–639. [Google Scholar] [CrossRef]
  7. Lake, A.; Rezaie, B.; Beyerlein, S. Review of district heating and cooling systems for a sustainable future. Renew. Sustain. Energy Rev. 2017, 67, 417–425. [Google Scholar] [CrossRef]
  8. Zhang, X.; Strbac, G.; Teng, F.; Djapic, P. Economic assessment of alternative heat decarbonization strategies through coordinated operation with electricity system—UK case study. Appl. Energy 2018, 222, 79–91. [Google Scholar] [CrossRef]
  9. Lund, H.; Werner, S.; Wiltshire, R.; Svendsen, S.; Thorsen, J.E.; Hvelplund, F.; Mathiesen, B.V. 4th Generation District Heating (4GDH): Integrating smart thermal grids into future sustainable energy systems. Energy 2014, 68, 1–11. [Google Scholar] [CrossRef]
  10. Vandermeulen, A.; van der Heijde, B.; Helsen, L. Controlling district heating and cooling networks to unlock flexibility: A review. Energy 2018, 151, 103–115. [Google Scholar] [CrossRef]
  11. Pálsson, H.; Larsen, H.V.; Bøhm, B.; Ravn, H.F.; Zhou, J. Equivalent Models of District Heating Systems for On-Line Minimization of Operational Costs of the Complete District Heating System; DTU-ET-ES-99-03; Department of Energy Engineering, Technical University of Denmark: Lyngby, Denmark, 1999. [Google Scholar]
  12. Larsen, H.V.; Pálsson, H.; Bøhm, B.; Ravn, H.F. Aggregated dynamic simulation model of district heating networks. Energy Convers. Manag. 2002, 43, 995–1019. [Google Scholar] [CrossRef]
  13. Birk, W.; Ritter, Y.; Linder, N.; Odefey, U.; Lingman, P.; Chandan, V. OPTi-Sim: Co-Simulation Based Virtualization of Large Scale DHC-Networks. In Proceedings of the IEEE International Conference on Smart Grid Communications, Sydney, Australia, 6–9 November 2016. [Google Scholar]
  14. Loureiro, T.; Rämä, M.; Sterling, R.; Cozzini, M.; Vinyals, M.; Descamps, M.; Birk, W.; Unkaya, G.; Fuligni, F.; Doračić, B.; et al. District Energy Systems: A Collaborative Exchange of Results on Planning, Operation and Modeling for Energy Efficiency. Proceedings 2018, 2, 1127. [Google Scholar] [CrossRef] [Green Version]
  15. Wetter, M.; Treeck, C.V.; Helsen, L.; Robinson, D.; Schweiger, G. IBPSA Project 1: BIM/GIS and Modelica framework for building and community energy system design and operation—Ongoing developments, lessons learned and challenges. In Proceedings of the Sustainable Built Environment Conference 2019, Graz, Austria, 11–14 September 2019. [Google Scholar]
  16. Hermansson, K.; Kos, C.; Starfelt, F.; Kyprianidis, K.; Lindberg, C.F.F.; Zimmerman, N. An Automated Approach to Building and Simulating Dynamic District Heating Networks. IFAC-PapersOnLine 2018, 51, 855–860. [Google Scholar] [CrossRef]
  17. Leśko, M.; Bujalski, W. Modeling of District Heating Networks for the Purpose of Operational Optimization with Thermal Energy Storage. Arch. Thermodyn. 2017, 38. [Google Scholar] [CrossRef] [Green Version]
  18. Schweiger, G.; Larsson, P.o.; Magnusson, F.; Lauenburg, P.; Velut, S. District heating and cooling systems—Framework for Modelica based simulation and dynamic optimization. Energy 2017, 137, 566–578. [Google Scholar] [CrossRef]
  19. Li, P.; Nord, N.; Ertesvåg, I.S.; Ge, Z.; Yang, Z.; Yang, Y. Integrated multiscale simulation of combined heat and power based district heating system. Energy Convers. Manag. 2015, 106, 337–354. [Google Scholar] [CrossRef]
  20. Köfinger, M.; Schmidt, R.; Basciotti, D.; Terreros, O.; Baldvinsson, I.; Mayrhofer, J.; Moser, S.; Tichler, R.; Pauli, H. Simulation based evaluation of large scale waste heat utilization in urban district heating networks: Optimized integration and operation of a seasonal storage. Energy 2018, 159, 1161–1174. [Google Scholar] [CrossRef]
  21. Babiarz, B.; Kut, P. District heating simulation in the aspect of heat supply safety. E3S Web Conf. 2018, 45, 00005. [Google Scholar] [CrossRef] [Green Version]
  22. Guelpa, E.; Marincioni, L.; Deputato, S.; Capone, M.; Amelio, S.; Pochettino, E.; Verda, V. Demand side management in district heating networks: A real application. Energy 2019. [Google Scholar] [CrossRef]
  23. International Renewable Energy Agency. REthinking Energy 2017: Accelerating the Global Energy Transformation; International Renewable Energy Agency (IRENA): Abu Dhabi, UAE, 2017. [Google Scholar]
  24. Larsen, H.V.; Bøhm, B.; Wigbels, M. A comparison of aggregated models for simulation and operational optimisation of district heating networks. Energy Convers. Manag. 2004, 45, 1119–1139. [Google Scholar] [CrossRef]
  25. Schweiger, G.; Heimrath, R.; Falay, B.; O’Donovan, K.; Nageler, P.; Pertschy, R.; Engel, G.; Streicher, W.; Leusbrock, I. District energy systems: Modeling paradigms and general-purpose tools. Energy 2018. [Google Scholar] [CrossRef]
  26. Modelisar Consortium and the Modelica Association. Functional Mock-Up Interface for Model Exchange and Co-Simulation, Report Version 2.0.2; 2020. Available online: (accessed on 20 December 2020).
  27. Ochel, L.; Braun, R.; Thiele, B.; Asghar, A.; Buffoni, L.; Eek, M.; Fritzson, P.; Fritzson, D.; Horkeby, S.; Hallquist, R.; et al. OMSimulator—Integrated FMI and TLM-Based Co-simulation with Composite Model Editing and SSP. In Proceedings of the 13th International Modelica Conference, Regensburg, Germany, 4–6 March 2019. [Google Scholar] [CrossRef] [Green Version]
  28. Saloux, E.; Candanedo, J.A. Forecasting District Heating Demand using Machine Learning Algorithms. Energy Procedia 2018, 149, 59–68. [Google Scholar] [CrossRef]
  29. Simpson, T.; Poplinski, J.; Koch, P.N.; Allen, J. Metamodels for Computer based Engineering Design: Survey and recommendations. Eng. Comput. 2001, 17, 129–150. [Google Scholar] [CrossRef] [Green Version]
  30. MathWorks. MATLAB (R2019b); The MathWorks Inc.: Natick, MA, USA, 2019. Available online: (accessed on 15 September 2019).
  31. Bezanson, J.; Edelman, A.; Karpinski, S.; Shah, V.B. Julia: A Fresh Approach to Numerical Computing. SIAM Rev. 2017, 59, 65–98. [Google Scholar] [CrossRef] [Green Version]
  32. Elmqvist, H.; Neumayr, A.; Otter, M. Modia—Dynamic Modeling and Simulation with Julia; JuliaCon: Berkeley, CA, USA, 2017.
  33. EQUA. IDA Indoor Climate and Energy; EQUA Simulation AB: Solna, Sweden, 2019. Available online: (accessed on 15 September 2019).
  34. Schweiger, G.; Nilsson, H.; Schoeggl, J.; Birk, W.; Posch, A. Modeling and simulation of large-scale Systems: A systematic comparison of modeling paradigms. Appl. Math. Comput. 2020, 365, 1–14. [Google Scholar] [CrossRef] [Green Version]
  35. Allegrini, J.; Orehounig, K.; Mavromatidis, G.; Ruesch, F.; Dorer, V.; Evins, R. A review of modeling approaches and tools for the simulation of district-scale energy systems. Renew. Sustain. Energy Rev. 2015, 52, 1391–1404. [Google Scholar] [CrossRef]
  36. Shafto, M.; Conroy, M.; Doyle, R.; Glaessgen, E.; Kemp, C.; LeMoigne, J.; Wang, L.; Elmqvist, H.; Henningsson, T.; Otter, M.; et al. Evaluation of excess heat utilization in district heating systems by implementing levelized cost of excess heat. Energy 2017, 137, 1211–1221. [Google Scholar] [CrossRef]
  37. Termis Simulation Modes. 7-Technologies A/S: Birkerød, Denmark. Available online: (accessed on 15 September 2019).
  38. PSS®SINCAL—Simulation Software for Analysis and Planning. Siemens Aktiengesellschaft: Munich, Germany. Available online: (accessed on 15 September 2019).
  39. Transient System Simulation Tool (TRNSYS). Thermal Energy System Specialists, LLC: Madison, WI, USA. Available online: (accessed on 15 September 2019).
  40. Netsim Grid Simulation. VITEC Software Group AB: Umeå, Sweden. Available online: (accessed on 15 September 2019).
  41. van der Heijde, B.; Fuchs, M.; Ribas Tugores, C.; Schweiger, G.; Sartor, K.; Basciotti, D.; Müller, D.; Nytsch-Geusen, C.; Wetter, M.; Helsen, L. Dynamic equation based thermo-hydraulic pipe model for district heating and cooling systems. Energy Convers. Manag. 2017, 151, 158–169. [Google Scholar] [CrossRef] [Green Version]
  42. del Hoyo Arce, I.; Herrero López, S.; López Perez, S.; Rämä, M.; Klobut, K.; Febres, J.A. Models for fast modeling of district heating and cooling networks. Renew. Sustain. Energy Rev. 2018, 82, 1863–1873. [Google Scholar] [CrossRef]
  43. Schweiger, G.; Gomes, C.; Engel, G.; Hafner, I.; Schoeggl, J.; Posch, A.; Nouidui, T. An empirical survey on co-simulation: Promising standards, challenges and research needs. Simul. Model. Pract. Theory 2019, 95, 148–163. [Google Scholar] [CrossRef] [Green Version]
  44. Bacher, P.; Madsen, H.; Nielsen, H.A. Online short-term heat load forecasting for single family houses. Energy Build. 2013, 65, 101–112. [Google Scholar] [CrossRef] [Green Version]
  45. Grosswindhager, S.; Voigt, A.; Kozek, M. Online Short-Term Forecast of System Heat Load in District Heating Networks. In Proceedings of the 31st International Symposium on Forecasting, Prague, Czech Republic, 26–29 June 2011. [Google Scholar]
  46. Lilis, G.; Giannakis, G.; Katsigarakis, K.; Rovas, D. District-aware Building Energy Performance simulation model generation from GIS and BIM data. In Proceedings of the BSO 2018: 4th Building Simulation and Optimization Conference, Cambridge, UK, 11–12 September 2018; BIPSA: Emmanuel College, University of Cambridge: Cambridge, UK, 2018. [Google Scholar]
  47. Nageler, P.; Zahrer, G.; Heimrath, R.; Mach, T.; Mauthner, F.; Leusbrock, I.; Schranzhofer, H.; Hochenauer, C. Novel validated method for GIS based automated dynamic urban building energy simulations. Energy 2017, 139, 142–154. [Google Scholar] [CrossRef]
  48. Mans, M.; Blacha, T.S.; Remmen, P.; Müller, D. Automated model generation and simplification for district heating and cooling networks. In Proceedings of the 13th International Modelica Conference, Regensburg, Germany, 4–6 March 2019; Haumer, A., Ed.; Modelica Association: Linköping, Sweden, 2019; Volume 157, pp. 179–186. [Google Scholar] [CrossRef] [Green Version]
  49. Nouvel, R.; Schulte, C.; Eicker, U.; Pietruschka, D.; Coors, V. Citygml-Based 3D City Model for Energy Diagnostics and Urban Energy Policy Support. In Proceedings of the BS2013, 13th Conference of International Building Performance Simulation Association, Chambéry, France, 26–28 August 2013. [Google Scholar]
  50. Benner, J.; Geiger, A.; Häfele Ing Joachim Benner, K.H. Virtual 3D City Model Support for Energy Demand Simulations on City Level-The CityGML Energy Extension. In Proceedings of the REAL CORP 2016 21st International Conference on Urban Planning, Regional Development and Information Society, Hamburg, Germany, 22–24 June 2016. [Google Scholar]
  51. Monsalvete, P.; Robinson, D.; Eicker, U. Dynamic simulation methodologies for urban energy demand. Energy Procedia 2015. [Google Scholar] [CrossRef] [Green Version]
  52. SysML© OMG System Modeling Language. The Object Management Group®: Milford, MA, USA. Available online: (accessed on 10 November 2019).
  53. Drath, R.; Luder, A.; Peschke, J.; Hundt, L. AutomationML—The glue for seamless automation engineering. In Proceedings of the 2008 IEEE International Conference on Emerging Technologies and Factory Automation, Hamburg, Germany, 15–18 September 2008; pp. 616–623. [Google Scholar] [CrossRef]
  54. Muñoz, H.; Esteban, M.; Dochev, I.; Seller, H.; Peters, I. Enriching the 3D City-Model for the Simulation of Urban Heat Demand. In Proceedings of the REAL CORP 2016 21st International Conference on Urban Planning, Regional Development and Information Society, Hamburg, Germany, 22–24 June 2016. [Google Scholar]
  55. Remmen, P.; Müller, D.; Lauster, M.R.; Osterhage, T.; Mans, M. CityGML Import and Export for Dynamic Building Performance Simulation in Modelica. In Proceedings of the Third IBSPA—England Conference: Building Simulation and Optimization 2016, Newcastle upon Tyne, UK, 12–14 September 2016. [Google Scholar]
  56. Falay, B.; Schweiger, G.; O’Donovan, K.; Leusbrock, I. Enabling large-scale dynamic simulations and reducing model complexity of district heating and cooling systems by aggregation. Energy 2020, 209, 118410. [Google Scholar] [CrossRef]
  57. Antoulas, A.; Sorensen, D.; Gallivan, K.A.; Van Dooren, P.; Grama, A.; Hoffmann, C.; Sameh, A. Model Reduction of Large-Scale Dynamical Systems. In Computational Science—ICCS 2004; Bubak, M., van Albada, G.D., Sloot, P.M.A., Dongarra, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2004; pp. 740–747. [Google Scholar]
  58. Benner, P.; Stykel, T. Model Order Reduction for Differential-Algebraic Equations: A Survey. In Surveys in Differential-Algebraic Equations IV; Springer International Publishing: Cham, Switzerland, 2017; pp. 107–160. [Google Scholar] [CrossRef]
  59. Braun, W.; Casella, F.; Bachmann, B. Solving large-scale Modelica models: New approaches and experimental results using OpenModelica. In Proceedings of the 12th International Modelica Conference, Prague, Czech Republic, 15–17 May 2017; pp. 557–563. [Google Scholar] [CrossRef] [Green Version]
  60. Agosta, G.; Baldino, E.; Casella, F.; Cherubin, S.; Leva, A.; Terraneo, F. Towards a High-Performance Modelica Compiler. In Proceedings of the 13th International Modelica Conference, Regensburg, Germany, 4–6 March 2019; pp. 313–320. [Google Scholar] [CrossRef]
  61. Henningsson, E.; Olsson, H.; Vanfretti, L. DAE Solvers for Large-Scale Hybrid Models. In Proceedings of the 13th International Modelica Conference, Regensburg, Germany, 4–6 March 2019; pp. 491–502. [Google Scholar] [CrossRef] [Green Version]
  62. Fernández, J.; Kofman, E. A stand-alone quantized state system solver for continuous system simulation. Simulation 2014, 90, 782–799. [Google Scholar] [CrossRef] [Green Version]
  63. Casella, F.; Bartolini, A.G.; Leva, A. Equation-Based Object-Oriented modeling and simulation of large-scale Smart Grids with Modelica. IFAC-PapersOnLine 2017, 50, 5542–5547. [Google Scholar] [CrossRef]
  64. Ljung, L.; Glad, T. Modeling and Identification of Dynamic Systems; Studentlitteratur AB: Lund, Sweden, 2016. [Google Scholar]
  65. Ljung, L.; Goodwin, G.C.; Agüero, J.C.; Chen, T. Model error modeling and stochastic embedding. IFAC-PapersOnLine 2015, 48, 75–79. [Google Scholar] [CrossRef]
  66. Harty, D. The myth of accuracy. J. Eng. Integr. Soc. 2001, 9, 22–28. [Google Scholar]
  67. Sakoe, H.; Chiba, S. Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans. Acoust. Speech Signal Process. 1978, 26, 43–49. [Google Scholar] [CrossRef] [Green Version]
  68. Levenshtein, V.I. Binary codes capable of correcting deletions, insertions, and reversals. Sov. Phys. Dokl. 1966, 10, 707–710. [Google Scholar]
  69. Hermann, M.; Pentek, T.; Otto, B. Design Principles for Industrie 4.0 Scenarios. In Proceedings of the 2016 49th Hawaii International Conference on System Sciences (HICSS), Koloa, HI, USA, 5–8 January 2016; pp. 3928–3937. [Google Scholar] [CrossRef] [Green Version]
  70. Zipper, H.; Auris, F.; Strahilov, A.; Paul, M. Keeping the digital twin up-to-date—Process monitoring to identify changes in a plant. In Proceedings of the 2018 IEEE International Conference on Industrial Technology (ICIT), Lyon, France, 20–22 February 2018; pp. 1592–1597. [Google Scholar] [CrossRef]
  71. Gerdin, M.; Schön, T.B.; Glad, T.; Gustafsson, F.; Ljung, L. On parameter and state estimation for linear differential—Algebraic equations. Automatica 2007, 43, 416–425. [Google Scholar] [CrossRef] [Green Version]
  72. Andersson, C.; Gedda, S.; Åkesson, J.; Diehl, S. Derivative-free Parameter Optimization of Functional Mock-up Units. In Proceedings of the 9th International Modelica Conference, Munich, Germany, 3–5 September 2012. [Google Scholar]
  73. Grieves, M. Digital Twin: Manufacturing Excelence through Virtual Factory Replication; Technical Report; Florida Institute of Technology: Melbourne, FL, USA, 2014. [Google Scholar]
  74. Council, N.R. NASA Space Technology Roadmaps and Priorities: Restoring NASA’s Technological Edge and Paving the Way for a New Era in Space; The National Academies Press: Washington, DC, USA, 2012. [Google Scholar] [CrossRef]
  75. Boschert, S.; Rosen, R. Digital Twin—The Simulation Aspect. In Mechatronic Futures; Springer International Publishing: Cham, Switzerland, 2016; pp. 59–74. [Google Scholar] [CrossRef]
  76. Lamnabhi-Lagarrigue, F.; Annaswamy, A.; Engell, S.; Isaksson, A.; Khargonekar, P.; Murray, R.M.; Nijmeijer, H.; Samad, T.; Tilbury, D.; Van den Hof, P. Systems & Control for the future of humanity, research agenda: Current and future roles, impact and grand challenges. Annu. Rev. Control. 2017, 43, 1–64. [Google Scholar] [CrossRef]
Figure 1. The graphical user interface made using MATLAB.
Figure 1. The graphical user interface made using MATLAB.
Resources 10 00010 g001
Figure 2. Graphical view of the Dymola model, featuring a branch of the district heating grid. The model is automatically generated from GIS data, including district heating pipes, nodes, and consumers, where the size of the consumer reflects the annual heat load.
Figure 2. Graphical view of the Dymola model, featuring a branch of the district heating grid. The model is automatically generated from GIS data, including district heating pipes, nodes, and consumers, where the size of the consumer reflects the annual heat load.
Resources 10 00010 g002
Figure 3. Graphical view of the Dymola model of a production unit. The model is manually modeled from a piping and instrumentation (P&I) diagram and includes components such as pumps, valves, and boilers.
Figure 3. Graphical view of the Dymola model of a production unit. The model is manually modeled from a piping and instrumentation (P&I) diagram and includes components such as pumps, valves, and boilers.
Resources 10 00010 g003
Figure 4. Automatic control structure for the pump station in Simulink, recreated from diagrams.
Figure 4. Automatic control structure for the pump station in Simulink, recreated from diagrams.
Resources 10 00010 g004
Figure 5. Simulation of the Luleå grid over 10 days in January for a temperature scenario going from −5 C to −30 C and returning in the end to −15 C.
Figure 5. Simulation of the Luleå grid over 10 days in January for a temperature scenario going from −5 C to −30 C and returning in the end to −15 C.
Resources 10 00010 g005
Figure 6. Basic setting for the validation and update of a model.
Figure 6. Basic setting for the validation and update of a model.
Resources 10 00010 g006
Figure 7. Principle sketch of the composition of the replicated system consisting of both physical and cyber components fully interconnected. Each connection can contain a multitude of physical or signal interconnections that are potentially directed. In the figure u are the inputs to the system, y are the outputs from the system, and d are exogenous inputs.
Figure 7. Principle sketch of the composition of the replicated system consisting of both physical and cyber components fully interconnected. Each connection can contain a multitude of physical or signal interconnections that are potentially directed. In the figure u are the inputs to the system, y are the outputs from the system, and d are exogenous inputs.
Resources 10 00010 g007
Table 1. District heating and cooling grid modeling levels, based on IRENA power grid modeling levels.
Table 1. District heating and cooling grid modeling levels, based on IRENA power grid modeling levels.
Hierarchical LevelTime Resolution
Planning and design modelsSeasons-years
Economic modelsHours-seasons
Static grid modelsSingle point
Dynamic thermal grid modelsMinutes-hours
Dynamic hydraulic and electrical grid modelsMilliseconds-minutes
Table 2. Consumed CPU time for simulation of 10,000 s using the solver LSODAR for three different cases.
Table 2. Consumed CPU time for simulation of 10,000 s using the solver LSODAR for three different cases.
Simulation CaseCPU Time
Continuous inputs11.7 s
Sampled inputs41.3 s
Sampled inputs and fast dynamics2360 s
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Simonsson, J.; Atta, K.T.; Schweiger, G.; Birk, W. Experiences from City-Scale Simulation of Thermal Grids. Resources 2021, 10, 10.

AMA Style

Simonsson J, Atta KT, Schweiger G, Birk W. Experiences from City-Scale Simulation of Thermal Grids. Resources. 2021; 10(2):10.

Chicago/Turabian Style

Simonsson, Johan, Khalid Tourkey Atta, Gerald Schweiger, and Wolfgang Birk. 2021. "Experiences from City-Scale Simulation of Thermal Grids" Resources 10, no. 2: 10.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop