Impacts of thermal energy storage on the management of variable demand and production in electricity and district heating systems: a Swedish case study

ABSTRACT This study investigates how thermal energy storage (TES) influences the cost-optimal investment and operation of electricity and district heating (DH) systems in different scenarios. Greenfield energy system modelling for Year 2050 with a high time resolution shows that sensible TES strategies have a strong impact on the composition and operation of the DH system in all investigated scenarios. The introduction of TES displaces to a significant extent the heat-only boilers in all scenarios and can promote solar heating in small DH networks. The modelling shows that TES also promotes the use of power-to-heat processes and enables combined heat and power plants to increase full-load hours, with simultaneous adaptation to the variable production in the electricity system. A major benefit derived from TES is the ability to respond to rapid variations in the electricity system. Thus, the pit and tank storage systems with higher (dis)charging capacities are preferred over borehole storage.


Introduction
In response to the global threat posed by climate change and dramatic reductions in the costs of variable renewable energy (VRE) sources, in particular wind and solar power, the use of VRE is expected to increase and become more widespread over the coming decades (IEA 2017). Consequently, flexibility measures, sometimes referred to as different variation management strategies (VMS), are likely to become more important in terms of increasing the value of VRE and reducing energy curtailment. The available VMS in the electricity sector include the use of batteries, demand-side management (DSM), pumped hydro, flexible thermal generation, and power-to-fuels processes, e.g. hydrogen production from electrolysis. In the district heating (DH) sector, a well-established VMS is sensible thermal energy storage (TES), which is used to manage both short-term and long-term variations. The most common TES system, tank TES (TTES), is frequently used in combination with conventional heat generation technologies, in order to meet short-term load variations, and is sometimes also used as seasonal storage (Sarbu and Sebarchievici 2017). Pit TES and borehole TES (PTES and BTES) are mostly used for seasonal storage, often in combination with solar heating (PlanEnergi n.d.; Sibbit et al. 2012). Ummels, Pelgrum, and Kling (2007) have concluded that the investment cost is a limiting factor for storage solutions in the electricity sector, and that electric boilers are efficient in promoting wind power. Since thermal storage capacity is less costly than batteries or electrolysers with hydrogen storage, TES could be an interesting VMS also for the electricity sector. Especially if it is connected to the heating sector by Power-to-Heat (PtH) technologies and combined heat and power (CHP) plants. The effects on the electricity sector will depend on whether and in what way the operation of these heat production technologies changes based on electricity prices. Romanchenko et al. (2017) have shown that both the variations in electricity price and the average price of electricity affect the operation strategies of CHP plants and heat pumps (HPs). More specifically, in a scenario with high levels of wind power but without nuclear power, they have reported that the resulting price fluctuations cause the HPs to be started up more frequently and run for short periods, whereas a higher average price results in more heat being produced by CHP plants and less heat being produced by HPs. Furthermore, Mollenhauer, Christidis, and Tsatsaronis (2018) and references therein have confirmed that HPs and TES allow the DH system to take advantage of fluctuating electricity prices. Johansson and Göransson (2019) have modelled several VMS in the electricity sector, dividing them into three categories: absorbing (e.g. electricity-to-fuel); complementing (e.g. flexible thermal power); and shifting strategies (e.g. batteries). They have concluded that absorbing VMS (in their work represented by electric boilers combined with a static value of heat) are effective at promoting wind investments irrespective of regional wind conditions. However, complementing strategies (such as flexible biomass power) have been found to be the VMS that are most effective at increasing the VRE share with less favourable wind conditions, thereby reducing the initial wind shares. Kiviluoma, Rinne, and Helistö (2017) have also included TES in the different flexibility measures in their model, which describes the electricity system during three representative weeks of one year. The results show that TES is more effective at reducing the system cost than either batteries or DSM, even if power-to-heat is not available; however, HPs (without TES) are even more effective, in terms of both reducing the system cost and increasing the wind energy share. Chen et al. (2014) have compared the effects of electric boilers (EBs) and TES and have concluded that EBs effectively reduce wind curtailment, while TES increases the total energy efficiency of the system. In the work conducted by Kiviluoma, Rinne, and Helistö (2017), heat storage is represented by the well-established water tanks (TTES), as is the case in most modelling studies with TES (e.g. Wang et al. 2015;Chen et al. 2014;Nuytten et al. 2013;Mollenhauer, Christidis, and Tsatsaronis 2018). However, a few studies have considered other types of TES. For example, Dominković et al. (2015) have reported that PTES used in the same system as a biomass CHP plant is economically beneficial and efficient for peak shaving and supply during plant down-time. Moreover, a DH system in Canada has achieved a solar heating share of >90% using BTES with TTES as a buffer (Sibbit et al. 2012). Different TES technologies are, however, not simultaneously included in the modelling in those studies. This raises the question of which TES technologies fit best to a particular system and which characteristics are most important in the design of heat storages for the purpose of increasing VRE penetration and improving DH operation. The extent to which different TES technologies interact differently with other VMSs (DSM, H 2 -storage and batteries) also requires their simultaneous implementation in a model.
The aims of the present work were to investigate: . The extent to which the availability of TES affects the usage of VRE technologies under different system conditions; . How TES affects investments in, and operation of, heat generation technologies; . The extent to which TES interacts with other VMSs, and the ways in which different types of TES interact with each other.
In order to answer these questions, the model applied in this paper allows for investments in TTES, PTES, and BTES, which allows for an analysis of their respective roles and possible interactions with each other. Similar to the models applied by Romanchenko et al. (2017), Mollenhauer, Christidis, and Tsatsaronis (2018), and Johansson and Göransson (2019), the model applied in the present work is a combined investment and dispatch model which minimises the total system cost, has a long time-horizon (1 year) and a high level of temporal resolution (every third hour). The combination of a long time horizon and a high level of temporal resolution is vital to capture both fast TES use for demand peak-shaving and slow use for seasonal shifting of energy. The model has net-zero CO 2 emissions as a constraint, uses technology data assumed for Year 2050, and does not take existing generation capacity into account. This Greenfield approach makes the model suitable for examining the potential effects of TES on the cost-optimal technology mix.

Methodology
This work investigates TES as a VMS by examining its effects on VRE utilisation, as well as the investments made in and the operation of DH technologies. This is achieved by modelling different scenarios, as described in the Model scenarios section, applying the single-region, Greenfield investment model presented by Göransson et al. (2017), which in this work is expanded to include a description of the DH sector. One of the scenarios also includes other VMS (DSM, H 2 -storage, and batteries), in order to investigate interactions (if any) with TES. Each TES (TTES, PTES and BTES) is also included in the model separately, for investigation of their interactions. A list of all the available generation and VMS technologies and their economic and technical properties can be found in Appendix A, Tables A1-A6. Due to the assumption of net-zero CO 2 emissions, fossil fuels are not included, with the exception of natural gas (NG), which is mixed with biogas in a net-zero emissions CCS technology. Net-negative CCS technologies are not considered in the present study. Municipal waste is regarded as a renewable fuel in this work, despite its emissions, since incineration may be preferred over landfilling. The model is also designed to account for the variabilities associated with generation technologies, including the cycling costs of thermal generation.
In the present work, the model is deployed to a region in Sweden corresponding to Nord Pool price area SE3 (the Stockholm-Gothenburg zone) and uses projected technology data for Year 2050. Nonetheless, this study does not attempt to make any regionor year-specific predictions, but rather uses regional data to capture correlations between wind and solar availability on the one hand and electricity and heat demand on the other hand.

District heating type systems
The integration of DH into the existing model requires a simplified description of the many geographically isolated DH networks. Since optimising each DH network with investments and demand would significantly increase the run-time of the model, the number of unique DH systems has to be restricted. Based on the work of Goop (2012), classes of DH networks are instead selected and implemented as aggregated-type systems with annual heat demands based on the total demand share of its represented networks in the chosen region. For the present work, three such 'type systems' are selected to represent small (A), medium (B), and large (C) DH networks with annual heat demands of 7%, 17%, and 11% of the annual electricity demand, respectively. Then, each type system has access to technologies that are appropriate to its size, so that, for example, the type system representing small DH networks cannot invest in large CHP plants, making generation capacity more expensive in smaller systems. The different technologies that are available for each type system are shown in Appendix A, Tables A2 and A3. Although there is some variation in the heat demand profiles across a given region owing to sub-regional weather differences, all the type systems in the SE3 region are assumed to share the heat profile of the city of Gothenburg to reduce model complexity and limit the solving-time. The effects of this assumption is discussed in the Discussion section.

Implementation of TES
The heat generation in a DH system can be disconnected from the heat demand in both the short and long terms by storing heat in a suitable medium (typically water), in tanks (TTES), pits (PTES) or boreholes (BTES). While other types of TES exist, for example, aquifers (ATES), they are not implemented in the model due to their specific requirements for local geological formations. To utilise stored heat at temperatures lower than the DH feed temperature (80°C), a HP can be used between the TES and the DH network. While this raises the storage capacity per volume and thereby decreases the investment cost per storage capacity, it limits the discharge capacity to the size of the HP. Whether or not a HP is used in a certain storage system depends on the water temperature (Pla-nEnergi n.d.), and since this temperature is varying within a broad range, the coefficient of performance (COP) of the HP also varies. In the present work, these non-linear relations are simplified such that the choices with regard to the deployment of HP are represented by two separate technologies, and the COP of the HP is assumed to have a value of 6 for TTES and PTES, and 5.5 for BTES. These COP values are based on an HP assumed to raise the temperature from an average storage temperature of 40-45°C to the DH temperature of 80°C with a system efficiency of 60%. While TTES and PTES can be installed with or without a HP, BTES is only implemented with a HP due to its geothermal limitations on high temperatures. The possible consequences of these simplifications are discussed in the Discussion section. Thermal stratification is also excluded from the descriptions of TES in the model, although it is included in the sensitivity analysis. The water in the storage units is instead assumed to be perfectly mixed, which increases the investment cost by reducing the storage capacity per volume, and therefore underestimates the impact of TES. The different TES technologies are not restricted to specific type systems, since even the largest existing pit storage units are connected to small networks (Acron-Sunmark n.d.; PlanEnergi n.d.). However, a type A system must use the more expensive small HP instead of the large one for the PTES. The properties of the TES units used is presented in Appendix A, Table A6.

Variation management strategies (VMS)
The analysis and description of the different TES units in this paper use the VMS categories of shifting, absorbing, and complementing technologies, as defined by Göransson and Johnsson (2018). In brief, a shifting VMS is short-term and operates within one sector, where it stores energy for later use or moves the demand in time (e.g. DSM and batteries). An absorbing VMS in the electricity system uses electricity in a flexible new process or converts the electricity to another energy carrier (e.g. hydrogen), to allow it to be used in another sector. As complementing VMS fill the gaps in the generation of VRE, they may be either flexible generation or a technology that can convert absorbed energy back to electricity (e.g. fuel cells). A long-term energy storage system may act as a combined absorbing and complementing VMS.

Energy systems model
This work has integrated district heating into a linear optimisation model given by Göransson et al. (2017) and solved using the Cplex solver in GAMS. While the objective function and additions for this study are explained below, constraints relating to the operation of units can be found in Göransson et al. (2017). This model was chosen because it combines a high time-resolution with a long horizon to capture both short-and long-term variations as well as both hourly and seasonal usage of thermal storages. Note that even though they are included in this work, VMSs other than TES are excluded from the equations for simplicity and can be found elsewhere (Johansson and Göransson 2019).
The main decision variables are: installed capacity (s i,k ), generation (p i,t for electricity and q i,k,t for heat) and storage charge (z ch i,k,t ) and discharge (z dis i,k,t ). The sets i, k and t represent technology, type system and timestep, respectively. All sets, parameters and variables shown in this section are listed in Table 1. It should be noted that the electricity system is included in the type system set, K, as El to avoid having duplicate variables. The objective function to be minimised in the model is the total system cost, which after the integration of the DH sector, can be simplified as: where for each technology, both the investment, running and cycling costs are summed -first for technologies in the electricity system (I El ) and then for the DH system (I HO ) and its type systems (K). Costs associated with CHP plants are included in the first sum since the implemented costs are based on electricity generation. Some constraints are also added or modified for the purposes of the present study. As shown in Equations (2) and (3), the electricity and heat demand need to be satisfied in every time-step and in every type system.
In Equation (2), DSM measures are included in z i,El,t and further restricted according to equations found in Johansson and Göransson (2019) and described in the following section (Model scenarios). In Equation (3), the discharge from the TES units with HP is included in the summation over q i,k,t as the output from the HPs. Naturally, either electricity production (p i,t ) or heat generation (q i,t ) is always zero for all technologies except the CHPs, for which we assume a fixed power-to-heat ratio. Therefore, it holds that: for power-to-heat ratios (a i ) which can be found in Table A3 in Appendix A. The different TES units cannot charge and discharge the storage faster than the C-factor allows, and if the storage is discharged via a HP the discharge from the storage must also correspond to the generation of the accompanying HP. This may be written as follows: where z ikt in the first equation represents either charge or discharge. The parentheses following q i HP ,kt account for the heat added by the electricity use of the HP. The storage balances can now be written as: The constant-loss factor L c i is zero for the TES types with HP owing to their low minimum temperatures. For the other storage systems, where an empty storage represents a temperature of 80°C, this factor ensures that the heat loss is not zero at 80°C but instead equals the losses of the storage with HP at the same temperature. Since q i,k,t is a variable with a positive value, the system is forced to compensate for the constant losses (by charging) also during periods when the storage is not used.

Model scenarios
The effects of TES are investigated through the implementation of four different model scenarios with different system conditions: Base, LowFlex, Tax, and AllVMS. All scenarios are implemented with and without the opportunity to invest in TES and can be found in Table 2. In the Base scenario, all heat and electricity generation technologies (listed in Appendix A) described in the model are included. In the LowFlex scenario, the cost of flexible generation is higher due to a doubled cost for biomass (to 60 €/MWh), no municipal waste being available as fuel, and only 10% of the usual hydropower being available (both in terms of energy and capacity). This is used to examine the effects of TES when there is low intrinsic system flexibility. The Tax scenario, as compared to the Base scenario, adds an electricity tax of 34 €/MWh for power-to-heat production and a transmission fee of 10 €/MWh for power-to-heat and electrolysers. This tax and fee are in effect in the Stockholm-Gothenburg region during the first half of 2018 (E.ON Energidistribution AB 2018).
In the AllVMS scenario, VMS other than TES (DSM, hydrogen storage, batteries) are added to the technologies available in the Base scenario, so as to examine their interactions with TES. In all of the scenarios, 20% of the annual electricity demand is replaced by an industrial hydrogen demand to facilitate the comparison of TES and hydrogen storage as VMS. This can be compared to the demand for electricity for hydrogen production for the Swedish steel industry, which is expected to correspond to 10% of the annual electricity demand (or 15 TWh) alone (Hybrit 2018). DSM is implemented so that up to 20% of the hourly electricity demand can be delayed for up to 6 hours. The share of the electricity demand available for DSM corresponds to roughly two-thirds of the Swedish household electricity consumption (SCB 2018). The time which the demand can be delayed is in line with the number of hours heat demand in single-family dwellings can be delayed without substantial impact on comfort (Nyholm et al. 2016). In addition, the Base and LowFlex scenarios are implemented with only one type of TES being available at a time, in order to detect interactions between them.

Sensitivity analysis
Thermal stratification within the TES is, depending on the storage design, a naturally occurring phenomenon that can increase performance by not mixing the incoming hot water with colder water, thereby preserving exergy in the TES (Njoku et al. 2014). For example, this enables a tank storage that operates between the DH feed and return temperatures to discharge water at the temperature of the DH feed even though the average temperature in the storage unit is lower. Chen et al. (2014) have modelled this by assuming the existence of three separate zones in the tank: a hot part at the top; an intermediate temperature part in the middle; and a cold part at the bottom. The TES units in this work are implemented as being perfectly mixed. However, since a real TES operates in a state somewhere between fully mixed and perfectly stratified, depending on factors such as design and various destratification mechanisms (Njoku et al. 2014), both alternatives are tested in the sensitivity analysis to demonstrate differences in system impacts. However, it should be noted that due to the relatively large surface area of a pit storage unit, stratification would likely be less prevalent than in a tank storage system. To supply the DH feed temperature from the fully mixed alternative also when the storage is only partly filled, the temperature interval used for these TES units is 80°-95°C, while the TES units that are assumed to be stratified are implemented with a temperature interval of 40°-95°C. This both reduces the passive losses and increases the storage capacity per volume. Specifically, this makes the investment cost of the mixed TES unit 3.7-fold higher than that of the stratified TES.
To investigate the importance of discharge capacity, the C-factors for the no-HP TES units are varied between 50% and 150% of the original C-factor when these TES units are included separately in the LowFlex scenario. These C-factors are also replaced by fixed (no-cost) discharge capacities in the model, corresponding to the original C-factors and resulting storage investments. The system sensitivity to TES investment costs is also tested in two cases (based on the LowFlex scenario) where the costs are increased by 25% and decreased by 25%, respectively. Figure 1 shows the cost-optimal generation capacities for the electricity and DH systems obtained from the modelling in this work of the SE3 region. The total system cost, total TES cost, and curtailment, as well as the VRE, wind, PtH, and CHP shares for each scenario are listed in Table 3. The total TES sizes for all the scenarios are given in Table 4. Figure 2 shows the generation over a 4-week period in the LowFlex scenario with: (a) no TES (a); (b) TTES without HP; (c) PTES without HP; and (d) PTES with HP. Finally, Table 5 shows the results of comparing the impacts of the various TES types in the LowFlex scenario.

Results
Looking at the Base scenario in Table 3, one of the effects of introducing TES is reduced wind curtailment. The reduction in curtailment mainly stems from a shift in the DH systems from load-following to opportunistically using CHP and PtH. This opportunistic use has both absorbing and complementing effects on the electricity system and improves the electricity net-load following of the CHP plants. Even though the effect on the total wind investments is small, as can be seen in Figure 1(a), the absorbing effects of TES result in a shift from investments in off-shore wind power to investments in on-shore plants, entailing lower investment costs but more-variable wind profiles. The opportunistic use of CHP and PtH also results in a lower total heat generation capacity if TES is available (see Figure 1(b)). The presence of TES mainly reduces investments in heat-only boilers (HOBs), which represent peak generation in the DH systems.
In the LowFlex scenario, where the electricity price is both higher and more volatile than in the Base scenario, the reduction of wind curtailment brought about by TES increases the value of new wind power investments enough to replace a significant part of the (base) nuclear capacity with wind power, as shown in Figure 1(a). Some other effects can be identified for the LowFlex scenario in Table  3, namely a decreased share of CHP heat when TES are included, and with high investments in TES compared to the other cases. The CHP share decreases due to the complementary potential of PTES, which displaces the, for this scenario expensive, wood chip CHP. This leaves only the biogas CHP  Note: All units are in GWh, and all TES units are available for investments in the system scenarios. with lower investment costs and fewer full-load hours than the wood chip CHP. In a broader context, this is an example of how TES allows the system to replace the use of expensive fuels with cheaper but intermittent PtH (as can be seen in both Figure 1 and Table 3). These effects on DH operation are also evident when comparing Figure 2(a and c). Compared to simply smoothening the CHP production curves, the opportunistic use of PtH has a stronger impact on the cost of the system but requires a larger TES unit due to the large fluctuations in wind power.
In the Tax scenario, the electricity system is not affected by the absorbing effects of TES. PtH is less valuable and is decreased when TES is added, which causes the increased wind curtailment. The shift to on-shore wind still occurs due to the complementing effects of TES in the DH system, which makes it possible for a CHP plant to decrease significantly its output during windy hours. As shown in Figure 1, TES promotes solar heating rather than PtH in this scenario. However, even with a high share of solar heat, the no-HP TES is cost-optimal and solar heat is only stored until the end of the summer.
In the AllVMS scenario, the electricity system also has little to gain from the absorbing effects of TES. Therefore, the main change that occurs is that the peak HOB in type system C is replaced by stored heat from the CHP. This increase in CHP production in the electricity system naturally decreases the investments in wind power. Comparing the impact of TES on the total system costs in the Base and AllVMS scenarios (Table 3), it is clear that there are significant additive effects between TES and DSM and H 2 storage. Batteries are not found to be cost-optimal in the system. Figure 1. Cost-optimal electricity (a) and heat (b) generation capacities obtained from the modelling for the SE3 region. All labels for capacities <0.35 GW are omitted for clarity. See Appendix B for the heat generation capacity in each separate type system.
When allowing for only one TES type at a time, some distinct differences become apparent in the ways that they affect the system composition and operation. In Figure 2, the operation of type system C (largest DH systems) together with the electricity price is shown for the LowFlex scenario without heat storage for 28 days in late winter. Large variations in the electricity price occur at certain times, and the operations of the CHP plants and HPs react accordingly.
As illustrated in Figure 2(b), allowing for investments in TTES without HP gives scope for underor over-production of heat. However, the detachment from the heat load is short-term due to the relatively high energy storage cost of TTES. Still, this detachment allows for lower electricity Figure 2. Heat generation and electricity price in the LowFlex scenario with type system C for 4 weeks in February-March. Panel (a) shows the generation in a system without any TES, while panels (b) and (c) show the levels of generation in systems with TTES and PTES without accompanying heat pumps, respectively. The system used in panel d also uses PTES but with an accompanying heat pump. The resulting TES (dis)charge capacities in panels b, c, and d are 1.5, 1.9, and 0.6 GW, respectively. consumption during low-wind hours and smoother operation of both the CHP plants and HPs. Furthermore, the electricity price is slightly more stable with TES, which can be seen by comparing the electricity prices around Day 60 in Figure 2(a and b). The discharge capacity for the storage in Figure  2(b), which depends exclusively on the storage size and predefined C-factor (since no HP is used), is 1.5 GW and it limits the amount of discharged heat during approximately 30 hours throughout the year. The TTES with HP (not included in the figure) has effects similar to those of the no-HP TTES but is more expensive due to the discharge-limiting HP, so the impacts are insignificant in the system examined in this work (see Table 5).
Figure 2(c) shows the operation of DH type system C for the same 28 days when allowing for investments in PTES without HP. Being pit storage, it has been implemented with a cheaper energy storage cost than the corresponding tank storage. This results in a larger storage unit and thus longer detachments from the heat load curve. Comparing Figure 2, panels b and c, it is clear that this longer detachment with PTES has a strong impact on the operation of the PtH technologies, which for longer periods at a time are shut down because of low VRE production and higher electricity prices. As a consequence, the HP runs at higher output and over-produces for longer periods of time when the electricity price is lower. The PTES without HP can be considered as having a shifting role in the DH system in the LowFlex scenario, while it acts more as an absorbing and complementing VMS in the Base scenario. This is because the availability of waste and cheap biomass promotes the use of CHP plants, which mainly benefit from TES through a smoothened production curve and increased number of full-load hours. Correspondingly, the role of TES changes from shifting PtH production to complementing or absorbing CHP production.
If instead only PTES with HP is available, the storage capacity increases almost 3-fold, from 382 GWh to 941 GWh. However, the discharge capacity is reduced from 1.9 GW to 0.6 GW due to the relatively high cost of the HP. In addition, as shown in Table 5, the system cost benefit is reduced from 274.4 M€/year to 59 M€/year. Figure 2(d) also shows that the cost-optimal DH system differs significantly when using PTES with HP rather than PTES without HP. The opportunistic and electricity price-dependent behaviour seen in Figure 2(c) is not as apparent in Figure 2(d), where instead there is a shift between using CHP or PtH when the electricity price changes. However, the PTES in Figure 2(d) does allow for long-term detachment from the heat load curve and has a net discharge of 217 GWh during the displayed 4 weeks. The heat that the PTES discharges during winter is mostly absorbed from the DH system in the July to September period, and the net discharge occurs mostly to complement the heat generation during periods of high demand. Therefore, in this case, PTES can be regarded as assuming the role of a long-term absorbing and complementing VMS, alternating between the roles depending on the season. This, combined with the high price of biomass, is why PTES also promotes investments in solar heat (in contrast to the no-HP PTES case).
When allowing for only BTES, investments only occur in type system A, in which the generation technologies are more expensive and the effects on the system are weak (see Table 5). The total storage capacity is 334 GWh, and the discharge capacity (0.1 GW) is limited by the C-factor. With a heat generation pattern that follows the load very closely on an hourly basis and daily basis, but with a constant discharge of the BTES during the winter and charging during the summer, the effects of BTES differ significantly from the other TES types and do not match any of the VMS categories. BTES slightly increases the value of wind by using curtailed energy during summer, although it exerts very weak effects on the system's ability to manage the variations.
It is evident from Table 5 that PTES without HP has the strongest effect on the system, followed by TTES without HP. Consequently, the scenario with all TES, in addition to investing mainly in PTES, also includes a small investment in no-HP tank storage. The benefit of TTES over PTES in the model is a slightly lower investment cost per discharge capacity (11.3 €/kW compared to 14.9 €/kW) through the C-factor. However, due to the discharge capacity that has already been introduced through the PTES in the case with all TES, the TTES adds very little extra value, as can be seen in Table 5. Therefore, it can be concluded that the different TES only systems are slightly complementary but mainly compete with each other, with PTES able to provide most of the TES system services.
In summary, in the electricity system, TES is found to have mostly absorbing effects, although it sometimes also has complementing effects. In the DH system, however, pit storage (PTES) without a HP and tank storage (TTES) have shifting effects, while PTES with and without HP can act as absorbing/complementing VMS, smoothing the operation and reducing the required capacity, depending on the system composition. Figure 3 compares the impacts of mixed and stratified TES on system costs and vRE shares for the electricity and DH systems investigated. It is evident that the difference in system costs between the mixed TES and stratified TES is similar to that of having no TES or mixed TES. However, the impact on VRE share is less consistent. In the three scenarios (Base, AllVMS and Tax), the stratified TES increases significantly the VRE share compared to either no TES or mixed TES. Instead, the LowFlex case receives a strong impact from the mixed TES, and there is virtually no change in the VRE share between the mixed TES and stratified TES. In the LowFlex scenario, investments in wind power increase significantly as TES is made available, mainly because the TES stimulates an increased share of heat from opportunistically operated PtH. However, already with mixed TES, PtH supplies 99% of the heat demand in the DH systems. Thus, a stratified TES has a low possibility to enhance further opportunistic consumption of electricity for this scenario.

Sensitivity analysis results
Not shown in Figure 3, but included in the VRE indicator, is the difference in solar heating level between the mixed TES and stratified TES. As shown in Figure 1, the mixed TES removes all solar heating, except in the Tax scenario. Instead, the stratified TES makes solar heating the main source of heat in type system A (small towns) in all cases. While the stratified TES in all other aspects amplifies the effects of the mixed TES, this trend of supporting solar heating in type system A even without taxes represents a significant deviation in the effects of stratified TES.
The sensitivity analysis concerning the C-factor, carried out in the no-HP TTES and no-HP PTES cases of the LowFlex scenario, shows that the storage volume of the PTES becomes considerably over-dimensioned in order to obtain a larger discharge capacity. This also occurs for the TTES in some cases, although investments in this TES are mostly driven by a demand for storage. It is, however, cost-optimal for all cases to fill the entire existing storage capacity during some hours, even if a smaller storage unit (with the same discharge capacity) would be preferred, if such were possible. There are, however, no qualitative differences in the system composition in the different cases of this sensitivity analysis. The cost-sensitivity analysis is also performed in the LowFlex scenario, where the costs of all TES units are initially increased, and thereafter decreased by 25%. While decreased investment costs result in a shift from investments in PTES without HP to PTES with HP, increased investment costs instead shift investments towards more no-HP TTES, which has a cheaper discharge capacity. However, there are no qualitative changes in the effects on the system, and the discharge capacity is still the main driving factor for no-HP PTES investments.

Discussion
By examining the different types of TES in various scenarios, this study aims to further current knowledge of how TES influences energy systems on a large system scale. The implementation of TES in this study includes a range of options related to storage and discharge capacity cost, as well as losses. As is evident from the weak system impact of BTES and the persistent tendency to favour TES without HP, the discharge capacity is of major importance in terms of the usage and system benefits of TES for the system investigated. However, since pit storage often is preferred over tank storage (which is slightly cheaper per discharge capacity), there is a balance between the discharge and storage capacities and this falls within the spectrum of TES as implemented in the model. The importance of the discharge capacity for TES investment is discrepant with a similar study of VMS and variable power generation conducted by Kiviluoma, Rinne, and Helistö (2017), in which the storage capacity was proposed as the driving factor for heat storage investments. However, that study only included tank storage systems (without HPs), which in this study are less discharge-driven than pit storage systems. Kiviluoma et al. did not specify how the discharge capacity was limited, so a comparison of the imposed restrictions is not possible. A recommendation for future work is thus to examine further the physical and economical limitations of TES (dis)charge, so as to implement the most appropriate model constraints and strengthen the TES design recommendations.
A crucial outcome of the present study is the effects of TES on the electricity system, specifically that the effects are weak unless the level of flexibility is low and biomass is scarce. Kiviluoma, Rinne, and Helistö (2017) studied the impacts of a wide range of VMS using the LP model Balmorel (Wiese et al. 2018) and found that TES, when combined with PtH, significantly affected both the system cost and electricity generation. However, Kiviluoma et al. had a significant portion of old (fossil) capacity still available, combined with a CO 2 tax instead of a strict zero-limit on CO 2 emissions as applied in this work. In a system dominated by thermal generation, TES is likely to have a stronger impact, since the operation of expensive thermal power can be reduced, in similarity to how TES has a significant impact on the electricity system in the LowFlex scenario in the present study.
We show that TES has an absorbing effect on the electricity system. While Johansson and Göransson (2019) have found that absorbing VMS (EBs) are effective in promoting wind power, a significant increase in the level of wind investment is only seen in the LowFlex scenario of the present work. However, the case with EB that was investigated by Johansson and Göransson (2019) did not include cheap biomass. With a high price for biomass and no municipal waste, TES can have significant effects on the (total) wind investments even if there is already a large (>50%) wind energy share in the system, due to complementing hydropower.
The very limited (dis)charge of the BTES in the current modelling results in effects on the DH system that do not properly fit with the categories of shifting, absorbing, and complementing VMS. While BTES can shift some demand from winter to summer, it scarcely helps the system to manage variations from wind or solar power. Furthermore, the large-scale perspective in this paper reflects the assumption that all TES units can be accessed from the whole DH type system. Taking geographical and infrastructural issues into account could result in TTES without HP being preferred over PTES in some cases, due to the large size of the latter.
In a non-linear model, TES could have been implemented with a temperature-dependent COP of the HPs, as well as the option to avoid using a HP at high storage temperatures. However, the major part of the investment cost of HP-TES units originates from the HPs, which have a cost that is based on heat generation. Therefore, since investments in HP-TES units are not found to be cost-optimal in the present work, the implementation of a variable COP and optional HP usage for TES is not likely to change the results significantly, even though the total storage investment cost could be reduced to some extent. An assumption was, as mentioned in subsection District heating type systems, made to equate all DH heat profiles with that of Gothenburg. This assumption results in a total heat profile from the DH sector which is not as smoothed by geographical effects as it otherwise would have been. In turn, this less smoothed profile makes shifting and peak technologies somewhat more valuable at the expense of technologies with more FLHs. However, this effect is believed by the authors to be very small in relation to the results seen when comparing scenarios and various TES.

Conclusion
The impacts of different types of thermal energy storage (TES) on the electricity and district heating (DH) systems are examined using a Greenfield investment model, with the focus on the integration of variable renewable energy. The impact of TES is investigated for a region that corresponds to southern Sweden, with large seasonal variations in demand for heat and electricity, well-established DH in both large and small towns, and good wind resources. Through its ability to disconnect heat generation from the load, TES is found to: . Allow CHP and power-to-heat technologies to generate heat in a more opportunistic fashion, as dictated by the net demand of the electricity system. This results in an increase in wind investments when there is low flexibility and poor access to low-cost energy in the system; otherwise, there is a shift from off-shore to on-shore wind power. While this shift does not significantly affect the system cost, it indicates an increased capability to make use of more-intermittent energy production; . Add additional value to a flexible system that comprises DSM and hydrogen storage; . Enable lower levels of investment and more even production in the DH sector, which to a large extent displaces the peak HOBs; . Promote investments in solar heating when interactions between the electricity and DH systems are disincentivised by, for example, an electricity tax.
Furthermore, it is shown that different types of TES have different impacts on the electricity and district heating systems. In particular, it is found that: . Tank TES shifts the demand/generation in the DH system to the short term, enabling a more stable electricity price; . Pit TES can move the demand/generation on both shorter and longer time-scales, which in addition to the effects of tank TES, result in more full-load hours of CHP and power-to-heat technologies. If an accompanying HP is used for storage, pit TES can also store heat inter-seasonally; . Borehole TES can shift some of the demand between seasons, although it is rarely cost-optimal in the investigated system.
The discharge capacity of the TES has a high value, which implies that TES without HPs is favoured over TES with HPs and that the discharge capacity is often a driving force in no-HP storage investments. Among the TES systems without HPs, there is some competition given that their effects are similar, and tank TES adds very little value to a system that already includes pit TES.

Appendix A. Input data
The properties of all the generation technologies and VMS available in the model are shown in Tables A1-A5. The costs of the fuels used in the thermal technologies are assumed to be 1 €/MWh for municipal waste, 30 €/MWh for wood chips (except in the LowFlex scenario), and 8.07 €/MWh for uranium. Biogas is assumed to be gasified wood chips, where 1.39 MWh WC per MWh BG is needed. The biogas is also used in the net-zero CO 2 -emitting CCS, combined with 88.5% natural gas, which has a cost of 34.27 €/MWh. The fuel cost of natural gas and uranium are based on ranges given in World Energy Outlook by IEA (2014). Note: On-shore wind is divided into wind sites that have different wind profiles and full-load hours but that also have limited capacities depending on the geographical site.   Figure B1 shows the cost-optimal heat generation capacity in Figure 1b but divided among the type systems. Figures  B2, B3 and B4 shows the example storage levels throughout a year of a TTES and PTES without heat pump, and PTES with heat pump, respectively. Figure B1. Cost-optimal heat generation capacity in each type system and system scenario. All labels are omitted for capacities <0.3 to improve readability. Figure 2 shows the same data but in an aggregated way for the whole DH system. Figure B2. Stored energy in type system C in the no-HP TTES case, for every time-step during 1 year. Figure B3. Stored energy in type system C in the no-HP PTES case, for every time-step during 1 year. Figure B4. Stored energy in type system C in the PTES (HP) case, for every time-step during 1 year.