## 2 Physical and Mathematical Models
### Mathematical Model
#### 2.2.2 Energy Balance for Two-Stage Chiller with Heat Recovery  
The heat exchange for the beds, the evaporator and the condenser, in addition to valves, shown in Figure 1 is used for the mathematical model. 1. During Operation  
For G1 and G4: adsorption. G1 interacts with the evaporator. G4 interacts with G3. The energy balance equation is:  
\[ \begin{array}{l}\frac{d}{dt}\{(M_{ac}*Cp_{ac}+M_{ac}*Cp_{m}*x_{ads}+M_{Al}*Cp_ {Al}+M_{cu}*Cp_{cu})T_{ads}\}=\\ M_{ac}*Q_{st}*\frac{dx_{sub}}{dt}-M_{ac}*Cp_{m}*(T_{ads}-T_{eva})*\frac{dx_{ subs}}{dt}+M_{cu}*Cp_{pw}*(T_{ci}-T_{co})\end{array}  \tag{1}\]  
The left side represents the required sensible heat transfer of activated carbon, the metallic part of the bed and the methanol amount absorbed by activated carbon. The first part of the right side represents the adsorption heat. The second term represents heat flow from evaporator to adsorbent bed. The third term represents the heat transfer by cooling water. The outlet temperature of the cooling water is calculated by Log Mean Temperature Difference (LMTD):  
\[T_{co}=T_{ads}+(T_{ci}-T_{ads})*exp\{-(U_{b}*A_{b})/(M_{cav}*Cp_{w})\} \tag{2}\]  
For G2 and G3: desorption, where G2 interacts with condenser. G3 interacts with G4. The energy balance equation is:  
\[ \begin{array}{l}\frac{d}{dt}\{(M_{ac}*Cp_{ac}+M_{ac}*Cp_{m}*x_{des}+M_{Al}*Cp _{Al}+M_{cu}*Cp_{cu})T_{des}\}=\\ M_{ac}*Q_{st}*\frac{dx_{sub}}{dt}+M_{cu}*Cp_{pw}*(T_{hi}-T_{ho})\end{array}  \tag{3}\] \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Mode** & **A** & **B** & **C** & **D** & **E** & **F** \\ \hline G1 & Adsorption & Heat Recovery & Pre-Heating & Desorption & Heat Recovery & Pre-Cooling \\ \hline G2 & Desorption & Heat Recovery & Pre-Cooling & Adsorption & Heat Recovery & Pre-Heating \\ \hline G3 & Desorption & Heat Recovery & Pre-Cooling & Adsorption & Heat Recovery & Pre-Heating \\ \hline G4 & Adsorption & Heat Recovery & Pre-Heating & Desorption & Heat Recovery & Pre-Cooling \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Operation modes for the two-stage chiller with mass and heat recovery. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Switching** & **Adsorption/Desorption** & **Switching** & **Adsorption/Desorption** \\ \hline Valves & 1, 3 and 5 & Closed & Open & Closed & Closed \\ \hline  & 2, 4 and 6 & Closed & Closed & Closed & Open \\ \hline Bed & G1 and G4 & Hot water & Hot water & Cold Water & Cold Water \\ \hline  & G2 and G3 & Cold water & Cold Water & Hot water & Hot water \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Valve operation and cooling/hot water circulation. The left side represents the required sensible heat transfer of activated carbon, the metallic part of the bed and the methanol amount absorbed by activated carbon. The first part of the right side represents the desorption heat. The second term represents the heat transfer by heating water. The outlet temperature of the heating water is calculated by LMTD:  
\[T_{ho}=T_{des}+(T_{hi}-T_{des})*exp\{-(U_{b}*A_{b})/(M_{hw}*Cp_{w})\} \tag{4}\]  
For the evaporator:  
\[ \begin{array}{l}\frac{d}{dt}\{(M_{em}(t)*Cp_{m}+M_{eu}*Cp_{rou})T_{eu}\}=- M_{ac}*hf_{fg}*\frac{dx_{abs}}{dt}\\ -M_{ac}*Cp_{m}*(T_{con}-T_{eu})*\frac{dx_{abs}}{dt}+M_{chw}*Cp_{pw}*(T_{chi}-T_ {cho})\end{array}  \tag{5}\]  
The left side represents the required sensible heat transfer of the metallic part of the evaporator heat exchanger. \(M_{em}(t)\) is methanol mass inside the evaporator that is changing with time due to adsorption and desorption processes. The first part of the right side represents latent heat of vaporization for methanol. The second term represents the heat required to cool down incoming condensed methanol at condensation temperature. The last term represents the heat transfer by chilled water. The outlet temperature of the chilled water is calculated by LMTD:  
\[T_{cho}=T_{eu}+(T_{chi}-T_{eu})*exp\{-(U_{cwu}*A_{eva})/(M_{chw}*Cp_{w})\} \tag{6}\]  
For the condenser:  
\[