Modeling, Simulation, and Optimization of a Solar-Based System of Desalination Using Humidiﬁcation and Dehumidiﬁcation

: Solar desalination systems are characterized by low freshwater production compared with the usual techniques of mineral and salt removal from water. The usual methods include, but are not limited to, multi-stage flash distillation, multiple-effect distillation, vapor-compression desalination, and reverse osmosis. Solar desalination requires various modifications to make it more productive than the usual methods. The method is suitable for energy and environmental protection, making it the most effective system. The adjustments involve using the humidification and dehumidification principle (HD). The three configurations of the HD solar desalination system in this project are designed to accommodate variations in climate conditions and seasonal changes. Mathematical models are designed to test the workability of the system in an ideal environment. The models are based on universal fluid equations that regulate the functioning of each component of the system. After the model is designed, a regulation algorithm is designed based on the model. The simulation results show that the gain in freshwater production using a regulation algorithm is in the order of 33%.


Introduction
In the coming decades, the major challenge will be accessing fresh drinking water, especially in isolated sites. Social scientists predict that by the year 2025, at least 70% of the Earth's population is likely to suffer from freshwater scarcity [1]. Therefore, a solution to prevent a foreseeable crisis is in place. Scientists suggest that the answer to this problem is to make saline water fresh through environmentally friendly mechanisms such as the use of solar power. Using other forms of energy, such as fossil fuels, will worsen the situation owing to global climate change and the heavy use of fresh water to cool the industry [2]. These novel methods have not yet been put in place as they are under development [3,4]. Besides, the solar desalination method is known to produce small amounts of water that may be insufficient to sustain the population. The production of the solar-based system (SBS) has been compared with other sophisticated methods, such as multi-stage flash distillation (MSF), multiple-effect distillation (MED), vapor-compression desalination (VC), and reverse osmosis (RO). Therefore, various scientists have tried to improve the productivity of the solar-based system owing to its cost-effectiveness, timeliness, and friendliness to the environment.
Elmutasim et al. [5] modified the closed-air open-water (CAOW) humidification and dehumidification (HD) system by incorporating recovery options that depend on heat. The option is made possible through the following two steps: a mixing chamber step and a heat exchanger step. To be able to assess the efficiency of the system, scientists have designed a scale (low, moderate, and Each component had its unique purpose in the system. The system based on the first configuration is shown in Figure 1. The seawater is preheated in the system, which in turn reduces the overall heat usage in the system, one of the reasons that it is improved. Therefore, the system can be used when the thermal energy can be limited, and thepreheating heat is recovered in other stages of the system. The water heating process follows several processes so that the final product can be collected with the utmost efficiency. The existing and incoming hot and cold air balance the working of the system so that the water heating and the collection process are successful.
The first configuration is characterized by the use of collectors of water and air for the respective heating of water and air simultaneously so that the performance of the system in terms of thermal efficiency can be increased. Moreover, the system operates under reduced pressure to lower the evaporation temperature and thus limit the fouling and corrosion phenomena, which increase with the temperature. In all designs, the fresh water is gathered from the base of the buildup tower, while the saline solution at the base of both the humidifier and dissipation tower will be either reused and joined with the input solution at the section point or dismissed if there should be an occurrence of increment of saltiness rates.
The flexibility of the first configuration of the HD solar desalination system allows us to derive two other settings (operating scenarios) depending on weather conditions and the season of the year: 1.
For days with low sunshine intensity and to avoid condensation of water vapor at the solar air collectors, the second configuration of the solar desalination system, presented in Figure 2, is recommended. This scenario includes a field of the collectors of solar water with a humidifying module and the distillation module. In this scenario, all the energy needed for evaporation is provided by solar water collectors.

2.
For days with high solar radiation intensity, the first, second, and third configurations presented in Figures 1-3, respectively, can be used. In this case, the amount of thermal energy required for evaporation is supplied by the field of solar water collectors (second configuration) or by the field of solar air collectors (third configuration) or by both (first configuration).
Appl. Sci. 2020, 10, x FOR PEER REVIEW 3 of 15 The first configuration is characterized by the use of collectors of water and air for the respective heating of water and air simultaneously so that the performance of the system in terms of thermal efficiency can be increased. Moreover, the system operates under reduced pressure to lower the evaporation temperature and thus limit the fouling and corrosion phenomena, which increase with the temperature. In all designs, the fresh water is gathered from the base of the buildup tower, while the saline solution at the base of both the humidifier and dissipation tower will be either reused and joined with the input solution at the section point or dismissed if there should be an occurrence of increment of saltiness rates.
The flexibility of the first configuration of the HD solar desalination system allows us to derive two other settings (operating scenarios) depending on weather conditions and the season of the year: 1. For days with low sunshine intensity and to avoid condensation of water vapor at the solar air collectors, the second configuration of the solar desalination system, presented in Figure 2, is recommended. This scenario includes a field of the collectors of solar water with a humidifying module and the distillation module. In this scenario, all the energy needed for evaporation is provided by solar water collectors. 2. For days with high solar radiation intensity, the first, second, and third configurations presented in Figures1-3, respectively, can be used. In this case, the amount of thermal energy required for evaporation is supplied by the field of solar water collectors (second configuration) or by the field of solar air collectors (third configuration) or by both (first configuration).

Water Solar Collector
The system for the water solar collector represents a multivariate model that consists of multiple inputs and outputs, as shown in Figure 4. The structure of the collector makes it possible to visualize the variables of the system and map them against time. The external factors that may affect the efficiency of the system are also shown so that the sources of error can be traced. The different variables in the collector are I (t), Tamb (t), mw (t), Twi (t), and Two (t).

Water Solar Collector
The system for the water solar collector represents a multivariate model that consists of multiple inputs and outputs, as shown in Figure 4. The structure of the collector makes it possible to visualize the variables of the system and map them against time. The external factors that may affect the efficiency of the system are also shown so that the sources of error can be traced. The different variables in the collector are I (t), Tamb (t), mw (t), Twi (t), and Two (t).

Water Solar Collector
The system for the water solar collector represents a multivariate model that consists of multiple inputs and outputs, as shown in Figure 4. The structure of the collector makes it possible to visualize the variables of the system and map them against time. The external factors that may affect the efficiency of the system are also shown so that the sources of error can be traced. The different variables in the collector are I (t), T amb (t), m w (t), T wi (t), and T wo (t). Appl. Sci. 2020, 10, x FOR PEER REVIEW 5 of 15 The model is constructed on the basis of the following assumptions: • The water flows in with a uniform velocity and depends on only one side x; • The water temperature is always below 100 °C.
The following equation illustrates how the thermal balancing of the system is achieved:

Air Solar Collector
Similarly, the air solar collector represents a multivariate model with multiple inputs and multiple outputs, as shown below in figure 5. The display is structured in a way that the different components of the system can be shown as a function of time. The various components are similar to those in the water solar collector. The system works on the following assumptions: • The exchange coefficient is very high to the extent that the absorber can be assumed to be a flat plate; • The temperatures of the air and the absorber plate are considered equal throughout the absorber; • The air moves with uniform velocity, and it is dependent on only one side x; • There is a difference between the areas of the air, the absorber, and the glass cover.
The model makes use of the following equations:

Tamb (t) I (t)
Water Solar Collector (WSC) The model is constructed on the basis of the following assumptions: • The water flows in with a uniform velocity and depends on only one side x; • The water temperature is always below 100 • C.
The following equation illustrates how the thermal balancing of the system is achieved: where

Air Solar Collector
Similarly, the air solar collector represents a multivariate model with multiple inputs and multiple outputs, as shown below in Figure 5. The display is structured in a way that the different components of the system can be shown as a function of time. The various components are similar to those in the water solar collector.  The model is constructed on the basis of the following assumptions: • The water flows in with a uniform velocity and depends on only one side x; • The water temperature is always below 100 °C.
The following equation illustrates how the thermal balancing of the system is achieved:

Air Solar Collector
Similarly, the air solar collector represents a multivariate model with multiple inputs and multiple outputs, as shown below in figure 5. The display is structured in a way that the different components of the system can be shown as a function of time. The various components are similar to those in the water solar collector. The system works on the following assumptions: • The exchange coefficient is very high to the extent that the absorber can be assumed to be a flat plate; • The temperatures of the air and the absorber plate are considered equal throughout the absorber; • The air moves with uniform velocity, and it is dependent on only one side x; • There is a difference between the areas of the air, the absorber, and the glass cover.
The model makes use of the following equations:

Tamb (t) I (t)
Air Solar Collector (ASC) Water Solar Collector (WSC) Figure 5. The input/output diagram of the air solar collector [18].
The system works on the following assumptions: • The exchange coefficient is very high to the extent that the absorber can be assumed to be a flat plate; • The temperatures of the air and the absorber plate are considered equal throughout the absorber; • The air moves with uniform velocity, and it is dependent on only one side x; • There is a difference between the areas of the air, the absorber, and the glass cover.
The model makes use of the following equations: where hcr v−amb = hco v−amb + hrad v−amb is the coefficient of the net thermal transfer. Figure 6 shows the input/output block diagram of the humidifier. The input is made possible at the upper side where saline water is fed. The temperature at the top is denoted by T L2 (t), which is interpreted as the humidifying temperature. The saline water leaves the system at the bottom of the model at temperature T L1 (t). The movement of the air and the humidity is as shown by the humidifier's diagram in Figure 6.

The Humidifier
Appl. Sci. 2020, 10, x FOR PEER REVIEW 6 of 15 where ℎ = ℎ + ℎ is the coefficient of the net thermal transfer. Figure 6 shows the input/output block diagram of the humidifier. The input is made possible at the upper side where saline water is fed. The temperature at the top is denoted by TL2 (t), which is interpreted as the humidifying temperature. The saline water leaves the system at the bottom of the model at temperature TL1(t). The movement of the air and the humidity is as shown by the humidifier's diagram in Figure 6. The humidifier operates on the following assumptions:

The Humidifier
• The system does not transfer heat from one mass to the other; • The flows of the air and water are in a counter-current and a one-dimensional space; • The heat of the water remains invariant throughout the process; • The flow equation shows energy transfer from air to water. Mathematically, the system works based on the following fluid equations: • Air phase and

Evaporation Tower Modeling
The evaporation tower in the desalination process separates the fresh water from the saline water. During the extraction process, the air is allowed to flow at the lower part of the tower, and its temperatureat that point is Tgl,ev(t) and its humidity is Wg1,ev(t). Besides, the air has a mass velocity of mg,ev(t). When the air exits the tower, its temperature is Tg2,ev(t), while its moisture is Wg2,ev(t).
Wg2 (t) Figure 6. The input/output block diagram of the humidifier.
The humidifier operates on the following assumptions: • The system does not transfer heat from one mass to the other; • The flows of the air and water are in a counter-current and a one-dimensional space; • The heat of the water remains invariant throughout the process; • The flow equation shows energy transfer from air to water. Mathematically, the system works based on the following fluid equations: and

Evaporation Tower Modeling
The evaporation tower in the desalination process separates the fresh water from the saline water. During the extraction process, the air is allowed to flow at the lower part of the tower, and its temperatureat that point is T gl,ev (t) and its humidity is W g1,ev (t). Besides, the air has a mass velocity of m g,ev (t). When the air exits the tower, its temperature is T g2,ev (t), while its moisture is W g2,ev (t). Moreover, there is hot water that flows from the collector. The water is adjusted to temperature T l2,ev (t). Figure 7 shows how the tower operates as a multivariate system. Moreover, there is hot water that flows from the collector. The water is adjusted to temperature Tl2,ev(t). Figure 7 shows how the tower operates as a multivariate system. Similarly, the evaporation tower works on the following assumptions: The system does not transfer heat from one mass to the other; The flows of the air and water are in a counter-current and a one-dimensional space; The heat of the water remains invariant throughout the process; The flow equation shows energy transfer from the air to the water.
The following system of equations represents the flow of fluids that takes place in the evaporation tower.
Water stage

2.2.5.Condensation Tower Modeling
The other component is the condensation tower. The working of this tower is shown in Figure 8. The moisturized air coming from the evaporation tower enters the condensation stage at the top with temperatureTgc2(t);the humidity of the air is Wgc2(t), and it flows with a flow rate of mgt(t). As it moves through the condenser, the air is momentarily cooled, and upon reaching the exit point, the air is at temperature Te1(t), while its flow rate per mass changes to De(t).
The condensation tower operates on the following assumptions: • The flows of the air and water are in a counter-current; • The air entering the chamber is assumed to be ideal.  Similarly, the evaporation tower works on the following assumptions: The system does not transfer heat from one mass to the other; The flows of the air and water are in a counter-current and a one-dimensional space; The heat of the water remains invariant throughout the process; The flow equation shows energy transfer from the air to the water.
The following system of equations represents the flow of fluids that takes place in the evaporation tower.
Air phase ∂T g.ev Air-water interphase h l a ev (T i.ev − T l.ev ) = h g a ev T i.ev − T g.ev + λ o K m a ev W i.ev − W g.ev (11) and ∂W g.ev

Condensation Tower Modeling
The other component is the condensation tower. The working of this tower is shown in Figure 8. The moisturized air coming from the evaporation tower enters the condensation stage at the top with temperature T gc2 (t); the humidity of the air is W gc2 (t), and it flows with a flow rate of m gt (t). As it moves through the condenser, the air is momentarily cooled, and upon reaching the exit point, the air is at temperature T e1 (t), while its flow rate per mass changes to D e (t).
The condensation tower operates on the following assumptions: • The flows of the air and water are in a counter-current; • The air entering the chamber is assumed to be ideal. Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 15 • Water phase • Air phase • Air-condensate interphase and

Regulation Algorithm
Asthe SBS is dependent on the availability of sunshine, the system is further modified to enable it to serve its purpose even in periods when the sunlight is not sufficient. The modification will increase the reliability of the system as it will be able to preserve energy and operate normally during times when there is no sunshine. The improvement makes use of numerical mathematical models that are established to control the working of the model. The effectiveness of developing a mathematical model wastested, and it was shown that an algorithm could be used to improve the reliability of the model.
The model is designed to change the features of the water and air in the different chambers. By controlling the temperature of the water and air that enter and leave the towers, it is possible to recycle hot water and keep the temperature of the air and the water below that in the system, which preserves the overall energy usage. The result is that energy will be conserved. During times when there is no sunshine, the system can still work because there is some conserved energy. However, the system should have an alternative way because conserved energy cannot work for a prolonged time [19].
The energy evolution and preservation process in the system is shown by the following equation: where = + 1 at the water solar collector outlet.

Condensation tower
Wgc2 (t) mc (t) Figure 8. The input/output block diagram of the condensation tower.

Regulation Algorithm
Asthe SBS is dependent on the availability of sunshine, the system is further modified to enable it to serve its purpose even in periods when the sunlight is not sufficient. The modification will increase the reliability of the system as it will be able to preserve energy and operate normally during times when there is no sunshine. The improvement makes use of numerical mathematical models that are established to control the working of the model. The effectiveness of developing a mathematical model wastested, and it was shown that an algorithm could be used to improve the reliability of the model.
The model is designed to change the features of the water and air in the different chambers. By controlling the temperature of the water and air that enter and leave the towers, it is possible to recycle hot water and keep the temperature of the air and the water below that in the system, which preserves the overall energy usage. The result is that energy will be conserved. During times when there is no sunshine, the system can still work because there is some conserved energy. However, the system should have an alternative way because conserved energy cannot work for a prolonged time [19].
The energy evolution and preservation process in the system is shown by the following equation: where i = n + 1 at the water solar collector outlet.
We set y = T w(n+1) . The adopted formula serves the purpose of forcing y to follow the set-point y e for satisfying the desired dynamic. We consider the dynamics of a closed loop given by the following linear equation: dy ∂t = χ(y e − y); χ ≥ 0 (18) Using Equations (17) and (18), we deduce the following command equation:

Results and Discussion
The HD solar desalination system is modified in three ways to test the effectiveness of each modification, as well as testing which modification best suits the required purpose of the system. To check the policy, we ran simulations with a C++ program. The results describe the variation in the production of fresh water under each modification. The working of the system and the simulated results for the three modifications are shown in Figure 9. The graph illustrates that the maximum mass of fresh water presented by any of the three modifications is about 18 kg/day. Specifically, the highest mass is received from the third modification. The order of preference of the three modifications is from the third to the first. The second modification is more efficient than the first modification, whereas the third is more efficient than the first andthesecond. Therefore, the third modification was chosen to be the most efficient and reliable modification.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 15 We set = ( ) . The adopted formula serves the purpose of forcing to follow the set-point for satisfying the desired dynamic. We consider the dynamics of a closed loop given by the following linear equation: Using Equations (17) and (18), we deduce the following command equation:

Results and Discussion
The HD solar desalination system is modified in three ways to test the effectiveness of each modification, as well as testing which modification best suits the required purpose of the system. To check the policy, we ran simulations with a C++ program. The results describe the variation in the production of fresh water under each modification. The working of the system and the simulated results for the three modifications are shown in Figure 9. The graph illustrates that the maximum mass of fresh water presented by any of the three modifications is about 18 kg/day. Specifically, the highest mass is received from the third modification. The order of preference of the three modifications is from the third to the first. The second modification is more efficient than the first modification, whereas the third is more efficient than the first andthesecond. Therefore, the third modification was chosen to be the most efficient and reliable modification. Given the complexity of the process and the practical impossibility of varying one parameter, the system requires several modifications. Furthermore, setting the others because of meteorological fluctuations and having an optimal flow rate of water as it enters the evaporation tower with the highest possible temperature and better air flow rate is required for leveraging the production. Besides, the third configuration is essential if a law that controls the variation in the solar flux (I) and that controls the flow rate of the water into the water solar collector (mw) is put in place. Finally, the amount of water to be recycled (mrecy) should always respect the optimal operating temperature (Tl1,ev) as well as the water flow rate (ml,ev ) in the evaporation tower. The regulation consists of setting the set-points of the temperature of the water at the solar collector outlet (Twset), the temperature of the water at the evaporation tower (Tl1set), and the water flow rates (mw and mrecy), as follows: Given the complexity of the process and the practical impossibility of varying one parameter, the system requires several modifications. Furthermore, setting the others because of meteorological fluctuations and having an optimal flow rate of water as it enters the evaporation tower with the highest possible temperature and better air flow rate is required for leveraging the production. Besides, the third configuration is essential if a law that controls the variation in the solar flux (I) and that controls the flow rate of the water into the water solar collector (m w ) is put in place. Finally, the amount of water to be recycled (m recy ) should always respect the optimal operating temperature (T l1,ev ) as well as the water flow rate (m l,ev ) in the evaporation tower. The regulation consists of setting the set-points of the temperature of the water at the solar collector outlet (T wset ), the temperature of the water at the evaporation tower (T l1set ), and the water flow rates (m w and m recy ), as follows: • Set-point of the outlet of the temperature of water: • Set-point of the inlet of the temperature of water in the evaporation tower: To adjust the high water temperature set-points, the rate of flow of the water ranges between 0.01 and 0.5 kg/s. Figures 10 and 11 describe the variation in the rate of flow of water in the water solar collector and the quantity of recycled water for a given solar radiation model, respectively. The amount of recycled water satisfies the desired condition imposed on the water flow rate in the evaporation tower, m recy . For a water flow rate higher than 0.2 kg/s in the water solar collector, the amount of water to be recycled is equal to zero. When the water flow rate drops below 0.2 kg/s, m recy takes a nonzero value to compensate for the decrease in the water flow rate. To adjust the high water temperature set-points, the rate of flow of the water ranges between 0.01 and 0.5 kg/s. Figures 10 and 11 describe the variation in the rate of flow of water in the water solar collector and the quantity of recycled water for a given solar radiation model,respectively. The amount of recycled water satisfies the desired condition imposed on the water flow rate in the evaporation tower, mrecy. For a water flow rate higher than 0.2 kg/s in the water solar collector, the amount of water to be recycled is equal to zero. When the water flow rate drops below 0.2 kg/s, mrecy takes a nonzero value to compensate for the decrease in the water flow rate.  Figure 11. Variation in the amount of recycled water. Figure 12 illustrates the behavior of the water temperature at the outlet of the collector and that at the inlet of the evaporation tower. Two follows its desired value carefully. Likewise, Tl1,ev retains the assigned value.
The estimated amount of fresh water produced during eight hours of operation using the algorithm established for the regulation of the third configuration of the HD solar desalination system is shown in Figure 13. The same figure shows the amount of fresh water obtained under the same working conditions, but without regulation. The difference between the two estimated To adjust the high water temperature set-points, the rate of flow of the water ranges between 0.01 and 0.5 kg/s. Figures 10 and 11 describe the variation in the rate of flow of water in the water solar collector and the quantity of recycled water for a given solar radiation model,respectively. The amount of recycled water satisfies the desired condition imposed on the water flow rate in the evaporation tower, mrecy. For a water flow rate higher than 0.2 kg/s in the water solar collector, the amount of water to be recycled is equal to zero. When the water flow rate drops below 0.2 kg/s, mrecy takes a nonzero value to compensate for the decrease in the water flow rate.  Figure 11. Variation in the amount of recycled water. Figure 12 illustrates the behavior of the water temperature at the outlet of the collector and that at the inlet of the evaporation tower. Two follows its desired value carefully. Likewise, Tl1,ev retains the assigned value.
The estimated amount of fresh water produced during eight hours of operation using the algorithm established for the regulation of the third configuration of the HD solar desalination system is shown in Figure 13. The same figure shows the amount of fresh water obtained under the same working conditions, but without regulation. The difference between the two estimated  Figure 12 illustrates the behavior of the water temperature at the outlet of the collector and that at the inlet of the evaporation tower. T wo follows its desired value carefully. Likewise, T l1,ev retains the assigned value. quantities to be collected is apparent,suchthat the gain derived using regulation is around 33%.Concerning the daily fresh water production amounts for the managed system when compared with other HD solar systems [20][21][22], their volume run from 6 to 15.2 l/day, is a promising rate.

Cost Analysis
Production is designed to ensure that maximum profits are realized, while at the same time, costs are minimized. Besides, different approaches appear to be desirable, forcing one to conduct a cost analysis and to evaluate the weaknesses and strengths associated with each alternative. Given the costs and benefits of different production components, it is possible to create different production paths and then assess their profitability. The option with the lowest cost becomes desirable as it may be used to achieve maximum profit. Table 1 shows the components of production investment and their respective costs.  The estimated amount of fresh water produced during eight hours of operation using the algorithm established for the regulation of the third configuration of the HD solar desalination system is shown in Figure 13. The same figure shows the amount of fresh water obtained under the same working conditions, but without regulation. The difference between the two estimated quantities to be collected is apparent, suchthat the gain derived using regulation is around 33%. Concerning the daily fresh water production amounts for the managed system when compared with other HD solar systems [20][21][22], their volume run from 6 to 15.2 L/day, is a promising rate.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 11 of 15 quantities to be collected is apparent,suchthat the gain derived using regulation is around 33%.Concerning the daily fresh water production amounts for the managed system when compared with other HD solar systems [20][21][22], their volume run from 6 to 15.2 l/day, is a promising rate.

Cost Analysis
Production is designed to ensure that maximum profits are realized, while at the same time, costs are minimized. Besides, different approaches appear to be desirable, forcing one to conduct a cost analysis and to evaluate the weaknesses and strengths associated with each alternative. Given the costs and benefits of different production components, it is possible to create different production paths and then assess their profitability. The option with the lowest cost becomes desirable as it may be used to achieve maximum profit. Table 1 shows the components of production investment and their respective costs.

Cost Analysis
Production is designed to ensure that maximum profits are realized, while at the same time, costs are minimized. Besides, different approaches appear to be desirable, forcing one to conduct a cost analysis and to evaluate the weaknesses and strengths associated with each alternative. Given the costs and benefits of different production components, it is possible to create different production paths and then assess their profitability. The option with the lowest cost becomes desirable as it may be used to achieve maximum profit. Table 1 shows the components of production investment and their respective costs. The total cost of the system is arrived at by totaling the fabrication costs, repair and maintenance costs, and the cost of operation. The investment's main aim is to recover the total costs. Initially, the amount laid as the investment cost is 10,775 €. Besides, the system is estimated to have a lifetime of 20 years, which must be taken into consideration while arriving at the most effective alternative.
The system will produce 18 L per day.

2.
The production will take place 10 months each year. Analysis: The total litres of water that will be produced = production rate per day × total period of production × lifetime = 18 L 1 day × 300 day 1 year × 20 years = 108, 000 L. The total cost of production (water per litre) =

The initial total cos t of investment
The total capacity of water that is produced = 10,775 € 120,000 L = 0.09 €/L.
The daily cost of production (water in litres per day) = cost of production of water per litre × productivity = 0.09 € 1 L × 18 L = 1.62 €. The cost of maintenance = 0.01 €/day. Net income = cost of production of water − the cost of maintenance = 1.62 − 0.01 = 1.61 €. Period for effective payback = Investment Net earning = 10,775 € 1.61 € = 6692 days. As the system will take approximately 18 years, which is less than its lifetime, to repay itself, the investment is worth the cost.

Conclusions
To make the solar desalination system more effective, scientists have made several changes to the solar desalination model. The novelty of the current study is to obtain a higher production rate of daily fresh water in the HD solar desalination system through developing and simulating three design configurations of the process and integrating into the optimal configuration a regulation algorithm to further optimize its freshwater production. The results obtained indicate that the maximum freshwater output of about 18 kg/day is obtained with the third configuration, and this value is also increased by nearly 33% with the implementation of the proposed regulation algorithm.The atomization of such a type of solar desalination system, together with the development of a regulating algorithm for the removal of minerals and salts in the system, is an extension of the current study.