Design and bio-inspired optimization of direct contact membrane distillation for desalination based on constructal law

At the present study, a one-dimensional model for the flat sheet direct contact membrane distillation (DCMD) for desalination purposes is proposed. Flows and membrane properties have been estimated by appropriate temperature-dependent correlations. Results show that the numerical model is in a very good agreement with experimental data at various feed temperatures, flow rates and concentrations. A constructal design is investigated for DCMD to assess how constructal law can improve the DCMD performance. With the same thermal efficiency of 93.5%, constructal design improves the water mass flux by 37.5% in comparison with the conventional DCMD design. Also, an evolutionary-based optimization algorithm is employed to increase the efficiency of the constructal and conventional design. The Pareto frontier of the constructal and conventional design is compared with each other and the correlations between design variables are investigated. Overall, the present study demonstrates how constructal law can increase the performance of energy systems with a simple modification.

The deficiency of freshwater resources would cause a serious crisis in the foreseeable future. Searching for an efficient desalination method, as a result, has been surged in the past recent years. Among conventional desalination methods, membrane distillation (MD) is one of the newest technologies that is under development [1][2][3][4][5] . MD is a thermally driven system which water vapor is condensed by crossing the hydrophobic membrane. This technology could be used in a vast range of applications ranging from food industries to wastewater treatments. This technology benefits from several advantages. Operating in a lower temperature in comparison with other desalination systems such as multiple-effect desalination (MED) system and the ability to operate in highly saline water are two of the major advantages of this technology [6][7][8][9][10] . Such merits make the MD suitable for integrating with solar flat plate collectors. Several MDs are investigated such as direct contact membrane desalination (DCMD), vacuum membrane desalination (VMD), air gap membrane desalination (AGMD) and swiping gas membrane desalination (SGMD). At the present study, DCMD has been chosen with a focus on the flat sheet membrane configuration 11 . Countless mathematical models were developed to simulate the DCMD performance [12][13][14] .
Bandini et al. 15 studied the effect of different operating conditions and membrane properties on the efficiency and mass transfer of the DCMD. Their results show that applying polarization coefficient alone, cannot lead to a satisfactory analysis of various resistances. They suggested novel sensitivity factors for the distillate flux based on convective heat transfer rate, membrane heat and mass transfer coefficient.
Al-Obaidani et al. 13 conducted an experiment, investigating the hollow fiber DCMD exergy analysis, sensitivity study and economic evaluation in an effort to provide an optimization guideline. Hwang et al. 16 carried out an experimental and analytical study on the flat sheet DCMD. They studied the impact of module dimensions and operating parameters on the DCMD performance. They also, obtained mass transfer coefficients for different module designs. www.nature.com/scientificreports/ Bahmanyar et al. 17 studied the impact of membrane morphology and operating parameters on the DCMD performance. The effect of those parameters on the concentration polarization and temperature was examined. Their results demonstrated that one of the most prominent parameters for permeate flux is the feed inlet temperature. Also, they showed that the feed temperature and feed circulation velocity have a meaningful correlation with concentration polarization.
Wu et al. 18 investigated the impact of the membrane thickness on the transmembrane flux for DCMD. They calculated that the optimal membrane thickness increases with the reduction of the heat transfer coefficient and feed inlet temperature. However, the optimal membrane thickness decreases with the drop of the feed salinity and membrane permeability.
Bouchrit et al. 19 evaluated the capability of treating hypersaline solution using flat sheet DCMD. They developed a model for mass and heat transfer and studied the effect of operating parameters on the DCMD performance. They determined the optimum operation parameters and constructed a lab-scale DCMD to concentrate the RO discharge for achieving the super-saturation saline with the aim of the salt crystallization. A long-term experiment was also constructed to monitor the permeability and the scaling of the membrane.
Imdakm and Matsuura 20 developed a Monte Carlo simulation model to study the effect of membrane physical properties such as membrane pore size distribution, thickness, porosity, and thermal conductivity on the membrane flux. They proposed a DCMD's porous membrane by a three-dimensional network model of the interconnected cylindrical pores with the distributive effective pore sizes.
Deshpande et al. 21 completed a systematic numerical analysis, focusing on exergy destruction inside the hollow fiber DCMD module. They investigated the impact of different design and operation parameters on the exergy efficiency and recovery ratio of the DCMD system. They found that regardless of packing arrangement, the higher inlet feed temperature, the better recovery ratio. Also, they pointed out the important role of membrane properties on the recovery ratio.
Heat transfer is of great importance in a vast range of technologies. The very epitome of this could be seen at the heat exchangers, fuel cells and so forth. DCMD is one of the technologies which is highly dependent on the heat transfer. Multi-objective optimization, therefore, has been employed to obtain the optimized operation conditions [22][23][24][25][26] . Bejan et al. 27,28 calculated the suitable size and shape of the heat exchanger which leads to a minimum thermodynamic loss. Bejan's theory, constructal law, has the ability to increase the rate of the heat transfer significantly. In broad terms, constructal law can enhance the effectiveness of heat exchangers 29 . For instance, constructal theory can reduce the system cost by 50% in comparison with its conventional system 30 .
The present study tries to improve the performance of the flat sheet DCMD by combining the DCMD enhanced model with constructal law. The Nusselt correlation which considers the entry effects (both thermal and hydrodynamic) for rectangular cross-sections 31 is also employed to improve the accuracy of the model. The most commonly cited issues in the literature were lack of proposing a constructal design with a thorough analysis of the DCMD design parameters. The following highlight the novelty of this research and its importance: • Proposing a novel constructal DCMD design.
• Conducting a thorough analysis of DCMD design and operational parameters.
• Conducting an evolutionary-based optimization for constructal and conventional DCMD design.
• The performance of constructal and conventional DCMD design is compared with each other.
• Correlations between decision parameters are obtained.
Modeling. The schematic of the flat sheet DCMD is illustrated in Fig. 1. The DCMD consists of three main parts namely: feed channel, permeate channel and membrane. The whole flat plate is divided into smaller control volumes and governing equations are solved for each control volume. It is worth mentioning that because of the coupling nature of governing equations these control volumes should be co-directed along the width of the DCMD.
While hot saltwater flows through the feed channel, cold freshwater streams in the opposite direction at the permeate channel whereas a porous hydrophobic membrane separates these water streams. This temperature difference causes a water vapor pressure gradient which is perpendicular to the membrane direction. The mass transfer through the membrane is proportional with the pressure gradient 32 : where P w.f .m and P w.p.m are the water pressure at the feed and permeate channel, respectively. B is the membrane flux coefficient which can be evaluated by empirical or theoretical correlations. Chung et al. 33 proposed an empirical equation to evaluate the mass flux through the membrane. Although the membrane flux coefficient changes with operating conditions, some of existed DCMD models select a constant value and employ it as a calibration parameter.
where R is the gas constant, M w is the water molecular weight and T is the membrane temperature. The membrane properties r p , δ , ǫ and τ are pore size, thickness, porosity and tortuosity, respectively. The membrane tortuosity and porosity can be calculated as 33 : Scientific RepoRtS | (2020) 10:16790 | https://doi.org/10.1038/s41598-020-73964-7 www.nature.com/scientificreports/ p a is the air pressure inside the membrane pores and D is the water diffusion coefficient. The total pressure can be assumed constant in both DCMD's channels module and equal to the atmospheric pressure. The viscous flow, as a result, would be negligible 34 . PD for the water-air mixture can be written: where the water vapor pressure at each side of the membrane can be written: here P sat.w (T) indicates the saturation pressure of water at the temperature T. The presence of salt at the feed channel causes the deviation of vapor from pure water. To considering impurities due to the NaCl, the activity coefficient ( γ w ) can be determined as follows 35 : The water vapor pressure at the feed channel can be expressed as: here X is the molar solute concentration. The saturation pressure of water can be calculated by the Antoine equation. P sat.w is calculated as follows: Mass flux throughout the membrane is dependent on the temperature of channels. By applying the energy equation on each control volume, the temperature distribution along the channel can be obtained. Since the membrane module consists of three segments, the energy equation applies to each separately as is demonstrated in Fig. 2. In this regard, the energy equation is applied for the feed channel with the assumption of adiabatic walls: where ṁ f is the water mass flow rate, h f .b is the bulk enthalpy of liquid water and h v.f .m represents the vapor enthalpy at the membrane surface which flows through the membrane into the permeate channel. Also, q m is the heat flux through the membrane. where ṁ p is the water mass flow rate at the permeate channel. h p.b and h v.p.m represent the bulk liquid and vapor enthalpy at the permeate channel, respectively. It is assumed that no mass is added or removed inside the membrane and all vapor flows from the feed channel into the permeate channel without any condensation in the membrane pores. Following equations, as a result, are given based on a continuity equation: The vapor enthalpy at the boundary, h v.m can be considered as the latent heat of vaporization and saturated enthalpy of water at that temperature.
Substituting previous equations into Eqs. 9 and 10 yields: here dh f .b and dh p.b represent the bulk enthalpy difference in the feed and permeate channel, respectively. The convective heat transfer of the membrane sides can be calculated as follows: where T f .b , T p.b , T f .m , T p.m are the bulk and membrane surface temperature of the feed and permeate channel, respectively. h t.f and h t.p are the convective heat transfer coefficient at the feed and permeate side which determined by the appropriate Nusselt number correlation. The total membrane thermal conductivity consists of two parts, the thermal conductivity of the solid part ( k s ) and the heat conduction through the gas inside pores with the thermal conductivity of k g . The thermal conductivity of air and water vapor, however, have the same order of magnitude so the thermal conductivity of water vapor is considered as k g . By applying the parallel heat www.nature.com/scientificreports/ flow assumption through the gas inside pores and solid parts, the membrane thermal conductivity (k m ) can be calculated as follows 36 : The thermal conductivity of water vapor and PTFE membrane, which is employed in this study, are depended on the temperature. These values can be calculated using the following equations: Previous equations are valid between the temperature of 273-373 K. It is worth mentioning that the convection heat transfer within the membrane pores is negligible: where ǫ and δ m are porosity and membrane thickness, respectively.
For solving the above equations along the channel length, a proper Nusselt number is needed for each section of the channel. Various correlations based on the geometry and flow regime are suggested and used in the previous studies. At the present study, a general relationship for an arbitrary cross-sectional shape, considering the entry effects (both thermally and hydrodynamically), is applied 31 .
Here m is the blending parameter which is given by: where a = 2.27 and b = 1.65. The product of friction factor (f) and Reynolds number which is defined based upon the square root of cross-sectional area, is given by: f (Pr) for the uniform wall heat flux boundary condition is calculated as follows: where ε , z * , Pr and γ are the aspect ratio of duct, dimensionless position of thermally developed flows, Prandtl number and shape parameter, respectively. γ is considered − 0.3 due to the low aspect ratio of the duct. The input parameters of the DCMD is represented in Table 1. The membrane module in that study was a counter flow flat sheet with 9 feed channels and 9 permeate channels. The water mass flux ( J m ) versus the average bulk temperature of the feed saltwater ( T b1 ) are compared in Fig. 3 for two recirculation rates (7 and 11 cm 3 /s) at various salt feed water concentrations (0, 0.55, 1.15 and 1.67 molar NaCl). As is represented in Fig. 3 the simulation results are in an excellent agreement with www.nature.com/scientificreports/ experimental data. It is worth mentioning that T b1 in Fig. 3 is the average of the inlet and outlet bulk temperature of the feed channel.
constructal design and optimization. Speed-constrained Multi-objective particle swarm optimization (SMPSO) is an improved particle swarm optimization (PSO) characterized by the use of a strategy to limit the velocity of the particles. PSO is a bio-inspired evolutionary-based which imitating social behavior of bird flocking or fish schooling 38 . SMPSO use a strategy to put a constraint on particle velocity. In this regard, SMPSO produces new particles when the velocity becomes too high. Also, SMPSO benefits from polynomial mutation as a turbulence factor and external archive to store the non-dominated solutions found during the search 39 . Constructal law, which was proposed for the first time in 1996 40 , states that for a flow system to persist in time it needs to evolve in a way that it provides easier access to its current 41 . The very epitome of this notion could be seen everywhere in nature 42 . Dendritic shapes, which is ubiquities in nature, are an icon of constructal design. These patterns could be seen in blood vessels, river basins and most recently the quantum footprint [43][44][45] . The present study tries to implement constructal law to enhance DCMD performance. While, the water mass flow rate and the size of channels are kept constant, as is demonstrated in Fig. 4, a new configuration is adopted to give the flow architecture the freedom to morph. The hot brine after entering in the feed channel is distributed into two other equally spaced feed channels (1 → 2,3). The same design is also considered for permeate channels. This configuration is also known as a canopy-to-canopy design.
Two different designs including constructal and conventional DCMD are considered for optimization. The schematic diagram of the constructal DCMD is illustrated in Fig. 4. The constructal DCMD consists of three parts. Each part of the constructal DCMD is one-third of the conventional DCMD. The inlet volume flow rate is divided into two equal portions while entering part 2 and 3. Nine design parameters including the inlet volume flow rate at the feed side, inlet volume flow rate at the permeate side, inlet feed water salinity, bulk temperature of the feed side, bulk temperature of the Permeate side, membrane length, membrane width, porosity and membrane pore size are considered for both conventional and constructal design. SMPSO algorithm is employed for optimization. The thermal efficiency and water mass flux are considered as two objective functions. The thermal efficiency of the DCMD can be defined as the ratio of latent heat of vaporization to the total heat transfer across the membrane which can written as: The amount of the water mass flux ( J m ) is calculated based on the previous equations. At the present study, the main goal of the optimization is to maximize both objective functions. The applicable ranges for relevant decision variables in this study are listed in Table 2.

Results and discussion
The Pareto frontier of the conventional and constructal designs is represented in Fig. 5. As is shown the constructal design indicates a better performance before the water mass flux of about 4.4 kg/m 2 s as it is closer to the ideal point. Its performance, however, drops after the efficiency of 89% and mass flux of 4.4 kg/m 2 s. After this point the conventional design has a better performance. Therefore, for the efficiencies below 89% or mass fluxes more than 4.4 kg/m 2 s, the conventional design is preferable to the constructal design. The equilibrium point is closer to the constructal Pareto frontier so as a result, the constructal design can strike a better balance between the thermal efficiency and water mass flux. The Pareto optimal front of the constructal DCMD design is started from point (a), showing the single objective optimization (Thermal efficiency). Point (a) has the highest thermal efficiency. Its water mass flux, however, is at its lowest value. The constructal DCMD design has the thermal efficiency of 96.5% at point (a) meanwhile, its mass flux is 2.57 kg/m 2 s. On the contrary, the constructal Aforementioned points are the result of single objective optimizations. As is illustrated, the conventional design is dominated by the constructal design from a thermal efficiency perspective, in contrast, the conventional design can have a larger amount of mass flux as point (b) is lower than the point (d). Three lines (A, B and C) are added to assess the impact of the constructal design on DCMD performance. Line A shows that with the same thermal efficiency of 93.5%, the constructal design can improve the water mass flux by 37.5% from 2.45 to 3.37 kg/m 2 s which is a considerable enhancement. Line C, on the other hand, indicates that with the same thermal efficiency of 87.5%, the constructal design leads to decreasing the mass flux by 2.4%. Line B is considered as the reference line inasmuch as the constructal design is more appropriate above this line. In contrast, the conventional DCMD is more suitable below this line. Since in the most parts the constructal design has a superior, the design and operational parameters of this design will be discussed. The correlation between each parameter (Pair Plot) is illustrated in Fig. 6. Pair plot illustrates the relation between decision variables, helping to identify the influence of parameters on each other. The diagonal of the pair plot shows the distribution of design parameters. Description of each decision variable is shown in Table 2. As is represented in Fig. 6 most of the design and operational parameters follow a dominated trend which can provide a useful insight into what range of decision variables can lead to an optimal design. Decision-makers and designers, as a result, can use these design parameters to design an optimal constructal DCMD. It can also suggest optimum operational conditions for the constructal DCMD.
For precise investigation, the distribution of each decision variable is represented in Fig. 7. The frequency distribution of decision variables reveals the most appropriate value for each decision variable. Generally, the frequency distribution of decision variables can be categorized into two main sections. First,  www.nature.com/scientificreports/ design and operational variables that have one peak (Fig. 7a, h). In such categories, there is a dominant value that causes an optimal constructal DCMD design. On the other hand, some frequency distributions of the decision variables have two peaks. In such cases, each optimal design could have one of these values. The very epitome of this could be seen in Fig. 7b. Also, there is a possibility that a decision variable has three peaks (Fig. 7d). As is shown in Fig. 7a, almost all of the optimal points have the value of 0.59 l/s which means it is the most suitable quantity for the inlet volume flow rate at the feed side. Figure 7b shows the optimal points for the inlet volume flow rate at the permeate side. As is discussed before, it has two peaks (0.2 and 0.6 l/s). Choosing one of these values are depended on other decision variables. Figure 7c represents the most suitable inlet feed water salinity. This figure reveals that the best inlet feed water salinity for the constructal DCMD is between 15,000 and 15,100 ppm. In other words, the constructal DCMD will be performed optimally if it works in this range of inlet feed water salinity. Figure 7d shows the most optimal bulk temperature. Although each peak could lead to an optimal operation condition, the highest one (89 °C) is the most dominant value. The most frequent value of the permeate side bulk temperature, however, is 34 °C as is shown in Fig. 7e. Most of the appropriate values for the membrane length, membrane width, porosity and membrane pore size, with the same procedure, are 4 m, 0.4 m, 0.89 and 0.89 e−7, respectively. Another important question is whether decision variables have a correlation with each other or not. Figure 8 shows the Pearson correlation coefficients to determine whether there is any relation between decision variables. This can help designers to understand what effect a change in one parameter has on the other parameters so they can modify design parameters effectively. www.nature.com/scientificreports/ Pearson's correlation coefficient calculated by dividing the covariance of the variables, which are decision variables here, to the product of their standard deviations. As is shown there is some conspicuous relation between some design parameters which at the first glance seems to have nothing to do with each other. Starting from the inlet volume flow rate and bulk temperature at the permeate side. As is demonstrated in Fig. 8 these variables www.nature.com/scientificreports/ move in the opposite direction. In broad terms, for having an optimized constructal DCMD, if the inlet volume flow rate at the permeate side is increased, the bulk temperature of the permeate side must be decreased to keep the constructal DCMD optimized. Another interesting correlation exists between the porosity and membrane pore size. These two design parameters are move in the same direction so for having an optimized constructal DCMD, the quantity of both variables have to increase or decrease simultaneously. The membrane width and bulk temperature of the feed side have a weaker yet very interesting relation. As is shown these parameters move in the same direction. More correlations can be discovered as is shown in Fig. 6. Pearson's correlation coefficient more than 0.3 or less than − 0.3 can be called as a moderate or strong correlation between parameters and can have a conspicuous impact on objectives. These relations can help decision-makers to increase or decrease the values of design parameters more wisely to keep the constructal DCMD optimized. The marginal plot of several decision variables is also represented in Fig. 9. Marginal plots help to examine decision variables distributions and how designers should choose decision variables to build an optimal constructal DCMD. Decision variables which have a considerable Pearson's correlation coefficient are shown in Fig. 9. For easier visualization data have been normalized between 0 and 1. Figure 9a shows that both the membrane pore size and porosity have to be chosen from their highest frequency as the deepest part of the Fig. 9a is located in this part. Figure 9b illustrates that the most optimal points happen when the bulk temperature is chosen from its high frequency values while the inlet volume flow rate at the permeate side should choose from its second peak. Other values of design parameters can also be employed by designers based on other parts of the figures but the most optimal designs happen with the aforementioned values. Figure 9c, with the same procedure, reveals that the porosity and membrane pore size have to be selected from their highest frequency value. Figure 9d can be analyzed with the same method.

conclusion
At the present study, a novel DCMD design is proposed based on the constructal theory. Flow and membrane properties are estimated by the temperature-dependent correlations to reduce the model input parameters. A generalized Nusselt number correlation is employed for the thermal and hydrodynamic flow. The average mass www.nature.com/scientificreports/ flux which is calculated by this model is in a very good agreement with experimental data. SMPSO optimization algorithm is implemented to assess whether the constructal design can improve the performance of the DCMD. Results reveal that the constructal DCMD design leads to better performance under the water mass flux of about 4.4 kg/m 2 s or less than that. The conventional design, on the other hand, illustrates better performance after this point. Also, the results indicate that the constructal design is more desirable for higher thermal efficiencies. The constructal design dominates the conventional design from a thermal efficiency perspective, in contrast, the conventional design can perform under higher mass flux. For instance, the optimization outcomes show that with the same thermal efficiency of 93.5% the constructal design can improve the water mass flux by 37.5% from 2.45 to 3.37 kg/m 2 s. In the next step, the pair plot is employed to investigate the relation between decision parameters. It indicates that there are dominated trends among design and operational parameters which can provide a useful insight into what range of decision variables can lead to an optimal design. The frequency distribution of decision variables demonstrates that decision variables could be categorized into two main parts. First, operational and design variables that have one peak which means that there is one dominant value that causes an optimal constructal DCMD design. Second, decision variables that have two or three peaks. In such www.nature.com/scientificreports/ categories, each peak could lead to optimal design. The quantities of each parameter are discussed in the results and discussion section. The results show that the bulk temperature and inlet volume flow rate of the permeate side move in the opposite direction which means for obtaining an optimized constructal DCMD, if the bulk temperature of the permeate side is increased, the inlet volume flow rate at the permeate side must be decreased to keep the constructal DCMD optimized. Also, results demonstrate that the amount of the membrane pore size and porosity must increase or decrease simultaneously. Data disclose that the membrane pore size and porosity have to be chosen from their highest frequency.