4E investigation of solar-driven RO and RRO osmotic desalination systems from water, energy, and environment relevance perspective: a comparative approach

In this paper, two osmotic desalination systems, namely, plug reverse osmosis (RO) and recirculation reverse osmosis (RRO) systems integrated with solar and organic Rankine cycle (ORC), have been presented. These systems are modeled and optimized from energy, exergy, economic, and environmental perspectives. The objective functions are the concentration disposal index (CDI) and unit cost of the product (fresh water) (UPC). The results show that the RO cycle has an optimal configuration grounded on max (CDI) and min (UPC). At identical UPC, the environmental effects of the RO system were less than those of the RRO. This is attributed to higher recovery with increasing temperature of discharged water into the sea in a smaller area and at a higher rate. For the RO system, the values for CDI, exergy efficiency, and fresh water production are 0.193, 45.6%, and 13.1 m3/h for R245ca fluid. Also, the share of RO and RRO in the total TAC costs is 19.44% and 17.33%, respectively. The R245ca working fluid is selected for both cycles, which is more productive than the other fluids. The results show that more than 50% recovery is achieved for the SW30HR-320 membrane at the optimum for the RO system.


Introduction
Various technologies have been employed to produce fresh water, of which approximately 65% is pertinent to reverse osmosis (RO) systems (Jones et al. 2019;Fang et al. 2021). A present concern for RO desalination systems is their energy supply and environmental impact. In other words, the relevance between water, energy, and environmental impacts has become a topic of interest in desalination systems (Quan et al. 2021;Li et al. 2020;Chen et al. 2022).
A comprehensive study by Pugsley et al. (Pugsley et al. 2016) identified the need for solar energy for each country with water stress based on a defined index. Each country was assigned a rank in which, based on it, countries that have a high potential to produce fresh water at a reasonable price of solar energy are determined. The results of this study are presented in Table 1 for several Middle Eastern countries. This ranking factor, denoted by R, is defined based on the following parameters: 1. The amount of water stress in the country 2. Access to saline water sources, seawater, brackish water, and wastewater 3. Annual solar radiation area 4. The demand for fresh water in the coming years 5. Weather conditions On the other hand, in the Persian Gulf, the Red Sea, and the eastern Mediterranean region, an increase in water salinity and the repercussions of desalination have been reported (Khudair and Eraibi 2017;Missimer and Maliva 2018;Chenoweth and Al-Masri 2022;Shahabi et al. 2015; Intakes and Outfalls for Seawater Reverse-Osmosis Desalination Facilities 2015). To clarify, a desalination system that uses only solar energy cannot be considered without environmental effects. Depending on the geographical location of each desalination plant, there are different methods for wastewater disposal (Ge et al. 2019;Lin et al. 2021;Yang et al. 2022). The standard approach is to release the effluent into the sea and oceans. Approximately 5 to 10 km of the shoreline is affected by desalination effluents, eliciting environmental issues in the region. The results show that a large volume of brine is produced in the Middle East and North Africa. The volume of effluent in these areas is higher than one million barrels per day. This includes Saudi Arabia and Qatar, which produce 72 million cubic meters of fresh water per day (Pugsley et al. 2016). Research on the environmental impact of desalination projects has witnessed attention, increasing by 92% from 2005 to date (Ihsanullah et al. 2021;Yang et al. 2018).
Few papers have addressed the effects of the environment on desalination systems as a mathematical function and its impact on other cycle parameters. To express the environmental effects of brine, Shayesteh et al. (Shayesteh et al. 2019) presented a concentration disposal index (CDI) and evaluated a RO desalination system with an organic Rankine cycle (ORC) using heat recovery from exhaust gases to produce fresh water. The study's results signposted that the environmental effects can be thoroughly investigated using the expressed index regarding brine volume, temperature, and concentration effects. Also, optimizing the objective function positively influenced other cycle indicators, namely, exergy efficiency and water cost. Mansouri et al. (Tajik Mansouri et al. 2019) integrated an RO desalination system with ORC and membrane desalination (MD) in an industrial unit. Using the CDI, the role of MD on the discharge brine from the RO system was investigated. The results of this study demonstrated that the arrangement of the ORC-RO-MD has a substantial role in reducing environmental effects but intensifies the overall cost of fresh water. In another study, Mansouri et al. (Tajik Mansouri et al. 2020) assessed the environmental effects of assorted ORC configurations using different fluids and the integration with RO-MD units, which utilized gas turbine exhaust. They studied approaches toward capturing CO 2 with algae and increasing fresh water production. The paper described the use of MD to reduce the RO environmental impact.
The configuration of the ORC-RO cycle whereby the output power of the ORC is set as the mover of the high-pressure pump has been studied in several articles. Table 2 delineates the research conducted on the mover supply of the RO system pump from different heat sources. As observed, the findings indicate that the optimization of this cycle and 4E analysis and environmental impacts have received less attention.
Limited research can be found comparing the two RO configurations. There are various configurations of the RO system, the two most common being Plug RO and recirculation RO (RRO). Khanarmuei et al. (Khanarmuei et al. 2017) compared these two configurations. The results of their study, which was performed for a fixed fresh water flow, exposed that in the optimal case, the RRO system reduced investment costs by 2% and increased maintenance costs by 6%, augmenting the efficiency by 19.7%.
In retrospect studies, only the ORC + RO system with heat recovery from an environmental perspective and 4E analysis was studied and analyzed. Fewer research works have focused on the present study innovations, namely: (1) Analysis of Plug RO and RRO configurations from the perspective of 4E.
(2) Comparison of Solar + ORC + RO cycle configuration from the 4E perspective in tandem with its environmental effects. (3) Using the environmental index to compare the two RO configurations and optimization through genetic algorithm (GA). (4) Investigation and analysis of reducing the environmental effects of carbon dioxide production and energy availability for remote coastal areas with solar energy Also, in this study, attributable to the increase in areas where desalination projects have led to an increment in seawater concentration, the environmental index along with energy, exergy, and economic analysis for the two configurations of the Solar + ORC + (RO/RRO) system is implemented.

System description
The studied cycle is illustrated in Fig. 1. Figure 1a shows the general structure of the cycle.
The cycle comprises three sections: solar farm, power generation, and fresh water production via RO. The parabolic solar field absorbs solar energy; the heat transfer fluid (HTF) enters the heat exchanger and absorbs heat, so its temperature is augmented. The heat exchanger has two parts, the economizer and the evaporator. The HTF leaves the heat exchanger by transferring heat to the organic working fluid and then enters the solar field through increased pressure. The solar field has different rings that are parallel to each other. In other words, the HTF enters different branches, and each branch increases its temperature. The HTF experiences a pressure drop, which is compensated by the pump. The organic fluid generates power in a simple organic Rankine cycle (ORC). At point (3), the organic fluid enters the tubing as saturation and produces power. Depending on its type, the organic fluid enters the condenser, either saturated or superheated as point (4) and condenses with a loss of energy to point (1). The organic fluid enters the pump, and its pressure increases as point (2) and exits the heat exchanger as condensed by passing through two heat exchangers. The contrast between the ORC system and the RO is observed at two points: (1) The output power in the ORC is entirely given to the high-pressure pump of the RO system. (2) Part of the water leaving the condenser enters the highpressure pump. In other words, the amount of heat rejected from the condenser increases the temperature of the water entering the osmotic system. In this section, both configurations for the osmotic system are suggested. The first configuration is the RO system that enters all the incoming water into the membranes, and the feed water is extracted as brine water and fresh water, as shown in Fig. 1b.
The second system is the RRO which enters a part of the brine water ( ) due to the pressure and also the reduction of operation costs (power consumption) into the membrane section, depicted in Fig. 1c. After receiving heat, part of the seawater enters a mixed tank, and the other enters a tank, whereby additives such as sulfuric acid are added to adjust the pH. The output water from this tank enters a pump, whereby its energy is provisioned from the ORC cycle. The feed water is then divided into two streams of fresh and brine water. The difference between RO and RRO systems is in how brine water is used. An energy recovery system is designed for both cases.
What is important in this study is that the system's environmental effects are only in the output brine water. The solar part has no environmental effects. In the ORC, only the environmental effects, namely, ozone depletion potential (ODP) and global warming potential (GWP), should be considered in the working fluid selection. As a result, the most important part of the environmental impact of the studied body is the osmotic system.

Methodology
The nexus between energy, water production, and environmental effects in the proposed system is to increase power and fresh water production, respectively, with a decrease in environmental impacts. For this purpose, the two RO and RRO systems are compared from the 4E perspective in the optimal state. According to Fig. 2, the effect of each of the parameters of each part of the configuration is illustrated in each of the analyses. The effective parameters in energy and exergy analyses are similar, so they are expressed similarly. Some parameters affect only one item, and some affect most analyses.
This study aims to find the optimal expressed parameters so that the system has the lowest cost of fresh water production and the most negligible environmental impact. It can be seen that all parameters in the economic section are directly and indirectly affected. The final product of the fresh water production system, whereby increasing its production, improves the system's recovery and energy and exergy efficiency. In this optimization, the two osmotic configurations are compared based on the specified objectives to determine which systems can place the objective functions at their maxima. In the RRO system, a percentage of brine (β) is returned to the system. It enters the membranes as feed water after passing through a booster pump, eliciting energy recovery. Adding some brine to the feed water increases the concentration, which causes more sedimentation, reducing the system's life. Through this approach, less brine is discharged into the environment. For this purpose, the two RO and RRO systems are optimized with identical parameters and ranges. This optimization is grounded on the two objective functions: CDI and prod. The two systems are compared at the optimal point found in the Pareto curve. Comparison under optimal conditions is instrumental in presenting a suitable configuration based on analysis of energy, exergy, economic, and environmental impacts along with fresh water production (4E + D) and optimal parameters.

ORC
The fundamental equations used for the ORC system are based on the law of continuity and the first law of thermodynamics. The equations for the equipment used in the ORC cycle can be expressed as follows. In the turbine, based on the pressure, the saturation temperature and enthalpy of point (3) are determined according to the isentropic efficiency of the turbine ( T = 80% ). According to Eq. (1), h 4 is determined, and according to the first law, the power capacity of the turbine ( Ẇ T ) is (Shayesteh et al. 2019): In the condenser, the seawater exits the condenser with the determined temperature difference ( T cw,out = T cw,in + ΔT ). By having the temperature of the inlet and outlet cooling water and the quality of the organic fluid and the condenser pressure at point (1) (x = 0.0 and P con ), the rejection heat and the amount of seawater can be calculated: Cp water ΔT

Fig. 2 Process block diagram
In the pump, by determining the isentropic efficiency of the pump ( P = 85% ), inlet, and outlet pressure, the power per unit mass is calculable. By calculating this value, the output enthalpy is also calculated: Once the output enthalpy is determined, the required pump power can be calculated according to the first law of thermodynamics: In the heat exchanger, the approach and pinch point temperature are determined as two parameters to find the temperature of the HTF entering and exiting the evaporator: Next, according to the first law of thermodynamics, the inlet temperature of the HTF from the economizer ( T HTF,i,Eco ) and the flow rate of organic fluid ( ṁ f ) as saturated are determined (Shayesteh et al. 2019):

RO and RRO
The design and modeling of the plug RO and RRO are similar. Only part of the brine flow rate is transferred to the inlet in the RRO system, which is determined by the feed water flow rate (Q f ) and the feed water concentration (C f ) according to the law of water-salt continuity. The RRO system generally reduces the number of elements to reach a fixed recovery but increases the operating costs and equipment required in the system. In modeling the osmotic system, the flowchart in Fig. 3 is employed. The feedwater flow rate is divided into several pressure pipes. The flow of feedwater enters the membrane, and each membrane is elementalized, and the fundamental equations described in the following are solved. This solution is repeated for the number of membranes in each pressure vessel (PV). Finally, the fresh water flow rate produced by each PV is summed, and the total fresh water flow rate is determined.
The basic equations for each element are as follows. The water flow flux is proportional to the feed water pressure ( P f ), the required fresh water pressure ( P p ), the osmotic pressure difference ( w − p ), and the membrane permeability ( A ) (Mokhtari et al. 2016;Khanarmuei et al. 2017): The amount of salt flow through the membrane is Eq. (13).

Fig. 3 The schematic of the osmosis system
The flow rate is proportional to the difference between the wall concentration ( C w ) and the salt concentration ( C f ) (Mokhtari et al. 2016;Khanarmuei et al. 2017). The water velocity between the membranes is determined by Mokhtari et al. (2016); Khanarmuei et al. 2017): Based on boundary conditions and polarization, the concentration on the wall is calculated as (Mokhtari et al. 2016;Khanarmuei et al. 2017): The concentration of fresh water produced and the fresh water flow rate is determined based on the following equations (Mokhtari et al. 2016;Khanarmuei et al. 2017): The equations of salt and water continuity to determine brine concentration and flow rate are as follows: The correction factor of temperature suggested for membranes of DOW is given as (Mokhtari et al. 2016;Khanarmuei et al. 2017): The relationships between pressure drop and mass transfer have been determined by the Hagen-Poiseuille relationship and the Sherwood and Schmidt numbers, consistent with references (Mokhtari et al. 2016;Khanarmuei et al. 2017).
Due to the range of discharge and insignificant changes in efficiency, its value is chosen as 90% in this modeling.

Parabolic solar farm
In this model, each tube is elementalized, and the HTF absorbs the irradiation energy from the sun in the tubes, while part of it is lost through the surrounding environment. The flow rate from each branch of the farm is calculated according to the law of continuity ( ṁ pip = oil VA pipe ). The energy absorbed by the HTF is calculated as (Mokhtari et al. 2016): Based on Eq. (23), the temperature of the HTF outlet from each element can be calculated. The Nusselt number in laminal and turbulent flows can be calculated. To determine the Nusselt number for turbulent flow, Eq. (24) is employed (Mokhtari et al. 2014): where f is the coefficient of friction for the inner surface of the absorbent tube and Pr is the Prandtl number for the operating fluid, respectively. When the flow is laminar, the Reynolds number has a constant value. Heat transfer from the surface of the absorbent tube to the environment occurs through both convection and radiation, determined as follows: As previously described, convective heat transfer is calculated from Newton's law of cooling, and only the Nusselt numbers change due to changing conditions. To calculate the Nusselt in the case where there is no wind, the equations proposed by Churchill and Chu are employed, and in the present modeling, this case is assumed (Mokhtari et al. 2016): where Ra, , , and Pr are Rayleigh number, the coefficient of volumetric thermal expansion, the kinematic viscosity, and Prandtl number at the average ambient and tube temperature, and T ave is the average surface and ambient temperature.

Exergy analysis (2E)
Exergy of any stream includes physical and chemical exergy as described in Bejan et al. (1995): Based on different fluids, exergy is expressed in Table 3, and the specific exergy power is determined. Due to the fact that the salt concentration changes in the fresh water production process, the amount of chemical exergy is calculated based on Ref. (Bejan et al. 1995).
After calculating the exergy of each stream, the amount of exergy destruction ( Ė x D ) is calculated as (Bejan et al. 1995): In this equation, Ė x Q and Ė x W , respectively, denote the exergy of the transferred heat and the work done. The parameters expressed in this regard are determined as follows (Bejan et al. 1995): Based on Ref. (Bejan et al. 1995), the exergy balance for each stream can be expressed as follows: where Ė x f , Ė x P , and Ė x L express fuel exergy, product exergy, and lossed exergy, respectively. Based on this definition, the exergy efficiency can be defined as follows: Exergy equations for equipment in the cycle are charted in Table 4.

Economic analysis (3E)
In this section, economic analysis has been considered. The total annualized cost (TAC) consists of two terms: total capital cost (TCI) and operating cost (OC). TCI includes fixedcapital investment (FCI), start-up cost (SUC), working capital (WC), allowance for funds of construction (AFUDC) and licensing, research, and development (LRD) costs (Khanarmuei et al. 2017;Bejan et al. 1995): The direct cost (DC) is determined by Eq. (39), which contains the onsite (ONSC) and (OFSC) offsite costs (Bejan et al. 1995): Assuming that R&D costs are calculated as follows: In this case, the TCI can be calculated through: As a result:   TCI can also be determined by combining the above relations: According to the cost of purchasing equipment (CC) or ONSC, the TCI can be evaluated. The relations for estimating the cost of each element of the osmosis system, the ORC, and the parabolic solar farm, along with other costs of available equipment such as steam turbines and condensers, are shown in Table 5.
The operating cost of a reverse osmosis system is calculated as follows, and in other systems, 2% of the CC is considered as O&M costs (Nabati and M.S. sadeghi, S.N. Naserabad, H. Mokhtari, S. izadpanah 2018). where OC m is the replacement cost; OC O&M is the total operating cost, which includes OC lab , OC m , OC ins , and OC ch which are the annual cost of the labor, maintenance, insurance, and chemicals, respectively. The operating costs of other components have also been calculated according to Ref. (Bejan et al. 1995). Finally, the annual operating cost is calculated as follows: The normalized TAC is given as: where CRF is the capital recovery factor. Finally, the unit product cost (UPC) of fresh water is defined as:

Environmental effects (4E)
In this study, the organic fluids charted in Table 6, which have appropriate environmental conditions suggested by ASHRE, are considered in the modeling.

RO system
In this study, the environmental impact function of brine is carried out similar to Refs. (Shayesteh et al. 2019;Tajik Mansouri et al. 2020): In this dimensionless function, recovery is a function that reduces with increasing flow rate. Owing to the slight effect of temperature on density at low temperatures for water, this function is based on the more it increases, the environmental effects lessen. On the other hand, density of brine depends on salinity. The salinity of seawater is considered as a basis because the brine water is discharged into the sea. Therefore, the difference between the density of brine water and seawater is considered at a constant temperature. The lower the amount, the less environmental impact it has on the sea. That is why it is located in the denominator.

Optimization
The two configurations are optimized separately based on optimization variables in Table 7.

Validation
For validation, the ROSA software has been used to validate the code developed in MATLAB software. In this validation for the plug system, the flow rate and feed water concentration are TDS 4049 and 40 m 3 /h, respectively, and the results are presented in Table 8.

Results and discussion
In multi objective optimization, it is required to define a process for the optimal solution among available solutions.
In the literature many methods can be found in this regard. In many cases the dimensions of two or more objectives are different, so, firstly, dimensions and scales of the objectives should be unified. Therefore, objectives vectors should be non-dimensionalized before decision-making. There are some methods of non-dimensionalization utilized in decision-making including linear non-dimensionalization, Euclidian non-dimensionalization, and fuzzy non-dimensionalization, which have been comprehensively described in Sayyaadi and Mehrabipour (2012).
In the literature, several methods of decision-making processes, including the fuzzy Bellman-Zadeh, LINMAP, and TOPSIS, have been used in order to specify the final optimal solution. In this paper, LINMAP method has been employed for this purpose. LINMAP employs Euclidian non-dimensionalization, and after Euclidian non-dimensionalization of all objectives, the spatial distance of each solution on the Pareto frontier from the ideal point denoted by d i+ is determined. For the determination of the ideal point, which is in the infeasible domain, the process ahead is passed. After the creation of the Pareto curve among the points found, the amounts of the (X ideal , Y ideal , Z ideal ) of the ideal point are chosen. For the objective functions which are considered to be maximized (like the CDI (Max (F j )), the maximum amount and for the functions which are considered to be minimized (like UPC Min (F j )), the minimum obtained amount is chosen. This obtained point is the ideal point with the maximum and minimum amount of the objective functions. Figure 4 shows the optimization Pareto curve of the two systems cycles, RO and RRO, with two target functions of UPC and CDI. The goal of the optimization is to increase the CDI function and reduce the UPC. In the Pareto curves relevant to the CDI, the UPC of the RO system is higher than the RRO system. The Pareto curve divides the solution

Fig. 4
Pareto curves obtained from RO and RRO system optimization region into two: the accessible and the inaccessible. The RO system Pareto curve is located in the inaccessible part of the RRO system, which signposts the appropriate optimal points of this system. The optimization results based on the best optimal point are presented in Table 9. It is observed that in an almost constant TAC, the exergy efficiency for RO and RRO is 45.6% and 38.2%, respectively. The share of RO and RRO in the total TAC costs also shows that the RRO has 19.44% compared to RO, which has 17.33% poses more costs to the system. Also, the RRO has increased ancillary costs by 3.8%. This is due to the increase in costs, including increased sedimentation and replacement of membranes.
Moreover, due to the increase in input brine concentration and specific energy consumption (SEC), the RRO exergy efficiency is 26.6% lower than that of RO. Table 9 shows that the exergy efficiency of the whole cycle with RO is 40.68% and for the RRO is 38.2%. This is attributable to the production of more fresh water in exchange for less energy consumption. It is observed that to augment efficiency, the genetic algorithm has increased the pump pressure as much as possible, and its value has not exceeded 80 bar. Consistent with the membranes used, if the pressure increases from this value, there is the possibility of rupture and damage to the membrane. In the RRO system, since approximately 13.5% of the water is recirculated to it, this has reduced the pressure of the feed pump.
The fresh water flow rate produced in the RRO system is more than RO, which is because of the brine water injection into the feed water. A notable point is the change in the selection of membranes based on the input feed water. Based on the condition of the feed water, which has a concentration of 42,000 ppm (concentration of water in the Persian Gulf), the SW30HR-320 membrane is used for the RO system, which is a common membrane that has high strength in rejecting salts. But in the RRO system, SW30XLE-400i is employed because: 1. Operating cost for high TDS. 2. Due to its high surface area, it has a significant production of fresh water. 3. For systems with low recovery, it can cut the risk of clogging, On the basis of all these issues existing in the RRO system, the genetic algorithm has selected this membrane. Figures 5 and 6 show the membrane sensitivity analysis in the RO system. As seen, the SW30HR-320 produces less fresh water than the SW30XLE-400i due to its lower membrane surface area (Fig. 5) but has a higher salt rejection (Fig. 6). Increasing the concentration and decreasing the flow rate is due to the polarization effect of the concentration on the surface, which momentously increases the salt concentration of the wall. Increasing water temperature and decreasing brine flow rate (increasing recovery) have caused the value of the CDI function in the RO system to be higher than the RRO system. As a result, it is discerned that a 10.5% increase in concentration has again improved the CDI function compared to the RRO system. In other words, environmental issues for the osmotic system must be addressed in an inclusive and comprehensive manner. Temperature, concentration, and water flow all affect this function. Since it is discharged to the sea floor, temperature term is the main factor in reducing the mixing time with seawater and reducing the area affected by the brine discharge. The subjection of bioavailability into the discharged water into the sea leads to a reduction in mixing time and a smaller area affected by this osmotic system due to the temperature difference.
In Figure 5, it can be seen that according to Eq. (15), with the increase of the input rate, the water concentration near the wall increases, and this increases the osmotic pressure in Eq. (12), which reduces the amount of water flux from the membrane. Figure 7 illustrates the effect of recovery with SW30HR-320 on SEC. It can be seen that the energy consumption for the SW30HR type membrane reaches its lowest level in the range of 50% water recovery. Therefore, it is better than the recovery be within this range in the design of systems that use this membrane. According to Table 9, it is conspicuous that the genetic algorithm based on the selected membrane has placed the system recovery in this range.
The reason for the decrease in SEC and then its increase is due to the flow rate and inlet pressure. As the recovery increases, the flow rate decreases, but the inlet pressure increases so that the recovery can be increased; this leads to SEC decreasing at first and then increasing. Figure 8 depicts the sensitivity analysis on the different working fluids in the RO cycle. It is observed that the type of working fluid is very effective on the production capacity. By changing the type of fluid at a constant operating   Fig. 7 The effect of recovery with SW30HR-320 on SEC in different flow rates pressure, the enthalpy of stream to the turbine and the condenser pressure is altered. These two parameters influence the ORC turbine, leading to a variance in power produced. By changing the fluid R245ca to R123, it is demonstrated that the power is reduced by 55%. At high temperatures, the effect of condenser pressure can be considered as a factor of further reduction of turbine power. It should be noted that with decreasing power, the pump pressure of the RO system will also lessen, and fresh water production will decline. Figure 8 is obtained by changing the fluid in thermodynamically stable conditions. This figure shows the working fluid analysis. By changing the fluid and not changing the thermodynamic conditions, it can be seen that the condenser pressure increases in the R123 fluid, and the input enthalpy to the turbine decreases; this leads to a reduction in power when the fluid is changed from R245ca to R123.

Conclusion
In this paper, the two solar-driven osmotic systems fed on seawater, namely, plug RO and RRO, were assessed and compared in terms of energy, exergy, economics, environmental impact, and fresh water production (4E + D). The purpose of this study was to compare the two cycles under optimal conditions to reduce fresh water costs and increase the environmental impact index. Since the solar field power generation cycle was combined with ORC, the only environmental effect of the system under consideration was the osmotic system. The genetic algorithm found optimal parameters by simulating the three sections: the parabolic solar field, the ORC cycle, and the osmotic RO and RRO systems. The results showed that the RO cycle has an optimal configuration grounded on the objective functions (max (CDI), min (UPC)). At identical UPC, the environmental effects of the RO system were less than those of the RRO. This was attributed to higher recovery with increasing temperature of discharged water into the sea, which took place in a smaller area and at a higher rate. The results indicated that the total system exergy efficiency for RO and RRO was 45.6% and 38.2%, respectively. Also, the share of RO and RRO in the total TAC costs was 19.44% and 17.33%, respectively. The R245ca working fluid was selected for both cycles, which is more productive than the other fluids. The sensitivity analysis results signposted that 50% recovery elicited in best SEC for the SW30HR-320 membrane, which the genetic recovery algorithm calculated it at 52% for the RO system. Funding There is no funding.
Data availability There are no data for this paper.

Conflict of interest The author declares no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.