## 2 Methodology
### Exergetic Evaluation  
In order to evaluate the cycle performance, the second law efficiency and exergy destruction rate are considered as main evaluation criteria. In general, in the absence of magnetic, electrical, nuclear and surface tension effects as well as ignoring the kinetic and potential exergies, the exergy rate consists of two physical and chemical exergy rates as [39]:  
\[\dot{E}=\dot{E}_{ph}+\dot{E}_{ch} \tag{8}\]  
Physical exergy can be obtained from [33]:  
\[\dot{E}_{ph}=\dot{m}[(h-h_{0})-T_{0}(s-s_{0})] \tag{9}\]  
and the chemical exergy for ammonia-water solution is expressed as [40]:  
\[\dot{E}_{ch(NH_{3}/H_{2}O)}=\dot{m}\bigg{[}(\frac{X}{M_{NH_{3}}})e_{ch,NH_{3}} ^{0}+(\frac{1-X}{M_{H_{2}O}})e_{ch,H_{2}O}^{0}\bigg{]} \tag{10}\]  
The subscript 0 in Equation (3) indicates the dead state and \(T_{0}\) shows its temperature. The standard chemical exergy for ammonia and water is set to 336.684 and 45 kJ/kmol [40]. For a detailed analysis, the exergy destruction rate is calculated. The exergy destruction rate is defined as the difference between the product exergy (\(\dot{E}_{P}\)), loss exergy (\(\dot{E}_{L}\)) and fuel exergy (\(\dot{E}_{F}\)) for each component of the proposed system [41]:  
\[\dot{E}_{D,k}=\dot{E}_{F,k}-\dot{E}_{P,k}-\dot{E}_{L,k} \tag{11}\]  
For parametric analysis, the energy and exergy efficiencies are calculated to be [42]:  
\[\eta_{\text{energy}}=\frac{\dot{W}_{net}+\dot{Q}_{heating/cooling}}{\dot{Q}_{in}} \tag{12}\]  
\[\eta_{\text{energy}}=\frac{\dot{W}_{net}+\dot{E}_{heating/cooling}}{\dot{E}_{in}} \tag{13}\] \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & **WWF** & **WWC** & **WSF** & **WSC** & **TWC** & **TSC** & **TSF** & **TWF** & **SWX** & **SSX** \\ \hline  & _n = 29_ & _n = 91_ & _n = 6_ & _n = 19_ & _n = 72_ & _n = 10_ & _n = 15_ & _n = 37_ & _n = 13_ & _n = 73_ \\ \hline T\({}_{\text{ambient}}\) (\({}^{\circ}\)C) [24] & \(-\)0.13 & \(-\)5.68 & 2.27 & 1.1 & 7.37 & 4.81 & 13.81 & 15.42 & 15.67 & 17.24 \\ \(\dot{Q}_{\text{heating}}\) (MW) [24] & 11.68 & 11.66 & 11.8 & 10.79 & 6.3 & 6.15 & 4.79 & 5.69 & 2.99 & 2.9 \\ \(\dot{Q}_{\text{cooling}}\) (MW) & - & - & - & - & - & 1.78 & 1.9 & 2.43 & 2.48 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Corresponding mean values of heating, cooling and ambient temperature for different typical days categories. It is evident that the energy or thermal efficiency is the ratio of the net available products (net product power, heating and cooling rates) to the rate of thermal energy, which is absorbed from the geothermal heat source. In addition, the exergy efficiency is the ratio of the net available products exergy (net product power, heating and cooling exergies) to the rate of input exergy from the geothermal heat source. In Equations (12) and (13) \(\dot{W}_{net}\) is the net output power of the system, \(\dot{Q}_{cooling}\) is the cooling capacity in the summer condition, the heating capacity and the total heat input are \(\dot{Q}_{heating}\) and \(\dot{Q}_{in}\), respectively. \(\dot{E}_{cooling}\) is the generated exergy rate for cooling purpose used in the summer days, the heating exergy and the total input exergy are \(\dot{E}_{heating}\) and \(\dot{E}_{in}\), respectively. These parameters are defined as:  
\[\dot{W}_{net}=\dot{W}_{Tur}-\sum\dot{W}_{P} \tag{14}\]  
\[\dot{Q}_{cooling}=\dot{m}_{39}(h_{39}-\mathrm{h}_{40}) \tag{15}\]  
\[\dot{Q}_{heating}=\dot{m}_{30}(h_{30}-\mathrm{h}_{29}) \tag{16}\]  
\[\dot{Q}_{in}=\left\{ \begin{array}{ll}\dot{m}_{21}(h_{21}-h_{28})&\text{for winter condition}\\ \dot{m}_{21}(\mathrm{h}_{21}-\mathrm{h}_{27})&\text{for summer condition} \end{array} \right. \tag{17}\]  
\[\dot{E}_{cooling}=\dot{E}_{40}-\dot{E}_{39} \tag{18}\]  
\[\dot{E}_{heating}=\dot{E}_{30}-\dot{E}_{29} \tag{19}\]  
\[\dot{E}_{in}=\left\{ \begin{array}{ll}\dot{E}_{21}-\dot{E}_{28}&\text{for winter condition}\\ \dot{E}_{21}-\dot{E}_{27}&\text{for summer condition}\end{array} \right.