Technical description of main components
In this chapter the mathematical models of components, that are used in ReSiE for the simulation of energy systems, are described. In this context a component is defined as one energy processing part (e.g. a heat pump) of the overall system, while the combination of multiple interconnected components is defined as an energy system. For each component the implemented calculation rules and relevant physical quantities and parameters are described. You can find a detailed description of customizable parameters in the corresponding chapter.
Note: Not all components described here are implemented in ReSiE yet but all will be included in upcoming versions! Currently, only simplified component models are integrated. Also, the descriptions are not yet completed and may change later.
Conventions
Symbols:
 Scalars are shown in italic letters (normal math: )
 Vectors or time series in bold and italic letters (boldsymbol: )
 Matrices are bold and nonitalic (textbf: )
 Timederivatives are noted with , meaning
 General energies are noted with , general power with . Thermal energies are noted with and thermal power with .
Components:
 Energy flows into a component are positive, energy flows out of a component are negative
 Components are single units like a heat pump, a buffer tank, a battery or a photovoltaic power plant while energy systems are interconnected components
Heat pump (HP)
General description of HP
As heat pumps, electrically driven variablespeed and onoff compressor heat pumps can be integrated into the simulation model of ReSiE. Their general system chart with the denotation of the in and outputs is shown in the figure below. In general, a gaseous refrigerant is compressed by the compressor requiring electrical energy, resulting in a high temperature of the refrigerant. The refrigerant is then condensed in the condenser and it releases the energy to the condenser liquid at a high temperature level. After that, the refrigerant is expanded and completely liquefied in the expansion valve. In the following evaporator, the refrigerant is then evaporated at a low temperature level with the help of a lowtemperature heat source, after which it is fed back into the compressor.
The energy balance at the heat pump is built up from the incoming electricity , the incoming heat at a low temperature level and the outgoing heat flow at a higher temperature level .
The energy balance of the heat pump model is shown in the following figure:
Using the electrical power , reduced by the losses of the power electronics , an energy flow with temperature is transformed to the energy flow with temperature . The efficiency of the heat pump is defined by the coefficient of performance (COP). The COP determines the electrical power required to raise the temperature of a mass flow from the lower temperature level to :
The COP is always smaller than the maximum possible Carnot coefficient of performance (), which is calculated from the condenser outlet and evaporator inlet temperature. The maximum possible COP calculated by Carnot is reduced by the carnot efficiency factor , which is according to [Arpagaus2018]^{2} around 45 % for high temperature heat pumps and around 40 % for conventional heat pumps.
The energy balance (or power balance) of the heat pump can be drawn up on the basis of the latter figure and on the ratio between supplied and dissipated heat power, expressed as the COP:
The power of the heat pump's electric supply, including the losses of the power electronics, is given as:
Since the temperatures of the heat flows entering and leaving the heat pump, which have not been considered so far, may also be relevant for connected components, the heat outputs can be calculated on the basis of the respective mass flow and the physical properties of the heat transfer medium (specific heat capacity and, if applicable, the density ) by rearranging the following equation:
As a chiller follows the same principle as a heat pump, the same component can be used to simulate both technologies. The difference is the definition of the efficiency, as for a chiller the useful energy is not but . This leads to the definition of the energy efficiency ratio (EER) for chillers as
As shown, the COP can be transferred to the EER. In the following, the description is made for heat pumps. The only adaption that has to be done for chillers is the change of the useful energy. Also, the efficiency function needs to be changed to EER (, ) (if used) and for nonlinear part load efficiency the useful energy is assumed to be the linear reference energy instead of as for heating mode.
Modelling approaches for HP: Overview
According to [Blervaque2015]^{1}, four different categories are described in the literature when it comes to the simulation of heat pumps:
 quasistatic empirical models: equationfit models based on discretized manufacturer or certification data fitted to polynomials, used for example in EnergyPlus or TRNSYS
 dynamic empirical models: equationfit models extended by continuous transient effects
 detailed physical models: thermodynamic approach based on dynamic and refrigerant flow modelling, many parameters required
 simplified physical models or parameterestimation models: based on physical model, but with less input parameter needed due to internal assumptions
For the simulation of energy systems in an early design phase, for which QuaSi is intended, only quasistatic or dynamic empirical models can be considered due to the lack of detailed information about the technical components used and the computational effort required for physical models. Therefore, an empirical model based on manufacturer data or certification process data is implemented in ReSiE.
There are several aspects to be considered when simulating a heat pump based on equationfitting, which will be briefly described in the following:
The COP of a heat pump, representing the efficiency in a current timestep, depends highly on the temperature of the source and the requested temperature of the heat demand. Generally speaking, the efficiency and thus the COP decreases with larger temperature differences between source and sink.
Additionally, the maximum thermal power of the heat pump is not constant for different operation temperatures. The available thermal power is decreasing with lower source temperature, an effect that mainly occurs in heat pumps with air as the source medium. The rated power given for a specific heat pump is only valid for a specified combination of sink and source temperature. The specification for the declaration of the rated power is described in DIN EN 14511^{3}.
Furthermore, the efficiency and therefor the COP is changing in part load operation. In the past, mostly onoff heat pump where used, regulating the total power output in a given time span by alternating the current state between on and off. This causes efficiency losses mostly due to thermal capacity effects and initial compression power needed at each start, or rather the compression losses at each shutdown. [Socal2021]^{11} In the last years, modulating heat pumps are more common, using a frequency inverter at the electrical power input to adjust the speed of the compression motor and therefor affecting the thermal power output. Interestingly, this method leads to an efficiency increase in part load operation with a peak in efficiency at around 30 to 60 % of the nominal power output. In the literature, many research groups have investigated this effect, compare for example to Bettanini2003^{4}, Toffanin2019^{5}, TorregrosaJaime2008^{6}, Fuentes2019^{7}, Blervaque2015^{1} or Fahlen2012^{8}.
When heat pumps with air as source medium are used, the losses due to icing effects need to be considered as well.
For a most realistic representation, all four discussed effects need to be considered  temperaturedependent COP, temperaturedependent power, partloaddependent COP and icing losses. The calculation of these dependencies will be described below.
Modelling approaches for HP: Detail
Temperaturedependent COP
The temperaturedependent COP can be calculated from different methods:
 using the with the carnot efficiency factor as explained above (easy, simple and fast, but unreal high efficiency with small temperature differences of source and sink)
 looking up the COP in a lookup table in dependence of the condenser outlet and the evaporator inlet temperature (for computational efficiency, lookuptables are fitted to polynomials in preprocessing)
 COP calculated as fraction of temperaturedependent electrical and thermal power, gained from generally developed polynomials. Here, the temperaturedepended variation of the maximal power output of the heat pump can be directly taken into account.
As example for a lookuptable COP (second bulletpoint above), the following figure from Steinacker2022^{33} shows a map of a hightemperature heat pump as a set of curves, depending on the evaporator inlet and condenser outlet temperature. In three dimensions, this figure would result in a surface that can be parameterized with a threedimensional spline interpolation algorithm.
Maximum thermal and electrical power
In order to address a change in maximum power output or input of the heat pump at different operating temperatures, two different approaches can be used.
The more complex but also more accurate approach is the use of polynomial fits of temperaturedependent thermal and electrical power. These polynomials depend on the condenser outlet and the evaporator inlet temperature and they need to be calculated from manufacturer data or from measurements.
In order to address the early planning stage, general, marketaveraged polynomials need to be created, representing an average heat pump. Additionally, one specific heat pump model can be used if the the required data is available.
ToDo: Add method of calculating marketaveraged polynomials!
Biquadratic polynomials according to TRNSYS Type 401
where all temperatures have to be normed according to
If both the thermal output and electrical input power are given as a temperaturedependent polynomial, the temperaturedependent COP (see previous section) can be directly calculated from these polynomials.
The second method to adjust the electrical and thermal energy would be a linear gradient that adjust the rated power in dependency of one temperature. Checking the available data of many different heat pumps from StiebelEltron^{9}, a simplified correlation can be observed:
 the thermal power is dependent on the source temperature, but independent on the sink temperature (the lower the source temperature the lower is the heating power)
 the electrical power is dependent on the sink temperature, but independent on the source temperature (the higher the sink temperature the higher is the electrical power consumption)
This gives the possibility to linearly adjust the available thermal power with the change of the source temperature and the electrical power demand with the change of the temperature of the sink. Which power needs to be adjusted depends on the choice of the control strategy  thermally or electrically controlled. The gradients of the power de or increase with a change of the temperature, and , needs to be specified. Both factors can have a value of, for example, 0.02, which means a change of 2 % of the rated power per Kelvin of temperature shift with respect to the rated temperatures. The two factors are defined as follows:
With this method, the actual temperaturedependent relation of thermal and electrical power need to be determined using the temperaturedependent COP described earlier.
Part load efficiency
The COP of the modeled heat pump depends not only on the temperatures of the sink and the source but also on the current part load ratio (PLR). The COP can be corrected using a part load factor (PLF) that is dependent of the PLR. The definition of the PLR and the PLF is given below:
PLR (part load ratio)
PLF (part load factor = adjustment factor for COP):
The literature provides different examples for the correlation of the COP to the PLR (see section "Overview" for literature examples). This relation is nonlinear as shown for example in the following figure given the partloaddependent COP of an inverterdriven ENRGIHeatpump at different temperature levels (Source: Enrgi^{10}).
The partload behavior depends also on the type of the heat pump (onoff or inverter heat pump), as shown for example in Bettanini2003^{4} or in Socal2021^{11}. For illustration, the following figure is taken from the latter reference to demonstrate the different part load factors of the COP (yaxis) at different part load ratios for different heat pump technologies:
Taking the correction factor curve from the figure above for inverter heat pumps, the maximum part load factor is reached at 50 % part load with an increase of the COP by about 10%. Contrary, in Toffanin2019^{5}, the part load factor is assumed to be much higher, reaching its maximum at 25 % part load ratio with a part load factor of 2.1 (efficiency increase of 110 %). These discrepancies illustrate the wide range of literature data and the difficulty in finding a general part load curve. In Lachance2011[Lachance2021^], several part load curves are compared.
The figure above shows also the difference of the part load factor comparing onoff and inverter heat pumps as well as the defined onoff losses in DIN EN 14825 for the calculation of the seasonal coefficient of performance (SCOP).
As described in the section "General description of HP", the COP is defined as the ratio of the heat output and the electrical input power . The shown curves for the part load factor affects only the ratio of heat output to electrical input power and there is no information available on the actual change of the two dimensions. Therefore, the heat output of the heat pump itself is assumed to be linear in part load operation between at and at PLR = 1.0 as shown in the figure below. This leads to a nonlinear relation of the power input to the part load ratio that was found more realistic as for inverter heat pumps, the observed efficiency change is mostly due to an efficiency change of the frequency converter and motor of the compressor. (QUELLE ToDo)
It is also important to note, that the typical PLFcurve for inverterdriven heat pumps is not invertible and can therefore not be used directly to calculate the PLR from PLF. Although, this needed for an operation strategy that uses limited availability or demand of the electrical or thermal power. To handle this problem, the PLFcurve is not used directly:
During preprocessing, the given curve of the PLF in dependence of the PLR (see orange curve in figure below as example) is discretized. Then, the electrical input power (yellow curve) is calculated at each discretization using the assumption of a linear thermal power output (grey curve) in part load operation. As the relation of the power input to the thermal power output is defined by the COP that is changing in every timestep, any COP can be chosen for this initial calculation during the preprocessing. For this example, a COP of 4 is chosen. This process results in two value tables for the electrical input power and the thermal output power. The latter one is, according to the assumption made above, a straight line as shown in the figure.
Both value tables are then normalized to their maximum value as shown in the next figure. The thermal power input although can not be precalculated as it depends on the absolute difference of thermal output and electrical input power.
In every timestep, the two precomputed and normalized value tables of the thermal output and electrical input power are scaled up to the current maximum power, limited by the heat pump current fullload operation state. There, the actual COP at the current timestep is represented in the ration of both values. The two scaled value tables can then be used to determine the actual PLF that is necessary to cover the current demand or to limit the operation state due to the limited available electrical power (interpolation on value table with known power, or interpolation in preprocessing). For the thermal output power, this is trivial as the ratio of the maximum thermal power output to the thermal power demand is equal to the PLF. To calculate the PLF for the thermal input power, if this is a limited source according to the operational strategy, the two scaled value tables need to be subtracted from each other to get a third table:
This third value table, generated in each timestep, can then be used to determine the maximum possible PLF according to the available thermal input power from a limited thermal power source.
All three PLF (from thermal input and output as well as electrical input power) are then compared and the smallest one is chosen as operating state in the current timestep. If this value is smaller than the minimal allowed PLF of the heat pump , the heat pump will not be in operation in the current timestep.
This method avoids the need to invert polynomial functions at each timestep and is computationally more efficient.
The definition of the part load factor curve is userdefined and differentiated into inverter and onoff heat pumps. The part load factor curve for inverterdriven heat pumps is based on Blervaque2015^{1} and Filliard2009^{12}. There, the curve is defined in two separate sections. The section below the point of maximum efficiency is a function according to the part load factor calculation in DIN EN 14825 for waterbased onoff heatpumps, differing from the cited paper but according to Fuentes2019^{7}. The section above the point of the maximum efficiency is approximated as straight curve. The definition of these curve can be done entering the cccoefficient and the coordinates of the two points highlighted in the figure below. Here, cc is chosen as 0.95 and is used to stretch the curve to meet the intersection point with the straight line.
This results in the following equation to calculate the part load factor for inverterdriven heat pumps, defined by the coefficients cc and a according to DIN EN 14825, the point of maximum efficiency at (/) and the PLR_1 at PLF = 1:
For onoff heat pumps, is set to 1 and the domain of the first equation above is set to the whole range of the PLR.
Icinglosses of heat pumps with air as source medium
To account for icing losses of heat pumps with air as source medium, the approach presented in TRNSYS Type 401 is used^{15}. When considering icinglosses, make sure that icing losses are not already included in the polynomials for thermal and electrical power!
For the calculation of icing losses, five coefficients are needed: , , , and . According to the Type 401, icing losses are calculated using a superposition of a gaussian curve with its maximum between 0 °C and 5 °C representing the maximum likelihood of frost within the heat pump (high absolute humidity) and a linear curve, representing the higher sensible energy effort to heatup the components of the heat pump for defrosting. Exemplary curves are shown in the following figure (linear, gauss and superposition):
The exemplary coefficients for the curves in the figure above are , , , , .
The resulting superposition, which represents the percentage loss of the COP due to icing as a function of ambient temperature, is expressed by the following formula, where the coefficients are reduced to the last letter for better readability:
can then be used to reduce the COP for icing losses:
According to the results found in Wei2021^{14}, it is assumed that the decrease of the COP due to icing losses will only increase the power input of the heat pump. It will not affect the thermal power output.
Steps to perform in the simulation model of the heat pump
The calculation is based on TRNSYS Type 401^{15} that is almost similar to Type 204^{16} (Type 204 provides an english documentation). The cycling losses of the heat pump in both TRNSYS models are calculated using an exponential function to describe the thermal capacity effects during heatup and cooldown. Here, these cycling losses will only be used during start and stop of the heat pump  actual cycling losses from onoff heatpumps will be considered separately in the process to allow the consideration of modulating heat pumps as well.
There are two different possibilities in calculating the full load power of the heat pump in dependence of and . An overview of the simulation steps and the required inputs are given in the following figure. A detailed description of the process shown in the figure is given below. Each of the main steps is described in more detail in the previous chapter.
Steps to calculate the electrical and thermal energy in and outputs of HP using a polynomial fit of the thermal and electrical power (compare to left side of figure above):
 using polynomial fits to calculate stationary thermal in and output and electrical fullload power at given temperatures of and for given nominal thermal power
 differing source and sink medium:
 airwater
 waterwater
 solewater
 differing temperature range:
 normal heat pump
 hightemperature heat pump
 polynomial fits have to be normalized to rated power at specified temperatures! Rated power has to be related always to the same temperature lift according to DIN EN 14511 > different fits for normal (B10/W35, W10/W35, A10/W35) and high temperature (B35/W85, W35/W85) heat pumps
 differing source and sink medium:
 reduce thermal power output due to transient capacity effects during startup as average over current timestep and calculate COP at full load with calculated thermal and electrical power
 may adjust COP by icing losses for airwater and airair heat pumps; calculate COP, recalculate electrical input power
 get demand/availability of thermal or electrical energy (mind !), differing if thermal and/or electric energy related operation strategy is chosen
 calculate smallest nonlinear partload ratio (PLR) with current demand and temperaturedependent, transient fullload power and precalculated value tables from PLFcurve, in dependency of heat pump type (inverter, onoff)
 calculate partload thermal and electrical energy, recalculate COP
If universal data table or the CarnotCOP reduced by an efficiency factor should be used instead of the more accurate model described above, a different calculation approach is needed (compare right side in the figure above):
 Get power at current temperatures
 using nominal power without a temperaturedependency or
 using polynomial fits to calculate stationary thermal or electrical fullload power at given temperatures of and , depending on control strategy (see above)
 get stationary fullload COP at given temperatures of and either from
 COP data table (fitted to polynomials in precalculation) or
 CarnotCOP reduced by an efficiency factor
 determine the unknown, noncontrolled full load power (electrical or thermal) with known, controlled power and COP
 continue with transient capacity effects as described above
Contrary to the TRNSYS Type 401, the mass flow here is variable and not constant within two time steps, therefore the and can be calculated directly without the need of iteration as implemented in Type 401. Here, the is a fixed, userspecified value in the presented simplified model.
The polynomials describing the temperaturedepended thermal and electrical power of the heat pump need to be normalized to the power consumption at the rated operation point in order to be able to autoscale the size in parameter variation studies. Therefore, the following steps are necessary:
 fit data to polynomial for thermal and electrical energy
 calculate power at specified nominal temperatures with generated fitted polynomial
 normalize polynomial to calculated rated power at specific temperature using a fraction_factor
Inputs und Outputs of the Heat Pump:
Symbol  Description  Unit 

heat flow supplied to the HP (heat source)  [W]  
heat flow leaving the HP (heat sink)  [W]  
electric power demand of the HP  [W]  
electric power demand of the HP incl. losses of the power electronics  [W]  
condenser inlet temperature  not used  [°C]  
condenser outlet temperature  [°C]  
evaporator inlet temperature  [°C]  
evaporator outlet temperature  not used  [°C] 
Parameter of the Heat Pump:
Symbol  Description  Unit 

rated thermal energy output of heat pump at specified conditions  [W]  
(normalized) polynomial of maximum full load thermal heat output at given temperatures  [W]  
(normalized) polynomial of maximum full load electrical power output at given temperatures  [W]  
or  
linear reduction factor for nominal full load thermal output power with respect to  [%/°C]  
linear reduction factor for nominal full load electrical input power with respect to  [%/°C]  
coefficient of performance (COP) of the heat pump depending on and  []  
efficiency factor of heat pump, reduces the CarnotCOP  []  
and  
minimum possible part load of the heat pump  [%]  
part load ratio at point of maximum efficiency (inverter only)  []  
part load factor at point of maximum efficiency (inverter only)  []  
part load factor at part load ratio = 1 (inverter only)  []  
coefficient for part load curve according to DIN EN 14825  []  
five coefficients for curve with icing losses according to TRNSYS Type 401 (air heat pump only)  []  
efficiency of power electronics of heat pump  []  
minimum operating time of heat pump  [min]  
startup time of the HP until full heat supply (linear curve)  [min]  
cooldown time of the HP from full heat supply to ambient (linear curve)  [min] 
State Variables of Heat Pump:
Symbol  Description  Unit 

current operating state (on, off, part load)  [%] 
Hydrogen Electrolyser (HEL)
The hydrogen electrolyser uses electrical energy to split water into its components hydrogen () and oxygen () as shown in the following reaction equation:
If the electrical energy is provided by renewable energies, the resulting hydrogen is labeled as "green hydrogen" and can be used to decarbonize the mobility or industrial sector or fed into the natural gas grid. The waste heat generated in the process can be used directly by feeding it into a heat network or via an intermediate heat pump. For flexible operation, it is possible to discharge the waste heat to the environment using a chiller. The use of waste heat is an important factor for the overall efficiency of the electrolyser.
The general energy and mass flow in the electrolyser as well as the losses considered in the model can be seen in the following figure.
The relationship between supplied hydrogen of the electrolysis (energy () or mass flow ()) and the consumption of electrical energy () is given in the following equation, where can be either the net or the gross calorific value of the hydrogen:
Due to the purification losses of the hydrogen caused by the reduction of oxygen molecules contained in the hydrogen gas in the catalyst, depending on the electrolysis technology, the actually obtained hydrogen energy or mass flow is reduced by the proportion of the hydrogen losses to the energy or mass flows, supplemented with index :
Conversely, by rearranging and substituting the previous equations from a required hydrogen mass flow, the electrical power consumption can be calculated as follows:
The usable waste heat from the electrolysis process is determined, depending on the available information, as
With an increase of operation time, the efficiency in hydrogen production of the stacks of electrolysers is decreasing while the efficiency of heat production is increased. This is due to degradation effects in the stacks. This effect of aging of the stack cells can be expressed by an correction factor for each the hydrogen () and the heat ( > 0) related efficiency. These correction factors are given in the change of percentage points per 10.000 full load hours (FLH), where the full load hours are determined by dividing the total hydrogen produced by the nominal hydrogen output of the electrolyser. The efficiencies of hydrogen and heat production are therefore corrected in every timestep using the nominal efficiency at the point of the beginning of life of the electrolyser, the correction factors and the passed FLH.
Keep in mind: Test if sum of efficiencies will reach values > 1 or if one efficiency falls below zero for the given maximum changing intervale of the stacks (ToDo)
With a known mass flow and the specific heat capacity of the heat transfer medium of the heat recovery as well as a known inlet temperature , the outlet temperature of the heat transfer medium from the cooling circuit can be determined by rearranging the following equation:
The heat loss , which cannot be used and is dissipated to the environment via heat transport mechanisms, is calculated as follows
The actual needed power supply of the electrolyser increases by losses in the power electronics and results from the electrical reference power and the losses in the power electronics to
Since the oxygen produced during the electrolysis process can also be utilized economically under certain circumstances, the resulting oxygen mass flow is determined from the stoichiometric ratio of the reaction equation of the water splitting described at the beginning:
The required mass flow of water can be determined from the supplied masses of hydrogen and oxygen and the purification losses in the water treatment unit, characterized by the fraction of purification losses .
Assumption: The electrolyser is only operated between minimum 0 % and maximum 100 % load. A specification of power above nominal power, which frequently occurs in practice, is not supported.
Inputs and Outputs of the Electrolyser:
Symbol  Description  Unit 

electrical power requirement of the electrolyser  [W]  
electrical power requirement of the electrolyser incl. losses of power electronics  [W]  
water mass flow fed to the electrolyser  [kg/h]  
oxygen mass flow delivered by the electrolyser  [kg/h]  
hydrogen mass flow produced by the electrolyser (before cleaning losses)  [kg/h]  
hydrogen mass flow provided by the electrolyser (after cleaning losses)  [kg/h]  
hydrogen energy flow discharged from the electrolyser (before cleaning losses)  [W]  
hydrogen energy flow provided by the electrolyser cleaning losses)  [W]  
cooling fluid inlet temperature of electrolyser  [°C]  
cooling fluid outlet temperature of electrolyser  [°C]  
waste heat provided by the electrolyser  [W]  
thermal losses in electrolyser (unused waste heat))  [W] 
Parameter of the Electrolyser:
Symbol  Description  Unit 

electric power consumption of the electrolyser under full load (operating state 100 %)  [W]  
efficiency of hydrogen production of the electrolyser ( related to as a function of operating state, plant size and plant type at the beginning of live)  []  
efficiency of the usable heat extraction of the electrolyser (related to at the beginning of live)  []  
linear decrease of efficiency of hydrogen production due to degradation per 10.000 full load hours, typically < 0  
linear increase of efficiency of heat production due to degradation per 10.000 full load hours, typically > 0  
efficiency of the power electronics of the electrolyser  []  
minimum allowed partial load of the electrolyser  []  
minimum operating time of the electrolyser  [min]  
startup time of the electrolyser until full heat supply (linear curve)  [min]  
cooldown time of the electrolyser from full heat supply to ambient (linear curve)  [min]  
massdependent energy of hydrogen (net calorific value or gross calorific value)  
stoichiometric massbased ratio of oxygen and hydrogen supply during electrolysis  [kg / kg ]  
percentage of purification losses in hydrogen purification  [%]  
percentage of purification losses in water treatment  [%]  
pressure of hydrogen supply  [bar]  
pressure of oxygen supply  [bar]  
max. allowed temperature of cooling medium input  [°C] 
State variables of the Electrolyser:
Symbol  Description  Unit 

current operating state (on, off, part load)  [%] 
Combined heat and power plant (CHPP)
Energy balance on CHPP:
Calculation of electric power output:
Calculation of thermal power output:
Calculation of thermal losses in CHPP:
Relation of electric and thermal power output:
The partload dependent efficiency as described in the chapter "general transient effects" can be considered as well.
ToDo: partload dependent efficiency definition with heat and electricity > two efficiency curves? One efficiency curve and the second one related to the first one? Part load curve e.g in Urbanucci2019^{17}
Inputs and Outputs of the CHPP:
Symbol  Description  Unit 

electric power output of the CHPP  [W]  
electric power provided by the CHPP  [W]  
thermal power output of the CHPP  [W]  
energy demand of the CHPP, natural or green gas (NCV or GCV)  [W]  
thermal energy losses of the CHPP  [W] 
Parameter of the CHPP:
Symbol  Description  Unit 

rated electric power output of the CHPP under full load (operating state 100 %)  [W]  
rated thermal power output of the CHPP under full load (operating state 100 %)  [W]  
thermal efficiency of CHPP, function of PLR (regarding NCV or GCV, needs to correspond to )  []  
electrical efficiency of CHPP, including selfuse of electrical energy, function of PLR (regarding NCV or GCV, needs to correspond to )  []  
minimum allowed partial load of the CHPP  []  
minimum operating time of the CHPP  [min]  
startup time of the CHPP until full heat supply (linear curve)  [min]  
cooldown time of the CHPP from full heat supply to ambient (linear curve)  [min] 
State variables of the CHPP:
Symbol  Description  Unit 

current operating state of the CHPP (on, off, part load)  [%] 
Fuel boiler (FB)
Implements traits: PLRdependent efficiency
Energy balance of fuel boiler:
Inputs and outputs of the FB:
Symbol  Description  Unit 

thermal power output of the FB  [W]  
energy demand of the FB as chemical fuel  [W]  
thermal losses of the FB  [W] 
Parameters of the FB:
Symbol  Description  Unit 

rated thermal power output of the FB under full load (operating state 100 %)  [W]  
thermal efficiency of fuel boiler depending on the PLR  []  
minimum allowed partial load of the GB  [] 
Typical efficiency functions
Note: These are exemplary values and do not imply validation or extensive research.
Note: An important part of choosing efficiency values is considering if the efficiency is relative to the lower, higher or gross heating value of the fuel. The simulation model outputs energy values for the required fuel for operation. How a given energy value corresponds to an amount of fuel is directly related to the heating value to which the efficiency is relative. For example, if a fuel with a GHV of 2.8 and a fuel boiler with a constant efficiency of 0.9 relative to the GHV is used, this means a simulated heat output of 25.2 kWh can be expected from 10 kg or 28 of input fuel.
Conventional gasfired boiler
 Adapted from LeeSeo2019^{18}: . Note that the coefficients in the paper do not match given values. The coefficients were adapted as we were not able to replicate the figures in the paper.
Wood pellet boiler
 Bottomfeed boiler, adapted from Verma2013^{19}: Constant 88.5%
 Topfeed boiler, adapted from Verma2013^{19}: 70% at PLR of 0.3, 87% at PLR of 1.0
 Horizontalfeed boiler, adapted from Verma2013^{19}: Constant 88.25%
Gas boiler (GB)
Modelled as fuel boiler with burnable gasses as input.
Oil heating (OH)
Modelled as fuel boiler with liquid fuel as input.
Electric heating rod (ER)
Modelled as fuel boiler with electricity as input. This is not physically correct, as electricity is not a chemical fuel, however the numerical mechanisms are the same.
Biomass boiler (BB)
Modelled as fuel boiler with solid biomass fuel as input.
Heat sources
Soil
 geothermal probes > see below
 geothermal collector > see below
 geothermal basket collector > not included for now
 geothermal trensh collector > not included for now
 geothermal spiral collector > not included for now
Geothermal Probes
Overview
Geothermal probes are vertical geothermal heat exchangers with a typical drilling depth of 50  150 m. Into the borehole, which usually has a diameter of 150  160 mm, pipes are laid. In most cases, two pipes are inserted into the borehole in a Ushape and the borehole is subsequently filled with filling material. The purpose of the filling material is to improve the thermal properties of the heat transfer between the probe tubes and the ground and to give the borehole stability. Geothermal probes serve as heat reservoirs for heat pumps and can also be used conversely as cold reservoirs in summer regeneration mode. In larger systems, several borehole heat exchangers are connected hydraulically in parallel to form fields of geothermal probes. Over longer periods of time, the temperature fields around adjacent probes in a field influence each other. There are several approaches to model geothermal probes. In ReSiE, an approach based on gfunctions is chosen. Using the gfunctions, temperature responses of the surrounding earth to changes in thermal in and output power can be calculated, as illustrated in the figure below. This approach eliminates the need to numerically calculate the temperature field of the entire ground at each time step and is therefore computationally efficient. The gfunction values are based on analytical mathematical computational equations, which will be discussed in more detail later.
Basic Simplifications
The soil is assumed to be homogeneous with uniform and constant physical properties over time. The properties can be determined, for example, by a thermal response test, or estimated by assumptions of the soil typology with standard values from VDI 46401^{20}. In addition, it is assumed that the heat transport processes in the ground are based exclusively on heat conduction. Convective effects, like ground water flow, are therefore not taken into account. All probes in the probe field are assumed to be identical in geometry and design and are hydraulically connected in parallel, i.e. the same volume flow rate flows through all of them in each time step. The borehole and fluid temperatures of each individual probe are assumed to be the same and the total heat extraction and input rates are divided equally among all probes.
gfunction approach
The general gfunction approach was introduced by Eskilson.^{21} The current temperature at the borehole wall as response to a specific heat extraction or injection within one timestep can be determined using the following equation:
where is the undisturbed ground temperature, is the heat conductivity of the soil and the precalculated gfunction value at the current simulation time (\t). can be calculated with the total heat extraction rate for one single probe , which is constant over each time step, and with the probe depth . is considered to be uniform over the entire depth of the probe.
Since the heat extraction or injection rate varies with each time step, a superposition approach is chosen, which is based on Duhamels theorem.^{22} The temperature at the borehole wall is calculated by superimposing the temperature responses to past heat pulses:
The undisturbed ground temperature can be assumed as a constant value averaged over the probe depth. With the assumption of a thermal borehole resistance between the borehole wall and the circulating fluid, an average fluid temperature can be calculated from the borehole temperature. The calculation approach of the thermal borehole resistance will be discussed in more detail later.
Since a uniform borehole wall temperature over the entire probe depth is assumed, a depthaveraged fluid temperature is calculated.
Symbol  Description  Unit 

Heat conductivity of soil  []  
gfunction  []  
probe depth  [m]  
i  Index Variable  [] 
n  total numbers of time steps so far  [] 
specific heat extraction or injection  []  
Thermal borehole resistance  []  
t  current simulation time  [s] 
Temperature at the borehole wall  [°C]  
Average fluid temperature  [°C]  
Undisturbed ground temperature  [°C] 
Calculation of the gfunction values
There are a number of approaches of varying complexity for determining the gfunctions. Fortunately, there are already precomputed libraries, such as the opensource library of Spitler&Cook2021^{25}, which save a timeconsuming calculation for gfunctions of various probe field configurations. The probe field configuration is understood as the number of probes in the field, the respective probe depth, the distance between the probes and the overall geometric arrangement of the probes. For each configuration, 27 precalculated gfunction values are provided at different time points between which the ReSiE implementation interpolates in order to be able to access the corresponding gfunction values for each simulation time step. The first interpolation point of the library is always at , where is the steadystate time defined by Eskilson 1987^{21}:
where is the thermal diffusivity of the surrouding earth and is the probe depth. Depending on the thermal properties of the soil, the first given value in the library mentioned above at corresponds to a time after serveral days to weeks. Since the simulation time step size is in the range of a few minutes to hours, further gfunction values must be calculated for the missing shortterm period. This is done under the assumption that the temperature fields of the probe fields do not influence each other during these short periods of time.^{23} Thus, a calculation equation for the gfunction can be chosen that is only valid for a single probe. In ReSiE, the approach by Carslaw and Jaeger is implemented ^{24}, which simplifies the probe as an infinite cylindrical source or sink. The shortterm gfunction values can be calculated using the following equation:
Where ,, and are Besselfunctions, is an integral variable, is the FourierNumber and is the radius ratio: with as the equivalent radius, as the radius of an Utube and as the borehole radius. After calculating the gfunction values for the single probe, an overlap with the gfunction values from the library of Spitler&Cook2021^{25} takes place. If both gfunction value series do not have a common intersection point, the library values are used from the first grid point from Spitler&Cook, which take into account mutual probe influence over longer periods of time. Thus, the gfunction is composed as shown in the grafics below, where "online library" is meant to be the one by Spitler&Cook. The time horiont at the xaxis is given in years (a):
Symbol  Description  Unit 

thermal diffusivity  []  
probe depth  [m]  
,,,  Besselfunctions  [] 
equivalent radius of cyldindric heat source or sink  [m]  
radius of a Utube  [m]  
radius ratio  []  
temperature at the borehole wall  [°C]  
steadystate time by Eskilson1987^{21}  [s] 
Thermal borehole resistance
All considered heat transfer processes within a borehole are summarized in the thermal borehole resistance, which is used to calculate a fluid temperature from a borehole temperature. The calculation of the thermal borehole resistance for the determination of the average fluid temperature in ReSiE is based on an approach by Hellström1991^{26}:
with the following substitutions:
where is the thermal conductivity of the backfill material, is the outer radius of a probe tube, is the inner radius of a probe tube, is the borehole radius, is the distance between the two adjacent probe tubes, is the heat transfer coefficient on the inside of the tube, and is the thermal conductivity of the soil.
Energies are transferred between the coupled components in ReSiE, but not volume flows. For this reason, an average power is calculated at the beginning of each time step on the basis of the energy extracted within the known time step width. The spread of the heat transfer fluid is assumed to be constant during the operation. On the basis of the average heat energy input or output within the current time step, a mass flow can be calculated using the following equation, whereby this is halved in the case of an double Uprobe.
where represents the fluid mass flow, the total heat extraction or input, the specific heat capacity of the fluid and the spread between inlet and outlet temperatures, which is assumed to be constant within the whole simulation. Since the inner crosssection of the tube is known (or set as a default value), statements about the flow condition in the probe tube can be made on the basis of the mass flow after calculating the Reynolds number . This is relevant because the heat transfer coefficient on the inside of the tube depends strongly on the level of turbulence. The more turbulent the flow, the greater is the heat transfer coefficient.
with as the fluid velocity, as the kinematic viscosity of the fluid and as the density of the fluid. Based on the Reynolds number , a corresponding calculation equation of the Nußelt number will be used in the following, depending on the flow condition. For Re 2300, which is laminar flow, a simplified equation used in Ramming^{27} is used: where is the Prandtl number of the heat carrier fluid, is the inner diameter of one Upipe and
For , which is turbulent flow, an equation by Gielinski^{28} is used: Where is calculated as follows
For 2300 Re , which is the transition between laminar and turbulent flow, an equation by Gielinski^{29} is used:
where is calculated as follows
Based on the calculated Nußelt number, the heat transfer coefficient on the inside of the tube is calculated:
Symbol  Description  Unit 

heat transfer coefficient inside the tube  [W/]  
kinematic viscosity of the fluid  [/s]  
density of the fluid  [kg/]  
spread between fluid inlet and outlet temperature  [K]  
fluid velocity  [m/s]  
specific heat capacity of the fluid  [J/(kg K)]  
Inner diameter of a Upipe  [m]  
,,,  Besselfunctions  [] 
Total length of a Upipe (up and down)  [m]  
fluid mass flow  [kg/s]  
Nußelt number  []  
Prandtl number of the heat carrier Fluid  []  
Prandtl number of water  []  
total heat extraction or input  [W]  
tadius of a Utube  [m]  
equivalent radius of cyldindric heat source or sink  [m]  
Reynolds number  []  
temperature at the borehole wall  [°C]  
steadystate time by Eskilson1987^{21}  [s] 
Geothermal Heat Collector
Overview
There are several types of geothermal heat collectors. The Model in ReSiE covers classic horizontal geothermal heat exchangers with a typical depth of 12 m below the surface, e.g. by a number of pipes laid parallel to each other. In addition to the physical properties of the soil, local weather conditions have a noticeable influence on the soil temperature due to the low installation depth below the earth's surface, e.g. compared to geothermal probes systems. When designing geothermal collectors, the aim is to achieve partial icing of the ground around the collector pipes during the heating season in order to utilize latently stored energy. However, the iced volume around the collector pipes must not be too large in order to prevent precipitation from seeping into deeper layers of the earth. VDI 46402 specifies design values for the arearelated heat extraction capacity depending on the soil type and the climate zone.
Simulation domain and boundary conditions
For modeling horizontal geothermal collectors, a numerical approach is chosen here, which discretizes the soil and calculates a twodimensional temperature field at each time step.
In the figure below, a schematic sectional view of the twodimensional simulation domain is shown. A symmetrical temperature distribution in positive and negative xdirection of the collector tube axis is assumed to save computing time. Furthermore, boundary effects and interaction between adjacent collector tubes are neglected. Therefore, the simulation range in the xdirection includes half the pipe spacing between two adjacent collector pipes including half a collector pipe, where the outer simulation boundaries are assumed to be adiabatic. In ydirection the depth of the simulation area is freely adjustable. Because the lower simulation boundary conditions are assumed to be constant, a sufficiently large distance between the simulation boundary and the collector pipe should be considered, to avoid the calculation results being too strongly influenced by the constant temperature.
[Currently work in Progress: Automatic discretization]
The simulation area in zdirection is necessary exclusively for the later formation of control surfaces and volumes around the computational nodes for energy balancing and includes the pipe length.
Within the simulation domain, a computational grid is built up for the numerical calculation of the temperature field in each time step. The nodes in xdirection get the index "i", those in ydirection the index "j". The narrower the spatial step size is defined between the computational nodes in x and ydirection, the finer the computational grid is and the more accurate the calculated temperature values are. However, this is also associated with a significant increase in computing time. In this model, the spatial step sizes between the computational nodes are not kept constant in order to keep the accuracy high only at necessary locations of the simulation area. These locations include the region around the collector pipe and the layers near the earth's surface, in order to be able to represent shortterm heat extraction and input into the simulation area as accurately as possible. The computational nodes each represent control volumes of the soil with a constant temperature. By balancing the energy of the control volumes in each time step, their temperatures can be recalculated taking into account the heat storage effect. The calculation from to will be explained in detail later.
The control volumes are calculated as follows: where is the control volume around a node and , , and are the variable location step widths in x, y, and z directions, respectively.
Modelling of the soil
In the context of this model, the soil is considered to be homogeneous with uniform and temporally constant physical properties. However, an extension to include several earth layers in ydirection would be possible in a simple way by assigning appropriate parameters to the computational nodes. The basis of the temperature calculation is the energy balance in each control volume for each time step:
where is the heat energy supplied or released between two time steps, is the control volume, is the density of the soil, is the specific heat capacity of the soil , is the temperature of the respective node, and is an index for the time step. It is assumed that the heat transport between the volume elements in the soil is based exclusively on heat conduction. The heat fluxes to are supplied to or extracted from the adjacent volume elements around the node (i,j) and are calculated with the following equations:
Where is the contact area between the adjacent control volumes and is the thermal conductivity of the soil. The heat flows to supplied to and extracted from the volume element are summed up and multiplied by an internal time step size τ.
If the value of τ is chosen too large, numerical instabilities and thus completely wrong calculation results may occur. According to the TRNSYS Type 710 Model (Hirsch, Hüsing & Rockendorf 2017)^{30}, the maximum internal time step size depends significantly on the physical properties of the soil and the minimum spacial step size and can be determined as follows:
By rearranging the equation of the energy balance from above, the new value for the temperature of each control volume can be calculated for the current time step as
Boundary Conditions
The control volumes around the computational nodes at the outer edges of the simulation area are calculated so that the respective control volumes do not extend beyond the simulation boundary. In addition, the lateral simulation boundaries are considered adiabatic, so the heat fluxes over the adiabatic control surface are set to zero when calculating the temperature. At the lowest computational nodes, the temperature is defined as constant before the simulation starts, which is why all computational steps for calculating new temperatures are eliminated. For the nodes at the upper simulation edge, which represent the earth's surface, no heat conduction from above is considered. Instead, weather effects in the form of solar radiation into the ground (), heat radiation from the ground to the surroundings () and convective heat exchange between the ground and the air flow above () are taken into account. The heat flow from above (in the figure: of the uppermost nodes) is therefore calculated as:
where is the incoming global radiation, is the longwave radiation exchange with the ambient, and is the convective heat flux between the surface and the air flowing over it. These terms are calculated as follows:
with as the reflectance of the earth's surface and as the global radiation read from a weather dataset;
where is the emissivity of the surface, is the StefanBoltzmann constant, and is the absolute temperature (in K);
with as the convective heat transfer coefficient at the surface and as the ambient air temperature.
Another important aspect of the model is the interface between the collector pipe and the surrounding soil. The heat carrier fluid is modelled in one node. Each of the five neighbouring nodes is assigned 1/5 of the soil volume surrounding the pipe and all of them have the same temperature.
The temperature calculation in the nodes neighbouring the pipe differs from the others in that an internal heat source or sink appears in the calculation equation. The internal heat source or sink represents the thermal heat flow that is extracted from or introduced into the ground. It is provided to the geothermal collector model as an input parameter of ReSiE. Since only half of the pipe's surroundings are in the simulation area, the heat flow given to the model is halved and distributed to each node as an internal heat source.
Heat Carrier Fluid
The description of the heat carrier fluid is very similar to the explanations in the chapter "Geothermal probes", which is why it is not explained here in detail again. Instead of the thermal borehole resistance from the probe model, a lengthrelated thermal pipe resistance is introduced for the geothermal collector model. First, the following equation in Accordance to (Hirsch, Hüsing & Rockendorf 2017)^{30} is used to calculate the heat transfer coefficient between the heat carrier fluid and the surrounding soil.
where is the heat transfer coefficient, is the convective heat transfer coefficient on the inside of the pipe, is the thermal conductivity of the pipe, is the inside diameter, and is the outside diameter of the pipe. Multiplying by the outer cylinder area of the pipe and then dividing by the pipe length produces a lengthspecific value. The reciprocal of this lengthspecific heat transfer coefficient results in the lengthspecific thermal pipe resistance, which is used in this ReSiE model.
The heat extraction or heat input capacity is related to the tube length of the collector and a mean fluid temperature is calculated using the lengthrelated thermal resistance :
with as the lengthspecific heat extraction or injection rate and as the temperature of the nodes adjacent to the fluid node.
Phase Change
In this model, the phase change of the water in the soil from liquid to solid and vice versa is modeled by applying the apparent heat capacity method adapted from Muhieddine2015^{31}. During the phase change, the phase change enthalpy is released or bounded, which is why the temperature remains almost constant during the phenomenon of freezing or melting. Basically, the apparent heat capacity method in the phase change process assigns a temperaturedependent apparent heat capacity to the volume element, which is calculated via a normal distribution of the phase change enthalpy over a defined temperature range around the icing temperature. As a result, the heat capacity takes on significantly larger values during the phase change, so that the temperature deviation between the time steps becomes minimal.
[Note: The implementation of this effect in ReSiE has not been validated yet. ToDo]
Symbol  Description  Unit 

convective heat transfer coefficient on the inside of the pipe  [W/ ]  
convective heat transfer coefficient  [W/ ]  
step widths in x, y, and z direction  [m]  
emissivity of the surface  [m]  
thermal conductivity of the soil  [W / (m K)]  
density of the soil  [kg / ]  
StefanBoltzmann constant  [W/ ]  
internal time step size  [s]  
contact area between two adjacent control volumes  []  
specific heat capacity of the soil  [J/ ]  
inside diameter of the pipe  [m]  
outside diameter of the pipe  [m]  
measured global radiation  [W/]  
Index for the node position in xdirection  []  
Index for the node position in ydirection  []  
Index for the time step  []  
lengthspecific heat extraction or injection rate  [W/m]  
global radiation  [W/]  
longwave radiation exchange with the ambient  [W/]  
convective heat flux  [W/]  
heat extraction or injection rate  [W]  
heat energy supplied or released between two time steps  [J]  
reflectance of the earth's surface  []  
lengthspecific thermal pipe resistance  [(mK)/W]  
Temperature  [°C]  
absolute Temperature  [K]  
Mean fluid temperature  [°C]  
temperature of the nodes adjacent to the fluid node  [°C]  
control volume  [] 
Water
 groundwater well
 surface waters: Temperature regression from measurement data: Harvey2011
 waste heat from industrial processes
 wastewater
 solar thermal collector
Air
 ambient air
 exhaust air
 hot air absorber
External source
 district heating network
Chiller
Simple model of compression chiller (SCC)
A simple model of an air cooled compression chiller is implemented to account for rather irrelevant cooling demands without significant changes in temperatures of the energy to be cooled. This model is a rough approximation, but offers a fast and easy calculation. It is based on a constant seasonal energy efficiency ratio (SEER) as yearly average of the energy efficiency ratio (EER) without partload dependent or temperature dependent efficiency. The energy flow chart is given below. The displayed temperature are only for illustration and will not be considered in this simple model.
The SEER is defined as
Comparing the definition of the EER to the COP given in the chapter of heat pumps, the following relation of the two efficiencies for heat pumps and compression chillers can be obtained
In this simple model, a constant SEER is given and set equivalent to the EER in every timestep to calculate the electrical power needed to cool down a given amount of thermal energy in every timestep:
The thermal output power, calculated from the energy balance of the chiller
,
is transferred to the environment by an air cooler and labeled as losses.
Inputs and Outputs of the SCC:
Symbol  Description  Unit 

thermal power output of the SCC to the ambient air (= )  [W]  
thermal power input into the SSC, equals the thermal cooling power  [W]  
electrical energy power input in the SCC  [W] 
Parameter of the SCC:
Symbol  Description  Unit 

Seasonal energy efficiency ratio (SEER) of the compressor chiller (= constant for all temperatures and partload)  []  
rated thermal power input of the SCC under full load  [W]  
minimum allowed partial load of the SCC with respect to  [] 
State variables of the SSC:
Symbol  Description  Unit 

current operating state of the SSC (on, off, part load)  [%] 
General model for compression chiller (CC)
The general model of a compression chiller, including a partload dependent and temperature dependent efficiency, is modeled in the same way as the heat pump described in the chapter "Heat pump". Instead of defining the thermal energy output as useful energy, the thermal energy input is defined as useful energy. Accordingly, the efficiency is described differently, as EER for the compression chiller instead of COP for heat pumps (see also the section above on the definition of EER).
General model for absorption/adsorption chiller (AAC)
Absorption/adsorption chiller are not implemented yet (ToDo).
Shortterm thermal energy storage (STTES)
The shortterm energy storage is a simplified model without thermal losses to the ambient. It consists of two adiabatically separated temperature layers, represented as an ideally stratified storage without any interaction between the two layers. This model was chosen to keep the computational effort as small as possible. If a more complex model is needed, the seasonal thermal energy storage can be used that is including energy and exergetic losses.
The rated thermal energy content of the STTES can be calculated using the volume , the density , the specific thermal capacity of the medium in the storage and the temperature span within the STTES:
The amount of the total input () and output energy () in every timestep is defined as and
The current charging state can be calculated using the following equation and the charging state of the previous timestep () as well as the input and output energy
leading to the total energy content in every timestep as
The limits of the thermal power in and output ( and ) due to the current energy content and maximum crate of the STTES are given as
Inputs and Outputs of the STTES:
Symbol  Description  Unit 

thermal power input in the STTES  [W]  
thermal power output of the STTES  [W]  
current mass flow rate into the STTES  [kg/h]  
current mass flow rate out of the STTES  [kg/h] 
Parameter of the STTES:
Symbol  Description  Unit 

maximum charging rate (Crate) of STTES  [1/h]  
maximum discharging rate (Crate) of STTES  [1/h]  
rated thermal energy capacity of the STTES  [MWh]  
thermal energy contend of the STTES at the beginning of the simulation in relation to  [%]  
volume of the STTES  [m]  
density of the heat carrier medium in the STTES  [kg/m]  
specific heat capacity of the heat carrier medium in the STTES  [kJ/(kg K)]  
rated upper temperature of the STTES  [°C]  
rated lower temperature of the STTES  [°C] 
State variables of the STTES:
Symbol  Description  Unit 

current amount of thermal energy stored in the STTES  [MWh]  
current charging state of the STTES  [%] 
Seasonal thermal energy storage (STES)
Seasonal thermal energy storages can be used to shift thermal energy from the summer to the heating period in the winter. Due to the long storage period, energy losses to the environment and exergy losses within the storage must be taken into account. Therefore, a stratified thermal storage model is implemented that is described below.
Tank (TTES) and Pit (PTES) thermal energy storage
Neglected: Thermal capacity of the surrounding soil, gravelwater storages
Generalized geometry for TTES and PTES
Figure and method of generalized geometry definition based on [Steinacker2022]^{33}.
Ratio between height and mean radius of the STES:
Upper radius of the STES in dependence of the Volume and : Lower radius of the STES in dependence of the upper radius :
Slope angle has to be in the range of to ensure the shape of a cylinder, a cone or a truncated cone. Analogously, the ratio between the height and the mean radius of the STES has to be smaller as
The height of the STES can be calculated as resulting with the number of layers into the thickness of each layer
Lateral surface of each layer with height , upper radius and lower radius of each layer:
Volume of each layer:
Thermal model for stratified storage
General energy balance in every timestep :
Figure adapted from [Steinacker2022]^{33}.
Stratified storage model based on [Lago2019]^{32} and modified to account for cones according to [Steinacker2022]^{33} and for halfburied storages.
Three different energy or exergy loss mechanisms are taken into account as shown in the figure above:
 Energy losses to the environment through the outer walls (bottom, walls and lid) of each storage layer (), characterized by the heat transfer coefficient of the outer surfaces
 Exergy losses due to diffusion processes between the storage layers , specified by the diffusion coefficient
 Exergy losses due to convection (buoyancy) between the storage layers .
The temperature in layer with height is given by the partial differential equation
The ambient temperature of each layer can be either the ambient air temperature in the specific timestep or the ground temperature depending on the considered layer and the number of layer buried under the ground surface.
Using the explicit Euler method for integration, the previous equation leads to the temperature in every timestep and layer with respect to the temperatures in the timestep before and the layers around (without the index for better overview)
As the coefficients mentioned above are constant within the simulation time, they can be precomputed for computational efficiency.
To illustrate the principle of the implemented model, the following figure shows the mass flow into and out of the STES as well as exemplary for one transition between two layers the mass flow between the layers within the model. The corresponding temperatures are the temperatures of the source (input flow or layer temperature of the previous layer). As a convention, the lowermost layer is labeled with the number 1. The inflow and outflow is always in the top and bottom layers. For correct results, the integrated mass flow within one timestep has to be smaller than the volume of the smallest layer element of the storage (ToDo: Maybe fix this issue in ReSiE?)
To account for buoyancy effects, a check is made in each timestep to determine whether the temperature gradient in the reservoir corresponds to the physically logical state, meaning that the temperatures in the upper layers are higher than in the lower storage layers. If, however, an inverse temperature gradient is present, a mixing process is performed in each timestep for all layers, beginning with : using the volumeratio of each layer with respect to the surrounding layers, inspired by [Lago2019]^{32}:
This method was extensively tested in [Steinacker2022]^{33} and compared to calculations performed with TRNSYS Type 142 with high agreement. Is was shown that an optimal number of layers for this model is 25, considering computational efficiency and quality of the results.
Inputs and Outputs of the STES:
Symbol  Description  Unit 

thermal power input in the STES  [W]  
thermal power output of the STES  [W]  
current mass flow rate into the STES  [kg/h]  
current mass flow rate out of the STES  [kg/h]  
temperature of input mass flow while loading the STES  [°C]  
temperature of output mass flow while loading the STES  [°C]  
temperature of input mass flow while unloading the STES  [°C]  
temperature of output mass flow while unloading the STES  [°C] 
Parameter of the STES:
Symbol  Description  Unit 

rated thermal energy capacity of the STES  [MWh]  
thermal energy contend of the STES at the beginning of the simulation in relation to  [%]  
rated upper temperature of the STES  [°C]  
rated lower temperature of the STES  [°C]  
maximum charging rate (Crate) of STES  [1/h]  
maximum discharging rate (Crate) of STES  [1/h]  
volume of the STES  [m]  
slope angle of the wall of the STES with respect to the horizon  [°]  
ratio between height and mean radius of the STES  []  
density of the heat carrier medium in the STES  [kg/m]  
specific heat capacity of the heat carrier medium in the STES  [kJ/(kg K)]  
coefficient of diffusion of the heat carrier medium in the STES into itself  [m/s]  
heat transfer coefficient of the STES' lid  [W/m K]  
heat transfer coefficient of the STES' wall  [W/m K]  
heat transfer coefficient of the STES' bottom  [W/m K]  
number of thermal layer in the STES for the simulation  [pcs.]  
number of thermal layer of the STES above the ground surface  [pcs.]  
timeseries or constant of ground temperature  [°C]  
timeseries of ambient temperature  [°C] 
State variables of the STES:
Symbol  Description  Unit 

current amount of thermal energy stored in the STES  [MWh]  
current charging state of the STES  [%]  
vector of current temperatures in every layer of the STES  [°C] 
Borehole thermal energy storage (BTES)
Borehole thermal energy storages are not implemented yet (ToDo).
Aquifer thermal energy storage (ATES)
Aquifer thermal energy storages are not implemented yet (ToDo).
Ice storage (IS)
Ice storages are not implemented yet (ToDo).
Hydrogen fuel cell (FC)
Hydrogen fuel cells are not implemented yet (ToDo).
Photovoltaik (PV)
For the calculation of the electrical power output of photovoltaic systems, a separate simulation tool was developed and integrated into ReSiE. It is based on the Python extension pvlib^{35} and uses the model chain approach described in the pvlib documentation. Technical data of specific PV modules and DCAC inverters are taken from the SAM model^{34} and integrated into pvlib.
Inputs can include orientation, tilt, ambient albedo, type of installation (e.g. roofadded, freestanding), as well as module interconnection and specific PV modules and inverters chosen from the library. Additional losses, such as ohmic losses in cables or losses due to soiling, can be taken into account. A weather input dataset is required that includes direct normal, global horizontal and diffuse horizontal irradiance as well as ambient (dry bulb) temperature, humidity and wind speed.
Wind power (WP)
windpowerlib (ToDo)
Achtung: Winddaten von EPW nicht geeignet!
Battery (BA)
Energy balance of battery in every timestep:
SelfDischarge losses of battery:
Charging losses of battery:
Discharging losses of battery:
Current maximum capacity of the battery:
Limits of electrical power in and output (limit to current energy content and maximum crate of battery):
Relation between current charging state in percent and in energy content:
Inputs and Outputs of the BA:
Symbol  Description  Unit 

electrical power input in the BA  [W]  
electrical power output of the BA  [W]  
electrical power losses of the BA due to selfdischarging  [W]  
electrical power losses of the BA while charging  [W]  
electrical power losses of the BA while discharging  [W] 
Parameter of the BA:
Symbol  Description  Unit 

charging efficiency of battery  []  
discharging efficiency of battery  []  
selfdischarge rate of battery (% losses per hour regarding current energy content)  [1/h]  
maximum charging rate (Crate) of battery  [1/h]  
maximum discharging rate (Crate) of battery  [1/h]  
rated electrical energy capacity of the battery  [MWh]  
percentage of the reduction of the current battery capacity due to one full charge cycle  [%/cycle]  
electrical energy contend of the battery at the beginning of the simulation  [MWh] 
State variables of the BA:
Symbol  Description  Unit 

current amount of energy stored in the battery  [MWh]  
current maximum capacity of the battery depending on the number of charging cycles already performed  [MWh]  
current charging state of the battery  [%] 
Hydrogen compressor (HC)
ToDo
 In Tabelle Parameter nur Parameter, die auch eingegeben werden, alle anderen im Text einführen
 check for consistency: partload, timestep, startup, shutdown
References

Blervaque, H et al. (2015): Variablespeed airtoair heat pump modelling approaches for building energy simulation and comparison with experimental data. Journal of Building Performance Simulation 9 (2), S. 210–225. doi: 10.1080/19401493.2015.1030862. ↩↩↩

Arpagaus C. et al. (2018): High temperature heat pumps: Market overview, state of the art, research status, refrigerants, and application potentials, Energy, doi: 10.1016/j.energy.2018.03.166 ↩

DIN EN 14511:2018 (2018): Air conditioner, liquid chilling packages and heat pumps for space heating and cooling and process chillers, with electrically driven compressors. DIN e.V., BeuthVerlag, Berlin. ↩

Bettanini, E.; Gastaldello, A.; Schibuola, L. (2003): Simplified Models to Simulate Part Load Performance of Air Conditioning Equipments. Eighth International IBPSA Conference, Eindhoven, Netherlands, S. 107–114. ↩↩

Toffanin, R. et al. (2019): Development and Implementation of a Reversible Variable Speed Heat Pump Model for Model Predictive Control Strategies. Proceedings of the 16th IBPSA Conference, S. 1866–1873. ↩↩

TorregrosaJaime, B. et al. (2019): Modelling of a Variable Refrigerant Flow System in EnergyPlus for Building Energy Simulation in an Open Building Information Modelling Environment. Energies 12 (1), S. 22. doi: 10.3390/en12010022. ↩

Fuentes, E. et al. (2016): Improved characterization of watertowater heat pumps part load performance. REHVA Journal, August 2016. ↩↩

Fahlén, Per (2012): Capacity control of heat pumps. REHVA Journal Oktober 2012, S. 28–31. ↩

StiebelEltron Heat Pump Toolbox: https://www.stiebeleltron.com/toolbox/waermepumpe/ ↩

https://enrgi.de/wpcontent/uploads/2022/08/Datenblatt_ecoGEO_BC_19kW.pdf ↩

Socal, Laurent (2021): Heat pumps: lost in standards, REHVA Journal August 2021. ↩↩

Filliard, Bruno; Guiavarch, Alain; Peuportier, Bruno (2009): Performance evaluation of an airtoair heat pump coupled with temperate airsources integrated into a dwelling. Eleventh International Building Simulation Conference 2009, S. 2266–73, Glasgow. ↩

Lachance, Alex; Tamasauskas, Justin; Breton, Stéphanie; Prud’homme, Solange (2021): Simulation based assessment on representativeness of a new performance rating procedure for cold climate air source heat pumps. E3S Web Conf. 246, S. 6004. doi: 10.1051/e3sconf/202124606004. ↩

Wei, Wenzhe et al. (2021): Investigation on the regulating methods of air source heat pump system used for district heating: Considering the energy loss caused by frosting and on–off. In: Energy and Buildings 235, S. 110731. doi: [10.1016/j.enbuild.2021.110731]((https://doi.org/10.1016/j.enbuild.2021.110731). ↩

Wetter M., Afjei T.: TRNSYS Type 401  Kompressionswärmepumpe inklusive Frost und Taktverluste. Modellbeschreibung und Implementation in TRNSYS (1996). Zentralschweizerisches Technikum Luzern, Ingenieurschule HTL. URL: https://trnsys.de/static/05dea6f31c3fc32b8db8db01927509ce/ts_type_401_de.pdf ↩↩

Afjei T., Wetter M., Glass A. (1997): TRNSYS Type 204  Dualstage compressor heat pump including frost and cycle losses. Model description and implementation in TRNSYS, Versin 2. Zentralschweizerisches Technikum Luzern, Ingenieurschule HTL. URL: https://simulationresearch.lbl.gov/wetter/download/type204_hp.pdf ↩

Urbanucci, Luca; Testi, Daniele; Bruno, Joan Carles (2019): Integration of Reversible Heat Pumps in Trigeneration Systems for LowTemperature Renewable District Heating and Cooling Microgrids. Applied Sciences 9 (15), S. 3194., doi: 10.3390/app9153194. ↩

Lee, D.Y., Seo, B.M., Yoon, Y.B. et al. Heating energy performance and part load ratio characteristics of boiler staging in an office building. Front. Energy 13, 339–353 (2019). doi: https://doi.org/10.1007/s1170801805965. ↩

Verma, V. K.; Bram, S.; Delattin, F.; Ruyck, J. de (2013): Real life performance of domestic pellet boiler technologies as a function of operational loads: A case study of Belgium. In: Applied Energy 101, S. 357–362. DOI: 10.1016/j.apenergy.2012.02.017. ↩↩↩

Verein Deutscher Ingenieure, VDI 4640 Blatt 1, Thermische Nutzung des Untergrunds  Grundlagen, Genehmigungen, Umweltaspekte: = Thermal use of the underground  fundamentals, approvals, environmental aspects. Berlin: Beuth Verlag GmbH, 2021. ↩

P. Eskilson, Thermal Analysis of Heat Extraction Boreholes. University of Lund, 1987. Available: https://buildingphysics.com/download/Eskilson1987.pdf ↩↩↩↩

Özisik, M.N. Heat conduction. New York: WileyInterscience, 1980. ISBN 047105481X ↩

M. Li, K. Zhu, Z. Fang: Analytical methods for thermal analysis of vertical ground heat exchangers. Advances in GroundSource Heat Pump Systems, 2016. doi: https://doi.org/10.1016/B9780081003114.000066. ↩

H.S. Carslaw., J.C. Jaeger. Heat Flow in the Region bounded Internally by a Circular Cylinder. Proceedings of the Royal Society of Edinburgh, 1942. ↩

J. D. Spitler, J. C. Cook, T. West, and X. Liu: GFunction Library for Modeling Vertical Bore Ground Heat Exchanger. Geothermal Data Repository, 2021. doi: https://doi.org/10.15121/1811518. ↩↩

G. Hellström, Ground Heat Storage: Thermal Analyses of Duct Storage Systems. Theorie. University of Lund, 1991. ↩

K. Ramming: Bewertung und Optimierung oberflächennaher Erdwärmekollektoren für verschiedene Lastfälle. Dissertation, Technische Universität Dresden 2007. ISBN 9783940046413. ↩

V. Gnielinski: Neue Gleichungen für den Wärme und Stoffübergang in turbulent durchströmten Rohren und Kanälen.Forsch.Ingwes 41(1):8–16, 1975. ↩

V. Gnielinski: Ein neues Berechnungsverfahren für die Wärmeübertragung im Übergangsbereich zwischen laminarer und turbulenter Rohrströmung. Forsch im Ing Wes 61:240–248, 1995. ↩

H. Hirsch, F. Hüsing, and G. Rockendorf: “Modellierung oberflächennaher Erdwärmeübertrager für Systemsimulationen in TRNSYS,” BauSIM, Dresden, 2016. ↩↩

M. Muhieddine, E. Canot, and R. March, Various Approaches for Solving Problems in Heat Conduction with Phase Change: HAL, 2015. ↩

Lago, J. et al. (2019): A 1dimensional continuous and smooth model for thermally stratified storage tanks including mixing and buoyancy, Applied Energy 248, S. 640– 655: doi: 10.1016/j.apenergy.2019.04.139. ↩↩

Steinacker, H (2022): Entwicklung eines dynamischen Simulationsmodells zur Optimierung von wärmegekoppelten Wasserstoffkonzepten für die klimaneutrale Quartiersversorgung, unpublished master thesis, University of Stuttgart. ↩↩↩↩↩

System Advisor Model Version 2020.11.29 (SAM 2020.11.29). National Renewable Energy Laboratory. Golden, CO. URL: https://sam.nrel.gov ↩

Holmgren W. F., Hansen C. W. and Mikofski M. A. (2018): Pvlib Python: A python package for modeling solar energy systems, Journal of Open Source Software 3(29), 884, doi: https://doi.org/10.21105/joss.00884 ↩