*2.3. Exergy Analysis*

Exergy analysis is a way to define how far a system operates from ideal conditions. Exergy indicates the maximum amount of work that a system can generate under the second law of thermodynamics. Consequently, since all real systems are far from their ideal state, they cannot produce the maximum theoretical amount of work, and some of the theoretical maximum is wasted as exergy destruction [31]. .

For a steady-state process, the destruction of exergy for equipment *i* ( *Ed*,*i*) is generally determined based on Equations (9) and (10) [32,33].

$$\dot{E}\_{dj} = \sum\_{\dot{j}} (\dot{m}\_{\dot{l}} e\_{\dot{l}})\_{\text{in}} - \sum\_{\dot{k}} (\dot{m}\_{\dot{k}} e\_{\dot{k}})\_{\text{out}} + \sum \dot{W}\_{\text{in}} - \sum \dot{W}\_{\text{out}} + \sum [\dot{Q}(1 - \frac{T\_0}{T})]\_{\text{in}} - \sum [\dot{Q}(1 - \frac{T\_0}{T})]\_{\text{out}} \tag{9}$$

$$e\_{\dot{l}} = (h\_{\dot{l}} - h\_0) - T\_0(s\_{\dot{l}} - s\_0) \tag{10}$$

In Equation (9), the first and second terms of the right-hand side show the input and output exergies by the streams for equipment *i*. The third and fourth terms show the exergy changes of equipment *i* owing to the work transferred, and, finally, the last two terms of the right-hand side of Equation (9), represent the exergy changes due to the heat transferred [32,33]. In this equation, *T*<sup>0</sup> is the surrounding temperature, considered as 273.15 K, which is also the selected reference temperature. *T* is the temperature of the equipment. In Equation (10), *h*<sup>0</sup> and *s*<sup>0</sup> are the enthalpy and entropy of the environment, considered at the reference conditions (i.e., at the reference temperature of *T*<sup>0</sup> and reference pressure of *P*0), and *hi* and *si* are the enthalpy and entropy, respectively, of stream *i* at temperature *T* and pressure *P*.

In addition to the exergy destruction of equipment *i*, in the cycle, the contribution of exergy destruction, *Econt*,*i*, in the total exergy loss of the cycle, . *Ed*,*tot* can be determined based on Equation (11). . .

$$E\_{cont,i} = \frac{E\_{d,i}}{\dot{E}\_{d,tot}} = \frac{E\_{d,i}}{\sum \dot{E}\_{d,i}} \tag{11}$$

In this manner, for each equipment of the investigated cycle, the exergy analysis is applied according to Equations (9) and (10) [31–33].

For the turbine, because it was considered to follow an isentropic process, there is no heat transfer. Then, Equations (9) and (10) are simplified to Equation (12) for the exergy destruction by the turbine, . *Ed*,*turb* ,

$$\dot{E}\_{d,turb} = \dot{m}\_r (h\_1 - h\_2) - \dot{m}\_r T\_0 (s\_1 - s\_2) - \dot{W}\_s \tag{12}$$

For the condenser, the exergy destruction, . *Ed*,*<sup>C</sup>* , is derived by,

$$\dot{E}\_{d,\mathbb{C}} = \dot{m}\_r (h\_2 - h\_3) - \dot{m}\_r T\_0 (s\_2 - s\_3) - \dot{Q}\_{\mathbb{C}} (1 - \frac{T\_0}{T\_{LS}}) \tag{13}$$

where *TLS* is the heat sink temperature which absorbs . *QC*, and is considered as 298.15 K.

For the evaporator, the exergy destruction, . *Ed*,*<sup>e</sup>* is calculated by Equation (14) (during the day).

$$\dot{E}\_{d,\varepsilon} = \dot{m}\_r[(h\_4 - h\_1) - T\_0(s\_4 - s\_1)] + \dot{m}\_w[(h\_6 - h\_5) - T\_0(s\_6 - s\_5)]\tag{14}$$

For the PCM tank, it is important to consider the assumption of insulation of the tank. Therefore, the exergy destructions of the PCM tank are determined based on Equations (15) and (16) for day and night, respectively.

$$E\_{d,PCM,day} = \dot{m}\_w \left( (h\_{10} - h\_7) - T\_0 (s\_{10} - s\_7) \right) \tag{15}$$

$$E\_{d,PCM,night} = \dot{m}\_r \left( (h\_{4'} - h\_{1'}) - T\_0 (s\_{4'} - s\_{1'}) \right) \tag{16}$$

In Equations (15) and (16), *Ed*,*PCM*,*day* and *Ed*,*PCM*,*night* are the exergy destructions of the PCM tank during the day and night, respectively. As a result, for a 24-h period, the exergy destruction of the PCM, *Ed*,*PCM*, can be calculated based on Equation (17) [34,35].

$$E\_{d,PCM} = E\_{d,PCM,day} + E\_{d,PCM,night} \tag{17}$$

Finally, according to Equations (9) and (10), the exergy destruction of the water tank, . *Ed*,*wt* , is calculated based on Equation (18).

$$\dot{E}\_{d,wt} = \dot{m}\_{\text{W}\text{\textquotedblleft}}(h\_8 - h\_9) - \dot{m}\_{\text{W}\text{\textquotedblright}}T\_0(s\_8 - s\_9) + \dot{Q}\_S(1 - \frac{T\_0}{T\_{\text{HW}}}) \tag{18}$$

where *THW* is the heat source temperature and equal to 0.75*Tsun* [29]. Moreover, for calculating the enthalpy and entropy changes of liquid water at constant pressure in the water tank, Equations (19) and (20) are used.

$$
\Delta h = \int\_{T\_8}^{T\_9} \mathbb{C}\_{pw} dT \tag{19}
$$

$$
\Delta s = \int\_{T\_8}^{T\_9} \frac{\mathbb{C}\_{pw}}{T} dT \tag{20}
$$

In these equations, *Cpw* is the heat capacity of water, and *T*<sup>8</sup> and *T*<sup>9</sup> are the inlet and outlet temperatures of the water streams of the water tank.

After determining the exergy destruction of all of the equipment, the total exergy destruction of the cycle, which includes the non-idealities of the system, can be determined according to Equation (21). .

$$
\dot{E}\_{d, \text{tot}} = \sum \dot{E}\_{d, i} \tag{21}
$$

According to this equation, the total exergy destruction of the cycle is actually the sum of the exergy destruction of each equipment in the cycle.
