Skip to main content
Erschienen in:

Open Access 01.10.2024

Model order reduction for the input–output behavior of a geothermal energy storage

verfasst von: Paul Honore Takam, Ralf Wunderlich

Erschienen in: Journal of Engineering Mathematics | Ausgabe 1/2024

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

In this article, we consider a geothermal energy storage system in which the spatio-temporal temperature distribution is modeled by a heat equation with a time-dependent convection term. Such storage systems are often embedded in residential heating systems. The control and management of such systems requires knowledge of aggregated characteristics of the temperature distribution in the storage. These describe the input–output behavior of the storage, the associated energy flows, and their response to charging and discharging processes. Our aim is to derive an efficient, approximate description of these characteristics by using low-dimensional systems of ordinary differential equations (ODEs). This leads to a model order reduction problem for a large-scale linear system of ODEs resulting from the semidiscretization of the heat equation combined with a linear algebraic output equation. In a first step, we approximated the nonautonomous system of ODEs by a linear time-invariant system. Then, we applied Lyapunov balanced truncation model order reduction to approximate the output by a reduced-order system that has only a few state equations but almost the same input–output behavior. The results of our extensive numerical experiments show the efficiency of the applied model order reduction method. We found that only a few suitably chosen ODEs are sufficient to achieve good approximations of the input–output behavior of the storage.
Hinweise

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Abkürzungen
\(Q=Q(t,x,y)\)
Temperature in the geothermal storage
T
Finite time horizon
\(l_x\)\(l_y\)\(l_z\)
Width, height and depth of the storage
\({\mathcal {D}} =(0, l_x) \times (0,l_y)\)
Domain of the geothermal storage
\({\mathcal {D}}^F, ~{\mathcal {D}}^M\)
Domain inside and outside the pipes
\({\mathcal {D}}^{J}\)
Interface between the pipes and the medium (dry soil)
\(\partial {\mathcal {D}}\)
Boundary of the domain
\(\partial {\mathcal {D}}^{I}\)\(\partial {\mathcal {D}}^{O}\)
Inlet and outlet boundaries of the pipe
\(\partial {\mathcal {D}}^{L}, \partial {\mathcal {D}}^{R}, \partial {\mathcal {D}}^{T}\)\(\partial {\mathcal {D}}^B\)
Left, right, top and bottom boundaries of the domain
\({\mathcal {K}} \)
Mappings \((i,j)\mapsto l\) of index pairs to single indices
\(v=v_0(t)(v^x, v^y)^{\top }\)
Time-dependent velocity vector,
\({\overline{v}}_0\)
Constant velocity during pumping
\(c_p^F\)\(c_p^M\)
Specific heat capacity of the fluid and medium
\(\rho ^F\)\(\rho ^M\)
Mass density of the fluid and medium
\(\kappa ^F\)\(\kappa ^M\)
Thermal conductivity of the fluid and medium
\(a^F\)\(a^M\)
Thermal diffusivity of the fluid and medium
\(\lambda ^{\!G}\)
Heat transfer coefficient between storage and underground
\(Q_0\)
Initial temperature distribution of the geothermal storage
\(Q^{G}\)
Underground temperature
\(Q^{I}, Q^{I}_C, Q^{I}_D\)
Inlet temperature of the pipe, during charging and discharging,
\({{\overline{Q}}} ^M, {{\overline{Q}}} ^F\)
Average temperature in the storage medium and fluid
\({{\overline{Q}}} ^{O}, {{\overline{Q}}} ^B\)
Average temperature at the outlet and bottom boundary
\(G^\dagger \)
Gain of thermal energy in a certain subdomain
\(I_{C}, I_{W}\), \(I_{D}\)
Time interval for charging, waiting, discharging periods
\(\nabla \),   \(\Delta =\nabla \cdot \nabla \)
Gradient, Laplace operator
\(N_x,~N_y\)
Number of grid points in xy-direction
\(h_x, h_y\)
Step size in x and y-direction
\(n_P\)
Number of pipes
\({\mathfrak {n}}\)
Outward normal to the boundary \(\partial {\mathcal {D}}\)
n
Dimension of vector Y
\(m, n_O\)
Dimension of input and output
\(\ell \)
Dimension of the reduced-order system
\(\ell _{\alpha }\)
Minimum dimension reaching selection criterion \({\mathcal {S}}(\ell )\ge \alpha \)
\(\mathbb {I}_n\)
\(n \times n\) identity matrix
\({A}, {B}, {C}\)
\(n \times n\) system matrix, \(n \times m\) input matrix, \(n_O\times n\) output matrix of original system
\(\widetilde{{A}}\), \(\widetilde{{B}}\), \(\widetilde{{C}}\)
\(\ell \times \ell \) system matrix, \(\ell \times m\) input matrix, \(n_O\times \ell \) output matrix of the reduced-order system
Y, \({\overline{Y}}\)
n-Dimensional state of original and transformed original system
\({\widetilde{Y}}\)
\(\ell \)-Dimensional state of reduced-order system
Z, \({\widetilde{Z}}\)
\(n_O\)-Dimensional output of original and reduced-order system
g
Input variable of the system
\({\mathcal {G}}_C,~{\mathcal {G}}_O\)
Controllability and observability Gramians
\({{\mathcal {T}}}\)
Invariant transformation
\(\sigma _i\)
Hankel singular values
\(\Sigma \)
Diagonal matrix of Hankel singular values
\({U,L}\)
From Cholesky decomp. of \({\mathcal {G}}_C/{\mathcal {G}}_O\)
\({{W}},~{V}\)
Unitary matrices from the singular value decomposition
\({\mathcal {S}}(\ell )\)
Selection criterion
\({\mathcal {L}}_2(0,t)\)
Set of square integrable functions on [0, t]
LTI
Linear time invariant
MOR
Model order reduction
PHX
Pipe heat exchanger

1 Introduction

This article investigates the input–output behavior of geothermal storage systems which describes the response of the storage to charging and discharging operations. Geothermal storage tanks represent an important class of thermal storage systems and enable extremely efficient operation of heating and cooling systems in individual buildings as well as in district heating systems. They allow heat or cold to be stored in such a way that it can be used hours, days, weeks, or even months later. This helps to shift heat supply and demand over time and to mitigate temporal fluctuations, and is beneficial for space heating, domestic or industrial water heating, and electricity generation. Thermal storage systems can significantly increase both the flexibility and performance of district heating systems and improve the integration of intermittent renewable energy sources into heating networks (see Guelpa and Verda [1], Kitapbayev et al. [2]). They also support peak shaving in power grids, i.e., mitigating peaks by converting electrical energy into thermal energy (power-to-heat). Several geothermal reservoirs can be pooled to form a virtual power plant that provides the necessary capacity for participation in the balancing energy market.
We consider geothermal storage tanks as depicted in Fig. 1 and as presented in detail in our previous work [3, 4]. Such storage tanks are increasingly important and are quite attractive for heating systems in residential buildings, as construction and maintenance are relatively inexpensive. Moreover, they can be integrated into both new and existing buildings. To construct a geothermal storage system, a storage tank with a defined volume is filled with soil and insulated against the surrounding soil. Thermal energy is stored by raising the temperature of the soil inside the storage tank. It is charged and discharged through pipe heat exchangers (PHX) filled with a fluid like water. These PHXs are connected to a heating system in the building, especially to water tanks used for storing heat, or directly to a solar collector. The liquid that transports the thermal energy is moved by pumps. Some of them are heat pumps that raise the fluid temperature to a higher level by converting electrical energy into thermal energy.
A key feature of the geothermal reservoir under consideration is that it is not insulated at the bottom, allowing thermal energy to flow to deeper layers, as shown in Fig. 2. This allows for expansion of the storage capacity, as this heat can be recovered if the storage tank is sufficiently discharged (cooled) and a heat flow is induced back to the storage tank. The inevitable losses due to diffusion into the environment can be compensated, as such geothermal storage units benefit from the higher temperatures in deeper soil layers and can therefore also serve as production units similar to borehole heat exchangers. This is particularly useful in colder climates, such as in many parts of Europe or North America, where soil temperatures at a depth of only 10 m remain relatively stable around \(10 \,{^{\circ }\text {C}}\) for most of the year.
For efficient operation of geothermal storage systems within residential systems, it is necessary to know certain aggregated characteristics of the spatial temperature distribution in the storage tank, their dynamics, and their responses to charging and discharging decisions. It must be determined whether to pump heated or cooled fluid through the PHXs to the storage tank or whether the pumps should be switched off. Furthermore, an appropriate fluid temperature needs to be set during the operation of the pumps. An example of such an aggregated characteristic is the spatially averaged temperature in the storage medium from which one can derive the amount of available thermal energy that can be stored in or extracted from the storage. Another example is the average temperature at the outlet, which allows to determine the amount of energy injected into or withdrawn from the storage. Furthermore, the average temperature at the bottom of the storage allows to quantify the heat transfer to and from the ground via the open bottom boundary. For more details, we refer to Sect. 4.
The above aggregated characteristics can be computed by post-processing the spatio-temporal temperature distribution in the storage. The latter can be obtained by solving the governing linear heat equation with convection and appropriate boundary and interface conditions. This is explained in Sects. 2 and 3. In this study, we utilize a stylized mathematical model of the storage that captures the physical properties needed to describe its input–output behavior, but does not consider all the engineering details. We use finite difference methods to semidiscretize the partial differential equation (PDE) w.r.t. the spatial variables. This approach is also known as ’method of lines’ and leads to a high-dimensional system of ODEs. We refer to [3, 4] for details and a stability analysis of the finite difference scheme as well as results of extensive numerical experiments. Further, we refer to a previous study in Bähr et al. [5, 6], where the storage was not considered isolated but embedded in the surrounding domain and the interaction between geothermal storage and the environment is examined. In that study, the focus was on the numerical simulation of the long-term behavior of the spatial temperature distribution. To simplify the analysis, a simple source term was used to describe charging and discharging, instead of PHXs. Here, we focus on the short-term behavior of the spatial temperature distribution, in particular its response to charging and discharging processes. We choose the computational domain to be the storage depicted by a solid black rectangle in Fig. 2. In our stylized model, we do not consider the surrounding medium but set appropriate boundary conditions to mimic the interaction between storage and environment. In contrast to [5, 6], we model PHXs which are used to charge and discharge the storage.
Literature review on modeling and simulation of geothermal storage systems  Thermal energy storage technologies can be divided into three categories which are sensible heat, latent heat, and thermo-chemical heat storage. In a sensible storage, the temperature of some medium is either increased or decreased. Latent heat storage uses a phase transition of phase-change material. Heat can be added or removed at these transitions without changing the temperature of the material. For an overview, we refer to Zayed et al. [7]. Thermo-chemical heat storage utilizes reversible chemical reactions with thermo-chemical materials.
The geothermal storage system investigated in this article is a sensible storage. It is a relatively new and specialized technology that has only been developed and deployed in the last 15 years. To the best of our knowledge, there are only a few references such as [36] about mathematical modeling and numerical simulation of this type of storage tanks which we already cited above. However, the heat transfer and exchange processes between the heat exchanger and the surrounding soil do not only play a crucial role in this work, but also for the performance of ground source heat pumps in general. The latter are used to extract heat from the ground, collect it, and feed it into heating systems, whereby a storage function is not provided or is only of secondary importance. The systems are divided into horizontal and vertical ground heat exchangers for which a considerable body of engineering literature about modeling and simulation is available. A comprehensive survey is given in Zayed et al. [8].
For horizontal ground heat exchangers, Dasare et al. [9], Gao et al. [10], Hu et. al. [11], Selamat et al. [12], and Shi et al. [13] study the performance of different heat exchanger arrangements (linear-loop, spiral-coil, slinky-coil), and the effect of the velocity of the heat carrier fluid, operation modes, subsurface water flow, soil thermal conductivity, installation depth, and certain atmospheric conditions above the surface. Vertical or borehole heat exchangers are studied in Frei et al. [14], Tilley et al. [15]. Here, the authors consider analytical methods for the computation of the thermal resistance of such systems. Tilley at al. [16] consider a borehole heat exchanger combined with aquifer or water channels that improve the heat transfer rates of the storage system. The focus is on fluid transport through a dynamic porous calcite medium in which a reaction occurs between the solid matrix and the fluid. The authors use a two-dimensional model that has some properties in common with the model presented in Sect. 2.1, see also Remark 2.2, and apply analytical methods, in particular homogenization techniques. Kim et al. [17] and Brunetti et al. [18] focus on the numerical simulation.
Model order reduction & optimization of heating systems  The results of this article are an important prerequisite and indispensable preliminary work to solve optimization problems arising in the cost-optimal management of residential heating systems equipped with a geothermal storage. These are decision-making problems under uncertainty and treated mathematically in terms of stochastic optimal control problems as in Takam [3]. The goal was to find optimal decision rules that determine feedback controls, including storage’s charging and discharging operations, which minimize the expected aggregate costs from the operation of the heating system. We include stochastics in the optimization problem because uncertainties regarding the future local production of thermal energy from renewable sources, e.g., by a solar collector must be taken into account for optimal operation. Predictions of such weather-dependent variables are difficult and fraught with uncertainties. Further, the heating demand is driven by the temperature of the environment, which is also weather dependent and not exactly predictable. Another source of uncertainties is the future price of fuel such as gas and oil needed for heat production in fuel-fired boilers. Larger consumers often do not have fixed tariffs, but are affected by fluctuations of the energy prices on energy markets. The market’s inherent uncertainties market must then be taken into account in the decision-making process for the optimal operation of the system.
The time-varying and non-predictable quantities can be modeled as stochastic processes defined by stochastic differential equations (SDEs). These processes form a first set of exogenous and uncontrolled state variables of the resulting stochastic optimal control problem. A second group contains endogenous and controlled variables, and contains, for example, temperatures in certain components of the heating system with dynamics controlled by ODEs. Another example are the aggregated characteristics of the spatio-temporal temperature distribution in the geothermal storage. They describe the input–output behavior of the storage and its response to charging and discharging processes. Although the aggregated features can be obtained by post-processing the spatial temperature distribution, the formulation of the optimal control problem requires the description of dynamics, either by the governing PDE for heat propagation or the approximating large-scale system of ODEs resulting from semidiscretization.
Working directly with the PDE or the large-scale system of ODEs for the mathematical description of the dynamics of the controlled state is prohibitively expensive, when we need to solve the stochastic optimal control problem numerically. This is our main motivation for investigating model order reduction (MOR) techniques and explained in more detail in the next paragraph. Note that this differs from deterministic control problems, and also from the possibility of simply simulating the state dynamics numerically. For the two-dimensional model under consideration, such a simulation is not too expensive from the point of view of computational time. Even for refined and three-dimensional models, this is feasible with today’s computer capabilities. Of course, MOR is also helpful there. For example, Kim et al. [17] use modal decomposition for MOR to improve computational efficiency of the simulations.
Model order reduction & stochastic optimal control  In continuous time and using the system of ODEs, the control problem’s state dynamics will be governed by a system of SDEs and ODEs. The control problem can be tackled using the established theory of controlled diffusion processes. Applying dynamic programming techniques, the desired optimal decision rules can be derived from necessary optimality conditions, which are given in terms of a highly nonlinear PDE known as Hamilton–Jacobi–Bellman equation. Here, the number of “spatial variables” is given by the number of states in the control problem which is very high. Typically, closed-form solutions are not available and one has to rely on numerical methods to solve that nonlinear PDE. This approach already suffers from the curse of dimensionality even when the number of states is small, say if it exceeds three. A typical remedy is to perform a suitable time discretization and to apply the theory of Markov decision processes as in [3] and the references therein. Then, modern machine learning techniques can help to overcome the curse of dimensionality if the number of states is moderate but not too high.
In summary, it is necessary to describe the input–output behavior of the storage by a suitable low-dimensional system of ODEs with a sufficiently high approximation accuracy. This leads to a problem of MOR, which is the focus of the present study.
Analogous model In our model in Sect. 2, we assume a piecewise constant velocity for the fluid flow in the PHX. This is often observed in real-world systems, which operate at constant velocity during charging and discharging if pumps are in operation, while the velocity is zero if pumps are switched off. Then, the high-dimensional system of ODEs constitutes a system of linear nonautonomous ODEs since the system matrix depends on time via the fluid velocity. The latter varies over time but it is piecewise constant. Thus, the obtained linear system is not linear time invariant (LTI). However, the latter is a crucial assumption for many MOR methods. In Sect. 5, we circumvent this problem by approximating the model for the geothermal storage by an analogous model, which is LTI. The key idea for the construction of such an analog is to mimic the original model by an LTI system, where pumps are always operating, so that the fluid velocity is constant at all times. During the waiting periods, we use the same type of boundary conditions at the inlet and outlet boundary as during charging and discharging. However, we choose the inlet temperature to be equal to the spatially averaged temperature in the PHX. Numerical results presented in Subsect. 7.2 show that the analogous system approximates the original system well.
Literature review on model order reduction For the derived linear LTI system, we applied MOR methods in Sect. 6. Such methods can be roughly divided into projection and truncation methods based on singular value decomposition (SVD), and moment matching methods as the Krylov subspace method. Depending on the structure of the problem, we can further subdivide SVD into two classes. The first class contains methods that are also suitable for nonlinear systems such as proper orthogonal projections (POD). The second class consists of Gramian-based approximations such as balanced truncation and Hankel approximation methods, which are suitable for linear systems. See Antoulas et al. [19, 20] and Schilders et al. [21] for a general overview.
Here, we focus on the Lyapunov balanced truncation MOR method, which is well suited for our purposes. It was first introduced by Mullis and Roberts [22] and later in the linear dynamical systems and control literature by Moore [23]. The idea of this method is firstly transform the system into an appropriate coordinate system for the state space, in which the states that are difficult to reach, that is, they require a large input energy to be reached. These are simultaneously difficult to observe, i.e., generate a small observation output energy. Then, the reduced model is obtained by truncating the states which are simultaneously difficult to reach and to observe. Among the various MOR methods, balanced truncation is characterized by the preservation of several system properties such as stability and passivity, see Pernebo and Silverman [24]. Moreover, it provides error bounds that permit an appropriate choice of the dimension of the reduced-order model depending on the desired accuracy of the approximation, see Enns [25] and Glover [26].
Besides the Lyapunov balancing method, other types of balancing techniques exist, e.g., stochastic balancing, bounded real balancing, positive real balancing, and frequency weighted balancing, see Antoulas [19] and Gugercin and Antoulas [27]. Gosea et al. [28] consider balanced truncation for linear switched systems. Benner et al. [29] present an efficient implementation of model reduction methods such as modal truncation, balanced truncation, and other balancing-related truncation techniques. Furthermore, the authors discussed various aspects of balancing-related techniques for large-scale systems, structured systems, and descriptor systems. The results presented in [29] also cover MOR techniques for time-varying as well as MOR for second- and higher-order systems. In addition, surveys on system approximation and MOR can be found in [19, 27, 3037] and the references therein.
Our contribution The main results of this article and the novel contribution to the literature are twofold. Firstly, we develop a stylized mathematical model of the geothermal storage in terms of a heat equation with a time-dependent convection term and appropriate boundary and interface conditions. It captures the physical aspects that contribute to the input–output behavior of the storage. The latter is described by a linear dynamical system derived from a semidiscretization of the heat equation with a time-dependent convection term describing the spatio-temporal temperature distribution. In order to overcome the time dependence induced by the convection term, we construct an approximation of the nonautonomous system of ODEs by an analogous system of LTI type. This facilitates the application of MOR methods such as Lyapunov balanced truncation which constitute the second main contribution.
Results of extensive numerical experiments justify the replacement of the original system by the LTI analogous system and show the efficiency of the applied MOR method. Only a few suitably chosen ODEs are sufficient to produce good approximations of the input–output behavior of the storage. This allows to work with reduced-order models in optimal control problems for the cost-optimal management of geothermal storage systems embedded in residential heating systems, which we investigated in [3].
Paper organization  In Sect. 2, we describe the mathematical modeling of the geothermal storage. We present a heat equation with a convection term and appropriate boundary and interface conditions that govern the dynamics of the spatial temperature distribution in the storage. Section 3 is devoted to the finite difference semidiscretization of the heat equation. In Sect. 4, we introduce aggregated characteristics of the spatio-temporal temperature distribution. Section 5 derives the approximate LTI analogous model of the geothermal storage. In Sect. 6, we start with the formulation of the general model reduction problem. Then, we present the Lyapunov balanced truncation method. Section 7 presents results of various numerical experiments, where the aggregated characteristics of the temperature distribution in storage for the original model are compared with the approximations obtained from reduced-order models. Section 8 contains our concluding remarks.

2 Dynamics of the geothermal storage

The setting is based on [4, Sect. 2]. For self-containedness and the convenience of the reader, we recall the model description in this section. The dynamics of the spatial temperature distribution in a geothermal storage can be described mathematically by a linear heat equation with a convection term and appropriate boundary and interface conditions.

2.1 Two-dimensional model

We assume that the domain of the geothermal storage is a cuboid and consider a two-dimensional rectangular cross-section. We denote by \(Q=Q(t,x,y)\) the temperature at time \(t \in [0,T]\) in the point \((x,y)\in {\mathcal {D}}=(0,l_x) \times (0,l_y)\) with \(l_x,l_y\) denoting the width and height of the storage. The domain \({\mathcal {D}}\) and its boundary \(\partial {\mathcal {D}}\) are depicted in Fig. 3. \({\mathcal {D}}\) is divided into three parts. The first is \({\mathcal {D}}^M\), which is filled with a homogeneous medium (soil) characterized by constant material parameters \(\rho ^M, \kappa ^M\), and \(c_p^M\) denoting mass density, thermal conductivity, and specific heat capacity, respectively. The second is \({\mathcal {D}}^F\), it represents the PHXs and is filled with a fluid (water) with constant material parameters \(\rho ^F, \kappa ^F\), and \(c_p^F\). The fluid moves with time-dependent velocity \(v_0(t)\) along the PHXs . For the sake of simplicity, we restrict to the case, often observed in applications, where the pumps moving the fluid are either on or off. Thus, the velocity \(v_0(t)\) is piecewise constant taking values \({\overline{v}}_0>0\) and zero, only. Finally, the third part is the interface \({\mathcal {D}}^{J}\) between \({\mathcal {D}}^M\) and \({\mathcal {D}}^F\). For the sake of simplicity, we neglect modeling the wall of the PHX and suppose perfect contact between the PHX and the soil. Details are given below in (4) and (5). We summarize as follows:
Assumption 2.1
 
1.
Material parameters of the medium \(\rho ^M, \kappa ^M, c_p^M\) in the domain \({\mathcal {D}}^M\) and of the fluid \(\rho ^F, \kappa ^F, c_p^F\) in the domain \({\mathcal {D}}^F\) are constants.
 
2.
Fluid velocity is piecewise constant, that is, \(v_0(t)={\left\{ \begin{array}{ll} {\overline{v}}_0>0, & \text {pump on,}\\ 0, & \text {pump off.} \end{array}\right. }\)
 
3.
Perfect contact and impermeability at the interface between fluid and medium.
 
Remark 2.2
The results of our two-dimensional model, in which \({\mathcal {D}}\) represents the rectangular cross-section of a box-shaped storage, can be transferred to the three-dimensional case if we assume that the storage domain is a cuboid of depth \(l_z\) with a homogeneous temperature distribution in the z-direction. A \(\text {PHX} \) in the two-dimensional model then represents an idealized horizontal snake-shaped \(\text {PHX} \) that densely fills a small layer of the storage tank.
Heat equation  The temperature \(Q=Q(t,x,y)\) in the external storage is governed by the linear heat equation with convection term
$$\begin{aligned} \rho c_p\frac{\partial Q}{\partial t}={\nabla \cdot (\kappa \nabla Q)}- {\rho v \cdot \nabla (c_pQ)},\quad (t,x,y) \in (0,T]\times {\mathcal {D}}\setminus {\mathcal {D}}^{J}, \end{aligned}$$
where \(\nabla =\big (\frac{\partial }{\partial x},\frac{\partial }{\partial y}\big )\) denotes the gradient operator. The first term on the right-hand side describes diffusion, while the second represents convection of the moving fluid in the PHXs. Further, \(v=v(t,x,y)\) \(=v_0(t)(v^x(x,y),v^y(x,y))^{\top }\) denotes the velocity vector with \((v^x,v^y)^\top \) being the normalized directional vector of the flow. According to Assumption 2.1, the material parameters \(\rho ,\kappa , c_p\) depend on the position (xy) and take the values \(\rho ^M,\kappa ^M, c_p^M\) for points in \({\mathcal {D}}^M\) (medium) and \(\rho ^F, \kappa ^F, c_p^F\) in \({\mathcal {D}}^F\) (fluid).
Note that there are no sources or sinks inside the storage. Therefore, the above heat equation appears without forcing term. Based on this assumption, the heat equation (2.1) can be written as
$$\begin{aligned} \frac{\partial Q}{\partial t}=a\Delta Q- { v \cdot \nabla Q},\quad (t,x,y) \in (0,T]\times {\mathcal {D}}\setminus {\mathcal {D}}^{J}, \end{aligned}$$
(1)
where \(\Delta =\frac{\partial ^2}{\partial x^2}+\frac{\partial ^2}{\partial y^2}\) is the Laplace operator and \( a=a(x,y)\) is the thermal diffusivity, which is piecewise constant with values \(a^\dagger =\frac{\kappa ^\dagger }{\rho ^\dagger c_p^\dagger }\) with \(\dagger =M\) for \((x,y)\in {\mathcal {D}}^M\) and \(\dagger =F\) for \((x,y)\in {\mathcal {D}}^F\), respectively. The initial condition \(Q(0,x,y)=Q_0(x,y)\) is given by the initial temperature distribution \(Q_0\) of the storage.

2.2 Boundary and interface conditions

For the description of the boundary conditions, we decompose the boundary \(\partial {\mathcal {D}}\) into several subsets as depicted in Fig. 3 representing the insulation on the top and the side, the open bottom, the inlet and outlet of the PHXs. Further, we have to specify conditions at the interface between PHXs and soil. The inlet, outlet, and the interface conditions model the heating and cooling of the storage via PHXs. We distinguish between the two regimes “pump on” and “pump off,” where for simplicity, we assume perfect insulation at inlet and outlet if the pump is off. Since we focus on the heat transfer over the open bottom boundary, we neglect the losses over the insulated top and side and assume perfect insulation at these boundaries. This leads to the following boundary conditions.
  • Homogeneous Neumann condition describing perfect insulation on the top and the side
    $$\begin{aligned} \frac{\partial Q}{\partial {\mathfrak {n}}}=0,\qquad (x,y)\in \partial {\mathcal {D}}^{T}\cup \partial {\mathcal {D}}^{L}\cup \partial {\mathcal {D}}^{R}, \end{aligned}$$
    (2)
    where \(\partial {\mathcal {D}}^{L}=\{0\} \times [0,l_y] \backslash \partial {\mathcal {D}}^{I}\),   \(\partial {\mathcal {D}}^{R}=\{l_x\} \times [0,l_y] \backslash \partial {\mathcal {D}}^{O}, \partial {\mathcal {D}}^{T}=[0,l_x] \times \{l_y\}\) and \({\mathfrak {n}}\) denotes the outer-pointing normal vector.
  • Robin condition describing heat transfer at the bottom
    $$\begin{aligned} -\kappa ^M\frac{\partial Q}{\partial {\mathfrak {n}}}=\lambda ^{\!G}(Q-Q^{G}(t)), \qquad (x,y)\in \partial {\mathcal {D}}^B, \end{aligned}$$
    with \(\partial {\mathcal {D}}^B=(0,l_x) \times \{0\}\), where \(\lambda ^{\!G}>0\) denotes the heat transfer coefficient and \(Q^{G}(t)\) the underground temperature.
  • Dirichlet condition at the inlet if the pump is on (\(v_0(t)>0\)), that is, the fluid arrives at the storage with a given temperature \(Q^{I}(t)\). If the pump is off (\(v_0(t)=0\)), we set a homogeneous Neumann condition describing perfect insulation.
    $$\begin{aligned} {\left\{ \begin{array}{ll} \begin{array}{rll} Q & =Q^{I}(t), & \text { pump on,} \\ \frac{\partial Q}{\partial {\mathfrak {n}}}& =0, & \text { pump off,} \end{array} \end{array}\right. } \qquad (x,y)\in \partial {\mathcal {D}}^{I}. \end{aligned}$$
    (3)
  • “Do Nothing” condition at the outlet in the following sense. If the pump is on (\(v_0(t)>0\)), then the total heat flux directed outwards can be decomposed into a diffusive heat flux given by \(\kappa ^F\frac{\partial Q}{\partial {\mathfrak {n}}}\) and a convective heat flux given by \(v_0(t) \rho ^Fc_p^FQ\). In our model, we can neglect the diffusive heat flux. This leads to a homogeneous Neumann condition
    $$\begin{aligned} \frac{\partial Q}{\partial {\mathfrak {n}}}=0,\qquad (x,y)\in \partial {\mathcal {D}}^{O}. \end{aligned}$$
    If the pump is off, we assume perfect insulation which is also described by the above condition.
  • Smooth heat flux at interface \({\mathcal {D}}^{J}\) between fluid and soil leading to a coupling condition
    $$\begin{aligned} \kappa ^F\frac{\partial Q^F}{\partial {\mathfrak {n}}}=\kappa ^M\frac{\partial Q^M}{\partial {\mathfrak {n}}}, \qquad (x,y)\in {\mathcal {D}}^{J}. \end{aligned}$$
    (4)
    Here, \(Q^F, Q^M\) denote the temperature of the fluid inside the PHX and of the soil outside the PHX, respectively. Moreover, we assume that the contact between the PHX and the medium is perfect, which leads to a smooth transition of a temperature, that is, we have
    $$\begin{aligned} Q^F=Q^M,\qquad (x,y)\in {\mathcal {D}}^{J}. \end{aligned}$$
    (5)
Remark 2.3
If there is no perfect contact between the PHX and the medium (e.g., in case of contact resistance or inclusion of the pipe wall in the model), then there is a temperature jump between the PHX and the medium, i.e., \(Q^F\ne Q^M.\) In this case, the heat transfer between the medium and the fluid can be modeled by a Robin boundary condition with a heat transfer coefficient that generally depends on the PHX geometry, the fluid velocity, and the fluid temperature.

3 Semidiscretization of the heat equation

We now sketch the discretization of the heat equation (1) together with the boundary and interface conditions given in (2) through (5). For details, we refer to [4, Sect. 3]. We confine ourselves to a semidiscretization in space and approximate only spatial derivatives by their respective finite differences. This approach is also known as ‘method of lines’ and leads to a high-dimensional system of ODEs for the temperatures at the grid points. The latter will serve as starting point for the model reduction in Sect. 6. For the full discretization in which time is also discretized, we refer to [4, Sect. 4], where we derive an implicit finite difference scheme and study its stability.

3.1 Semidiscretization of the heat equation

The spatial domain is discretized by the means of a mesh with grid points \((x_i,y_j)\), where \( x_i =ih_x, ~~~y_j =jh_y,\quad i ={ 0},...,N_x, ~~~j ={ 0},...,N_y.\) Here, \(N_x\) and \(N_y\) denote the number of grid points, while \(h_x={l_x}/{N_x}\) and \(h_y={l_y}/{N_y}\) are the step sizes in x and y-direction, respectively. We denote by \(Q_{ij}(t)\simeq Q(t,x_i,y_j)\) the semidiscrete approximation of the temperature at the grid point \((x_i,y_j)\) at time t, while \(v_0(t)(v^x_{ij},v^y_{ij})^{\top } =v_0(t)(v^x(x_i,y_j),v^y(x_i,y_j))^{\top } =v(t,x_i,y_j)\) denotes corresponding the velocity vector.
For the sake of simplification and tractability of our analysis, we restrict to the following assumption on the arrangement of PHXs and impose conditions on the location of grid points along the PHXs.
Assumption 3.1
 
1.
There are \(n_P \in {\mathbb {N}}\) straight horizontal PHXs, the fluid moves in positive x-direction.
 
2.
The diameter of the PHXs is such that the interior of PHXs contains grid points.
 
3.
Each interface between medium and fluid contains grid points.
 
We approximate the spatial derivatives in the heat equation (1), the boundary and interface conditions by finite differences as in [4, Subsects. 3.1–3.3], where we apply upwind techniques for the convection terms. The result is the system of ODEs (6) for a vector function \(Y:[0,T]\rightarrow {\mathbb {R}}^n\) collecting the semidiscrete approximations \(Q_{ij}(t)\) of the temperature \(Q(t,x_i,y_j)\) in the “inner” grid points, that is, all grid points except those on the boundary \(\partial {\mathcal {D}}\) and the interface \({\mathcal {D}}^{J}\). For a model with \(n_P\) PHXs , the dimension of Y is \(n=(N_x-1)(N_y-2n_P-1)\), see [4].
Using the above notations, the semidiscretized heat equation together with the given initial, boundary, and interface conditions reads as
$$\begin{aligned} \dot{Y}(t)= {A}(t)Y(t)+{B}(t)g(t), ~~t \in (0,T], \end{aligned}$$
(6)
with the initial condition \(Y(0)=y_0\), where the vector \(y_0\in {\mathbb {R}}^n\) contains the initial temperatures \(Q_0(\cdot ,\cdot )\) at the corresponding grid points. The system matrix \({A}\) results from the spatial discretization of the convection and diffusion term in the heat equation (1) together with the Robin and linear heat flux boundary conditions. It has the tridiagonal structure
https://static-content.springer.com/image/art%3A10.1007%2Fs10665-024-10398-4/MediaObjects/10665_2024_10398_Equ7_HTML.png
(7)
and consists of \((N_x-1)\times ( N_x-1)\) block matrices of dimension \(q=N_y-2n_P-1\). The block matrices \({A}_{L},{A}_{M},{A}_{R}\) on the diagonal have a tridiagonal structure and are given in [4, Table 1]. The block matrices on the subdiagonals \({D}^{\pm } \in {\mathbb {R}}^{q\times q}\), \(i=1,\ldots , N_x-1\) are diagonal matrices and given in [4, Eq. (20)].
As a result of the discretization of the Dirichlet condition at the inlet boundary and the Robin condition at the bottom boundary, we get the function \(g:~[0,T] \rightarrow {\mathbb {R}}^2\) called input function and the \(n\times 2\) matrix \({B}\) called input matrix. The entries of the input matrix \(B_{lr}, l=1,\ldots ,n, r=1,2,\) are derived in [4, Subsect. 3.4] and are given by
$$\begin{aligned} \begin{array}{rll} B_{l1}& =B_{l1}(t)={\left\{ \begin{array}{ll} \frac{a^F}{h^2_x}+\frac{{\overline{v}}_0}{h_x} & \text {pump on,}\\ 0 & \text {pump off,} \end{array}\right. } & l={\mathcal {K}}(1,j), (x_0,y_j)\in {\mathcal {D}}^{I},\\[3ex] B_{l2}& = \frac{\lambda ^{\!G}h_y}{\kappa ^M+\lambda ^{\!G}h_y}\beta ^M, & l={\mathcal {K}}(i,1), (x_i,y_0)\in {\mathcal {D}}^B, \end{array} \end{aligned}$$
(8)
with \(\beta ^M=a^M/{h^2_y}\). The entries for other l are zero. Here, \({\mathcal {K}}\) denotes the mapping \((i,j)\mapsto l={\mathcal {K}}(i,j)\) of pairs of indices of grid point \((x_i,y_j) \in {\mathcal {D}}\) to the single index \(l \in \{1,\ldots ,n \}\) of the corresponding entry in the vector Y. The input function reads as
$$\begin{aligned} g(t)={\left\{ \begin{array}{ll} (Q^{I}(t),~Q^{G}(t))^{\top }, & \quad \text {pump on},\\ ~~~~~(0,~~~~Q^{G}(t))^{\top }, & \quad \text {pump off}. \end{array}\right. } \end{aligned}$$
(9)
Recall that \(Q^{I}\) is the inlet temperature of the pipe during pumping and \(Q^{G}\) is the underground temperature.

3.2 Stability of matrix \({A}\)

The finite difference semidiscretization of the heat equation (1) given by the system of ODEs (6) is expected to preserve the dissipativity of the PDE. This property is related to the stability of the system matrix \({A}={A}(t)\) in the sense that all eigenvalues of \({A}\) lie in open left complex half plane. This property will play a crucial role below in Sect. 6, where we study model reduction techniques for (6) based on balanced truncation. The next theorem confirms the expectations on the stability of \({A}\). For the proof, we refer to our paper [4, Theorem 1].
Theorem 3.2
(Stability of matrix \({A}\)) Under Assumption 2.1 on the model and Assumption 3.1 on the discretization, the matrix \({A}={A}(t)\) given in (7) is stable for all \(t\in [0,T]\), that is, all eigenvalues \(\lambda ({A})\) of \({A}\) lie in the left open complex half plane.

4 Aggregated characteristics

In many applications, it is not necessary to know the complete information about the spatio-temporal temperature distribution in the geothermal storage which can be computed using the numerical methods described in Sect. 3. This is the case in [3], which studies the cost-optimal management and control of a storage which is embedded into a residential heating system. Here, it is sufficient to know only a few aggregated characteristics of the temperature distribution, which can be computed via post-processing as in [4, Sect. 5]. For self-containedness and the convenience of the reader, we sketch some of these aggregated characteristics and describe their approximate computation based on the solution vector Y of the finite difference scheme. Below in Sect. 6, these quantities will serve as output variables of a linear dynamical system and we apply MOR techniques to construct approximations based on a small numbers of suitable chosen ODEs.

4.1 Definition of aggregated characteristics

The first group of aggregated characteristics describes of the amount of stored energy in some subdomain of the storage. It can be given in terms of the spatially averaged temperature in that subdomain. In the following, we will simply refer to such average values as “average temperature,” keeping in mind that the average refers to space and not to time. Let \({\mathcal {B}}\subset {\mathcal {D}}\) be a generic subset of the 2D computational domain. We denote by \(|{\mathcal {B}}|=\iint _{{\mathcal {B}}} \text {d}x\text {d}y\) the area of \({\mathcal {B}}\). Then, \(W_{{\mathcal {B}}}(t)=l_z \iint _{{\mathcal {B}}} \rho c_pQ(t,x,y) \text {d}x\text {d}y\) represents the thermal energy contained in the 3D spatial domain \({\mathcal {B}}\times [0,l_z]\) at time \(t\in [0,T]\). Then for \(0\le t_0<t_1\le T\), the difference \(G_{{\mathcal {B}}}(t_0,t_1)=W_{{\mathcal {B}}}(t_1)-W_{{\mathcal {B}}}(t_0)\) is the gain of thermal energy during the period \([t_0,t_1]\). While positive values correspond to warming of \({\mathcal {B}}\), negative values indicate cooling and \(-G_{{\mathcal {B}}}(t_0,t_1)\) represents the size of the loss of thermal energy.
For \({\mathcal {B}}={\mathcal {D}}^{\dagger }, \dagger =M,F\), we can use that the material parameters on \({\mathcal {D}}^\dagger \) equal the constants \(\rho =\rho ^\dagger ,c_p=c_p^\dagger \). For the corresponding gain of thermal energy, we then obtain
$$\begin{aligned} G^\dagger =G^\dagger (t_0,t_1)&:= G_{{\mathcal {D}}^{\dagger }}(t_0,t_1) = \rho ^\dagger c_p^\dagger |{\mathcal {D}}^{\dagger }| l_z~\big ({{\overline{Q}}} ^\dagger (t_1)-{{\overline{Q}}} ^\dagger (t_0)\big ),\nonumber \\ \text {where}\quad {{\overline{Q}}} ^\dagger (t)&= \frac{1}{|{\mathcal {D}}^{\dagger }|} \iint _{{\mathcal {D}}^{\dagger }} Q(t,x,y) \text {d}x\text {d}y, \quad \dagger =M,F, \end{aligned}$$
denotes the average temperature in the medium (\(\dagger =M\)) and the fluid (\(\dagger =F\)), respectively.
Next, we consider a second group of aggregated characteristics describing heat fluxes at the boundary such as the convective heat flux at the inlet and outlet boundary and the heat transfer at the bottom boundary. Let \({\mathcal {C}}\subset \mathcal {\partial D} \) be a generic curve on the boundary, then, we denote by \(|{\mathcal {C}}|=\int _{{\mathcal {C}}} ds\) the curve length.
The rate at which the energy is injected or withdrawn via the PHX is given by
$$\begin{aligned} \begin{aligned} R^P(t)&=\rho ^Fc_p^Fv_0(t) \Big [\int _{{\mathcal {D}}^{I}} Q(t,x,y)\, \text {d}s -\int _{{\mathcal {D}}^{O}} Q(t,x,y)\, \text {d}s\Big ]\\&=\rho ^Fc_p^Fv_0(t) \big |\partial {\mathcal {D}}^{O}\big |\big [Q^{I}(t) -{{\overline{Q}}} ^{O}(t)\big ], \end{aligned} \end{aligned}$$
(10)
where \({{\overline{Q}}} ^{O}(t)= \frac{1}{|\partial {\mathcal {D}}^{O}|} \int _{\partial {\mathcal {D}}^{O}} Q(t,x,y)\text {d}s\) is the spatially averaged temperature at the outlet boundary. Here, it is used that in our model we have horizontal PHXs such that \(|\partial {\mathcal {D}}^{I}|=|\partial {\mathcal {D}}^{O}|\) and a uniformly distributed inlet temperature at the inlet boundary \(\partial {\mathcal {D}}^{I}\). For a given interval of time \([t_0,t_1]\), the quantity \( G^P=G^P(t_0,t_1) =l_z\int _{t_0}^{t_1} R^P(t)\, \text {d}t\) describes the amount of heat injected (\(G^P>0\)) to or withdrawn (\(G^P<0\)) from the storage due to convection of the fluid. Note that the fluid moves at time t with velocity \(v_0(t)\) and arrives at the inlet with temperature \(Q^{I}(t)\), while it leaves at the outlet with the average temperature \({{\overline{Q}}} ^{O}(t)\).
The quantification of the diffusive heat transfer via the bottom boundary is based on the spatially averaged temperature at the bottom boundary \({{\overline{Q}}} ^B(t) = \frac{1}{|\partial {\mathcal {D}}^B|} \int _{\partial {\mathcal {D}}^B} Q(t,x,y)\text {d}s\). For more details, we refer to [4, Subsect. 5.2].

4.2 Computation of aggregated characteristics

Approximations of the above quantities can be obtained from the solution of the semidiscretized heat equation, that is, from the system of ODEs (6) for the vector function Y(t). Recall, the entries of Y(t) represent the temperatures \(Q=Q(t,x,y)\) in the inner grid points of the computational domain \({\mathcal {D}}\). Let \({{\overline{Q}}} ^\dagger (t)\) with \( \dagger =M,F,O,B\) be one of the average temperatures defined above. Then, evaluating the defining single and double integrals by quadrature rules leads to approximations by linear combinations of the entries of Y of the form
$$\begin{aligned} {{\overline{Q}}} ^\dagger (t)&\approx C^{\dagger }\,Y(t), \end{aligned}$$
(11)
where \(C^{\dagger }\) is some \(1\times n\)-matrix. For more details we refer to [3, Sect. 3.3].

5 Analogous linear time-invariant system

Equation (6) represents a system of n linear nonautonomous ODEs. Since some of the entries in the matrices \({A}\) and \({B}\), resulting from the discretization of convection terms in the heat equation (1), depend on the velocity \(v_0(t)\), it follows that \({A}\) and \({B}\) are time-dependent. Thus, (6) does not constitute a linear time-invariant (LTI) system. The latter is a crucial assumption for many MOR methods such as the Lyapunov balanced truncation technique that is considered below in Sect. 6. We circumvent this problem by replacing the model for the geothermal storage by a so-called analogous model which is LTI.
The key idea for the construction of such an analog is based on the observation that the assumption to our “original model” are such that it is already piecewise LTI. Recall that the fluid velocity is constant \({\overline{v}}_0\) during (dis)charging when the pump is on, and zero during waiting when the pump is off. This leads to the following two-step approximation of the original by an analogous model.
Approximation Step 1  For the analogous model, we assume that contrary to the original model, the fluid is also moving with constant velocity \({\overline{v}}_0\) during pump-off periods. During these waiting periods, in the original model, the fluid is at rest and only subject to the diffusive propagation of heat. In order to mimic this behavior of the resting fluid by a moving fluid, we assume that the temperature \(Q^{I}\) at the PHX inlet is equal to the average temperature of the fluid in the PHX \({{\overline{Q}}} ^F\). Thus, we will preserve the average temperature of the fluid, but a potential temperature gradient along the PHX is not preserved and replaced by an almost flat temperature distribution. It can be expected that the error induced by this “mixing” of the fluid temperature in the PHX is small since in real-world systems the (dis)charging periods are typically quite long. This leads to a saturation with an almost constant temperature profile along the PHX.
The initial boundary value problem for the heat equation (1) now comes with a modified boundary condition at the inlet. During waiting the homogeneous Neumann boundary condition in (3) is replaced by a nonlocal coupling condition such that the inlet boundary condition reads as
$$\begin{aligned} Q= {\left\{ \begin{array}{ll} \begin{array}{ll} Q^{I}(t), & \text { pump on,} \\ {{\overline{Q}}} ^F(t), & \text { pump off,} \end{array} \end{array}\right. } \qquad (x,y)\in \partial {\mathcal {D}}^{I}. \end{aligned}$$
This is a “nonlocal” condition since the inlet temperature is not only specified by the local temperature distribution at the inlet boundary \(\partial {\mathcal {D}}^{I}\), but depends on the whole spatial temperature distribution in the fluid domain \({\mathcal {D}}^F\). Semidiscretization of the above boundary condition using approximation (11) of the average fluid temperature \({{\overline{Q}}} ^F\) leads to a modified input term g(t) of the system of ODEs (6). Instead of (9), it is now given by
$$\begin{aligned} g(t)={\left\{ \begin{array}{ll} ~~\big (Q^{I}(t),~Q^{G}(t)\big )^{\top }, & \quad \text {pump on},\\ \big (C^{F}\,Y(t),Q^{G}(t)\big )^{\top }, & \quad \text {pump off}. \end{array}\right. } \end{aligned}$$
(12)
Further, the nonzero entries \(B_{l1}\) of the input matrix B given in (8) are modified. They are now no longer time-dependent but given by the constant \( B_{l1}=\frac{a^F}{h^2_x}+\frac{{\overline{v}}_0}{h_x} \), which was already used during pump-on periods.
Approximation Step 2  In view of (12), the modified input term g depends on the state vector Y when pumping via \(C^{F}\,Y\) and can no longer be considered exogenous. Formally, the term \(C^{F}\,Y\) has to be included in \({A}Y\), which would lead to an additional contribution to the system matrix \({A}\) given by \({B}_{\bullet 1}C^{F}\) where \({B}_{\bullet 1}\) denotes the first column of \({B}\). Then, the system matrix again would be time-dependent and the system not LTI. In order to facilitate the application of MOR methods, we perform a second approximation step and formally treat \({{\overline{Q}}} ^F\) as an exogenously given quantity (such as \(Q^{I}\) and \(Q^{G}\)). This leads to a tractable approach since the Lyapunov balanced truncation technique applied in the next section generates low-dimensional systems depending only on the system matrix \({A}\) and the input matrix \({B}\), but not on the input term g, which now contains \({{\overline{Q}}} ^F\). This approach is also tractable for numerical schemes for simulating the system and from an algorithmic or implementation point of view, since given the solution Y of (6) at time t, the average fluid temperature \({{\overline{Q}}} ^F(t)\) can be computed as a linear combination of the entries of Y(t). The only requirement is to work with explicit rather than implicit time discretization of \({{\overline{Q}}} ^F\).
In Subsect. 7.2, we present results of numerical experiments indicating that apart from some small approximation errors in the PHX during waiting periods, in particular at the outlet, the other deviations are negligible.

6 Model order reduction

6.1 Problem

In the previous sections, we have seen that the spatio-temporal temperature distribution describing the input–output behavior of the geothermal storage can be approximately computed by solving the system of ODEs (6) for the n-dimensional function Y resulting from semidiscretization of the heat equation (1). Aggregated characteristics can be obtained by linear combinations of the entries of Y in a post-processing step. In the following, we work with the approximation of (6) by an analogous system as introduced in Sect. 5. Then, the input–output behavior of the geothermal storage can be described by an LTI system, that is, a pair of a linear autonomous differential and a linear algebraic equation, which is well known from linear system and control theory and of the form
$$\begin{aligned} \begin{array}{rl} {\dot{Y}}(t)& ={A}\,Y(t)+ {B}\,g(t), \\ Z(t)& ={C}\, Y(t). \end{array} \end{aligned}$$
(13)
Here, \({A} \in {\mathbb {R}}^{n \times n}, {B} \in {\mathbb {R}}^{n \times m}, {C} \in {\mathbb {R}}^{n_O\times n}\) for \(n,m,n_O\in {\mathbb {N}}\) are called system, input, output matrix, respectively. Further, \(~g: [0,T] \rightarrow {\mathbb {R}}^{m}\) is the input (or control), \(Y:[0,T]\rightarrow {\mathbb {R}}^n \) the state and \(Z:[0,T] \rightarrow {\mathbb {R}}^{n_O}\) is the output. Given some initial value \(Y(0)=y_0\) the input–output behavior, that is, the mapping of the input g to the output Z is fully described by the triple of matrices \(({A,B,C})\), which is called realization of the above system.
For the analogous system, \({A}\) and \({B}\) are constant matrices, which are given in (7) and (8). From Theorem 3.2, we know that \({A}\) is stable. The input dimension is \(m=2\), while the dimension n of the state depends on the discretization of the spatial domain \({\mathcal {D}}\). The two entries of the input g are the temperatures at the inlet and of the underground at the bottom boundary. Thus, g is piecewise continuous and bounded. The output Z contains the desired aggregated characteristics such as the average temperatures \({{\overline{Q}}} ^\dagger \), \(\dagger =M,F,O,B\), of the medium, the fluid, at the outlet or the bottom boundary. The associated row matrices \(C^{\dagger }\) of the approximation \({{\overline{Q}}} ^\dagger (t)= C^{\dagger }Y(t)\) given in (11) form the \(n_O\) rows of the output matrix C. The output dimension \({n_O}\) is the number of characteristics included in the problem and typically small, while the state dimension n will be very large in order to obtain a reasonable accuracy for the semidiscretized solution of the heat equation.
In [3], we study the cost-optimal management of a geothermal storage, which is embedded in a residential heating systems in terms of optimal control problems. The solution of such problems suffers from the curse of dimensionality and becomes intractable because of the computational complexity and memory requirements if the input–output behavior of the geothermal storage is described by system (13) with high-dimensional state Y. Tractable solutions can only be expected if the input–output behavior can be approximated by state equations containing only a few suitable chosen ODEs. This motivates us to apply MOR.
The general goal of MOR is to approximate the high-dimensional linear time-invariant system (13) given by the realization \(({A,B,C})\) by a low-dimensional reduced-order system
$$\begin{aligned} \begin{array}{rl} \dot{{\widetilde{Y}}}(t)& =\widetilde{{A}}\,{\widetilde{Y}}(t)+ \widetilde{{B}}g(t) \\[0.5ex] {\widetilde{Z}}(t)& =\widetilde{{C}}\,{\widetilde{Y}}(t), \end{array} \end{aligned}$$
(14)
that is, a realization \((\widetilde{{A}},\widetilde{{B}},\widetilde{{C}})\), where \(\widetilde{{A}} \in {\mathbb {R}}^{\ell \times \ell },~\widetilde{{B}} \in {\mathbb {R}}^{\ell \times m}, ~\widetilde{{C}} \in {\mathbb {R}}^{n_o \times \ell },~{\widetilde{Y}} \in {\mathbb {R}}^{\ell },\) \({\widetilde{Z}} \in {\mathbb {R}}^{n_O}\), and \( \ell \ll n\) denotes the dimension of the reduced-order state. We notice that the input variable g is the same for the systems (13) and (14). The reduced-order system should capture the most dominant dynamics of the original system, in particular preserve the main physical system properties, that is, stability. Further, it should provide a reasonable approximation of the original output Z by \(\widetilde{Z}\) to given input g, where the output error \(Z-{{\widetilde{Z}}}\) is measured using a suitable norm. In addition, the computation of the reduced-order system should be numerically stable and efficient.
Here, we choose Lyapunov balanced truncation which is a projection-based method. It suits well to our purposes and is described below. The underlying idea of projection-based methods is that the state dynamics can be well approximated by the dynamics of a projection of the n-dimensional state Y onto a suitable low-dimensional subspace of \({\mathbb {R}}^n\) of dimension \(\ell <n\). Then, the aim is to describe the dynamics of the projection by a \(\ell \)-dimensional system of ODEs. Here, the projection is found by applying a suitable linear state transformation \({{\overline{Y}}}={\mathcal {T}}Y\) with some nonsingular \(n\times n\)-matrix \({\mathcal {T}}\), which allows to define the projection by truncation of \({{\overline{Y}}}\), that is, truncate the \(n-\ell \) less dominant entries of \({{\overline{Y}}}\).

6.2 Lyapunov balanced truncation

For the sake of brevity, we only sketch the main ideas of Lyapunov balanced truncation method and refer for a more detailed description to [3, Sect. 4.2]. The method uses ideas from linear control theory, in particular the notion of controllability and observability. We refer the interested reader to [19] and the references therein.
Algorithm  For a stable linear systems such as (13), one can define the controllability and the observability Gramians as
$$\begin{aligned} {\mathcal {G}}_O=\displaystyle \int _{0}^{\infty } e^{{A}^{\top }t}{C}^{\top }{C} e^{{A}t}\text {d}t \quad \text {and}\quad {\mathcal {G}}_C=\displaystyle \int _{0}^{\infty } e^{{A}t}{B}{B}^{\top } e^{{A}^{\top }t}\text {d}t, \end{aligned}$$
respectively. The Gramian matrices \({\mathcal {G}}_C\) and \({\mathcal {G}}_O\) are known to be symmetric, positive semi-definite. If in addition the linear system (13) is controllable and observable then the Gramians are strictly positive definite. For their computation, it is used that they satisfy the algebraic Lyapunov equations
$$\begin{aligned} \begin{aligned} {A}{\mathcal {G}}_C+{\mathcal {G}}_C{A}^{\top }&=-{B}{B}^{\top } \quad \text {and}\quad {\mathcal {G}}_O{A}+{A}^{\top }{\mathcal {G}}_O&=-{C}^{\top }{C}, \end{aligned} \end{aligned}$$
(15)
for which efficient numerical solution methods are available. The Gramians are related to the so-called controllability and observability function given for states \(y\in {\mathbb {R}}^n\) by \({\mathcal {E}}_C(y) = y^{\top } {\mathcal {G}}_C^{-1} y\) and \({\mathcal {E}}_O(y) = y^{\top } {\mathcal {G}}_Oy\), respectively. These functions “measure the degree of controllability and observability” of a state y and are also interpreted as input and output energy, respectively. States which are difficult to reach are characterized by large values of the function \({\mathcal {E}}_C(y)\), whereas small values of \({\mathcal {E}}_O(y)\) indicate that the state y is difficult to observe. The above relations show that states y in the span of the eigenvectors corresponding to small (large) eigenvalues of \({\mathcal {G}}_C\) lead to large (small) values of \({\mathcal {E}}_C(y)\). Thus, such states require a high (small) input energy and are difficult (easy) to reach. On the other hand, states y in the span of the eigenvectors corresponding to small (large) eigenvalues of \({\mathcal {G}}_O\) produce small (large) output energy \({\mathcal {E}}_O(y)\) and are difficult (easy) to observe.
Although this interpretation of the Gramians is quite instructive, in an arbitrary coordinate system, a state y that is easy to reach might be difficult to observe. Conversely, there could be another state \(y^\prime \) that is difficult to reach but easy to observe. Thus, it is hard to decide which of the two states y and \(y^\prime \) are more important for the input–output behavior of the system. This observation suggests to transform the coordinate system of the state space using a suitable transformation matrix \({\mathcal {T}}\) in which easy reachable states are simultaneously easy to observe and vice versa. This is the case if the transformed Gramians coincide. Below in Theorem 6.1, we give a transformation for which the two Gramians are even diagonal. For that result, the Hankel singular values play an important role. They are defined as the square roots of the eigenvalues of the product of the controllability and observability Gramian. That is, \(\sigma _i=\sqrt{\lambda _i({\mathcal {G}}_C{\mathcal {G}}_O)}, i=1,\ldots n.\) Here, \(\lambda _i(G)\) denotes the i-th eigenvalue of the matrix G, ordered as \(\lambda _1\ge \ldots \lambda _n\ge 0\).
Theorem 6.1
(Square root algorithm, Antoulas [19], Sect. 7.4) Let the linear system (13) be stable, controllable, and observable. Further, let
$$\begin{aligned} \begin{array}{cl} {\mathcal {G}}_C={U}{U}^{{\top }} & \hbox {be the Cholesky decomposition of the controllability Gramian, }\\ {\mathcal {G}}_O={L}{L}^{{\top }} & \hbox {be the Cholesky decomposition of the observability Gramian, }\\ & \hbox {where }{U}\hbox { and }{L}\hbox { are lower triangular matrices,}\\ {U}^{{\top }} {L}={W} \Sigma {V}^{{\top }} & \hbox {be the singular value decomposition of }{U}^{{\top }} {L} \hbox { with the }\\ & \hbox {orthogonal matrices } {W} \hbox { and } {V}\hbox { and }\Sigma =\operatorname {diag}(\sigma _1,\ldots ,\sigma _n) \\ & \hbox {with }\sigma _1\ge \sigma _2\ge \ldots \ge \sigma _n>0. \end{array} \end{aligned}$$
Then, \(\Sigma \) is the diagonal matrix of Hankel singular values. Further, the transformation matrix \({\mathcal {T}}\) and its inverse can be represented as
$$\begin{aligned} {\mathcal {T}}=\Sigma ^{-1/2}{V}^{{\top }}{L}^{\top } \quad \text {and} \quad {\mathcal {T}}^{-1}={U}{W}\Sigma ^{-1/2}. \end{aligned}$$
The transformed system for \({{\overline{Y}}}={\mathcal {T}}Y\) is balanced and the associated controllability and observability Gramians are diagonal and equal to a diagonal matrix containing the Hankel singular values.
Based on this theorem, the desired reduced-order system (14) is found by truncating the last \(n-\ell \) entries of the transformed state \({{\overline{Y}}}={\mathcal {T}}Y\) and removing the corresponding equations from the state equation. This procedure is summarized in the following algorithm which assumes that the linear LTI system (13) with the realization (\({A,B,C}\)) is stable, controllable, and observable.
Algorithm 6.2
(Lyapunov balanced truncation) 
1.
Compute the Gramians \({\mathcal {G}}_C\) and \({\mathcal {G}}_O\) by solving the Lyapunov equations
\({A}{\mathcal {G}}_C+{\mathcal {G}}_C{A}^{\top }=-{B}{B}^{\top }\) and \({\mathcal {G}}_O{A}+{A}^{\top }{\mathcal {G}}_O=-{C}^{\top }{C}\).
 
2.
Compute the Cholesky decomposition of the Gramians \({\mathcal {G}}_C={U}{U}^{{\top }} \text { and } {\mathcal {G}}_O={L}{L}^{{\top }}\)
where \({U}\) and \({L}\) are lower triangular matrices.
 
3.
Compute from the singular value decomposition
\({U}^{{\top }}{L}={{W}}\Sigma V^{{\top }} \quad \text { with } ~\Sigma = \operatorname {diag}(\sigma _1,\ldots ,\sigma _n) ~\text { and }~ \sigma _1\ge \sigma _2\ge \ldots \ge \sigma _n>0.\)
Form the diagonal matrix \({\Sigma }_\ell = \operatorname {diag}(\sigma _1,\ldots ,\sigma _\ell )\) from the \(\ell \) largest Hankel singular values and the \( n\times \ell \) matrices \({W}_\ell \) and \({V}_\ell \) from the associated left and right eigenvectors, respectively.
 
4.
Construct transformation matrices with \(\begin{array}{l} \hbox {the } \ell \times n\hbox { matrix }{\mathcal {T}}_\ell ^+= {\Sigma }_\ell ^{-1/2}{V}_\ell ^{{\top }}{L}^{\top } \hbox {and }\\ \hbox {the } n\times \ell \hbox { matrix }{\mathcal {T}}_\ell ^-={U}{W}_\ell {\Sigma }_\ell ^{-1/2}. \end{array}\)
 
5.
The reduced-order system (14) is given by   \( (\widetilde{{A}}, \widetilde{{B}},\widetilde{{C}})=({\mathcal {T}}^+ {A} {\mathcal {T}}^{-}, {\mathcal {T}}^+{B}, {C} {\mathcal {T}}^{-}). \)
 
Error bounds  One of the advantages of Lyapunov balanced truncation is that there exist error estimates, which can be given in terms of the discarded Hankel singular values. They allow to select the dimension \(\ell \) of the reduced-order system such that a prescribed accuracy of the output approximation is guaranteed. In the literature, these error estimates are given for the transfer functions of the original and the reduced-order system from which one can derive the estimates given below for the error measured in the \({\mathcal {L}}_2(0,t)\)-norm. The following theorem is proven in Enns [25] and Glover [26].
Theorem 6.3
Let the linear system (13) be a stable, controllable, and observable with zero initial value, i.e., \(Y(0)=0\). Further, let the Hankel singular values be pairwise distinct with \(\sigma _1> \ldots> \sigma _{n}>0\). Then, it holds for all \(t\ge 0\)
$$\begin{aligned} \big \Vert Z-{\widetilde{Z}}\big \Vert _{{\mathcal {L}}_2(0,t)} \le 2\sum _{i=\ell +1}^{n}\sigma _i \; \Vert g\Vert _{{\mathcal {L}}_2(0,t)}, \end{aligned}$$
(16)
where \(\ell \in \{1,\ldots ,n-1\}\) denotes the dimension of the reduced-order system constructed by Algorithm 6.2.
Since the Hankel singular values depend only on the original model (13) the error bound in (16) can be computed a priori. Given the input g, this allows to control the approximation error by the selection of the reduced order \(\ell \). The error bound can be generalized to systems with Hankel singular values with multiplicity larger than one. In this case, they only have to be counted once, which leads to tighter bounds, see Glover [26].
Inequality (16) shows that the error bound depends on the reduced order \(\ell \) only via the sum of discarded Hankel singular values for which we have \( \sum _{i=\ell +1}^{n}\sigma _i = \operatorname {tr}({\Sigma }) -\operatorname {tr}({\Sigma }_{\ell }). \) Obviously, the above sum is decreasing in \(\ell \) and becomes zero for \(\ell =n\). This motivates the introduction of the following relative selection criterion
$$\begin{aligned} {\mathcal {S}}(\ell ) = \frac{\operatorname {tr}({\Sigma _{\ell }})}{\operatorname {tr}({\Sigma })}, \quad \text {for } \ell =1,\ldots ,n, \end{aligned}$$
with values in (0, 1]. It is increasing in \(\ell \) with \({\mathcal {S}}(\ell )=1\) for \(\ell =n\). \({\mathcal {S}}(\ell )\) can be used as a measure of the proportion of the output energy which can be captured by a reduced-order system of dimension \(\ell \). The selection of an appropriate dimension \(\ell \) can be based on a prescribed threshold level \(\alpha \in (0,1]\) for that proportion. We denote the minimal reduced order reaching that level is defined by
$$\begin{aligned} \ell _\alpha = \min \{\ell : {\mathcal {S}}(\ell )\ge \alpha \}. \end{aligned}$$
(17)
Finally, we note that the error estimate in Theorem 6.3 holds for a zero initial condition \(Y(0)=0\). This is quite restrictive and usually not fulfilled in applications. We refer to Beattie et al. [38], Daraghmeh at al. [39], Heinkenschloss et al. [40], and Schröder and Voigt [41], where the authors study the general case of linear systems with nonzero initial conditions and derive error bounds with extra terms accounting for the initial condition.
The linear systems considered in the present paper are obtained by semidiscretization of the heat equation (1) with the associated boundary and initial conditions. The initial value \(Y(0)=y_0 \in {\mathbb {R}}^n\) represents the initial temperatures \(Q(0,\cdot ,\cdot )\) at the corresponding grid points. In general, we have \(y_0\ne 0_n\). However, for the case of a homogeneous initial temperature distribution with \(Q(0,x,y)=Q_0\) for all \((x,y)\in {\mathcal {D}}\) with some constant \(Q_0\), one can derive an equivalent linear system with zero initial value. That special case is considered in our numerical experiments in Sect. 7.
Summary  Before we present numerical results in the next section, we provide in Fig. 4 a flowchart that gives an overview of the workflow of the paper. It shows the different models describing the spatio-temporal temperature distribution of the geothermal storage together with its input and output variables. Further, the various approximation steps are visualized.

7 Numerical results

In this section, we present results of numerical experiments on MOR for the system of ODEs (6) resulting from semidiscretization of the heat equation (1), which models the spatio-temporal temperature distribution of a geothermal storage. For describing the input–output behavior of that storage, we use the aggregated characteristics of the spatial temperature distribution introduced in Sect. 4. Further, we work with the approximation of (6) by an analogous system that is LTI as explained in Sect. 5. Recall that here it is assumed that the pump is always on and during the waiting periods the inlet temperature \(Q^{I}\) is set to be the average temperature \({{\overline{Q}}} ^F\) in the PHX fluid.
First, we perform a numerical experiment in which we investigate the accuracy of the approximation of aggregated characteristics of the original system by those from the LTI analogous system. Then, we present approximations of the aggregated characteristics obtained from reduced-order models together with error estimates provided in Theorem 6.3 for systems with zero initial conditions. Here, we apply the approach sketched at the end of Subsect. 6.2, where in a pre-processing step, we first shift the temperature scale by the constant initial temperature \(Q_0\) to obtain a linear system (13) with zero initial value for which we can compute the error bounds. Then, in a post-processing step, the inverse scale shift is applied. The experiments are based on Algorithm 6.2 and are performed for the cases of one and three PHXs, see Fig. 5. The model with three PHXs is more realistic and shows more structure of the spatial temperature distribution in the storage, whereas for one PHX that distribution is less heterogeneous. The Lyapunov equations (15) for the Gramians are solved numerically using the Matlab package mess-lyap provided by Saak et al. [42].
After explaining the experimental settings in Subsect. 7.1, we compare in Subsect. 7.2 aggregated characteristics of the original and the LTI analogous system. Then, we perform in Subsect. 7.3 an experiment in which the system output consists of two output variables, which are the spatially averaged temperatures \({{\overline{Q}}} ^M\) and \({{\overline{Q}}} ^F\) in the storage medium and in the PHX, respectively. Finally, we add a third output variable, which is in Subsect. 7.4 the spatially averaged temperature at the outlet \({{\overline{Q}}} ^{O}\). The outlet temperature \({{\overline{Q}}} ^{O}\) is interesting for the management of heating systems equipped with a geothermal storage.
Note that [3, Subsects. 4.3.1, 4.3.4, 4.3.5] contains additional results for models with one, three, and four output variables, respectively. There, the spatially averaged temperature at the bottom boundary \({{\overline{Q}}} ^B\) is taken as a fourth output variable. The latter allows to quantify the transfer of thermal energy to the environment at the bottom boundary of the geothermal storage.

7.1 Experimental settings

Table 1
Model and discretization parameters
Parameters
 
Values
Units
Geometry
Width
\(l_x\)
10 
m
Height
\(l_y\)
1
m
Depth
\(l_z\)
10
m
Diameter of pipe
\(d_P\)
0.02
 m
Number of pipes
\(n_P\)
1 and 3
 
Material
Medium (dry soil)
   
    Mass density
\(\rho ^M\)
2000
kg/m\(^3\)
    Specific heat capacity
\(c_p^m\)
800
J/kg  K
    Thermal conductivity
\(\kappa ^M\)
1.59
W/m  K
    Thermal diffusivity   \(\kappa ^M(\rho ^Mc_p^m)^{-1}\)
\(a^M\)
\(9.9375 \times 10^{-7}\)
m\(^2\)/s
Fluid (water)
   
    Mass density
\(\rho ^F\)
997  
kg/m\(^3\)
    Specific heat capacity
\(c_p^F\)
4182
J/kg  K
    Thermal conductivity
\(\kappa ^F\)
0.607
W/m  K
    Thermal diffusivity   \(\kappa ^F(\rho ^Fc_p^F)^{-1}\)
\(a^F\)
\(1.4558\times 10^{-7}\)
m\(^2/\)s
Velocity during pumping
\(~{\overline{v}}_0\)
\( 10^{-2}\)
m/s
Heat transfer coeff.  to underground
\(\lambda ^{\!G}\)
10
W/(m\(^2\)  K)
Initial temperature
\(Q_0\)
10 and 35
\({^{\circ }\text {C}}\)
Inlet temperature: charging
\(Q^{I}_C\)
40
\({^{\circ }\text {C}}\)
Discharging
\(Q^{I}_D\)
5
\(~{^{\circ }\text {C}}\)
Underground temperature
\(Q^{G}\)
15
\({^{\circ }\text {C}}\)
Discretization
Mesh size
\(h_x\)
0.1
m
Mesh size
\(h_y\)
0.01
m
Time step
\(\tau \)
1
s
Time horizon
 T
72
h
Top block: quantities describing the geometry of the storage tank, the location of PHXs is shown in Fig. 5. Middle block: parameters of the storage medium and the fluid, initial, inlet and underground temperature. Bottom block: step sizes of the finite difference discretization and time horizon for the numerical simulation
For our numerical examples, we use the model and discretization parameters taken from our paper [4] which are given in Table 1. The storage is charged and discharged either by a single PHX or by three PHXs filled with a moving fluid. Thermal energy is stored by raising the temperature of the storage medium. We recall the open architecture of the storage, which is only insulated at the top and the side but not at the bottom. This leads to an additional heat transfer to the underground for which we assume a constant temperature of \(Q^{G}(t)=15\, {^{\circ }\text {C}}\).
In all experiments, we start with a homogeneous initial temperature distribution with the constant temperature \(Q_0=10\, {^{\circ }\text {C}}\). The fluid is assumed to be water, while the storage medium is dry soil. During charging, a pump moves the fluid with constant velocity \({\overline{v}}_0\) arriving with constant temperature \(Q^{I}(t)=Q^{I}_C=40\,{^{\circ }\text {C}}\) at the inlet. This temperature is higher than in the vicinity of the PHXs, thus induces a heat flux into the storage medium. During discharging, the inlet temperature is \(Q^{I}(t)=Q^{I}_D=5\,{^{\circ }\text {C}}\) leading to a cooling of the storage. At the outlet, we impose a vanishing diffusive heat flux, that is, during pumping, there is only a convective heat flux. We also consider waiting periods, where the pump is off. This helps to mitigate saturation effects in the vicinity of the PHXs, which reduce the injection and extraction efficiency. During that waiting periods the injected heat (cold) can propagate to other regions of the storage. Without convection of the PHX fluid, we have only diffusive propagation of heat in the storage and the transfer over the bottom boundary.
For time horizon \(T=72\) hours, we divide the simulation time interval [0, T] into charging (\(I_{C}\)), discharging (\( I_{D}\)), and waiting (\(I_{W}\)) periods, which are depicted in the figures below. The two-dimensional input function g is defined as
$$\begin{aligned} g(t)=\big (Q^{I}(t),Q^{G}(t)\big )^{\top } ~ \text {with } ~ Q^{I}(t)={\left\{ \begin{array}{ll} Q^{I}_C=40\, {^{\circ }\text {C}},& t \in I_{C} ~~\text {(charging)},\\ Q^{I}_D=5\, {^{\circ }\text {C}},& t \in I_{D} ~~\text {(discharging)},\\ {{\overline{Q}}} ^F\!(t), & t \in I_{W} ~~\text {(waiting)}.\\ \end{array}\right. } \end{aligned}$$
(18)
Here, the inlet temperature \(Q^{I}(t)\) is piecewise constant during charging and discharging but time-dependent and equal to \({{\overline{Q}}} ^F(t)\) during waiting periods.
For the chosen discretization parameters, the dimension of the state equation, (13) resulting from the space-discretization of the heat equation is \(n=10201\). The output matrix \(C\) depends on the number of output variables and changes in the various experiments.

7.2 Numerical results for analogous LTI system

In Fig. 6, we present some numerical results, where we compare the aggregated characteristics of the original and the associated analogous model. These results are based on the storage architecture with three PHXs. The figure shows negligible approximation errors for the average temperature in the storage \({{\overline{Q}}} ^M\), in the fluid \({{\overline{Q}}} ^F\), and at the bottom boundary \({{\overline{Q}}} ^B\). However, the approximation of the average outlet temperature \({{\overline{Q}}} ^{O}\) suffers slightly from the replacement of a resting fluid by a moving fluid during the waiting periods. The resulting “mixing of the temperature profile” inside the PHXs adjusts the outlet to the average temperature in the PHXs. This can be seen in the right panel, where the relative error for the outlet temperature dominates the errors for the two other average temperatures in the storage and the fluid. The experiment indicates that apart from some noticeable approximation errors in the PHXs during waiting periods, in particular at the outlet, the other deviations are negligible. Finally, it can be nicely seen that during the (dis)charging periods the errors decrease and vanish almost completely, that is, in the long run there is no accumulation of errors. Note that in [3, Sect. 3.5.4], we also compare the detailed spatial temperature distribution in the storage for the original and analogous model. These results also show no visible differences.
The poor precision of the outlet temperature approximation by the analogous model during waiting periods is of no relevance for the management and operation of the geothermal storage within a residential heating system. Here, the outlet temperature is required only during charging and discharging but not during the waiting periods. The interesting quantity for which a good approximation precision is required is the average temperature in the storage and this is provided by the analogous model.

7.3 Two aggregated characteristics:  \({{\overline{Q}}} ^M,{{\overline{Q}}} ^F\)

In this example, we consider a two-dimensional output \(Z=({{\overline{Q}}} ^M,{{\overline{Q}}} ^F)^\top \). The two rows of the \(2\times n\) output matrix \(C\) are \(C^{M}\) and \(C^{F}\), which are given in [3, Subsect. 3.3].
Figure 7 depicts in the left panel the first 50 largest Hankel singular values, whereas the right panel shows the selection criteria (red for 1 PHX and blue for 3 PHXs). We recall that the selection criterion \({\mathcal {S}}(l)\) provides an estimate of the proportion of output energy of the original system that can be captured by the reduced-order system of dimension \(\ell \). In the graph of the selection criterion, we draw vertical red dashed (one PHX) and blue dotted lines (three PHX) to indicate the reduced orders \(\ell \) for which the selection criterion \({\mathcal {S}}(l)\) exceeds the threshold values \(\alpha =90\%, 95\%,99\%\) for the first time, respectively. This allows to determine graphically the associated minimal reduced orders \(\ell _\alpha = \min \{\ell : {\mathcal {S}}(\ell )\ge \alpha \}\), which have been introduced in (17). The resulting values are also given in Table 2 and compared with results from the experiment with three output variables considered in the next subsection (line 4) and from additional experiments which we performed in [3, Table 4.1] (lines 1, 3, 5).
Table 2
Minimal reduced orders \(\ell _\alpha = \min \{\ell : {\mathcal {S}}(\ell )\ge \alpha \}\), 1 PHX /3 PHXs
Output
\(\alpha \)
90%
95%
99%
Z=\({{\overline{Q}}} ^M\)
2/2
3/3
4/5
Z=\(({{\overline{Q}}} ^M,{{\overline{Q}}} ^F)^\top \)
4/4
5/6
11/11
Z=\(({{\overline{Q}}} ^M,{{\overline{Q}}} ^F,{{\overline{Q}}} ^B)^\top \)
5/6
7/8
12/13
Z=\(({{\overline{Q}}} ^M,{{\overline{Q}}} ^F,{{\overline{Q}}} ^{O})^\top \)
8/8
10/9
15/14
Z=\(({{\overline{Q}}} ^M,{{\overline{Q}}} ^F,{{\overline{Q}}} ^{O},{{\overline{Q}}} ^B)^\top \)
9/9
11/11
17/16
For the first 50 singular values, we observe for both models that they are all distinct and decrease by 9 orders of magnitude. We observe that the first 20 singular values decrease faster for the model with one PHX than for the three-PHX model. The selection criterion for the model with one PHX is for all \(\ell \ge 2\) larger than for three PHXs. From Fig. 7 and also from the minimal reduced orders reported in Table 2, it can be seen that a reduced-order system with \(\ell _{0.9}=4 \) states can capture more than \(90 \%\) of the output energy of the original system. For the level threshold \(95 \%\), the one PHX model requires \(\ell _{0.95}=5\) states, while for the three-PHX model \(\ell _{0.95}=6\) states are needed. In both cases, the level of \(99 \%\) is exceeded for the first time for \(\ell _{0.99}=11\). Hence, for dimension \(\ell \ge 11 \), an almost perfect approximation of the input–output behavior can be expected.
For the evaluation of the actual quality of the output approximation, we plot in Fig. 8 the output variables of the original and reduced-order system against time. The average temperatures \(Z_1(t)={{\overline{Q}}} ^M(t)\) and \(Z_2(t)={{\overline{Q}}} ^F(t)\) in the medium and fluid are drawn as solid blue and green lines, respectively, and its approximations as brown, orange, and red lines for \(\ell =4,5,11\). Further, the inlet temperature \(Q^{I}(t)\) during the charging a discharging periods is shown as black dotted line. The figures show that the approximation of \({{\overline{Q}}} ^M\) is better than for \({{\overline{Q}}} ^F\). As noted above, for \(\ell =11\), the selection criterion exceeds \(99 \%\), now the approximation errors are almost negligible. This was also observed for \(\ell >11\).
Figure 9 plots for the reduced orders \(\ell \) considered above the \({\mathcal {L}}_2\)-error \(\Vert Z-{\widetilde{Z}}\Vert _{{\mathcal {L}}_2(0,t)}\) against time t together with the error bounds from Theorem 6.3. This allows an alternative evaluation of the approximation quality. As expected, the error bounds and also the actual errors decrease with \(\ell \). However, the error bounds increase more during the charging periods due to the larger norm of the input g caused by the higher inlet temperature, the actual error increases more during the waiting periods. This corresponds to the above observed larger errors in the output approximation during these periods.

7.4 Three aggregated characteristics:  \({{\overline{Q}}} ^M,{{\overline{Q}}} ^F,{{\overline{Q}}} ^{O}\)

This example extends the example considered in Sect. 7.3 by adding a third variable to the system output which is the average temperature at the PHX outlet, that is, we consider the three-dimensional output \(Z=({{\overline{Q}}} ^M,{{\overline{Q}}} ^F,{{\overline{Q}}} ^{O})^\top \). The outlet temperature is needed if the geothermal storage is embedded into a residential system. Then, the management of the heating system and the interaction between its internal buffer storage and the geothermal storage rely on the knowledge of \({{\overline{Q}}} ^{O}\). Further, the difference \(Q^{I}(t)-{{\overline{Q}}} ^{O}(t)\) between inlet and outlet temperature is the key quantity for the quantification of the amount of heat injected to or withdrawn from the storage due to convection of the fluid in the PHX, we refer to Eq. (10) and the explanations in Sect. 4.
The setting is analogous to Subsect. 7.3. The input function g is given in (18) and the \(3\times n\) output matrix \(C\) is formed by the three rows \(C^{M},C^{F},C^{O}\) which are given in [3, Subsect.  3.3].
As in the previous experiments, Fig. 10 shows in the left panel the first 50 largest Hankel singular values, whereas the right panel shows the selection criteria. For the first 50 singular values, we observe for both models that they are all distinct and decrease by 8 orders of magnitude, which is slightly less than for the case of only two outputs. As in the examples with two outputs, the first 20 singular values decrease faster for the model with one PHX than for the three PHX model. The selection criterion for the model with one PHX is for \(\ell \le 6\) larger than for three PHXs and for \(\ell \ge 7\) slightly smaller. Table 2 shows that for reaching threshold levels of \(\alpha =90\%, 95\%, 99\%\) in the one PHX case, \(\ell _\alpha =8,10,15\) states are required, while for three PHXs , one needs \(\ell _\alpha =8,9,14\) states, respectively. Thus, for dimension \(\ell \ge 15 \), an almost perfect approximation of the input–output behavior can be expected. Note that in the previous experiment with two outputs (without outlet temperature), reaching the above thresholds requires about 4 to 5 states less.
In Fig. 11, we plot the output variables of the original and reduced-order system against time. The top panels show the average temperatures \(Z_1(t)={{\overline{Q}}} ^M(t)\) and \(Z_2(t)={{\overline{Q}}} ^F(t)\) in the medium and fluid which are drawn as solid blue and green lines, respectively. The bottom panels depict the average temperature at the outlet \(Z_3(t)={{\overline{Q}}} ^{O}(t)\) by a solid green line. The reduced-order approximations are drawn for \(\ell =8,10,15\). As in the previous experiments with two outputs, it can be observed that the approximation of \({{\overline{Q}}} ^M\) is better than for \({{\overline{Q}}} ^F\). The approximation errors for the outlet temperature \({{\overline{Q}}} ^{O}\) are quite similar to the errors for the fluid temperature. Note that the outlet temperature represents an average of the spatial temperature distribution over the quite small subdomain \({\mathcal {D}}^{O}\) on the boundary, which is still smaller than the subdomain \({\mathcal {D}}^F\) over which the average is taken for the fluid temperature \({{\overline{Q}}} ^F\). Both, the fluid and the outlet temperature show much larger temporal variations than the temperature in medium \({{\overline{Q}}} ^M\). Again, errors are more pronounced during waiting periods than during charging and discharging, and for the three-PHX model, the errors are larger than for the one PHX model. For \(\ell \ge 15\) states, the selection criterion is above \(99 \%\) and the approximation errors are almost negligible.
Figure 11 also shows that the average temperatures of the fluid and at the outlet pipe, \({{\overline{Q}}} ^M\) and \({{\overline{Q}}} ^{O}\), exhibit almost the same pattern during the charging, discharging, and waiting periods. Hence, knowing the average fluid temperature, one can simply predict the outlet temperature and remove \({{\overline{Q}}} ^{O}\) from the output variables. Then, we are back in the setting of the two output experiment in Subsect. 7.3 and need 4 to 5 states less to capture the input–output behavior with the same approximation quality.
An alternative evaluation of the approximation quality can be derived from Fig. 12 which plots for the reduced orders \(\ell \) considered above the \({\mathcal {L}}_2\)-error \(\Vert Z-{\widetilde{Z}}\Vert _{{\mathcal {L}}_2(0,t)}\) against time t together with the error bounds from Theorem 6.3. The results are similar to Fig. 9 and we refer for the interpretation to the end of the previous subsection.
Table 3
Computing times on a standard notebook for the numerical simulation of the aggregated characteristics for the original system and selected reduced-order systems
System dimension \(\ell \)
5
10
15
20
\(n=10201\)
CPU time (seconds)
2.43
2.46
2.68
3.85
46.84
Finally, we report in Table 3 some computing times for the numerical simulation of the aggregated characteristics both for the original system as well as for selected reduced-order systems. The results show that the reduced-order systems require only 5 to 10% of the computing time. We note that for the two-dimensional system under consideration the simulation of the original system is not too expensive, and we want to emphasize that the main purpose of our study was to compute the coefficients of a low-dimensional ODE system to establish a tractable optimal control system needed in another study, see [3].

8 Conclusion

In this study, we have considered the approximate description of the input–output behavior of a geothermal storage by a low-dimensional system of linear ODEs. The starting point was the mathematical modeling of the spatio-temporal temperature distribution in a two-dimensional cross-section of the storage by a linear heat equation with a convection term. By semidiscretization of that PDE w.r.t. spatial variables, we obtained a high-dimensional system of nonautonomous ODEs. The latter was approximated by an analogous LTI system. Reduced-order models in which the state dynamics are described by a low-dimensional system of linear ODEs were derived by the Lyapunov balanced truncation method. In our numerical experiments, we considered aggregated characteristics describing the input–output behavior of the storage, which are required for the operation of the geothermal storage within a residential heating system. The results show that it is possible to obtain relatively accurate approximations from reduced-order systems with only a few state variables. This allows treating the cost-optimal management of residential heating systems as a decision-making problem under uncertainty, which mathematically can be formulated as a stochastic optimal control problem. First results can be found in [3] and further findings will be published in forthcoming articles. After conducting the proof of concept of the proposed MOR method in this study, we aim to apply it to refined models based on three-dimensional models of the geothermal storage, a more detailed PHX topology and more realistic fluid-to-medium heat transfer models.

Acknowledgements

The authors thank Martin Bähr (DLR), Martin Redmann (Martin-Luther University Halle–Wittenberg), Olivier Menoukeu Pamen (University of Liverpool), and Gerd Wachsmuth (BTU Cottbus–Senftenberg) for valuable discussions that improved this paper.

Declarations

Conflict of interest

The authors declare no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://​creativecommons.​org/​licenses/​by/​4.​0/​.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Literatur
6.
Zurück zum Zitat Bähr M, Breuß M, Wunderlich R (2017) Fast explicit diffusion for long-time integration of parabolic problems. In: International conference of numerical analysis and applied mathematics (ICNAAM 2016), vol 1863. p 410002. https://doi.org/10.1063/1.4992582 Bähr M, Breuß M, Wunderlich R (2017) Fast explicit diffusion for long-time integration of parabolic problems. In: International conference of numerical analysis and applied mathematics (ICNAAM 2016), vol 1863. p 410002. https://​doi.​org/​10.​1063/​1.​4992582
19.
Zurück zum Zitat Antoulas AC (2005) Approximation of large-scale dynamical systems. SIAM. doi 10(1137/1):9780898718713 Antoulas AC (2005) Approximation of large-scale dynamical systems. SIAM. doi 10(1137/1):9780898718713
20.
Zurück zum Zitat Antoulas AC, Ionutiu R, Martins N, ter Maten EJW, Mohaghegh K, Pulch R, Rommes J, Saadvandi M, Striebel M (2015) Model order reduction: methods, concepts and properties. In: Coupled multiscale simulation and optimization in nanoelectronics. pp 159–265. https://doi.org/10.1007/978-3-662-46672-8_4 Antoulas AC, Ionutiu R, Martins N, ter Maten EJW, Mohaghegh K, Pulch R, Rommes J, Saadvandi M, Striebel M (2015) Model order reduction: methods, concepts and properties. In: Coupled multiscale simulation and optimization in nanoelectronics. pp 159–265. https://​doi.​org/​10.​1007/​978-3-662-46672-8_​4
36.
Metadaten
Titel
Model order reduction for the input–output behavior of a geothermal energy storage
verfasst von
Paul Honore Takam
Ralf Wunderlich
Publikationsdatum
01.10.2024
Verlag
Springer Netherlands
Erschienen in
Journal of Engineering Mathematics / Ausgabe 1/2024
Print ISSN: 0022-0833
Elektronische ISSN: 1573-2703
DOI
https://doi.org/10.1007/s10665-024-10398-4

    Marktübersichten

    Die im Laufe eines Jahres in der „adhäsion“ veröffentlichten Marktübersichten helfen Anwendern verschiedenster Branchen, sich einen gezielten Überblick über Lieferantenangebote zu verschaffen.