Optimal Municipal Energy System Design and Operation Using Cumulative Exergy Consumption Minimisation

: In developed countries like Austria the renewable energy potential might outpace the demand. This requires primary energy efﬁciency measures as well as an energy system design that enables the integration of variable renewable energy sources. Municipal energy systems, which supply customers with heat and electricity, will play an important role in this task. The cumulative exergy consumption methodology considers resource consumption from the raw material to the ﬁnal product. It includes the exergetic expenses for imported energy as well as for building the energy infrastructure. In this paper, we determine the exergy optimal energy system design of an exemplary municipal energy system by using cumulative exergy consumption minimisation. The results of a case study show that well a linked electricity and heat system using heat pumps, combined heat power plants and battery and thermal storages is necessary. This enables an efﬁcient supply and also provides the necessary ﬂexibilities for integrating variable renewable energy sources.


Introduction
Recent studies for Austria showed that the available potential for renewable energy sources (RES) is smaller than the current demand [1,2]. To reach the goal of a fully climate neutral society, imports of RES from other countries or local efficiency measures are necessary. In this context, exergy is a useful concept for identifying efficiency potentials. Although energy is subject to the law of conservation and can never be created or destroyed, exergy is the maximum useful work that can be extracted from a form of energy. It is consumed when brought to equilibrium with its surroundings, therefore it is a potential which describes the ability to cause change. It is the motive force that determines the flow of energy and it constantly deteriorates on its way through the energy system [3]. In the literature, there exist a variety of tools and methods [4,5] to identify and reduce exergy destruction and exergy losses. Their main aim is to increase resource efficiency.
The various forms of energy have different exergy contents, e.g., electricity is pure exergy, whereas low temperature heat has a very low exergy content. Most of today's used (fossil) energy carriers have a high exergy content. Data for 2016 shows that 50.7 % of the final energy consumption in Austria is used for heat applications [6]. 66.1 % of the heat is used for low temperature applications like domestic heating, hot water or air conditioning. The rest is used for steam or in furnaces in high temperature industrial applications. In a number of energy strategies of highly developed countries, the focus is on decarbonising the electric power generation [7], even though in the OECD member countries only 22.2 % of the final energy consumption is electricity [8].
A comprehensive decarbonisation of the energy system requires efficiency measures and a replacement of fossil fuels by renewable electricity [9]. In multi-energy systems (MES) several sectors (e.g., electricity, heat and transport) and energy carriers (e.g., electricity, natural gas, biomass) are considered in an integrated approach [10]. The coupling of energy sectors and their infrastructures using suitable technologies (e.g., heat pumps, CHPs, etc.) enables the utilisation of synergies, and provides the necessary flexibility for integrating variable RES. MES can also relieve the strain on the energy transmission and distribution infrastructure [11,12].
Today's typical way of energy system optimisation often focus solely on the electricity system, mainly aiming at an optimum dispatch of power plants and storages. The well-developed electricity grid makes electricity an easy to transport good and establishes operational competition between the individual electricity producers. The present approach delivers optimum operational strategies for the whole system, but does not investigate its optimum design. For heat the situation is different, as heat supply is a local issue and individual buildings or small heat grids are usually supplied by one or few plants. The main decision regarding energy and exergy consumption of heat supply is made during the system design process, and the technology selection. Therefore the main two research questions which occur when designing an exergy efficient MES, where heat and electricity sectors are linked: • What is the optimum system design? How can it provide the necessary flexibility options for the integration variable RES? • How can this system be efficiently operated to always meet the demand?
This calls for a model which combines planning and operational aspects [13]. The cumulative exergy demand (CExC) methodology [14] includes both the above outlined points. Next to the exergy consumed during operation it also considers the exergy consumed to create the energy system's infrastructure.
In this paper, we present the application of the CExC-minimisation on municipal energy systems. First we present the current research and the relevant literature on exergy analysis and energy system optimisation in Section 2. This is followed by an introduction into the concept of exergy, the CExC methodology and the optimisation approach in Section 3. Section 4 presents the results from applying the methodology on a municipal energy system. We close this paper with a comprehensive discussion of the results in Section 5.

State of Research
The term exergy was first mentioned by Rant in 1953 when he described the "technical working capacity" [15]. Today, the concept of exergy is used in different kind of fields in environmental science and technology. In this section, the basics of exergy are first presented and then a literature overview of the current tools and methods of exergy analysis is given.

Fundamentals: Exergy, Exergy Destruction and Exergy Losses
The first law of thermodynamics describes the energy conservation. The second law indicates the irreversibility of natural processes. This means that in any real process, exergy is consumed and entropy is created. The second law also provides information regarding the convertibility of energy forms and the direction in which a process proceeds. For example, electricity or mechanical work theoretically can be fully converted into any other form of energy, whereas for instance for heat the convertibility depends on the temperature difference. In general, energy E consists of a useful part exergy B and the useless part anergy A.
Exergy is the useful work that can be theoretically extracted from a form of energy when it is brought to equilibrium with its ambient conditions. Anergy in contrary cannot conduct any work. A well-known example for anergy is heat at ambient temperature.
Four different forms contribute to the total exergy of a system: potential exergy B pot (system height relative to the environment), kinetic exergy B kin (system velocity relative to the environment), chemical exergy B ch (deviation of the chemical composition to the environment) and physical exergy B ph (deviation of pressure p and temperature ϑ from the environment p 0 , ϑ 0 ) [5]. Potential and kinetic energy are pure exergy; the chemical exergy can be approximated by using the lower heating value [16]. The physical exergy, B ph , of a mass, m, can be calculated by the enthalpy, h, and entropy, s, of a system with its p and ϑ compared to the ambient conditions (T 0 , s 0 ).
Thermodynamic inefficiencies in an energy system are either caused by exergy destruction B D or exergy losses B L [17]. A well known example for exergy destruction is the production of hot water by burning natural gas. Irreversible thermodynamic transformations cause exergy destruction B D by entropy generation s gen . For a system with the mass m these irreversibilities can be described by the Guoy-Stodola theorem (Equation (3)). As exergy is always dependent on a reference state; it is usually described by the reference pressure p 0 and reference temperature ϑ 0 . Commonly this reference is the "standard atmosphere".
Exergy losses B L are caused by exergy transfers over the system boundaries. That might be work, heat or physical streams that cannot be further utilised. Examples are heat losses in a district heat network or flue gas exhaust streams from boilers.

Exergy Analysis: Tools and Methodologies
So far, for exergy analysis several tools and methodologies have been developed [4,5]. Examples are the the cumulative exergy consumption [14], the exergetic cost theory [18,19], thermoeconomics [20] or the extended exergy analysis [21]. They all share the same major goal to help to improve the system design, even though they have different system boundaries. As exergy is the potential to conduct work, it is especially suited as a common base in MES where different energy forms with different exergy contents are compared [16].
Cumulative exergy consumption (CExC) and the exergetic cost methodology extend exergy analysis of a single process beyond its boundaries to include all processes from natural resources to the final product. They both use a "fuel-product concept", where for any system a fuel exergy and a product exergy can be defined. Their exergetic definitions depend on the requirements of the task [18]. CExC analysis was introduced by Szargut in 1957 [22] and includes all exergetic expenses from raw materials to the final product [23]. The exergetic cost theory was introduced by Valero et al. [18] and is defined as "the sum of exergy contained in all resources entering the supply chain of the selected product or process" [5]. In this case, the term "cost" is the exergetic expenditure and has not monetary relation. Even though both methods use a different formalisation, their results are equivalent [5].
Both methodologies are applied to different fields. Szargut et al. [14] proposed the the CExC method to improve the "cumulative degree of perfection of chemical processes". Applications in energy conversion deal with an oxy-fuel combustion plant [24], or an organic Rankine cycle for waste heat power generation [25]. Valero et al. [26] applied the exergetic cost theory to the CGAM problem [27] and represented the productive structure explicitly, which allows optimisation at a local level. Lozano and Valero [28] performed an exergetic cost analysis on a steam boiler in a thermal generating station. In this study, the authors analysed variations in the exergetic costs of the total product and their causes in order to draw conclusions on the boiler's real performance. As seen in Misra et al. [29], the application of exergetic costs to a LiBr/H 2 O vapour absorption refrigeration system enables an approximate optimum design configuration.
The CExC-method was also applied to analyse the resource consumption on a larger scale with different countries and societies [30], for example the United States [31] and China [32]. On a city scale, it was applied to compare energy scenarios in the smart city planning of Milan [33]. Waste heat [34] and low temperature district heat systems [35] were also investigated using exergy analyses. Krause et al. [16] carried out optimum power flow calculations for a MES to maximise its operational exergy efficiency. We did not find any recent literature where the CExC-or exergetic cost method was applied on municipal energy systems.

Methodology
In this work, we adapt the CExC-method to determine an exergy optimal design of a municipal MES. This requires modelling the energy system, and the assessment of energy as well as materials streams flowing in and out of the system. The optimal system design is reached when the CExC reaches a minimum. Therefore, we need a precisely formulated objective function and to model all the necessary constraints [21].

Cumulative Exergetic Consumption
CExC includes all exergetic losses and exergy destruction from raw materials or energy carriers to their final utilisation. Therefore, it quantifies the consumption of primary resources embodied in a product or service [23]. In an energy system, the exergy expenditures are stored in the energy imports, the materials necessary to build the infrastructure and the locally produced RES. RES and the imported energy carriers are converted to the desired form of energy to supply the load. Therefore, the services produced are both the load as well as the excess energy ( Figure 1). The imported energy flows may include renewable and nonrenewable sources. For the exergetic assessment of imported and exported energy following assumption are made [23]: • Raw materials or energy carriers are attributed their reference exergy. • Pre-treated materials or energy carriers are attributed an exergy content of their raw value and the exergetic expenses for the pretreatments.

•
Any energy delivered to the load gets attributed its exergy content.

•
Next to the energy produced to meet the load, excess energy might be created ( Figure 1). If it can be further used, it is considered using its exergy content.
Therefore, for energy and material flows, we have to differentiate between their exergy content and their CExC. The exergy content B of an energy stream is the sum of its embodied physical, chemical, kinetic and potential exergy.
The "cumulative exergetic consumption" (CExC), B * , of a stream is its exergy content, B, and all the exergy destruction, B D ; exergy losses, B L ; and exergetic expenses, B exp , that occurred throughout the steps p of the production process PP of a stream. Any expenses are caused by irreversibilities within the production processes [19]. These can occur "directly or indirectly, in the extraction, preparation, transportation, pretreatment and manufacturing process" [21].
This means that the production route has an impact on the CExC of a product. The same product delivered by two different production processes can have a different CExC.

Unit Expenditures and Unit Content
In energy systems modelling, the descriptive variables are usually energy flows and the capacities of the installed infrastructure. Therefore, we use unit expenditures or unit contents to convert energy, E; materials, m; or capacities, C, to CExC or exergy. The unit expenditures describe the CExC per unit of energy, material or capacity. The conversion factor is called CExC-factor. The unit content describes the actual amount of exergy stored in a unit of energy. This conversion factor is therefore called exergy factor. The use of those conversion factors makes the CExC methodology applicable together with a broad range of energy system modelling tools.
The exergy factor r is used to convert energy to exergy. It is the proportion of exergy B in energy E: The CExC-factor r * is used to convert energy to CExC and describes the CExC per unit energy. It is the ratio between CExC B * and energy E (Equation (7)). For materials the calculation is equivalent, but relative to a unit of mass m.
CExC for the different energy carriers can be taken from literature. In the cases where no data is available, the use of cumulative energy demand (CED)-values is also acceptable. This is applicable, because we only consider energetic resources in this paper. In such cases, CED and CExC-values have a comparable magnitude with a coefficient of determination of more than 99 % [36]. Therefore we assume CED and CExC-values to be identical.
CExC B * I of the infrastructure units is incorporated in the materials necessary to build these conversion units, RES and storages. Therefore the infrastructure-CExC-factor r * can be defined as the CExC per capacity unit C of a conversion unit, a RES, or a storage: For some energy technologies, the CExC-factors are directly available in literature. As the lifetime of infrastructure units is usually longer than the investigated period in the model, CExC are only taken into account proportionally. Therefore, we can define the equivalent periodic CExC-factor r * p . It expresses the CExC B * over the investigated period per unit installed capacity C.
If CExC-factors are not directly available in literature they can be calculated using data from existing infrastructure units. CExC over the lifetime T LT of an infrastructure unit with the nominal capacity C n can be calculated based on its material consumption m m , and the respective material CExC-factors r * m . We assume linear relations between the capacity and the required materials, as well as between the investigation period T and the lifetime T LT . Thus, the equivalent periodic CExC-factor expresses the CExC for one unit of capacity for a certain period of time: For district heating, we want to produce heat with an exergetic content of 0.2 (physical exergy calculated using Equation (2) and based on following assumptions; feed temperature 70 • C and reference temperature 0 • C). The installed electric heater shall have a capacity of 1 MW and an efficiency of 99 %. In an investigation period of one year, the annually produced heat shall be equivalent to 2000 full load operating hours.
Electrical heater equivalent periodical CExC-factor: An electric heater with a nominal capacity of 10 kW and a lifetime of 15 a consists of 40 kg of steel. Steel has a CExC-factor of 1.75 × 10 −5 TJ kg . Material consumption of this boiler results in a CExC of 0.2 MW h. Therefore, using Equation (10)  For a plant with a given nominal capacity, the unit expenditures vary dependent on the annual full load operational hours. They include expenditures for the resistance heater and expenditures for the electricity. The latter ones consist of the expenditures, due to the consumption of physical exergy and the expenditures for the pretreatment. Pretreatment expenditures are those expenditures necessary to provide an energy carrier with its embodied physical exergy at the system boundaries.
In this example, we assume that the pretreatment for electricity is constant. Also, the efficiency of the resistance heater is constant, which leads to a constant consumption of electricity per unit heat. Therefore the expenditures for physical exergy and pretreatment are independent of the full load operational hours and stay constant in Figure 2. For the expenditures from infrastructure investment it is different, because they only occur once during the investigation period. The more heat is produced with the resistance heater, the smaller becomes their share on the total unit expenditures ( Figure 2). The cumulative unit expenditures for the electric heater with one full load operational hour are 4.3. For 8760 full load operational hours they decrease to 2.99. Then the share caused by plant investment is negligible.

CExC Minimisation of Multi-Energy Systems
The main objective in this paper is to design an energy system, which has minimum cumulative exergy destruction and exergy losses. We use a greenfield design approach, that means we do not consider existing energy infrastructure. A municipal energy system shall be designed for a given electricity and heat demand. On the one hand, exergy is needed in the form of materials to set up the physical infrastructure of the energy system. On the other hand, it is consumed in form of conventional energy carriers or RES to operate the system and supply the demand ( Figure 3). In the case of high RES production, excess energy might be produced. The optimum system is reached, when the difference between exergy flowing into the system and exergy flowing out of the system gets a minimum. A model must be set up which includes all relevant boundary conditions, but still leaves a certain degree of freedom for optimisation. For this task, we use the optimisation framework oemof, which is specifically designed for energy system optimisation. The model must allow several different supply routes using RES, conversion units (e.g., power plants, boilers, grids, etc.) and storages (e.g., batteries, hot water tanks, etc.). For these infrastructure elements, the used materials and their CExCs must be specified. The operational boundary conditions include the imported energy (e.g., electricity, natural gas, biomass, etc.) and RES potentials (e.g., wind, PV) and their CExC.

oemof -Open Energy Modelling Framework
The Open Energy Modelling Framework (oemof ) [37,38] is an open source framework for cross-sectoral and multi-regional modelling and optimising of MES. It can deal with multiple energy carriers, for example electricity, heat, biomass, natural gas, etc. In oemof, an energy system is represented by a graph, consisting of a set of edges and nodes. The edges are the logic links between the nodes, they describe the structure of the energy system. The nodes represent the technical components of the infrastructure. The components include all the main technical equipment of an energy system: sources, sinks, conversion units, grid elements and storages. The individual components can be connected via busses to each other.
Sources represent any imported energy, for example fuels, RES, natural gas and electricity from the grid. Sinks are used to model energy flows out of the energy system, for example, loads and electricity export. Energy conversion processes are described by conversion units, e.g., in power plants, boilers, etc. They can have multiple inputs (P in ) and multiple outputs (P out ) for a set of different energy carriers α, β, . . . ∈ Γ = {electricity, naturalgas, biomass, heat, . . .} and are described by their conversion efficiencies η [16].
Energy storage is modelled using a differential energy balance between the state of energies SOE of two consecutive time steps (Equation (12)). It includes inflow and outflow conversion losses (η in , η out ) and standby losses η loss over a time step τ.
Transmission and distribution infrastructure (e.g., power lines, district heat or natural gas pipelines) are modelled like conversion units with a conversion efficiency. They have the same input and output energy carrier. For any component a nominal value, minimum and maximum values as well as an actual value including a time series can be defined.

Objective Function
Cumulative exergy losses and exergy destruction become a minimum when the difference between expenditures and yields are a minimum. The expenditures include all the consumed exergy: for RES B * R , for imported energy B * Im and for the infrastructure B * I . The yields include all the useful produces exergy: the load B L , and any excess exergy B E due to the variable production of RES.
As exergy is a potential compared to a reference state, this reference state must be selected carefully taking into account the objectives of the model. Therefore, we define the following assessment guidelines for the exergetic assessment of any inflow and outflow streams.

•
All flows into the energy system get attributed their CExC-factor. • All flows out of the energy system get attributed their exergy factor. • Any form of energy becomes valuable as soon as it has a common usable and transportable form, therefore when it is secondary energy (e.g., electricity, district heat, natural gas, hydrogen or biomass). We do not assign the raw energy forms like solar irradiation or the kinetic energy stored in the wind speed any exergy. This is consistent with the international recommendations for energy statistics [39] Based on these guidelines and the system boundaries specified in Figure 3, the objective function for the energy system over the time period T can be formulated as follows.
In oemof, the descriptive variables of streams and infrastructure units are power flows P and capacities C. With the help of time step τ power is converted to energy. CExC-factors and exergy factors described in Section 3.1.1 are used to convert these variables to exergies. All flows need to be summed up over the investigation period T = {t start , . . . t end }.
All the imported energy flows must be converted to the CExC B * Im for the period T: Assessment of the outflows is analogous, but this time we use the exergetic value instead. The consideration of the outflows is only necessary, because we consider the excess energy E as valuable.
CExC calculation for all infrastructure elements I is based on the capacity C, and the equivalent periodic CExC r * ,p .
According to guideline (3), RES R are different. Electricity P R from RES is seen as an exergy expenditure and rated with its exergy factor. Operational upstream exergy losses, for example, from solar irradiation to electricity, are not taken into account. Next to the operational exergy expenditures, the infrastructure investment must also be considered. CExC is treated as analogous to the other infrastructure investments. Consideration of operational expenditures is necessary to avoid CExC-factors for electricity from RES, which are lower than its respective exergy factors.

Result Evaluation
The major results are the installed capacities of conversion units, storages, RES, the energy consumption from the grids and the excess energy produced. We also calculate total CExC for energy inflows and the exergy outflows. To rate the operational performance of conversion units, the capacity factor c l of any conversion unit l can be calculated: It compares the energy E out l a conversion unit produces during a certain period to the maximum energy E out,max l a conversion unit could produce during this time. The storage cycles c s for any storage s show how often an energy storage is fully charged or discharged. It is the discharged energy E out s during a certain period divided by the installed storage capacity C s,inst

Case Study
For our case study, we use the presented methodology in a greenfield approach to determine the optimum design of a municipal energy system. A greenfield approach means to model the energy system from the scratch. No existing infrastructure is considered. Energy loads, RES characteristics, exergetic indices and an available set of energy conversion technologies and storages are given. To account for the different shares of RES in the electricity from the grid, four different scenarios with different CExC-indices are evaluated. For any scenario a model is created in oemof and the results are discussed.

System Description
The medium-sized model city is located in a region attractive for wind power and PV installations, but has no potentials for run of the river hydro power or pumped hydro. Our case study focuses on municipal energy systems, therefore it considers electricity, process heat and domestic heat demand from the residential, commerce and public services sector. Industrial demand is not encompassed in our case study, because such consumers are mostly supplied by transmission grids and not by municipal distribution grids.
The energy system is connected to the electrical and natural gas transmission grids. RES potentials, biomass potentials and waste heat from an industrial process are available. For the sake of simplicity, we use an aggregated representation of the municipal energy system. All the individual conversion units, energy storages, RES, energy sources and energy loads of one kind are lumped together to a single one. This aggregation process is carried out according to the "cellular approach" [40]. To account for distribution grid losses, energy production and domestic consumption are modelled in two different regions or so called cells (Figure 4). Both are connected by electrical power lines and district heat networks. The values to be determined are the nominal capacities from conversion units, storages, RES as well as the imported energy and the excess electricity produced. Input parameters for the model are the loads, the available technologies, the maximum RES potentials and the possible conversion routes. In addition, CExC-factors and exergy factors must be provided for all specified technologies and energy carriers.
The electricity grid connection is bidirectional, that means that energy can be imported and exported. Even though in reality this is a single unit, in oemof, it is modelled using a source for imports and a sink for the excess electricity with a maximum connection power (Tables 1 and 2). Natural gas, waste heat and biomass are unidirectional, and therefore modelled using a source (Table 1). Natural gas and waste heat also do have a maximum capacity. The local biomass potential equals 22.5 GW h and must be fully exploited. Because biomass has no energy transport restriction like grid based energy carriers and can be easily stored, no maximum capacity is prescribed. CExC-factors for electricity, natural gas and biomass are taken from literature Table 1. Because there was no value available for waste heat, we estimated the CExC-factor based on its physical exergy using Equation (2) (assumptions: feed temperature 70 • C and reference temperature 0 • C). In our case study, we look at the domestic sector as well as at the businesses and commercial services sector. The annual demands specified in Table 3 include electricity, process heat, as well as domestic heating and hot water. Domestic heat has a temperature of 70 • C. Process heat is consumed by businesses and commercial services for the production of goods. The mean application temperature is assumed with 273 • C. Using Equation (2), this leads to the exergy factors specified in Table 3. In oemof, all loads are modelled as sinks with fixed time series. We used the load profile generator oemof demandlib [43] to create load profiles with a resolution of 15 min from annual demand values . The required temperature data was retrieved from renewables.ninja [44,45] which uses the MERRA-2 data set. Exemplary for our model data of the year 2014 and the location of Eisenstadt (city in the eastern part of Austria; latitude: 47.84 • , longitude: 16.54 • ) will be used. oemof demandlib uses standardised BDEW load profiles for modelling domestic and process heat time series [46,47] and electricity time series [48]. We assume that 30 % of the heat is used in single family houses, 40 % in multi family houses and the remaining 30 % in small businesses, commerce and services. The domestic heat demand is calculated for windy conditions and includes the hot water consumption. 20 % of the electricity is consumed by households, the remaining 80 % by small businesses, commerce and services. The electric load profiles do not include any demand for hot water production, as this is already considered in the domestic heat load profiles.
All conversion units, storages, RES and the process heat load are located in the production cell. Energy conversion is modelled using Equation (11), energy storage using Equation (12). All the available energy conversion, energy storage and RES technologies in the model are listed in Tables 4-6. Note that the biomass boiler, gas boiler and resistance heater are made available for both the production of domestic heat and process heat. In addition, we assume that 20 % of the high temperature process heat are waste heat, and can be further used for domestic heating. The specification parameters are conversion efficiencies, charge and discharge efficiencies, standby losses, maximum RES capacities, and equivalent periodic CExC per unit installed capacity. A detailed derivation (including all the references) of the equivalent periodic CExC for the individual units can be found in Appendix A. Normalised time series for PV and wind yields are retrieved from renewables.ninja using the same location and year as for the demand. Grid losses are modelled using transmission efficiencies and the networks do not have a restricting capacity (Table 7) Biomass boiler [49] η th = 0.85 r * p th = 8.14 Gas boiler [50] η th = 0.95 r * p th = 6.83 Heat pump [51] COP = 3 r * p th = 2.60 PEM eletrolyser [52] η H 2 = 0.8 r * p el = 126.68 PEM fuel cell [52] η el = 0.8 r * p H 2 = 126.68 Resistance heater [53] η th = 0.99 r * p th = 1.30 Biomass CHP [54] η th = 0.5 η el = 0.35 r * p el = 81.5 Gas CHP [55] η th = 0.5 η el = 0.35 r * p el = 24.34 Table 5. Considered energy storage technologies.

Grid Efficiency
Electricity η el = 0.99 Domestic heat η th = 0.85 Using all the specified data, the objective function is composed according to Equation (13).

Sensitivity Analysis with Respect to the Electricity Source CExC
Electricity from RES has a lower CExC-factor compared to today's prevalent thermal generation. This is because RES do not include the exergy destruction expensive conversion from chemical to thermal energy. Also the assessment guidelines (see Section 3.2.2, guideline three) support this, as the the produced electricity are the exergy expenditures and not the raw energy form like wind or solar irradiation. Therefore, the proceeding integration of RES into the future electric energy system will lead to decreasing CExC-factors for electricity from the grid. As these are relevant design parameters for the model, the different scenarios will lead to different optimum system designs.
An accurate value for future CExC-values cannot be determined at the present. Therefore, we will carry out calculations for four different scenarios, starting with the reference case SR. It describes the current state for the CExC-factor for electricity in Austria [41]. The following scenarios S1, S2 and S3 represent future electricity systems with higher shares of RES (Table 8). The other parameters stay the same in all four scenarios.

Results
The high exergy expenditures for imported electricity in the reference case SR lead to the highest total exergy expenditures ( Figure 5). They also make investments into conversion units, storages and RES worthwhile. This leads to the higher expenditures for investment and RES as well as fewer energy imports. The large installed capacities of variable, non-dispatchable RES also generate more excess electricity.
At times when the grid connection is not a limiting factor, the CExC-factor for electricity from the grid determines the maximum unit expenditures for local electricity generation. The unit expenditures are influenced by the CExC-factor of the used energy carrier, the investment expenditures, the efficiency and the capacity factor (compare to Figure 2). Only technologies which comply with this limit will be selected, otherwise the energy will be drawn from the grid. Therefore, the lower CExC-factors in S3, S2 and S1 will not allow for an infrastructure investment as extensive as in SR. This leads to reduced total exergy expenditures and a shift from infrastructure investment to energy imports. Due to the lower installed RES capacities, excess electricity also decreases in those scenarios.  The following sections provide further details on installed capacities and operation of conversion units, RES and storages for all four scenarios. Afterwards the operational exergy expenditures and exergy yields are presented, followed by a discussion of the results.

Infrastructure Capacities and Expenditures
The capacities and the corresponding CExC from installed conversion units and RES are shown in Figure 6. Available technologies described in Section 4.1 that have not been selected for deployment, are not shown in the results. All the displayed capacities relate to the power produced (e.g., heat for the heat pump and boilers, electricity for RES). In the case of the CHP, which produces heat and electricity, the nominal electrical output is displayed.
Compared to the other conversion units, the high installed capacities of heat pumps and wind are apparent. PV and CHP capacities rise with an increase in the CExC-factors in the scenarios. While wind power is expanded to its maximum potential in all scenarios, PV never uses its maximum potential. A PEM electrolyser and fuel cell are installed only in SR. Biomass boilers and gas boilers are only used to supply the process heat load, but not for domestic heat.  All the different conversion units and storages are operated exergy efficiently and depending on the overall composition of the system. Even though we used 15-minute mean values in our model, we use daily mean values to present the results for unit operation in Figure 7. This provides a better visualisation of the long-term results. In this case, for the period of a whole year.
The heat pump provides domestic heat all year long except for the summer month. The biomass CHP operates mainly during times with a high heat demand and a low PV yield. At the same time, process heat in S3 is produced by a biomass boiler, and in SR, it is produced by a biomass and gas boiler. In the complementary times, the process heat is provided by a biomass or gas boiler and a resistance heater, which is operated with excess electricity from PV or wind (Figure 7). In S1 and S2, high temperature heat is provided by biomass boilers and resistance heaters. The electrolyser is predominately operated in the second half of summer and in autumn. The conversion back to electricity takes place at the beginning of the year and in the second half of the year. The more different conversion units available, the lower the capacity factors (Table 9), which are calculated according to Equation (19). Exceptions are small scale units with dedicated base-load operation, for example, the process heat biomass boiler in SR. Because of the major seasonal component of domestic heat and hot water demand, the capacity factors for the production units are restricted by the shape of the load profile. The same applies for the electrolyser and the fuel cell. They are part of the long term H 2 storage and only one can operate at a time. The installed storage capacities are shown in Figure 8. The thermal storage capacity is several orders of magnitude larger than the battery and the hydrogen storage. Even though, the CExC for batteries and thermal energy storages are of a comparable magnitude. Hydrogen storage only makes exergetically sense in scenario SR. Remarkable is the vast increase of battery and thermal energy storage increase between the scenarios S2 and S3. The storage facilities are operated exergy-efficiently to bridge the gap between variable RES production and demand. Figure 9 shows the daily mean state of energy. With the help of the discrete Fourier transform (DFT), the state of energies time series can be decomposed into their individual periodical components. The results in Figure 10 show the amplitude and the numbers of cycles per year. Components which are smaller than 15 % of the maximum amplitude are removed from the plots.
In all four scenarios, the battery shows the highest states of energy during spring and autumn. During summer, the storage cycles are shorter, but the mean states of energy are also lower (Figure 9).
The DFT analysis shows clearly defined annual (one cycle per year) and daily cycles (365 cycles per year) in all three scenarios in which a battery is installed. The thermal energy storage is mainly used during the heating season with similar peak states of energy in the beginning and the end of the year. Exceptions are S3 and SR, where the peaks in autumn are more than twice as high compared to the spring. In all four scenarios, the amplitude of annual cycle is clearly dominant. The amplitude of this annual cycle is all the more significant with larger installed storage capacities. The hydrogen storage starts to get charged in July to shift electricity from the sunny periods to autumn and winter. Its state of energy has significant annual and biannual cycles. The full cycles that a storage can achieve depends on load and production time series, as well as the size and purpose of a storage (Table 10). The battery in S2 has more than twice as many full cycles compared to the ones in S3 and SR. The thermal storage has the most utilisation during the heating season and is barely utilised in summer. Although the thermal storage peak states of energies are in the same order of magnitude for spring and autumn in S1 and S2, they are more than twice as high in autumn for scenarios S3 and SR. Excess electricity is used by heat pumps to shift the excess energy from PV over longer periods to times with higher demand and less supply. This requires higher storage capacities where large shares of the total capacity are not very often used. This and the great demand difference between summer and winter leads to significantly less storage cycles compared to the battery. Even though the hydrogen storage is a seasonal storage technology, it has 8.4 full storage cycles per year.   Figure 11 shows annual energy and exergy loads, excesses, imports and the RES production. Loads, waste heat imports, biomass imports and electricity production from wind stay constant in all four scenarios. Imported electricity and natural gas, PV production and excess energy vary across scenarios with the CExC-factor for imported electricity. The higher the CExC-factor, the higher are PV-production and excess electricity, and the lower are the electricity imports. In scenario SR where the CExC-factor is the highest, no electricity is imported, but natural gas. Also, it is clearly visible that the exergy content of domestic heat is low when comparing annual energy and exergy loads of the domestic heat. Figure 12 shows the daily mean power for loads, electricity excess, and energy imports. Electricity and process heat loads mainly fluctuate over days and weeks, the annual variations are secondary. For the domestic heat load it is different. Its major annual fluctuation is caused by its strong temperature dependency. Biomass and gas imports are the highest when the heat load is highest as well. The waste heat is consumed to its maximum extent, except for short periods in summer. Yields and Expenditures S1 S2 S3 SR Figure 11. Energy sources and energy load, and the corresponding CExC, exergy load and excess exergy. (Source: own representation.) Daily average values for electricity imported from the grid show a high variability. Although there are days with very little to no consumption, those days can be followed by peaks up to an average of 12 MW. The highest daily average values for electricity drawn from the grid occur during the winter months. In the summer months, those peaks drop to half of those values for S1 ( Figure 12). This spread increases with increasing electricity CExC-factor until no electricity is consumed in SR. Excess electricity is produced between March and November, and in winter in case of high wind production. For SR Figure 12 shows that the exported electricity decreases from its peak in spring until autumn.

Result Discussion
Compared to imported energy, RES can provide energy for lower expenditures, but their fluctuating production does not necessarily meet the current demand. This gap must be compensated by energy drawn from the grid, or additional local power plants and storage facilities. Between the two options, the choice depends on unit expenditures for energy imports, and the investment as well as operational expenditures for conversion units and storage facilities. The unit expenditures of the imported energy carriers limit the maximum unit expenditures of local energy production, as long as there is no import capacity restriction. The local unit expenditures for an energy carrier include expenditures for conversion units and storages, and for exergy destruction and losses. The results reflect this context in higher total expenditures and a shift from operating to infrastructure expenditures in scenarios with higher CExC factors for imported electricity. Therefore, of all the scenarios, SR has the highest installed capacities of RES and conversion units (Figure 6), and is the only one where a long-term hydrogen storage makes sense (Figure 8). In our model, electricity imports can be seen as unrestricted, because the maximum load is well below the maximum grid capacity (Tables 1 and 3) This means that local production is only preferred if it has lower expenditures than the energy imports. In the case of excess electricity from RES, it can be stored locally for later use or it can be returned to the grid. For a useful storage investment, unit expenditures for electricity from RES and the battery must be lower than for imported electricity. The yield for electricity export must be also considered. This is the context that leads to the installed capacities of RES and storages. In all four scenarios, the wind power potential is used to its maximum. No PV is used in S1, but it rises up to 24.8 GW in SR, which is equal to 99.1 % of the available potential.
The higher CExC-factors for imported electricity make PV installations and battery storage practical in S2, S3 and SR. Long term storage using power to gas is exergetically only reasonable in SR.
For domestic heat, the situation is different. The maximum waste heat import power of 3 MW covers only 8 % of the maximum domestic heat load. The remaining heat will be provided by the plants with the lowest total unit expenditures, under the consideration that the local biomass has to be used. The biomass is used in a biomass CHP which is mainly operated in times where the heat demand is high and PV yields are low. Heat pumps together with thermal energy storage cover the rest.
From S2 to S3 the CExC-factor and therefore the unit expenditures for electricity imports rises from 1.5 MW MW to 2 MW MW . This results in an increase of the battery storage capacity from 2 MW h to 39.5 MW h and of the thermal energy storage from 895 MW h to 2193 MW h. Apart from the two scenarios, there are no others where the increase in storage capacity is so large. As already discussed above, raising the limiting unit expenditures for electricity imports allows for higher total unit expenditures. The increase can be totally attributed to the infrastructure expenditures, because the operational unit expenditures stay constant. This tolerates lower capacity factors or annual storage cycles. Due to the fact that the investment unit expenditures follow a reciprocal function (see Figure 2), such a vast increase of the storage capacities between these two scenarios is possible.

Conclusions
The method of the CExC minimisation has proved to be applicable to energy systems planning and operation. The usage of CExC-factors makes the methodology applicable to a wide range of modelling tools. Aggregation concepts like the "cellular approach" [40] allow for the deployment on different spatial scales with different levels of accuracy. Even though we presented a greenfield design approach, it is also well suited for brownfield design approaches, for unit commitment, and even for optimal power flow calculations.
The major point of the overall results is that a well linked electricity and heat sector, using heat pumps and thermal energy storage, can enable a resource efficient supply while providing the necessary flexibility for integrating variable RES at the same time. Co-generation of heat and electricity is beneficial to separate production. The second point is the consideration of the load collective of the different plants. Although the operational efficiency of one technology might be higher compared to another, its high investment CExC makes this technology more costly in cases with low annual capacity factors.
In general, for the same rated power an exergy efficient plant will be larger compared to a less exergy efficient one (e.g., compare the sizes of compression and absorption chillers.) [61]. This is because exergy efficient plants have to operate with lower driving potentials, which leads to larger plants and therefore to higher CExC for the plant investment. For example, for the same heat transfer capacity, heat exchangers with higher temperature differences between the hot and the cold fluid need smaller exchange surfaces than heat exchangers with lower temperature differences. This means that operational expenditures shift to investment expenditures. Therefore, exergy efficient plants need higher capacity factors than less exergy efficient plants to reach the same unit expenditures. The variability of RES requires additional storages and dispatchable back-up plants with high capacities. This will lead to low annual capacity factors for the individual plants, which contradicts the use of exergy efficient technologies. In such cases, investment expenditures might not be negligible any more compared to the operational expenses. The CExC methodology takes both discrepancies into account and supports finding an optimal solution.
Although exergy factors for energy streams can be unambiguously calculated by thermodynamic laws, we know that the CExC-factors for the inflows do not have such a high degree of accuracy and are subject to uncertainties. The influence of the investment CExC should also not be overestimated, because in none of the scenarios it exceeds 10 % (Table 11). For a comparison, the conversion losses (exergy losses and destruction within the energy system) range from 21.8 % to 25.1 %. A sensitivity analysis of the investment CExC of the individual plant can help to get a better understanding of their implications. Most of the current applications of technical exergy analyses differ in two points: the assessment of consumed energy carriers and materials according their physical exergy or CExC, and the use of either an energy-based or power-based perspective. Energy-based means that only the energy consumption over a certain period of time (usually one year) is considered for analysis. A power-based perspective also takes into account the variation in energy consumption over time [11].
Both of the above-stated points can have significant impacts on the relevance of the results. The use of physical exergy as an evaluation criterion could favour energy sources with high exergy losses outside the system boundaries over those produced internally. A power-based approach, as we use it in our work, is important for the sizing of system components and, in the case of involved storages, for considering their operational impact. Applications using physical exergy and a power-based approach mainly concern individual industrial processes or plants to identify internal exergy destruction and losses [5]. Energy-based perspectives are used above all when larger energy systems, in which the individual processes are no longer comprehensible, are considered over a longer period of time. Some consider only the flows of energy carriers, others include both energy and material flows [30].
Municipal energy systems lie between these two extremes. Our approach with using CExC-minimisation for design and operation of such energy systems helps to overcome this gap. It contributes to the identification of the location and magnitude of high exergy destruction and losses within the system. However, the use of CExC shows whether these are better treated within or outside the system boundaries. Including the materials for the plant investment permits optimum sizing of the plants for the respective load collective.
In future modelling applications, there are several improvements that can be made: • A better representation of the electric grid connection. In this paper, we use a constant CExC-factor for electricity from the grid. We assume grid availability for feed in and drawing energy all the time. This might not be true for future applications. The CExC-factor might vary over the day and the seasons. There might also be shortages or congestion in the transmission grid. • The spatial dimension. The current model does not account for the distribution of energy. Restricted energy transport capacities and the unavailability of network coverage in some areas, especially heat and gas grids, will lead to different results. The network restrictions can be modelled using total transfer capacities, or if more detail is necessary, power flow models. • Include further technologies. Currently, only a basic set of conversion technologies (Table 4), RES (Table 6), and storages (Table 5) is used in the model. Possible additional technologies are demand side management; absorption heat pumps; solid oxide fuel; and electrolysis cells, pumped hydro, tidal energy, etc. The use of storage capacities inherited in heat and gas networks can also support the integration of RES. can lead to synergies between industrial and municipal energy systems. In addition, a shift to electric mobility will increase electricity demand and include a high DSM potential.
Author Contributions: The authors contributed as following to the manuscript: conceptualisation, L.K. and T.K.; methodology, L.K.; software, L.K.; resources, L.K.; writing-original draft preparation, L.K.; writing-review and editing, T.K.; visualisation, L.K.; supervision, T.K.; project administration, T.K.; funding acquisition, T.K. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding. Table A1. CExC-factors and lifetime for PEM fuel cell and electrolyser.

CExC-Factor Lifetime
MW h MW a PEM fuel cell [52] 1900.2 15 PEM eletrolyser [52] 1900. 2 15 a Because PEM electrolysis and fuel cell technology are comparable, we assume the same CExC-factors for both. The results for conversion units and RES are presented in Table A7. The results for the storages in Table A8.