## 2 Methodology
### Thermodynamic Analysis  
In order to balance mass and energy, the mixture properties must be known. In the climatological study carried out in this work, the psychometric zone of the region was built. This zone has all the possible meteorological cases that can occur; therefore, this psychometric zone was used to collect the data to be used in the model.  
For the AWG process, the amount of moist air mass at the inlet is the mixture of dry air and water vapour that undergoes a condensation process until it leaves the system. Ideally, one would expect the water vapour in the incoming mixture to be completely condensed, but the reality is that it does not completely condense. The incoming dry air only undergoes a temperature change, being the means of transport for water vapour, and can be neglected. According to the conservation of mass, for the stationary process of condensation, component masses are related as follows:  
\[(\dot{m}_{v1}+\dot{m}_{a})-(\dot{m}_{a}+\dot{m}_{v2})=\dot{m}_{3l} \tag{2}\]  
\[\dot{m_{v1}}-\dot{m}_{v2}=\dot{m}_{3l} \tag{3}\]  
where  
\(\dot{m}_{v1}=\) mass flow rate of water vapor entering, in kg/s  
\(\dot{m}_{a}=\) mass flow rate of dry air, in kg/s  
\(\dot{m}_{v2}=\) mass flow rate of water vapor exiting, in kg/s  
\(\dot{m}_{3l}=\) mass flow rate of condensed water, in kg/s  
Figure 7: Schematic of physical model for the air dehumidification (AWG).  
Specific humidity, \(\omega\), is the ratio water vapour and dry air masses.  
\[\omega=\frac{m_{v}}{m_{a}} \tag{4}\]  
Specific humidity at input and output will then be:  
\[\omega_{1}=\frac{m_{v1}}{m_{a}} \tag{5}\]  
\[\omega_{2}=\frac{m_{v2}}{m_{a}} \tag{6}\]  
Using Equations (5) and (6) in Equation (3):  
\[\dot{m}_{a}(\omega_{1}-\omega_{2})=\dot{m}_{\mathcal{A}} \tag{7}\]  
Equation (7) is the mass balance in terms of specific humidity.  
The specific enthalpy depends on the properties of the material, such as the temperature of the mixture at the input and output. The energy balance for the stationary system, disregarding kinetic and potential energy changes between input and output, and there being no work done on or from the system, is  
\[(\dot{m}_{a}h_{a1}+\dot{m}_{v1}h_{v1})+\dot{Q}=(\dot{m}_{a}h_{a2}+\dot{m}_{v2} h_{v2})+\dot{m}_{3l}h_{3l} \tag{8}\]  
where  
\(\dot{Q}=\mathrm{Heat}\) transfer ratio to or from the system, in J/s  
\(h_{a1}=\mathrm{Dry}\) air inlet enthalpy, in J/kg  
\(h_{a2}=\mathrm{Dry}\) air outlet enthalpy, in J/kg.  
\(h_{v1}=\mathrm{Water}\) vapor inlet enthalpy, in J/kg.  
\(h_{v2}=\mathrm{Water}\) vapor outlet enthalpy, in J/kg  
\(h_{3l}=\mathrm{Condensed}\) water enthalpy, in J/kg  
Dividing by the mass of dry air, the above equation, in terms of specific humidity, gives:  
\[(h_{a1}+\omega_{1}h_{v1})-\frac{1}{\dot{m}_{a}}\dot{Q}=(h_{a2}+\omega_{2}h_{ v2})+\frac{\dot{m}_{3l}}{\dot{m}_{a}}h_{3l} \tag{9}\]  
Using Equation (7) in Equation (9) gives:  
\[(h_{a1}+\omega_{1}h_{v1})-\frac{1}{\dot{m}_{a}}\dot{Q}=(h_{a2}+\omega_{2}h_{ v2})+(\omega_{1}-\omega_{2})h_{3l} \tag{10}\]  
Then, heat transfer for each unit of mass of dry air from the system to the surroundings gives:  
\[\frac{\dot{Q}}{\dot{m}_{a}}=(h_{a1}+\omega_{1}h_{v1})-(h_{a2}+\omega_{2}h_{ v2})-(\omega_{1}-\omega_{2})h_{3l} \tag{11}\]  
With the above equation, heat transfer from the system to the surroundings that must be extracted for each unit of mass of dry air entering the system was determined. The heat transfer method used could be geothermal energy, solar energy, thermal energy from the sea, biomass energy, hybrid energy systems or by means of a refrigeration cycle, the latter being used for the case study presented herein [42; 44; 45; 46; 47; 48; 49; 50; 51].