**2.3 Thermal model of STES**

The STES system is modeled on these useful assumptions for simplifying:


*Holistic and Affordable Approach to Supporting the Sustainability of Family Houses… DOI: http://dx.doi.org/10.5772/intechopen.103110*

scheme based on monthly time steps, it will be introduced several numerical errors, and for this reason, after performing this model, another model will be performed by using daily time steps in order to verify the accuracy of the results obtained with the previous monthly model.

3.The field of temperatures within the water tank can be considered homogeneous, T. This assumption is reasonable according to its low Biot number, as it was previously discussed.

Working on the previous three hypotheses, the time evolution of the tank temperature can be calculated by means of the thermal model based on lumped capacities [14]. Taking this model and by considering now the energy equation, the rate of internal energy can be calculated by counterbalancing the solar power (*Qsolar*) gained with both extracting powers, the heat losses to the surrounding ambient (*Qamb*) and the power delivered to the household in-floor heating system (*Qheat*):

$$\mathcal{M} \, c(dT \,(t)/dt) = Q\_{solar}(t) \text{--} Q\_{amb}(t) \text{--} Q\_{heat}(t) \tag{3}$$

In this equation, the water mass and its heat capacity are noted by *M* and *c*, respectively. Thus, the annual evolution of the STES temperature can be described by using their monthly averages going through a twelve-equation system, as:

$$\mathbf{M} \ c \ (d\mathbf{T}\_1/dt) \sim = \mathbf{M} \ c \ \left(\mathbf{T}\_2^{-1} - \mathbf{T}\_1^{\ 0 \ }\right)/\Delta t = \mathbf{Q}\_{\text{solar}} \ ^{1}\mathbf{-Q}\_{\text{amb}} \ ^{1}\mathbf{-Q}\_{\text{heat}} \tag{4}$$

$$\mathbf{M} \ c \ (d\mathbf{T}\_2/dt) \sim = \mathbf{M} \ c \ \left(\mathbf{T}\_3^{\ 1} - \mathbf{T}\_2^{\ 1}\right)/\Delta t = \mathbf{Q}\_{solar}^{\ 2} - \mathbf{Q}\_{amb}^{\ 2} - \mathbf{Q}\_{heat}^{\ 2} \tag{5}$$

$$\mathbf{M} \ c \ (d\mathbf{T}\_{12}/dt) \sim = \mathbf{M} \ c \ \left(\mathbf{T}\_1^{\ 1} - \mathbf{T}\_{12}^{\ 1}\right)/\Delta t = \mathbf{Q}\_{solar}\,^{12} - \mathbf{Q}\_{amb}\,^{12} - \mathbf{Q}\_{heat}\,^{12} \tag{6}$$

In this system is approximated every *n-teenth* (*n* = 1,2 … 12) temperature rate (*dTn/dt)* by its difference quotient along its monthly time step, *(Tn+1 -Tn)/Δt,* and so, we can transform the original system of differential equations in another (simpler) system based on algebraic equations. The supra-index in powers and the sub-index in temperatures denote the ordinal monthly number, and the supra-index in temperatures denotes the number of the numerical iteration performed for obtaining an accurate solution. This system describes an explicit numerical scheme that can be solved by performing an iterative procedure. Thus, starting with a seed value for the first month (*T1* 1 ), the first value of every month can be cleared going through (Eqs. (4)–(6)). Here, the last Eq. (6) gives us the new value for the first month (*T1* 2 ), from which this iterative procedure starts again, and continues until the whole system converges to the stationary periodical solution, which describes the temperature evolution of the tank. This numerical code was performed on a spreadsheet (see Complementary Material, in [20]) and from our results, we have observed that usually, only little iterations are needed. This behavior is expected, according to the physical characteristic of this system, which is an energy dissipater. So, we have chosen a spreadsheet instead of any procedural language for developing our numerical tool, considering its advantage of providing explicit all-in-hand modeling.

We have to calculate now the three power terms, *Qsolar*, *Qamb*, and *Qheat*, in order to solve the previous algebraic system (Eqs. (4)–(6)). The first term (solar power) depends on the solar resource and the efficiency of solar collectors. For *N* collectors having collecting area *Ac* and instantaneous efficiency *η(t),* the instantaneous solar power collected from a normal solar flux *In(t)* is given by:

$$Q\_{solar}\left(t\right) = N\,A\_c\,\eta\left(t\right)I\_n(t)\tag{7}$$

Actually, we are only interested in obtaining the monthly averages of the collected solar energy, *Esolar<sup>n</sup>* . So, the monthly balances of powers (Eqs. (4)–(6)) will be substituted by the monthly balances of energy. However, it is cumbersome to integrate Eqs. (7), due to the high variability of the solar resource. On the other hand, the single solar data worldwide available are the monthly averages of the daily solar energy on ground level (*G<sup>n</sup>* ). Thus, this lack is now solved by introducing monthly average factors (*α<sup>n</sup>* x *G<sup>n</sup>* ), which take into account the relation between both monthly solar irradiations, the received on ground level and the received on the collector when it is elevated a given tilt angle (*φ*). By using these factors, the monthly average of the collected energy can be calculated by:

$$E\_{solar}{}^{n} = N \, A\_c \, \eta^n \, a^n \, G^n \tag{8}$$

In this equation, we have been introduced the monthly averages of the collector's efficiency, *η<sup>n</sup>* , which (from Eq. (2)) can be calculated by substituting the actual collector mean temperature (*Tm*) at the *n-teenth* month by the tank temperature calculated at the previous month,*Tn-1*:

$$
\eta^n = a\_0 - a\_1 (T\_{n-1} - T\_a) / I\_n - a\_2 (T\_{n-1} - T\_a)^2 / I\_n \tag{9}
$$

Here, let us note that the mean collector's temperature is around 5°C, higher than tank temperature by taking into account the temperature jump in the heat exchange. However, also the ambient temperature could be considered around 5°C above its daily average, according to the fact that the collector gets its highest efficiency mostly around noon, and so, these opposite effects are canceled.

The *α<sup>n</sup>* x*Gn* factors introduced in Eq. (8) must be calculated according to the latitude of the location, the day of the year and the collector's shape (cylindrical or flat), and they can be calculated from many solar codes available in the literature. Here is provided with a code programmed for cylindrical collectors (see in solar\_trajectory\_Bariloche.xls [20]), based on the well-known equations that describe the apparent trajectory of the sun [1, 21]. By using this code, the procedure from which the calculation of the *α<sup>n</sup>* x*G<sup>n</sup>* factors can be described by four steps:


*Holistic and Affordable Approach to Supporting the Sustainability of Family Houses… DOI: http://dx.doi.org/10.5772/intechopen.103110*

isotropic term), but, for the goal looking for here (to get the monthly averages of collector's production), this is a reasonable approximation.

4.Then, by using these monthly *I* values it is calculated the solar irradiation that would receive a cylindrical collector (*α<sup>n</sup>* x*G<sup>n</sup>* ) mounted with a given tilt angle.

Although at a first glance this procedure could be cumbersome, it is a well-known methodology; there are many similar software applications for calculating the solar irradiance over a collector as a function of its tilt angle. For example, the reader can study the simulating tool developed by NASA [22] for studying the *G* value for different tilt angles in any worldwide location. This issue has also been studied in the literature. Duffie and Beckman [23] have suggested tilt angles equal to the latitude for maximizing the annual yield. Tang and Wu [24] and Handoyo, Ichsania, and Prabowo [25] have recently proposed another criterion.

The energy losses by the tank (to the ambient for aboveground tanks, or to ground for underground ones) along the *n-teenth* month, *Eamb<sup>n</sup>* , is calculated in Eq. (10) by integrating the *Qamb* power term during its time step (*Δtn*), and by considering the tank temperature of the previous month,*Tn-1*. In Eq. (10), *λ* and *s* are, respectively, the thermal conductivity and thickness of the insulation material, and *A* is the overall external area of the tank.

$$E\_{amb}{}^{n} = (\lambda/s)A \left(T^{n-1} - T\_{a}{}^{n}\right) \Delta t^{n} \tag{10}$$

Remembering that the monthly averages of energy consumed by the space heat system (*Eheat*) and the monthly mean ambient temperatures are given by **Table 1**, now all terms of Eqs. (4)–(6) can be explicated. So, these equations can be solved by the iterative procedure described before, by:

$$\mathbf{M} \,\mathrm{c}\left(T\_2^{\ 1} - T\_1^{\ 0}\right) = E\_{solar}{}^1 \mathrm{-} E\_{amb}{}^1 \mathrm{-} E\_{heat}{}^1 \tag{11}$$

$$\mathbf{M} \,\mathrm{c}\left(T\_{\clubsuit}^{\sf T} - T\_{\clubsuit}^{\sf T}\right) = \mathbf{E}\_{\textup{solar}}\,^2 - \mathbf{E}\_{\textup{amb}}\,^2 - \mathbf{E}\_{\textup{heat}}\,^2\tag{12}$$

$$\mathbf{M} \ c \left( T\_1^{\ 1} - T\_{12}^{\ 1} \right) = E\_{solar}^{\ 12} - E\_{amb}^{\ 12} - E\_{heat}^{\ 12} \tag{13}$$

Let us discuss now the accuracy of this numerical methodology. There are two numerical approximations introduced by this explicit one-step scheme, related to the using of the temperature at the previous month (*Tn-1*), instead of using (*Tn*) for calculating the heat losses to the ambient (Eq. (10)) and the collector's efficiency (Eq. (9)). These two approximations together with the monthly approximation of the temperature rate (d*T*/d*t*), can be improved by reducing the time step, which is similar to any other numerical solver. This way, for all cases studied here, is provided three numerical codes (see *Complementary Material* in our Mendeley Dataset*,* [20]. The first code (namely 12 months) is based on a monthly time step (Eqs. (11)–(13)). The second code (namely 365 days) follows the same physical approximations that the previous one, but based on a daily time step and so, it gives us a more accurate solution. As it will be discussed in the next section, the major improvement achieved is related to the calculation of efficiency (Eq. (9)), which on the monthly modeling has tended to underestimate the efficiency during the winter months, which in turn penalizes the system's performance. In addition, there is a fourth approximation "hidden" in our numerical modeling, which is related to the calculation of the *α*<sup>n</sup> factors. This approximation is programmed on both previous codes by using the same monthly values calculated, as


#### **Table 1.**

*Monthly fractions of heating demand and ambient mean temperatures for Okotoks.*

was previously described by using our solar (solar\_trajectory) code [20]. This code calculates the *α*<sup>n</sup> factors going through the daily sun apparent trajectory by using a time step of 0.1 hours. Therefore, here is also provided with a third code (namely full365) that includes a daily calculation of these α<sup>n</sup> factors. These calculations can be performed day by day going through a very time-consuming task, by using our solar code (solar\_trajectory). Fortunately for the reader, this procedure has been already programmed by using a Visual Basic subroutine that is provided too (clicking the right button of your mouse over the name of the sheet and then, selecting the option 'view code'). Here, is also provided with a second sheet (namely 0.01 h) that includes a more accurate (taking 0.01 h time step) calculation for solar\_trajectory.xls, in order to minimize the error of this procedure too. Hence, now the accuracy of our first monthly model (12 months) can be estimated by comparing its performance against this most refined daily model (full365) developed. According to the observation that this last model provides always solutions with very small variations of the main variable (that is, the tank temperature varies down 0.3°C in every daily step), the numerical error of this model can be estimated as negligible and thus, the total error of our first monthly model can be estimated by comparing against this last code; this way, we have observed always solutions within the +/ 10% bandwidth error.
