## 3 Mathematical Model
### Definition of the General Model of the Wall  
Fundamentally, the thermal analysis of a wall should be developed dynamically, because the heat transfer through the wall is dependent on time and place. There are several different methods to analyze a building's envelope. According to the one-dimensional Fourier equation:  
\[\frac{\partial^{2}T}{\partial x^{2}}=\frac{1}{\alpha}\frac{\partial T}{\partial\tau} \tag{2}\]  
where \(\alpha\) is the thermal diffusivity coefficient of the medium, [m\({}^{2}\)/s], given by \(\alpha=\lambda/(c_{P}\,\rho)\). Equation (2) is solved by means of numerical techniques such as FEM (as well as analytically for small systems). Another way of solving Equation (2) is to transfer the PDE Fourier model to the ordinary differential equations (ODEs). The used lumped capacitance model is an ODE model and assumes that the temperature difference inside each lump is negligible. In this way, the wall is divided into some individual elements or lumps, in which the temperature is considered constant and independent of time. Figure 2 shows the layout of an external wall with the thermal resistance model [11]. External walls are notable nodes in the building envelope because these are consequently affected by solar and internal irradiation. The effect of solar radiation is accounted by means of the increase of temperature which it induces on the external surface of the wall. The energy balance equation for the nodes of wall,  
\[ \begin{split} M_{i}c_{vi}\frac{dT_{i}}{dt}=& U_{i-1,i}A(T_{i-1}-T_{i})-U_{i,i+1}A(T_{i}-T_{i+1})\\ & U_{i-1,i}=\frac{2}{R_{i-1}+R_{i}}\\ & U_{i,i+1}=\frac{1}{\frac{1}{2R_{i}^{2}}+\frac{L_{i+1}}{2R_{i +1}^{2}}},\ U_{i-1,i}=\frac{1}{\frac{L_{i-1}}{2R_{i-1}}+\frac{L_{i}}{2R_{i}}} \end{split}  \tag{5}\]  
where \(M_{i}\), \(c_{vi}\), \(T_{i}\), and \(R_{i}\) are the mass, the specific heat, the temperature, and thermal resistance of \(i\)th layer, respectively. In addition, \(L_{i}\) is the thicknesses and \(\lambda_{i}\) is the thermal conductivity of the \(i\)th layer. Equation (6) describes the balance of energy for the last node N. Internal radiation plays vital roles in internal temperature on the in-surface node, heater, furniture, human, and everything that might be in the building. \[ \begin{split} M_{N}c_{vN}\frac{dT_{N}}{dt}=& U_{N-1,N}A(T_{N-1}-T_{N})-U_{N,N}A(T_{N}-T_{in})+\\ &-\sigma\varepsilon_{int,h}A_{h}F_{s,h-N}\Big{[}T_{w,N}^{4}(t)-T _{h}^{4}(t)\Big{]}+\\ &-\sigma\varepsilon_{int,N}A_{N}\sum F_{s,j-N}\Big{[}T_{w,N}^{4} (t)-T_{w,j}^{4}(t)\Big{]}\\ U_{N,N}=\frac{1}{\frac{1}{R_{in}^{2}}+\frac{L_{N}}{2R_{N}}},\ U_{N -1,N}=\frac{1}{\frac{L_{N-1}}{2R_{N}}+\frac{L_{N}}{2R_{N}}}\end{split}  \tag{6}\]  
where, \(\sigma\), \(\varepsilon_{int,N}\), A, and \(F_{s,h-N}\) are the Stefan-Boltzmann constant, the N-layer emissivity, the surface area and the shape factor (radiation effect between two surfaces) of each surface on the other surfaces, respectively. The energy balance equation for the heater can be written as follows:  
\[ \begin{split} M_{h}c_{vN}\frac{dT_{h}}{dt}=Q_{heater}-U_{h}(T_{in} -T_{h})-\sigma\varepsilon_{int,h}A_{h}\sum F_{s,\ h-N}\Big{[}T_{w,\ N}^{4}(t)-T _{h}^{4}(t)\Big{]}\\ U_{h}=A_{h}h_{h}\end{split}  \tag{7}\]  
where, \(\varepsilon_{int,h}\), \(A_{h}\), and \(F_{s,h-N}\) are the heater emissivity, the heater area, and the shape factor of the heater on the other surfaces, respectively, and \(Q_{heater}\) is the constant power of the heater. The energy balance equation for the equipment and furniture can be written as follows:  
\[ \begin{split} M_{f}c_{vj}\frac{dT_{f}}{dt}=U_{f}\Big{(}T_{in}-T_{ f}\Big{)}-\sigma\varepsilon_{int,f}A_{f}\sum F_{s,f-N}\Big{[}T_{w,\ N}^{4}(t)-T_{f}^{4}(t)\Big{]}U_{f}= \frac{1}{\frac{1}{A_{f}h_{f}}+\frac{L_{f}}{A_{f}A_{f}}}\end{split}  \tag{8}\]  
where, \(\varepsilon_{int,f}\), \(A_{f}\), and \(F_{s,f-N}\) are the furniture emissivity, the furniture area, and the shape factor of the furniture on the other surfaces, respectively. The energy balance equation for the windows are as follows:  
\[