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. 1.

    The amount of water stress in the country

  2. 2.

    Access to saline water sources, seawater, brackish water, and wastewater

  3. 3.

    Annual solar radiation area

  4. 4.

    The demand for fresh water in the coming years

  5. 5.

    Weather conditions

Table 1 R index on the priority of Middle Eastern countries for using solar energy for fresh water production, based on defined indicators (Pugsley et al. 2016)

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 CO2 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.

Table 2 Research on movers of RO system pumps from different heat sources

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. (1)

    Analysis of Plug RO and RRO configurations from the perspective of 4E.

  2. (2)

    Comparison of Solar + ORC + RO cycle configuration from the 4E perspective in tandem with its environmental effects.

  3. (3)

    Using the environmental index to compare the two RO configurations and optimization through genetic algorithm (GA).

  4. (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.

Fig. 1
figure 1

Schematic of the studied system a general cycle configuration, b Plug RO system, c RRO system

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. (1)

    The output power in the ORC is entirely given to the high-pressure pump of the RO system.

  2. (2)

    Part of the water leaving the condenser enters the high-pressure 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 (\(\beta\)) 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.

Fig. 2
figure 2

Process block diagram

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.

Energy analysis (1E)

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 (\({\eta }_{T}=80\%\)). According to Eq. (1), \({h}_{4}\) is determined, and according to the first law, the power capacity of the turbine (\({\dot{W}}_{T}\)) is (Shayesteh et al. 2019):

$$\eta_{T} = \frac{{h_{3} - h_{4} }}{{h_{3} - h_{4,is} }}$$
(1)
$$\dot{W}_{T} = \dot{m}_{3} \left( {h_{3} - h_{4} } \right)$$
(2)

In the condenser, the seawater exits the condenser with the determined temperature difference (\({T}_{cw,out}={T}_{cw,in}+\Delta 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 Pcon), the rejection heat and the amount of seawater can be calculated:

$$\dot{Q}_{cond} = \dot{m}_{1} \left( {h_{4} - h_{1} } \right)$$
(3)
$$\dot{m}_{{{\text{water}}}} = \frac{{\dot{Q}_{{{\text{cond}}}} }}{{Cp_{{{\text{water}}}} \Delta T}}$$
(4)

In the pump, by determining the isentropic efficiency of the pump (\({\eta }_{P}=85\%\)), inlet, and outlet pressure, the power per unit mass is calculable. By calculating this value, the output enthalpy is also calculated:

$$W_{p} = \frac{{\left( {P_{2} - P_{1} } \right)}}{{\eta_{P} \rho_{1} }}$$
(5)
$$h_{2} = h_{1} + W_{p}$$
(6)

Once the output enthalpy is determined, the required pump power can be calculated according to the first law of thermodynamics:

$$W_{p,1} = \dot{m}_{1} \left( {h_{2} - h_{1} } \right)$$
(7)

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:

$$T_{{{\text{app}}}} = T_{{{\text{sat}}}} - T_{{f,o,{\text{Eco}}}}$$
(8)
$$T_{p.p} = T_{{{\text{HTF}},{\text{out}},{\text{Eva}}}} - T_{{{\text{sat}}}}$$
(9)

Next, according to the first law of thermodynamics, the inlet temperature of the HTF from the economizer (\(T_{{{\text{HTF}},i,{\text{Eco}}}}\)) and the flow rate of organic fluid (\(\dot{m}_{f}\)) as saturated are determined (Shayesteh et al. 2019):

$$\dot{m}_{{{\text{HTF}}}} Cp_{{{\text{HTF}}}} \left( {T_{{{\text{HTF}},o,{\text{Eco}}}} - T_{{{\text{HTF}},i,{\text{Eco}}}} } \right) = \dot{m}_{f} \left( {h_{{f,o,{\text{Eco}}}} - h_{{f,i,{\text{Eco}}}} } \right)$$
(10)
$$\dot{m}_{HTF} Cp_{HTF} \left( {T_{HTF,o,Eva} - T_{HTF,i,Eva} } \right) = \dot{m}_{f} \left( {h_{g} - h_{f,o} } \right)$$
(11)

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 (Qf) and the feed water concentration (Cf) 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.

Fig. 3
figure 3

The schematic of the osmosis system

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 (\(\pi_{w} - \pi_{p}\)), and the membrane permeability (\(A\)) (Mokhtari et al. 2016; Khanarmuei et al. 2017):

$$J_{w} = A \times {\text{TCF}}\left[ {\left( {P_{f} - P_{p} - \frac{{\Delta P_{f} }}{2}} \right) - \left( {\pi_{w} - \pi_{p} } \right)} \right] \times 10^{6}$$
(12)

The amount of salt flow through the membrane is Eq. (13).

$$J_{s} = B\left( {C_{w} - C_{f} } \right)$$
(13)

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):

$$V_{w} = \frac{{J_{s} + J_{w} }}{{\rho_{p} }}$$
(14)

Based on boundary conditions and polarization, the concentration on the wall is calculated as (Mokhtari et al. 2016; Khanarmuei et al. 2017):

$$C_{w} = C_{p} + \left( {\frac{{C_{f} + C_{b} }}{2} - C_{p} } \right)e^{{\frac{{V_{w} }}{k}}}$$
(15)

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):

$$C_{p} = \frac{{J_{s} }}{{V_{w} }} \times 1000$$
(16)
$$Q_{p} = V_{w} S_{m}$$
(17)

The equations of salt and water continuity to determine brine concentration and flow rate are as follows:

$$C_{B} = \frac{{Q_{F} C_{F} - Q_{P} C_{P} }}{{Q_{B} }}$$
(18)
$$Q_{B} = Q_{F} - Q_{P}$$
(19)

The correction factor of temperature suggested for membranes of DOW is given as (Mokhtari et al. 2016; Khanarmuei et al. 2017):

$${\text{TCF}} = \left\{ {\begin{array}{*{20}c} {{\text{EXP}}\left[ {2640\left( {\frac{1}{298} - \frac{1}{273 + T}} \right)} \right],T \ge 25^\circ {\text{C}}} \\ {{\text{EXP}}\left[ {3020\left( {\frac{1}{298} - \frac{1}{273 + T}} \right)} \right],T \le 25^\circ {\text{C}}} \\ \end{array} } \right.$$
(20)

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 (\({\dot{m}}_{pip}={\rho }_{oil}V{A}_{pipe}\)). The energy absorbed by the HTF is calculated as (Mokhtari et al. 2016):

$$\dot{q}_{abs} = h_{i} D_{in} \pi \left( {T_{m} - T_{f,ave} } \right)$$
(21)
$$h_{i} = Nu_{{D_{in} }} \frac{k}{{D_{in} }}$$
(22)
$$\dot{q}_{abs} = \dot{m}_{pip} Cp_{HTF} \left( {T_{f,out} - T_{f,in} } \right)$$
(23)

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):

$${\text{Nu}}_{{D_{2} }} = \frac{{\frac{f}{8}\left( {{\text{Re}} - 1000} \right)\Pr }}{{1 + 12.7\sqrt{\frac{f}{8}} \left( {\Pr^{\frac{2}{3}} - 1} \right)}}$$
(24)
$$f = \left( {1.82\log \left( {{\text{Re}}_{{D_{{{\text{in}}}} }} } \right) - 1.64} \right)^{ - 2}$$
(25)

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:

$$q_{{{\text{loss}}}} = h_{o} \pi D_{{{\text{out}}}} \left( {T_{m} - T_{{{\text{amb}}}} } \right)$$
(26)
$$h_{o} = \frac{k}{{D_{{{\text{out}}}} }}{\text{Nu}}_{{D_{{{\text{out}}}} }}$$
(27)

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):

$${\text{Nu}}_{{D_{{{\text{out}}}} }} = \left\{ {0.06 + \frac{{0.387Ra_{{D_{{{\text{out}}}} }}^{{{1 \mathord{\left/ {\vphantom {1 6}} \right. \kern-0pt} 6}}} }}{{\left[ {1 + \left( {{{0.559} \mathord{\left/ {\vphantom {{0.559} {\Pr }}} \right. \kern-0pt} {\Pr }}} \right)^{{{9 \mathord{\left/ {\vphantom {9 {16}}} \right. \kern-0pt} {16}}}} } \right]^{{{8 \mathord{\left/ {\vphantom {8 {27}}} \right. \kern-0pt} {27}}}} }}} \right\}^{2}$$
(28)
$${\text{Ra}}_{{D_{{{\text{out}}}} }} = \frac{{g\beta \left( {T_{w} - T_{{{\text{amb}}}} } \right)D_{{{\text{Out}}}}^{3} }}{{\left( {\alpha \nu } \right)}}$$
(29)
$$\beta = \frac{1}{{T_{{{\text{ave}}}} }}$$
(30)

where Ra, \(\beta\), \(\nu ,\) 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):

$$\dot{E}x = \dot{E}x^{{{\text{PH}}}} + \dot{E}x^{{{\text{CH}}}}$$
(31)

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).

Table 3 Chemical and physical exergies in each section (Tajik Mansouri et al. 2020; Bejan et al. 1995)

After calculating the exergy of each stream, the amount of exergy destruction (\(\dot{E}{x}_{D}\)) is calculated as (Bejan et al. 1995):

$$\dot{E}x_{Q} + \mathop \sum \limits_{i} \dot{m}_{i} ex_{i} = \mathop \sum \limits_{e} \dot{m}_{e} ex_{e} + \dot{E}x_{W} + \dot{E}x_{D}$$
(32)

In this equation, \(\dot{E}x_{Q}\) and \(\dot{E}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):

$$\dot{E}x_{D} = T_{0} \dot{S}_{{{\text{gen}}}}$$
(33)
$$\dot{E}x_{Q} = \mathop \smallint \limits_{i}^{e} \left( {1 - \frac{{T_{0} }}{{T_{b} }}} \right)q^{\prime}\;{\text{d}}L$$
(34)
$$\dot{E}x_{W} = \dot{W} - p_{0} \frac{{{\text{d}}V_{cv} }}{{{\text{d}}t}}$$
(35)

Based on Ref. (Bejan et al. 1995), the exergy balance for each stream can be expressed as follows:

$$\dot{E}x_{f} = \dot{E}x_{P} + \dot{E}x_{D} + \dot{E}x_{L}$$
(36)

where \(\dot{E}x_{f}\), \(\dot{E}x_{P}\), and \(\dot{E}x_{L}\) express fuel exergy, product exergy, and lossed exergy, respectively. Based on this definition, the exergy efficiency can be defined as follows:

$$\eta_{ex} = \frac{{\dot{E}x_{p} }}{{\dot{E}x_{{f,{\text{int}} ,{\text{Plant}}}} }}\mathop{\longrightarrow}\limits^{{\quad Eq\left( {15} \right)\quad }} = 1 - \frac{{\dot{E}x_{D} + E\dot{x}_{L} }}{{\dot{E}x_{{f,{\text{int}} ,{\text{Plant}}}} }}$$
(37)

Exergy equations for equipment in the cycle are charted in Table 4.

Table 4 Exergy balance equations and functions for equipment

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 fixed-capital 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):

$${\text{TCI}} = {\text{FCI}} + {\text{SUC}} + {\text{WC}} + {\text{LRD}} + {\text{AFUDC}}$$
(38)

The direct cost (DC) is determined by Eq. (39), which contains the onsite (ONSC) and (OFSC) offsite costs (Bejan et al. 1995):

$${\text{DC}} = {\text{ONSC}} + {\text{OFSC}}$$
(39)
$${\text{OFSC}} = \left\{ {\begin{array}{*{20}c} {1.2 \times {\text{ONSC}}\quad \quad {\text{new}}\;{\text{system}}} \\ {0.45 \times {\text{ONSC}}\quad {\text{expansion}}} \\ \end{array} } \right.$$
(40)

Assuming that R&D costs are calculated as follows:

$${\text{LRD}} = {\text{AFUDC}} + 0.15 \times {\text{FCI}}$$
(41)

In this case, the TCI can be calculated through:

$${\text{TCL}} = 147 \times {\text{FCI}}$$
(42)

As a result:

$${\text{TCL}} = 1.184{\text{DC}} = 1.84 \times \left( {{\text{ONSC}} + {\text{OFSC}}} \right)$$
(43)

TCI can also be determined by combining the above relations:

$${\text{TCI}} = \left\{ {\begin{array}{*{20}c} {4.05\;{\text{ONSC}}\quad {\text{new}}\;{\text{system}}} \\ {2.67\;{\text{ONSC}}\quad {\text{expansion}}} \\ \end{array} } \right.$$
(44)

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.

Table 5 The equations for estimating the cost components

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).

$${\text{OC}}_{m} = 0.2{\text{CC}}_{m}$$
(45)
$${\text{OC}}_{{{\text{ins}}}} = 0.005 \times {\text{TCI}}$$
(46)
$${\text{OC}}_{{{\text{lab}}}} = Q_{p} \times 24 \times 365 \times f_{c} \times 0.01$$
(47)
$${\text{OC}}_{{{\text{ch}}}} = Q_{p} \times 24 \times 365 \times f_{c} \times 0.0225$$
(48)
$${\text{OC}}_{{{\text{main}}}} = Q_{p} \times 24 \times 365 \times f_{c} \times 0.01$$
(49)
$${\text{OC}}_{{O\& M,{\text{RO}}}} = {\text{OC}}_{{{\text{ins}}}} + {\text{OC}}_{{{\text{labor}}}} + {\text{OC}}_{{{\text{ch}}}} + {\text{OC}}_{{{\text{main}}}}$$
(50)

where \(O{C}_{m}\) is the replacement cost; \(O{C}_{O\&M}\) is the total operating cost, which includes \(O{C}_{\mathrm{lab}}\), \(O{C}_{m}\), \(O{C}_{\mathrm{ins}},\) and \(O{C}_{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:

$${\text{AOC}}_{{{\text{RO}}}} = {\text{OC}}_{m} + {\text{OC}}_{{O\& M,{\text{RO}}}}$$
(51)
$${\text{AOC}}_{{{\text{Total}}}} = {\text{AOC}}_{{{\text{Other}}}} + {\text{AOC}}_{{{\text{RO}}}}$$
(52)

The normalized TAC is given as:

$${\text{TAC}} = \frac{{{\text{TCI}}}}{{{\text{CRF}}}} + {\text{AOC}}_{{{\text{Total}}}}$$
(53)

where \({\text{CRF}}\) is the capital recovery factor. Finally, the unit product cost (UPC) of fresh water is defined as:

$${\text{UPC}} = \frac{{{\text{TAC}}}}{{24 \times Q_{p} \times 365}}$$
(54)

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.

Table 6 Thermodynamic and environmental properties of organic working fluids (Tajik Mansouri et al. 2020)

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):

$${\text{CDI}} = R\rho_{\alpha } \to {\text{Where}}\;\rho_{\alpha } = \frac{{\rho_{sw} - \rho_{1,d}^{*} }}{{\rho_{2,d}^{*} - \rho_{sw} }}\left\{ {\begin{array}{*{20}c} {\rho_{sw} = f\left( {C_{sw} ,T_{sw} } \right)} \\ {\rho_{1,d}^{*} = f\left( {C_{sw} ,T_{d} } \right)} \\ {\rho_{2,d}^{*} = f\left( {C_{d} ,T_{sw} } \right)} \\ \end{array} } \right.$$
(55)

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.

Table 7 Optimization results based on the best optimal point

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 m3/h, respectively, and the results are presented in Table 8.

Table 8 Validation results with ROSA software

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 (Xideal, Yideal, Zideal) of the ideal point are chosen. For the objective functions which are considered to be maximized (like the CDI (Max (Fj)), the maximum amount and for the functions which are considered to be minimized (like UPC Min (Fj)), 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 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.

Fig. 4
figure 4

Pareto curves obtained from RO and RRO system optimization

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.

Table 9 Optimization results based on the best optimal point

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. 1.

    Operating cost for high TDS.

  2. 2.

    Due to its high surface area, it has a significant production of fresh water.

  3. 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.

Fig. 5
figure 5

Sensitivity analysis of produced fresh water flow rate on membrane change in different concentrations of inlet water on the membrane

Fig. 6
figure 6

Sensitivity analysis of produced fresh water concentration on membrane change at different concentrations of inlet water on a membrane

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.

Fig. 7
figure 7

The effect of recovery with SW30HR-320 on SEC in different flow rates

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 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.

Fig. 8
figure 8

The effect of inlet water temperature on output power in different working fluids

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.