Performance enhancement of a low-energy humidification dehumidification desalination system using the M-cycle Authors: Mohammad Ali Bakhtiari, Mohamad Sadeq Karimi, Bahar Firoozabadi Published: 2025 ABSTRACT Water scarcity remains a pressing global issue, particularly in arid and coastal regions, necessitating the development of energy-efficient and sustainable desalination technologies. This study presents a novel humidification-dehumidification desalination system enhanced by the M-Cycle, which utilizes ambient thermal energy to minimize power consumption and eliminate reliance on fossil fuels. A coupled computational approach involving CFD simulations and PSO was employed to model and optimize system performance. The CFD analysis captured detailed temperature and humidity distributions across the heat and mass exchanger, while the PSO algorithm optimized three key parameters: air velocity, heat exchanger width, and dry air split ratio. Notably, the optimized configuration—an airflow velocity of 6.89 m/s, a device width of 0.63 m, and a 35.97% dry air split—resulted in a freshwater production rate of 3.04 kg per kWh of electricity consumed, 360.5 L per day, and an outlet relative humidity of 99%, with total power consumption of 4.94 kW. Compared to previous M-Cycle-based desalination systems, the proposed configuration demonstrates over a threefold improvement in energy efficiency, as measured by the GOR, highlighting its superior thermodynamic performance. Additionally, the study uniquely resolved the spatial distribution of relative humidity and evaporation rates, without relying on simplifications such as assuming saturated air at the outlet. The results confirm the potential of the proposed M-Cycle HDH system as a highly efficient, scalable, and eco-friendly desalination technology suitable for decentralized and off-grid applications. Introduction The Earth’s oceans hold about 97% of the planet’s water, a vast resource that is crucial for many processes, yet it is largely unusable for human consumption due to its high salinity1. Despite its abundance, seawater is unsuitable for direct use in human activities such as drinking, agriculture, and industry, because of the high salt concentration, which is typically between 30,000 and 40,000 parts per million (ppm) of total dissolved solids (TDS). While seawater is abundant, it remains an untapped resource for providing the necessary freshwater needed to sustain human populations. At present, more than 3.4 billion people around the world are struggling with water scarcity, highlighting the critical importance of developing and improving desalination technologies to convert seawater into usable freshwater2–4. Desalination technologies have thus become a central focus for governments and researchers worldwide5,6. The process of desalination involves removing salts and minerals from seawater to make it suitable for human use7–9. Research in this field primarily focuses on two main categories of desalination methods: thermal processes3 and membrane-based processes10. Thermal desalination methods are based on heating seawater to evaporate the water and then condensing the vapor to separate freshwater from saltwater. Examples of thermal processes include multi-effect distillation, vapor-compression distillation, and multi-stage flash distillation11–13. On the other hand, membrane-based processes use specially designed filters, or membranes, to allow water molecules to pass through while blocking salts and other impurities. Reverse osmosis, electrodialysis, and capacitive deionization are some of the common membrane-based methods14–17. Despite the diversity of desalination technologies, they all face similar challenges. One of the most significant obstacles is maximizing the rate of freshwater production while minimizing the amount of energy required to operate the systems. Desalination is an energy-intensive process, and high energy consumption remains a key factor that affects the economic feasibility of these systems. Reducing the operational and maintenance costs of desalination plants, while also decreasing the amount of salt residue left after the desalination process, is another area of focus. Therefore, the development of energy-efficient, cost-effective, and environmentally sustainable desalination technologies is an urgent priority for researchers and engineers18–20. Among the promising solutions for desalination is the Humidification-Dehumidification (HDH) process. The HDH process has gained attention due to its ability to be powered by clean, renewable energy sources, such as solar power, and its relatively low energy requirements compared to other desalination methods21–26. This makes it particularly suitable for use in remote areas or locations that are off the electrical grid, where traditional desalination technologies may not be feasible. The process itself works by using air as a carrier medium to transfer water vapor. In the humidifier, seawater is heated to produce vapor, which is absorbed by the air. This humidified air is then passed through a dehumidifier, where the water vapor condenses into liquid freshwater, ready for use3,27,28. One of the key advantages of the HDH process is its ability to operate at room temperature and atmospheric pressure, which reduces the need for complex equipment and lowers maintenance costs29–33. Additionally, the process can be optimized by using a variety of heat sources, such as waste heat from industrial processes, solar energy, or geothermal energy, to enhance the performance of the humidifier34–36. By preheating the air and the saline water, these energy sources can improve the overall efficiency of the system. Furthermore, the system’s performance can be further optimized by increasing the temperature difference between the humidified air and the cooling surface in the dehumidifier. This temperature gradient enhances the condensation of water vapor, leading to greater freshwater recovery37,38. Although the HDH process holds great promise, there are still challenges in optimizing the humidification process to increase the amount of freshwater recovered39. One of the most promising innovations in this area is the Maisotsenko Cycle (M-Cycle), a thermodynamic process that captures latent heat from water evaporation40–42. The M-Cycle has been widely used in evaporative cooling systems, as it is capable of cooling air below its wet-bulb temperature, approaching the dew point. This feature makes the M-Cycle a promising approach for enhancing desalination performance by enabling efficient heat recovery and facilitating high-rate moisture transfer43–45. The M-Cycle also has applications in waste heat recovery systems, where it can be integrated with heat exchangers to improve the overall efficiency of energy use in industrial processes46–49. Recent studies have focused on integrating the M-Cycle with various desalination and heat recovery systems to enhance performance. For instance, researchers such as Saghafifar and colleagues46 have analyzed the use of M-Cycle-based air saturators in humid air turbines for waste heat recovery. By integrating the M-Cycle with heat exchangers, these systems can recover energy from waste heat and improve the efficiency of both desalination and cooling processes49. Additionally, Tariq and his team have developed a novel design for an M-Cycle-based air saturator that has demonstrated a 30% increase in efficiency and an 11% improvement in the gain output ratio (GOR) compared to conventional HDH systems5. This innovation also reduces operational costs by 14% and the carbon footprint by 7%, making it both economically and environmentally beneficial5. Building on these advances, this project proposes a new desalination system that utilizes the M-Cycle. The proposed system takes advantage of the cooling effects of water evaporation to create two distinct air streams. One air stream is cooled without humidification, losing a significant amount of sensible heat. The second air stream, known as the “wet stream,” absorbs the moisture from evaporated water, ensuring efficient humidification and stable system operation. This wet stream, which becomes fully saturated with moisture, is then passed through the dehumidification system to produce freshwater. The design of this system is particularly beneficial as it allows the air temperature to drop to its dew point, a feat that conventional evaporative cooling systems cannot achieve. To evaluate the performance of the new system, Computational Fluid Dynamics (CFD) is used to simulate the temperature and humidity distribution within the heat exchanger50–54. CFD simulations are essential for optimizing the design of the system, ensuring that the temperature and humidity profiles are balanced to maximize freshwater recovery. Additionally, Particle Swarm Optimization (PSO) is employed to identify the optimal design parameters for the heat exchanger. This optimization technique allows for the fine-tuning of system components to achieve the best possible performance, and the results are compared with those from previous research to assess improvements in efficiency. Despite the increasing interest in integrating the M-Cycle with HDH systems for sustainable desalination, several critical gaps remain unaddressed in the literature. Previous studies, including those by Shaikh et al.55–57, have primarily focused on system-level energy assessments, experimental validation of M-cycle performance, and hybrid solar desalination configurations. However, most of these works either rely on idealized assumptions—such as fully saturated air or uniform evaporation—or lack high-resolution numerical modeling of the coupled heat and mass transfer phenomena within the heat exchanger structure. Moreover, systematic optimization of geometric and operational parameters using advanced algorithms remains largely unexplored. To address these limitations, the present study proposes a comprehensive computational framework for analyzing and optimizing an M-Cycle-based HDH desalination system. The novelty of this work lies in three main contributions: (1) the development of a high-fidelity CFD model capturing spatial distributions of temperature, humidity, and evaporation without relying on simplifying assumptions; (2) integration of PSO for simultaneous tuning of airflow velocity, heat exchanger width, and air-split ratio to maximize water production per unit energy; and (3) inclusion of a sensitivity analysis and practical feasibility assessment to bridge the gap between numerical modeling and real-world implementation. These contributions not only offer a more realistic understanding of system behavior but also provide actionable insights for the design of next-generation off-grid desalination technologies. Method Assumptions In this study, several simplifying assumptions were made to facilitate the analysis and modeling of the M-cycle HDH desalination process. Heat losses to the surrounding environment were considered negligible, ensuring that all thermal energy remains effectively within the system. Both air and water flows were assumed to be steady-state and incompressible, with the airflow treated as an ideal mixture of dry air and water vapor. The system walls were assumed impermeable, preventing any fluid penetration. Molecular diffusion of water vapor within the air, as well as thermal conduction along the walls and within the liquid phase in the flow direction, were neglected due to their minimal impact on overall transport phenomena. Considering the thin water film, its temperature distribution across the thickness was assumed uniform and not explicitly modeled. Furthermore, owing to the high convective heat transfer coefficient between the water film and the air, the wall temperature at any location was taken to be equal to that of the water film. Evaporation was assumed to occur exclusively at the air–water interface. Given the high heat capacity of water, heat transfer between the water film and the airflow was presumed sufficient to maintain a constant water film temperature throughout the system. Finally, airflow in all channels was considered fully developed from the inlet, with a uniform velocity profile across all wet channels. System description The proposed desalination system is a novel integration of the M-Cycle into a HDH framework, designed to maximize thermal efficiency and freshwater production without relying on external thermal energy sources (Fig. 1). The system comprises four main components: a brackish water storage tank, a circulating pump, a Heat and Mass Exchanger (HMX) based on the M-Cycle, and a dehumidifier unit. Together, these components facilitate efficient simultaneous heat and mass transfer, enabling continuous freshwater generation.Fig. 1Schematic of the proposed humidification-dehumidification desalination system utilizing an innovative M-Cycle-based air saturator (Heat and Mass exchanger) for enhanced energy efficiency. Schematic of the proposed humidification-dehumidification desalination system utilizing an innovative M-Cycle-based air saturator (Heat and Mass exchanger) for enhanced energy efficiency. Initially, brackish water is drawn from the storage tank and distributed as a thin film over the surface of the wet channels within the HMX using a pump. Simultaneously, ambient air entering the system is split into two streams:The dry air stream passes through the dry channels, transferring its sensible heat through the channel walls to the adjacent wet channels without becoming humidified.The wet air stream (wet stream) flows over the wetted surfaces, absorbing moisture through evaporation and gradually approaching saturation. The dry air stream passes through the dry channels, transferring its sensible heat through the channel walls to the adjacent wet channels without becoming humidified. The dry air stream passes through the dry channels, transferring its sensible heat through the channel walls to the adjacent wet channels without becoming humidified. The wet air stream (wet stream) flows over the wetted surfaces, absorbing moisture through evaporation and gradually approaching saturation. The wet air stream (wet stream) flows over the wetted surfaces, absorbing moisture through evaporation and gradually approaching saturation. This crossflow configuration enables the recovery of latent heat of evaporation and allows the product air to cool down to its dew point temperature—beyond the capabilities of conventional evaporative cooling systems. The saturated humid air then flows into the dehumidifier, typically composed of finned-tube heat exchangers, where it is further cooled and condensed into liquid water, which is collected in the freshwater tank. The dry air stream exits the system after completing its role in thermal energy exchange. The airflow paths, pressure distribution, and channel geometries are optimized to ensure maximum energy recovery, efficient evaporation, and low power consumption. Electrical energy is the only external input, primarily used for the operation of the pump and fans, making the system ideal for off-grid or remote applications. Overall, by leveraging the thermodynamic advantages of the M-Cycle and the operational simplicity of HDH, this configuration provides a scalable, energy-efficient, and cost-effective solution for freshwater production under diverse environmental conditions. Mathematical formulation Dry floors Concerning Fig. 2 for the airflow in the dry channel and considering the energy balance, Eq. (1) was obtained as follows:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q_{x + dx} - Q_{x} = - dQ_{conv - 1} - dQ_{conv - 3}$$\end{document}Fig. 2Mass and Thermal control volume in an HMX based on M-cycle. Mass and Thermal control volume in an HMX based on M-cycle. The variables of Eq. (1) are calculated as follow:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{x}= {\dot{m}}_{x}* {C}_{p-air}*{T}_{p}(x.y)$$\end{document}3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{x+dx}= {\dot{m}}_{x}* {C}_{p-air}*({T}_{p}\left(x.y\right)+d{T}_{p})$$\end{document}4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${dQ}_{conv-1}={h}_{product}* {\underline{i}}_{y}*\left({T}_{p}\left(x.y\right)- {T}_{f}\left(x.y\right)\right)*dx$$\end{document}5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${dQ}_{conv-3}=0$$\end{document}6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{m}}_{x}= {\rho }_{air} * {V}_{p }* {\underline{i}}_{y}* {H}_{p}$$\end{document} By substitution in Eq. (1):7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{d{T}_{p}}{\left({T}_{p}\left(x.y\right)- {T}_{f}\left(x.y\right)\right)}= -\frac{{h}_{product}}{{\rho }_{air} * {V}_{p }* {C}_{p-air} * {H}_{p}} dx$$\end{document} In these equations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${h}_{product}$$\end{document} is the convective heat transfer coefficient, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${H}_{p}$$\end{document} is the height of the product channel, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${V}_{p}$$\end{document} is air velocity in the product channel and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\underline{i}}_{y}$$\end{document} is the width of the product and dry channels. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T}_{f}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T}_{p}$$\end{document} are the film and product air temperatures, respectively. Wet floors In contrast to the dry floors in the wet floors, the energy balance is not enough to determine the temperature distribution for air and water. Also, it is necessary to concern mass conservation for this purpose: By concerning Fig. 2 for the airflow in the wet channel:8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{y+dy}- {Q}_{y}=2* {dQ}_{conv-2}$$\end{document} The variables in Eq. (8) are determined as follows:9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{y}= {\dot{m}}_{y}* {C}_{p-air}*{T}_{w}(x.y)$$\end{document}10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{y+dy}= {\dot{m}}_{y}* {C}_{p-air}*\left({T}_{w}\left(x.y\right)+d{T}_{w}\right)+ {\dot{m}}_{evap}* {h}_{fg}$$\end{document}11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${dQ}_{conv-2}={h}_{wet}* {\underline{i}}_{x}*\left({T}_{w}\left(x.y\right)- {T}_{f}\left(x.y\right)\right)*dy$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{m}}_{evap}$$\end{document} is the rate of water evaporation and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${h}_{fg}$$\end{document} is the latent heat of evaporation. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\underline{i}}_{x}$$\end{document} is the width of wet channel and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${h}_{wet}$$\end{document} is the heat transfer coefficient in the wet channel. By substitution, the distribution function of air temperature has been calculated as Eq. (12):12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{m}}_{y}* {C}_{p-air}*d{T}_{w}=2* {h}_{wet}* {\underline{i}}_{x}*\left({T}_{w}\left(x.y\right)- {T}_{f}\left(x.y\right)\right)*dy-{\dot{m}}_{evap}* {h}_{fg}$$\end{document} To find this function for the water, the same approach is employed:13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{y+dy\left(water\right)}- {Q}_{y\left(water\right)}={dQ}_{conv-1}-{dQ}_{conv-2}$$\end{document} Each of the variables Eq. (13) relation is calculated as follows:14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{y\left(water\right)}= {\dot{m}}_{water}* {C}_{p-water}*{T}_{f}\left(x.y\right)$$\end{document}15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Q}_{y+dy\left(water\right)}= {\dot{m}}_{water}* {C}_{p-water}*\left({T}_{f}\left(x.y\right)+d{T}_{f}\right)- {\dot{m}}_{evaorationp}* {h}_{fg}$$\end{document} With the help of Eqs. (4) and (11) and substitution, the water film’s temperature distribution has been calculated by Eq. (16):16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{gathered} h_{{product}} *\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{i} _{y} *\left( {T_{p} \left( {x.y} \right) - T_{f} \left( {x.y} \right)} \right)*dx - h_{{wet}} *\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{i} _{x} *\left( {T_{w} \left( {x.y} \right) - T_{f} \left( {x.y} \right)} \right)*dy \hfill \\ + \dot{m}_{{evap}} *h_{{fg}} = \dot{m}_{{water}} *C_{{p - water}} *dT_{f} \hfill \\ \end{gathered}$$\end{document} Numerical methods and boundary conditions Algorithm The desalination cycle’s governing equations (Eqs. (7), (12), and (16)) were solved using an algorithm based on the second-order backward finite difference method. The algorithm, as outlined in Fig. 3, discretizes the equations and iteratively solves them to obtain the desired results. A comprehensive description of the discretization process, including specific steps and considerations, is presented in the Appendix under the title “Numerical Methods and Boundary Conditions.”Fig. 3Flowchart of the numerical algorithm employed to solve the M-cycle HDH system equations. Flowchart of the numerical algorithm employed to solve the M-cycle HDH system equations. Meteorological conditions To assess the environmental conditions for the desalination process, meteorological data from a coastal city were used. This is because the demand for desalination systems is typically higher in warmer months when both air and water temperatures are elevated. The relevant parameters for this study are58:Inlet air flow temperature: 60 °CInlet water flow temperature (sea water): 40 °CInlet air flow Relative humidity: 30% Inlet air flow temperature: 60 °C Inlet air flow temperature: 60 °C Inlet water flow temperature (sea water): 40 °C Inlet water flow temperature (sea water): 40 °C Inlet air flow Relative humidity: 30% Inlet air flow Relative humidity: 30% These conditions are representative of coastal regions with high air temperatures and warm seawater, which are typical scenarios for desalination applications. Structural specifications The dimensions and specifications used for the device are based on the previous works59–63 and are provided below (Table 1). These parameters are specifically applied for solving the CFD equations. The channel configurations for each floor are as follows:Table 1Dimensions and quantities of the channels used in the CFD modeling for the desalination system3.Channel typeLength × Width × Height (mm × mm × mm)Number of channelsProduct800 × 50 × 38Dry800 × 50 × 34Wet300 × 80 × 620 Table 1Dimensions and quantities of the channels used in the CFD modeling for the desalination system3.Channel typeLength × Width × Height (mm × mm × mm)Number of channelsProduct800 × 50 × 38Dry800 × 50 × 34Wet300 × 80 × 620 Dimensions and quantities of the channels used in the CFD modeling for the desalination system3. The plate thickness separating the channels is set to 1 mm. Additionally, the inlet air velocity is assumed to be 5 m/s, based on the findings of Pandelidis et al.40,64–66, and the water film thickness is set at 2.5 mm, following the work of Dean et al.67. Thermodynamic properties necessary for the calculations were derived from the data provided by Cenjel et al.68. These dimensions and specifications are used exclusively in the CFD modeling and equation-solving process to simulate the system’s behavior accurately. Optimization Optimization parameter In thermal systems, the primary goal of optimization is to achieve the maximum output with the minimum energy consumption. In this study, the optimization parameter is defined as the ratio of water production to the required thermal power. This parameter, by its nature, must be maximized to indicate an efficient and optimized system design. To calculate this parameter, the following relationships are used. The amount of water produced through the system’s wet cycle is determined using Eq. (17):17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{M}}_{water\_production}= {\dot{M}}_{Wet}*({\omega }_{1}-{\omega }_{2})$$\end{document} Here \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{M}}_{Wet}$$\end{document} represents the mass flow rate of air exiting all wet stages and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\omega }_{1}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\omega }_{2}$$\end{document} are the absolute humidity levels at the inlet and outlet of the condenser, respectively. The total thermal load,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\dot{Q}$$\end{document}, is calculated as the sum of sensible and latent heat components, as shown in Eq. (18):18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\dot{Q}= {\dot{Q}}_{sensible}+{\dot{Q}}_{latent}$$\end{document} These components are further detailed in Eqs. (19) and (20):19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{Q}}_{sensible}={\dot{M}}_{Wet}*{C}_{P-Wet}*({T}_{1}-{T}_{2})$$\end{document}20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{Q}}_{latent}= {\dot{M}}_{Wet}*\left({\omega }_{1}-{\omega }_{2}\right)*{h}_{fg }$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C}_{P-Wet}$$\end{document} is the specific heat capacity of air exiting the wet stages. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T}_{1}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T}_{2}$$\end{document} denote the air temperatures before and after the condenser, respectively. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${h}_{fg}$$\end{document} is the latent heat of vaporization of water. Using the calculated thermal load, the power required by the condenser can be obtained from Eq. (21):21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\dot{W}= \frac{\dot{Q}}{COP}$$\end{document} In this equation COP is the coefficient of performance of the condenser. For this study, with refrigerant R134a and a condenser outlet temperature of 1°C, the COP is considered to be 2.8453. Finally, the Water Production to Power Efficiency (WPPE), which serves as the optimization parameter, is calculated using Eq. (22):22\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$WPPE= \frac{{\dot{M}}_{water\_production}}{\dot{W}}$$\end{document} This parameter quantifies the system’s efficiency, with higher values indicating a more optimized configuration that maximizes freshwater output per unit of electrical energy consumed. Since electrical power is the sole external energy input in this system, the parameter directly reflects the operational cost and energy performance. Implementation In this study, the PSO method will be employed for system design and optimization. The optimization criterion will be defined as the ratio of water production to thermal power consumption, which directly indicates system efficiency. The goal is to maximize this ratio, as achieving a higher value signifies a more efficient design with lower energy consumption for water production. The PSO algorithm will initiate the search process with a population of 300 particles, each representing a unique set of input parameters. These particles will be configured based on the following three key variables:Input velocity: Ranging from 0.01 to 10 m/s, divided into 5 intervals.Airflow division ratio: Ranging from 5 to 95%, divided into 6 intervals.Device width: Ranging from 0.01 to 1 m, divided into 10 intervals. Input velocity: Ranging from 0.01 to 10 m/s, divided into 5 intervals. Input velocity: Ranging from 0.01 to 10 m/s, divided into 5 intervals. Airflow division ratio: Ranging from 5 to 95%, divided into 6 intervals. Airflow division ratio: Ranging from 5 to 95%, divided into 6 intervals. Device width: Ranging from 0.01 to 1 m, divided into 10 intervals. Device width: Ranging from 0.01 to 1 m, divided into 10 intervals. The combination of these intervals will enable a comprehensive exploration of the search space. The convergence criterion for the algorithm will be defined based on the difference between the average particle positions and the optimal point, which must be less than 10−4. This condition will indicate the accuracy of the PSO algorithm in reaching the optimal solution. Ultimately, this approach is expected to result in an optimal design that maximizes water production while minimizing energy consumption, demonstrating the effectiveness of the PSO algorithm in achieving efficient system performance. Mesh independence To evaluate the mesh independence of the simulation, five critical parameters were selected for analysis:Average relative humidity in the wet sectionAverage air temperature at the end of the dry channelsAverage air temperature at the product outletAverage air temperature at the outlet of the wet sectionAverage temperature of the water film at the outlet of the wet section Average relative humidity in the wet section Average relative humidity in the wet section Average air temperature at the end of the dry channels Average air temperature at the end of the dry channels Average air temperature at the product outlet Average air temperature at the product outlet Average air temperature at the outlet of the wet section Average air temperature at the outlet of the wet section Average temperature of the water film at the outlet of the wet section Average temperature of the water film at the outlet of the wet section The purpose of selecting these parameters was to ensure accurate mesh size determination by examining how mesh refinement influenced the results. The analysis revealed varying levels of sensitivity to mesh size changes across these parameters. The first parameter assessed was the average relative humidity in the wet section. The results for different mesh sizes, shown in Fig. 4a, indicate that the relative humidity values converged at a mesh size of approximately 10−3. Beyond this mesh size, further refinement did not significantly affect the results, suggesting that this mesh size was sufficient for accurate representation.Fig. 4Illustrates the impact of different mesh sizes on various system parameters. (a) shows how the average relative humidity in the wet stage varies with mesh size. (b) presents the change in the average dry air temperature at the end of the dry channels as mesh size changes. (c) highlights the effect of mesh size on the average product air temperature at the end of the product channels. (d) demonstrates how the average wet air temperature at the end of the wet channels is influenced by mesh size. Lastly, (e) depicts the variation in the average water film temperature at the end of the wet stage as the mesh size changes. Illustrates the impact of different mesh sizes on various system parameters. (a) shows how the average relative humidity in the wet stage varies with mesh size. (b) presents the change in the average dry air temperature at the end of the dry channels as mesh size changes. (c) highlights the effect of mesh size on the average product air temperature at the end of the product channels. (d) demonstrates how the average wet air temperature at the end of the wet channels is influenced by mesh size. Lastly, (e) depicts the variation in the average water film temperature at the end of the wet stage as the mesh size changes. The second parameter, average air temperature at the end of the dry channels, is presented in Fig. 4b. This parameter displayed relatively low sensitivity to mesh size variations. Although minor fluctuations were observed with different mesh resolutions, the results remained close to one another, and convergence occurred at a mesh size of 10−3, aligning with the findings for relative humidity. Next, the average air temperature at the product outlet was analyzed (Fig. 4c). Similar to the dry air temperature, the product outlet temperature showed minimal dependence on mesh size. The data reveal that mesh refinement had little impact on the product outlet temperature, with convergence reached at the same mesh size of 10−3. The average air temperature at the outlet of the wet section was the fourth parameter investigated. Figure 4d shows that this parameter exhibited slightly greater sensitivity to mesh size compared to the previous temperature parameters. Nonetheless, convergence was still achieved at a mesh size of approximately 10−3. This suggests that further mesh refinement below this size provided negligible improvements in accuracy. Finally, the average temperature of the water film at the outlet of the wet section was examined (Fig. 4e). This parameter displayed a moderate dependence on mesh size, with convergence occurring at mesh sizes as small as 10−3, similar to the trends observed for air temperature in the wet section. However, finer mesh sizes beyond 10−3 did not significantly impact the results. In summary, the mesh independence study demonstrated that certain parameters, such as the average dry air temperature and the average product air temperature, were relatively insensitive to mesh size changes. In contrast, parameters like the average relative humidity in the wet section were more sensitive to mesh resolution, where further refinement was necessary to achieve accurate convergence. Based on the analysis of all five parameters, the optimal mesh size for this simulation was determined to be 10−3. This mesh size strikes an effective balance between computational efficiency and result accuracy, making it suitable for the majority of the parameters studied. Validation The validation of the present study is carried out by comparing its results with the experimental data provided by Anisimov41. Specifically, the simulation performed in this study is based on the HMX design employed by Anisimov, which incorporates the M-Cycle for heat and mass transfer enhancement. To ensure the reliability of the current study, the same HMX design and input parameters used by Anisimov were adopted. The input variables, as presented in Table 2, are consistent with those in Anisimov’s study. These parameters were applied in the simulation process of the current research, allowing for a direct comparison of results.Table 2Input variables by Anisimov41.Design parameterAir inlet temperatureWater inlet temperatureAir velocity inletWet to product airflow ratioRelative humidity inlet air\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{Value}$$\end{document}40 °C18 °C5 m/s0.325% Table 2Input variables by Anisimov41.Design parameterAir inlet temperatureWater inlet temperatureAir velocity inletWet to product airflow ratioRelative humidity inlet air\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{Value}$$\end{document}40 °C18 °C5 m/s0.325% Input variables by Anisimov41. Table 3 displays the outcomes of the present study, and a careful analysis reveals that the values obtained from the current simulation closely match the experimental data provided by Anisimov. For all the parameters listed in Table 3, the differences between the current study’s results and Anisimov’s experimental data are found to be relatively small, demonstrating a high degree of agreement. This indicates that the simulation approach employed in this study, based on the M-Cycle integrated HMX design, produces results that are consistent with previously validated experimental data.Table 3Comparing current study results with Anisimov41.Result parameterOutlet temperatureOutlet relative humidity of wet floor (%)Wet bulb effectiveness (%)Dew point effectiveness (%)Anisimov4122.3 °C1009567\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text{Current study}$$\end{document}21.6 °C97.59873\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text{Relative difference}$$\end{document}3.1%2.53.28.9 Table 3Comparing current study results with Anisimov41.Result parameterOutlet temperatureOutlet relative humidity of wet floor (%)Wet bulb effectiveness (%)Dew point effectiveness (%)Anisimov4122.3 °C1009567\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text{Current study}$$\end{document}21.6 °C97.59873\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text{Relative difference}$$\end{document}3.1%2.53.28.9 Comparing current study results with Anisimov41. The close alignment between the experimental data and the simulation results provides strong evidence of the accuracy and robustness of the current model. Furthermore, this validation confirms that the use of the M-Cycle in the HMX design, as applied in this study, is a reliable approach for enhancing the performance of heat and mass exchangers in desalination systems. Results and discussion Simulation of air flow division and determination of heat transfer coefficients Accurately modeling the division of airflow between the dry and wet floors is a key aspect of simulating the HMX system, as shown in Fig. 1. This division plays a pivotal role in the system’s heat and mass transfer processes and directly influences overall performance. Simulation results provided critical insights into airflow rates and velocity distributions across both floors, which are essential for understanding the system’s dynamics. On the dry floor, Fig. 5 presents the mass flow rate and velocity distribution, respectively. The results reveal a reduction in air velocity along the dry channels, which is fundamental for effective heat transfer. Regions with constant velocity correspond to the product channels, where cooling occurs, while areas with a linear decrease in velocity mark the transition to the wet floor.Fig. 5Presents the airflow characteristics in the dry floor of the exchanger. (a) and (b) show the mass flow rate distribution, where (a) provides a 3D view and (b) illustrates the contour plot. (c) and (d) depict the velocity distribution of the airflow, with (c) showing the 3D view and (d) presenting the contour representation. Presents the airflow characteristics in the dry floor of the exchanger. (a) and (b) show the mass flow rate distribution, where (a) provides a 3D view and (b) illustrates the contour plot. (c) and (d) depict the velocity distribution of the airflow, with (c) showing the 3D view and (d) presenting the contour representation. On the wet floor, evaporation significantly impacts airflow behavior. While the mass flow rate depends on the evaporation rate and cannot be directly plotted, Fig. 6 illustrates the velocity distribution, showing the influence of evaporation on airflow dynamics. Here, air interacts with a water film, where evaporative cooling reduces the air temperature before it exits as cooled product air.Fig. 6Illustrates the distribution of the Velocity airflow on the exchanger wet floors. (a) provides a 3D view, and (b) shows the contour representation. Illustrates the distribution of the Velocity airflow on the exchanger wet floors. (a) provides a 3D view, and (b) shows the contour representation. The convective heat transfer coefficients, calculated for both floors and shown in Fig. 7, further elucidate the system’s behavior. On the dry floor, these coefficients vary due to airflow transitions, while on the wet floor, they remain stable owing to the low airflow velocity, which facilitates gradual and consistent heat exchange.Fig. 7Illustrates the distribution of the convective heat transfer coefficients on the exchanger floors. (a) and (b) represent the dry floor, where (a) provides a 3D view, and (b) shows the contour representation. Similarly, (c) and (d) depict the wet floor, with (c) showing the 3D view and (d) presenting the contour plot. Illustrates the distribution of the convective heat transfer coefficients on the exchanger floors. (a) and (b) represent the dry floor, where (a) provides a 3D view, and (b) shows the contour representation. Similarly, (c) and (d) depict the wet floor, with (c) showing the 3D view and (d) presenting the contour plot. Overall, these findings emphasize the crucial role of airflow division and evaporation in enhancing the performance of the HMX system. The interplay between airflow dynamics and heat transfer processes highlights key pathways for optimizing the design and efficiency of the heat and mass exchanger. M-cycle simulation results Mass distribution in the wet section Through the computational simulations, the mass flow rate of air in the wet floor, along with the cumulative evaporation rate within this floor, were calculated. The corresponding results are shown in Fig. 8.Fig. 8Illustrates the airflow and evaporation characteristics on the wet floor of the exchanger. (a) and (b) display the mass flow rate distribution, with (a) showing a 3D view and (b) providing the contour plot. Similarly, (c) and (d) present the cumulative evaporation rate, where (c) offers a 3D visualization and (d) depicts the contour representation. Illustrates the airflow and evaporation characteristics on the wet floor of the exchanger. (a) and (b) display the mass flow rate distribution, with (a) showing a 3D view and (b) providing the contour plot. Similarly, (c) and (d) present the cumulative evaporation rate, where (c) offers a 3D visualization and (d) depicts the contour representation. Figure 8 clearly illustrates the distribution of the mass flow rate of air in the wet section. The absence of linear trends in these plots can be attributed to the fact that the evaporation rate varies with the velocity and temperature at each point within the system. However, both figures indicate that as the temperature decreases, the evaporation rate reduces, which is consistent with the expected physical behavior of the system. Relative humidity distribution in the wet section The primary objective of this study is to maximize the relative humidity at the output of the wet floor, which signifies air saturation with moisture. In the context of desalination applications, this represents the most desirable operational condition for the desalination unit. As previously noted, relative humidity distribution is a crucial parameter that has not been extensively studied in prior research. Previous studies typically assumed 100% relative humidity at the output due to the inability to solve the system without this assumption. This study, however, is the first to examine the distribution of relative humidity, and the results are shown to correspond closely with the cumulative evaporation rate in the wet section. The highest evaporation and, consequently, the highest relative humidity, occur in the warmer regions of the dry section. At the end of the heat exchanger, due to a decrease in temperature, both the evaporation rate and the relative humidity diminish, which is in agreement with the anticipated system behavior (Fig. 9).Fig. 9Display the relative humidity distribution, with (a) showing a 3D view and (b) providing the contour plot. Display the relative humidity distribution, with (a) showing a 3D view and (b) providing the contour plot. Temperature distribution To gain a more detailed understanding of the thermodynamic processes governing the system, it is essential to analyze the temperature distributions of the different fluids involved. Given the nature of the heat exchanger, temperature is the most critical parameter. Figure 10 presents the temperature distributions of the airflow in the dry section, the wet section, and the water film.Fig. 10Visualization of temperature distributions in the dry and wet floors of the system. The air temperature distribution is shown in both the dry and wet floors through 3D (a, c) and contour (b, d) representations, highlighting the thermal gradients within the airflow. Additionally, the temperature distribution on the water film in the wet floor is illustrated using 3D (e) and contour (f) views, providing insights into the heat transfer dynamics at the air–water interface. Visualization of temperature distributions in the dry and wet floors of the system. The air temperature distribution is shown in both the dry and wet floors through 3D (a, c) and contour (b, d) representations, highlighting the thermal gradients within the airflow. Additionally, the temperature distribution on the water film in the wet floor is illustrated using 3D (e) and contour (f) views, providing insights into the heat transfer dynamics at the air–water interface. Figure 10a and b reveal that the temperature in the dry section undergoes a more substantial reduction compared to the product section. This is attributed to the lower airflow velocity in this section, which allows for greater heat transfer over a longer time, resulting in a lower temperature relative to the product section. In Fig. 10c and d, it is evident that areas with higher evaporation rates, such as the inlet of the exchanger, exhibit lower temperatures for the moist air. Conversely, areas with lower evaporation rates exhibit higher temperatures for the moist air. Figure 10e and f highlight a key principle of the M-cycle: the mechanism of air being drawn from the dry section into the wet section serves to prevent an increase in the temperature of the water. Initially, the temperature of the water rises slightly; however, as moist air passes over it, the heat is absorbed from the water, effectively reducing its temperature back to its initial value or even further lowering it. This temperature exchange between the air and water film is an essential characteristic of the M-cycle and plays a critical role in maintaining system efficiency. Optimization implementation The implementation of the optimization algorithm for the three-parameter case included the addition of the device’s width as a parameter. The algorithm, based on the PSO method, was designed to optimize three parameters simultaneously, and the convergence of the optimization points over multiple iterations is illustrated in Fig. 11. Also, Fig. 11 provides a visual representation of the progression of optimization points, highlighting how the solution approaches the optimal configuration with increasing iterations.Fig. 11Convergence of the optimization algorithm for the three-parameter scenario, illustrating the iterative refinement of the optimization points until the optimal solution is achieved. Convergence of the optimization algorithm for the three-parameter scenario, illustrating the iterative refinement of the optimization points until the optimal solution is achieved. Results of optimization The optimization process aimed to maximize freshwater production per unit of energy by adjusting air velocity, flow distribution ratio, and device width. After 334 iterations, the optimal configuration was determined: an air velocity of 6.89 m/s, a flow distribution ratio of 35.97%, and a device width of 0.63 m. Under these conditions, the system achieved a freshwater production rate of 3.04 kg per kWh, producing 360.5 L of water per day with an average outlet relative humidity of 99% and power consumption of 4.94 kW. Compared to previous M-Cycle-based desalination systems5, the proposed configuration demonstrates over a threefold improvement in energy efficiency, as measured by the GOR, highlighting its superior thermodynamic performance. This optimization enhanced the system’s efficiency by integrating physical dimensions with operational parameters, significantly improving energy efficiency and freshwater output. The Fig. 12 illustrates the system’s performance under these optimal conditions. The results underscore the importance of balancing physical dimensions with operational factors such as air velocity and flow distribution. Thermal and moisture profiles highlight how the optimized configuration maximizes overall performance, ensuring efficient freshwater production and energy utilization.Fig. 12Visualization of the optimized results across various floors of the system. The distribution of relative humidity in the wet floor after optimization is illustrated using 3D (a) and contour (b) views. The air temperature distribution in both the dry and wet floors, optimized for maximum efficiency, is presented through 3D (c, e) and contour (d, f) views, emphasizing the thermal gradients within the airflow. Lastly, the optimized temperature distribution on the water film in the wet floor is depicted using 3D (g) and contour (h) views, highlighting the enhanced heat transfer dynamics at the air–water interface. Visualization of the optimized results across various floors of the system. The distribution of relative humidity in the wet floor after optimization is illustrated using 3D (a) and contour (b) views. The air temperature distribution in both the dry and wet floors, optimized for maximum efficiency, is presented through 3D (c, e) and contour (d, f) views, emphasizing the thermal gradients within the airflow. Lastly, the optimized temperature distribution on the water film in the wet floor is depicted using 3D (g) and contour (h) views, highlighting the enhanced heat transfer dynamics at the air–water interface. To evaluate the robustness and practical feasibility of the optimized configuration, a parametric sensitivity analysis was conducted. Each of the three optimized parameters—air velocity, flow distribution ratio, and device width—was individually perturbed by ± 10%, while the other parameters were held constant. The analysis revealed that system performance, measured in terms of water production per kWh (WPPE), is most sensitive to variations in the air velocity, where a ± 10% deviation caused an average ~ 8.4% change in WPPE. In comparison, device width and flow distribution ratio showed moderate sensitivities, with ~ 3.7% and ~ 2.9% variations in WPPE, respectively. These findings indicate that while all parameters influence performance, the air velocity plays a more dominant role in thermodynamic efficiency and freshwater yield. Furthermore, practical constraints were considered regarding the implementation of the optimal airflow velocity (6.89 m/s). Achieving this airflow in real-world systems would require appropriately sized ducts and high-efficiency fans capable of maintaining airflow against system pressure drops. Based on ASHRAE duct sizing guidelines and empirical fan performance curves69, sustaining this velocity in a 0.63-m-wide channel would require an estimated fan power of 4–5.5 kW, assuming a pressure drop of approximately 180–210 Pa. This aligns closely with the total electrical power consumption reported for the system (4.94 kW), confirming the design’s feasibility for practical deployment. The sensitivity results are visually presented in Fig. 13, which illustrates the percentage change in WPPE in response to ± 10% variation in each parameter.Fig. 13Sensitivity of WPPE to ± 10% Variation in Each Parameter. Sensitivity of WPPE to ± 10% Variation in Each Parameter. Conclusion This study developed and evaluated a novel desalination system integrating the M-Cycle with a HDH process, aimed at enhancing thermodynamic efficiency and freshwater yield without dependence on external thermal sources. Unlike conventional thermal desalination technologies that rely on direct heating and high energy inputs, the proposed configuration leverages ambient thermal energy through indirect evaporative cooling, facilitating simultaneous heat and mass transfer in a low-energy framework. Numerical modeling techniques have proven to be powerful tools70–75 in analyzing and optimizing complex thermal-fluid systems, particularly in early-stage design and performance evaluation. A comprehensive CFD model was employed to resolve the coupled transport phenomena within the system’s heat and mass exchanger. The model captured spatially resolved air and water temperature profiles, relative humidity distributions, and local evaporation rates across the dry and wet channels. Importantly, the modeling framework eliminated oversimplified assumptions—such as uniform evaporation or fully saturated outlet conditions—thus enabling a more accurate assessment of system performance. Optimization of operational and geometric parameters was performed via PSO, targeting a maximized ratio of water production to energy input. The resulting optimal configuration—air velocity of 6.89 m/s, exchanger width of 0.63 m, and 35.97% dry air split—achieved a water production rate of 3.04 kg per kWh of electricity consumed. This corresponds to a GOR approximately 3.2 times higher than that reported in previous studies, such as the M-Cycle-based system by Tariq et al.5, which achieved a GOR of ~ 0.8 under comparable conditions. In addition to its superior energy performance, the proposed system offers operational simplicity, avoids the complexity of solar-thermal integration, and is readily adaptable to off-grid settings. These results highlight the system’s potential as a sustainable, scalable desalination solution. Future work may explore hybridization with renewable electricity sources and modular design adaptations to enhance deployment in diverse environmental contexts.