Studying a Multi-Stage Flash Brine Recirculation (MSF-BR) System Based on Energy, Exergy and Exergoeconomic Analysis

: Due to the lack of natural water resources and high consumption of water in industries, desalination systems are good options to supply water demands, especially in regions with a water crisis. If these wastes are used in thermal desalination cycles, in addition to improving efﬁciency and reducing energy consumption, the production of environmental pollutants can also be reduced. In this paper, the multi-stage ﬂash brine recirculation (MSF-BR) system of the Abadan reﬁnery is investigated from energy-exergy-exergoeconomic viewpoints. In addition, the effects of top brine temperature (TBT), number of stages and ambient temperature on the performance of the system are evaluated. The results at maximum brine temperature show that with increasing the TBT, the exergy efﬁciency, gained output ratio (GOR) and distillate water production increase by 34%, 47% and 47%, respectively. It is also found that if the number of stages in the heat rejection section increases to more than six stages, GOR will decrease. The exergoeconomic analysis results reveal that the relative cost difference increases by 94% with an increase in the number of stages. Finally, it is concluded that by using the waste heat of a reﬁnery complex for heating steam to run the desalination system, there is a 9103 $/year cost savings due to energy consumption reduction and 193 × 10 4 $/year cost savings due to CO 2 emission reduction.


Introduction
Climate change and world population growth have led to an increase in water demand and consequently a decrease in water resources [1].Around 40% of the world's population suffers from a lack of potable water which is expected to be increased in the future [2].Although 70% of the Earth's surface is covered with water, only 3% of it is drinking water [3].Desalination of seawater is one of the growing methods to supply potable water around the world [4].Generally, the desalination methods are divided into thermal and electrical techniques.Thermal desalination systems are generally divided into two main methods, MSF (multi-stage flash) and MED (multi-effect desalination).The water production process in thermal systems uses evaporation and distillation processes.Therefore, the produced water is of good quality.Power water desalination systems, the most common of which is the RO (reverse osmosis) method, use a membrane to filter and purify water.Moreover, electrodialysis (ED) and nanofiltration (NF) are other desalination methods using a membrane.While employing thermal desalination methods leads to pollutant emissions due to using fossil fuels, the waste heat of industrial units can be utilized as a heat source for thermal desalination systems.As shown in Figure 1, after reverse osmosis (RO), thermal desalination technologies account for a significant share of total desalination methods in the world.Therefore, optimization of such thermal desalination systems has considerable impact on reduction of fuel consumption and pollutant emissions.Multi-stage flash (MSF) is one of the most used thermal desalination techniques [5].However, MSF desalination systems consume a large number of fossil fuels which leads to an increase in air pollution and a decrease in non-renewable energy sources.As a result, energy consumption optimization of thermal desalination units like MSF can reduce energy consumption and water production cost [6].
Water 2022, 14, x FOR PEER REVIEW 2 of 20 emissions.Multi-stage flash (MSF) is one of the most used thermal desalination techniques [5].However, MSF desalination systems consume a large number of fossil fuels which leads to an increase in air pollution and a decrease in non-renewable energy sources.As a result, energy consumption optimization of thermal desalination units like MSF can reduce energy consumption and water production cost [6].The thermal desalination systems are categorized into two main groups-multi-flash and multi-effect desalination systems.The multi-stage flash desalination system requires low-pressure heating steam to run and medium-pressure steam to create a vacuum in the system.An MSF desalination system with 4 to 40 stages can produce 1000 to 35,000 m 3 /day of potable water [7].Generally, in this system, the seawater or brackish water, which is called feed brine water, enters the last stage being pre-heated in each stage and moves towards the first stage.Then, it goes to the brine heater and reaches a higher temperature and pressure through heat transfer with incoming heating steam.After that, it flows back to the stages that have ever lower pressure and temperature.This causes a small fraction of it to evaporate partially (flash) in each stage which is then condensed after contacting the tubes containing the feed brine water and produces potable water.The required 90-110 °C thermal energy for the brine heater of the MSF system can be supplied through burning fossil fuels, the waste heat of refinery or power plants, solar energy, etc. [8].Due to the high share of MSF desalination among thermal desalination systems, numerous studies have been conducted on the optimization and performance improvement of MSF systems.The replacement of non-renewable with renewable energies and waste heat of energy systems is another field of study in this area which reduces the emissions, costs and increases efficiency [9,10].In addition, as known, the outlet brine of MSF systems is still warm.One method is to reuse the thermal energy of outlet brine to increase the temperature of inlet feed brine.There are some studies that worked particularly on performance of multi-stage flash with brine recycle (MSF-BR) systems.
Al-Weshahi et al. [11] analyzed a 3800 m 3 /h MSF-BR desalination system with 16 stages for heat recovery and three stages for heat rejection using IPSEpro software.Results show that the maximum and minimum exergy destructions are related to heat recovery and pump, respectively.Furthermore, they found that by increasing the number of stages to eight stages, the exergy efficiency increases by 8% while it drops by 4% when the number of stages exceeds eight stages.Ben Ali and Kairouani [12] optimized a 10-stage MSF- The thermal desalination systems are categorized into two main groups-multi-flash and multi-effect desalination systems.The multi-stage flash desalination system requires low-pressure heating steam to run and medium-pressure steam to create a vacuum in the system.An MSF desalination system with 4 to 40 stages can produce 1000 to 35,000 m 3 /day of potable water [7].Generally, in this system, the seawater or brackish water, which is called feed brine water, enters the last stage being pre-heated in each stage and moves towards the first stage.Then, it goes to the brine heater and reaches a higher temperature and pressure through heat transfer with incoming heating steam.After that, it flows back to the stages that have ever lower pressure and temperature.This causes a small fraction of it to evaporate partially (flash) in each stage which is then condensed after contacting the tubes containing the feed brine water and produces potable water.The required 90-110 • C thermal energy for the brine heater of the MSF system can be supplied through burning fossil fuels, the waste heat of refinery or power plants, solar energy, etc. [8].Due to the high share of MSF desalination among thermal desalination systems, numerous studies have been conducted on the optimization and performance improvement of MSF systems.The replacement of non-renewable with renewable energies and waste heat of energy systems is another field of study in this area which reduces the emissions, costs and increases efficiency [9,10].In addition, as known, the outlet brine of MSF systems is still warm.One method is to reuse the thermal energy of outlet brine to increase the temperature of inlet feed brine.There are some studies that worked particularly on performance of multi-stage flash with brine recycle (MSF-BR) systems.
Al-Weshahi et al. [11] analyzed a 3800 m 3 /h MSF-BR desalination system with 16 stages for heat recovery and three stages for heat rejection using IPSEpro software.Results show that the maximum and minimum exergy destructions are related to heat recovery and pump, respectively.Furthermore, they found that by increasing the number of stages to eight stages, the exergy efficiency increases by 8% while it drops by 4% when the number of stages exceeds eight stages.Ben Ali and Kairouani [12] optimized a 10-stage MSF-BR desalination system with a capacity of 26,700 m 3 /day comprised of ten 16-stage units by means of MATLAB programming.The multi-objective optimization was aimed at maximizing potable water production, minimizing the heating steam flow for minimum thermal energy consumption and minimizing the pump flow for minimum power consumption.It was concluded that with increasing the heating steam flow, the potable water production increases while it decreases with increasing the seawater temperature.Al Ghamdi and Mustafa [13] developed a MATLAB code to model the performance of an MSF desalination system located in Saudi Arabia with a water production capacity of 159 kg/s in the winter and 200 kg/s in the summer.Results obtained for exergy destruction and exergy rate show that by exergy efficiency of 74.9%, the maximum exergy destruction occurs in the heat recovery section and decreases down to 69.2% with increasing the number of stages from 25 to 31 stages.In addition, the second law of thermodynamic efficiency of the system in winter and summer was obtained at 3.22% and 2.84%, respectively.They adopted some approaches such as Once Through (MSF-OT) and Brine Mixing (MSF-M) to minimize the exergy destructions in the system.Sanaye and Asgari [14] performed multi-objective optimization over a combined cycle power plant coupled with an MSF desalination system based on 4E (energy, exergy, economic and environmental) analysis using Thermo-flow software.They considered investment, operational and NO x emissions penalty costs as well as total exergy destruction of cycle as objective functions.Additionally, the impacts of gas turbine partial load, ambient temperature and fuel cost changes on optimal values of the drum pressure of HRSG, pinch point temperature of heat recovery steam generator (HRSG), top brine temperature of MSF, last stage temperature of MSF and number of MSF stages as design parameters were investigated.Their results showed that with increasing the ambient temperature, the amount of potable water production, steam turbine power generation, exergy destruction, fuel consumption and emissions penalty costs decrease while the payback period increases due to a decrease in annual income.It was also revealed that by increasing the last stage and top brine temperature of the MSF system, the temperature difference between successive stages of heat recovery and heat rejection sections increases which leads to a decrease in the heat transfer area, exergy destruction and costs.Bandi et al. [15] modeled the once-through MSF (MSF-OT), brine-mixing MSF (MSF-M) and brine recycle MSF (MSF-BR) desalination configurations mathematically to find the optimal solutions for decision variables taking into account the production cost of potable water as an objective function.They reported significant improvements in important parameters of the MSF desalination system.
[16] presented a novel method by extracting the cooling brine and re-injecting it to stages without passing through the brine heater.This will improve the thermodynamic and economic efficiency of the MSF desalination system by reducing the heat transfer area and power consumption.The performance of the system using single-point brine extraction was better than multiple-point brine extraction and a 7.23% increase in gained output ratio (GOR), 3.47% decrease in power consumption and 3.90% decrease in total cost were achieved.Sharaf Eldean and Soliman [17] utilized the waste gas of oil refineries to run the hybrid thermal desalination processes based on three scenarios including MSF-BR+MED (multi-effect desalination), MSF-BR+MED+ORC (organic Rankine cycle) and MSF-BR+GTC (gas turbine cycle).Final results showed that by using 5 m 3 /h of waste gases, the third scenario can produce 100 m 3 /day of freshwater and 60 MW of power with zero UHC while the amount of freshwater production in the second scenario is 38,000 m 3 /day.In addition, the value of exergy efficiency for first, second and third scenario was calculated equal to 62.73%, 23% and 23%, respectively.It was also concluded that the first scenario has no cost advantage, the second scenario is good for high freshwater production and the third scenario is applicable when there are huge amounts of waste gases.Carrasquer et al. [18] estimated the unit exergy cost of MED, MSF, RO and ED (electro dialysis) desalination techniques by combining the exergy cost analysis with Transfer Function Analysis based on recovery ratio, energy requirements and salts concentrations, plant capacity and organic matter recovery.They found that the unit exergy cost of membrane-based techniques (RO and ED) varies from 2 to 7 while it ranges from 10 to 26 for thermal-based techniques (MED and MSF).The exergy efficiency of RO was obtained at 47% which is much higher than the exergy efficiency of thermal-based techniques (3-10%).There is also extensive research that exclusively worked on MSF desalination systems from different viewpoints.A summary of important studies about MSF systems is presented in Table 1.Iran is one of those countries that is experiencing a serious water crisis.Industries such as chemicals, food and metals account for a large part of water consumption.Therefore, the use of desalination plants is a good option to tackle the water shortage and supply the water demand.Furthermore, the waste heat of petroleum refineries located in coastal areas can be utilized for the thermal desalination of seawater.This study investigates the multi-stage flash brine recirculation (MSF-BR) system of the Abadan refinery which has 18 stages in the heat recovery section and four stages in the heat rejection section.
In the first stage, the current research has investigated and modeled the water softener system installed in the refinery.The system in the refinery uses natural gas to supply the energy required for the desalination system.However, according to field investigations, heat losses in the steam production sector are significant.Therefore, in this research, the feasibility of using existing steam waste with the aim of supplying the energy needed for the desalination system is proposed.The potential of employing waste heat of a refinery complex as the heating steam of a desalination unit is studied based on energy, exergy and exergoeconomic analysis.The main goal of choosing energy, exergy and exergy analysis is to achieve a logical optimization by considering important aspects.Exergoeconomics is the branch of thermodynamics that combines exergy and economic analysis to provide the system designer with information not available through conventional energy analysis and economic evaluations.The results are firstly validated using the existing data of the Abadan refinery and then, the effects of some operational parameters on the performance of the system are examined.Finally, the annual amounts of cost savings due to energy consumption reduction and emissions reduction are calculated.

System Description
The multi-stage flash brine recirculation (MSF-BR) system investigated in this study is located in the Abadan refinery complex which is used to desalinate water from the Arvand River for drinking and steam boilers.Currently, the required heating steam for Water 2022, 14, 3108 5 of 18 the brine heater of the desalination system is supplied by existing steam boilers of the refinery complex.Figure 2 shows a schematic view of the MSF-BR desalination system.It is composed of 18 stages in the heat recovery section and four stages in the heat rejection section.The seawater (brine) enters the last stage of the rejection section through tubes (point E), is pre-heated and flows towards the recovery section.At this point (point F), some part of the seawater is returned to the sea and the rest of it is mixed with recycled brine (point C) and enters the recovery section and goes to the first stage.Then, it is pre-heated again in each stage using latent heat of the distillate vapor and moves to the brine heater and is heated by heating steam to reach a higher temperature and pressure than in the first stage.Now, it flows back at a temperature of 115 • C under saturated conditions to the first stage which is a vacuum (point A).This causes a fraction of inlet brine to evaporate partially (flash) which is then condensed through heat transfer with tubes of feed brine and is drained.The rest of the inlet brine flows to the next stage and this process continues until the last stage and the condensed water is collected as a distillate water product (point B).Some of the remaining concentrated brine is discharged (point D) and the rest is recycled at a temperature of 42 • C. The existing desalination plant of the Abadan refinery complex is shown in Figure 3. formance of the system are examined.Finally, the annual amounts of cost savings due to energy consumption reduction and emissions reduction are calculated.

System Description
The multi-stage flash brine recirculation (MSF-BR) system investigated in this study is located in the Abadan refinery complex which is used to desalinate water from the Arvand River for drinking and steam boilers.Currently, the required heating steam for the brine heater of the desalination system is supplied by existing steam boilers of the refinery complex.Figure 2 shows a schematic view of the MSF-BR desalination system.It is composed of 18 stages in the heat recovery section and four stages in the heat rejection section.The seawater (brine) enters the last stage of the rejection section through tubes (point E), is pre-heated and flows towards the recovery section.At this point (point F), some part of the seawater is returned to the sea and the rest of it is mixed with recycled brine (point C) and enters the recovery section and goes to the first stage.Then, it is pre-heated again in each stage using latent heat of the distillate vapor and moves to the brine heater and is heated by heating steam to reach a higher temperature and pressure than in the first stage.Now, it flows back at a temperature of 115 °C under saturated conditions to the first stage which is a vacuum (point A).This causes a fraction of inlet brine to evaporate partially (flash) which is then condensed through heat transfer with tubes of feed brine and is drained.The rest of the inlet brine flows to the next stage and this process continues until the last stage and the condensed water is collected as a distillate water product (point B).Some of the remaining concentrated brine is discharged (point D) and the rest is recycled at a temperature of 42 °C.The existing desalination plant of the Abadan refinery complex is shown in Figure 3.

Modeling
The modeling of the MSF-BR desalination system of the Abadan refinery is conducted based on energy, exergy and exergoeconomic analysis.Then, the effects of top brine temperature (TBT), number of stages and ambient temperature on energy efficiency Water 2022, 14, 3108 6 of 18

Modeling
The modeling of the MSF-BR desalination system of the Abadan refinery is conducted based on energy, exergy and exergoeconomic analysis.Then, the effects of top brine temperature (TBT), number of stages and ambient temperature on energy efficiency and exergy efficiency of the desalination system are investigated.Table 2 summarizes the basic information used to model the desalination system based on the following assumptions:

•
The latent heat of evaporation and condensation is assumed constant.

•
The distillate water is salt-free.

•
The variations in boiling temperature of brine at the recovery section outlet are small.

•
Pressure and temperature are assumed to be constant in each stage.

•
The heat capacity of brine is considered equal to that of distillate water at the same temperature.

•
The heat transfer to surroundings is neglected.

•
The pressure drop is negligible.

System Parameter Value
Pump isentropic efficiency η p (%) 70 Brine heater efficiency η HEX (%) 90 Temperature of vapor in the first stage Pressure of vapor in the first stage (kPa) 200 Feed water salinity (ppm) 8935 Freshwater salinity (ppm) 0 Ambient pressure P o (bar) 1.01 Ambient temperature ( • C) 25

Energy Analysis
Taking into account the assumptions and conditions presented in the previous section, the energy analysis is conducted on the desalination system based on the energy conservation equation.Moreover, mass conservation is also applied to the concentration of water, steam and salt.The mass and energy conservation equations are generally written as: .
W cv and X are mass flow rate, specific enthalpy, heat transfer rate, work rate and concentration, respectively.
The inlet brine enters the first stage in a saturated condition after receiving the inlet energy from the system.The amount of energy received by inlet brine from heating steam in the brine heater is calculated using Equation (4): Due to existence of impurities in brine water, Equation ( 5) is used to find the temperature for the range of 10 < T < 180 • C and 1 < TDS < 160,000 ppm [28].
Water 2022, 14, 3108 where BPE is an increase in the boiling point of inlet brine and is calculated using Equations ( 6)- (9).
In each stage, the distillate vapor is condensed through heat transfer with a tube of inlet brine.The required heat transfer area is computed by Equation (10).
In the above equation, U i is the overall heat transfer coefficient for each stage and is calculated using the following equation [9]: As described, part of the brine is desalinated and the remaining brine flows to the next stage with a temperature drop.Equation ( 12) is used to obtain the amount of temperature difference between successive stages where the temperature of the last stage is achieved from Equation ( 13).
T st.m = T Ambient + 10 ( 12) The gained output ratio (GOR) which is used to describe the performance of a thermal desalination system is defined as the ratio of distillate water to inlet heating steam [29]: where m d i is the total amount of distillate water produced by the desalination system and m s is the amount of inlet heating steam to the brine heater.

Exergy Analysis
In addition to energy analysis, the maximum useful work performed during the desalination processes is obtained using exergy analysis based on the second law of thermodynamics.The inlet exergy to desalination system and exergy destruction of the first stage is calculated using Equations ( 15) and ( 16), respectively [30].
Ex destruction = m s (( Finally, the exergy efficiency is the ratio of outlet exergy to inlet exergy as following equation [31]: The mass, energy and exergy balance equations used for each component of the desalination system are listed in Table 3.

Pump
Mass balance Energy balance . m in = .m out W pump = m ww ν ww

Exeregoeconomic Analysis
Exergoeconomics which combines the exergy analysis, economic and environmental analysis, evaluates the system based on thermodynamic performance, economic principles and environmental considerations.Exergoeconomic analysis provides information about the costs associated with system components, exergy destruction and thermodynamic inefficiencies.In this analysis, the system is exergoeconomically examined by using the cost balance equation (Equation ( 18)).In this equation, the inlet exergy cost rate plus the total cost rate of each stage is equal to the outlet exergy cost rate [4]  C out,Sea water (18) where .
Z tot,k is calculated using Equation (19) and is the total cost rate representing the entire cost related to capital investment, operating and maintenance cost of the component.20) and ( 22), respectively.
Additionally, the capital investment cost rate is computed using equations listed in Table 4 and Equation (20).In Equation ( 20), τ is the annual operating hours of the system which is assumed equal to 7500 h.Moreover, CRF is a capital recovery factor and is calculated using the following equation: where i is the interest rate which is considered 0.1 and n is the component life cycle which is assumed to be 20 years. .
The exergetic cost rate of inlet and outlet flow for each component are calculated using cost per exergy unit and exergy rate as following equations, respectively [33]. .
Ex out (24) Equations ( 25)-( 29) are used to find the cost per unit exergy of fuel, cost per unit exergy of product, cost rate of exergy destruction, exergoeconomic factor and relative cost difference which are the other exergoeconomic parameters in this study.Furthermore, the exergoeconomic balance equations for different components of the desalination system are summarized in Table 5. .
Table 5. Exergoeconomic balance equations for desalination system components.

Validation
The results obtained in the current study for GOR, inlet mass flow rate of heating steam and mass flow rate of distillate water are compared with the existing data of the Abadan refinery desalination system for validation.As presented in Table 6, there is a good agreement between modeling results and real data.

Results and Discussion
In this section, the results of energy, exergy and exergoeconomic analysis on the multistage flash brine recirculation (MSF-BR) system of the Abadan refinery are presented.In addition, the effects of some operational parameters on the performance of the system are investigated.Figure 4 shows the variations in pressure and temperature in each stage of the desalination system.As discussed, when the inlet brine enters the stage it is flashed into vapor due to pressure difference.Then, the distillate vapor is condensed through heat transfer with feed brine which causes the feed brine to be pre-heated.The remaining brine flows to the next stage which has lower pressure and the process repeats.Therefore, as is seen in Figure 4, the temperature and pressure of each stage are lower than those of the previous stage.The variations of total dissolved solids (TDS) and inlet energy in each stage of the desalination system are depicted in Figure 5. Since the pressure and temperature of inlet brine in each stage decrease, the inlet energy decreases from 194,505 kW in the first stage to 59,384 kW in the last stage.Furthermore, due to partial evaporation of inlet brine in each stage, the concentration of outlet brine increases from 31,448 ppm in the first stage to 47,353 ppm in the last stage.
The variations of total dissolved solids (TDS) and inlet energy in each stage of the desalination system are depicted in Figure 5. Since the pressure and temperature of inlet brine in each stage decrease, the inlet energy decreases from 194,505 kW in the first stage to 59,384 kW in the last stage.Furthermore, due to partial evaporation of inlet brine in each stage, the concentration of outlet brine increases from 31,448 ppm in the first stage to 47,353 ppm in the last stage.Figure 6 demonstrates the effect of ambient temperature on produced distillate water in a desalination system with a different number of stages.With increasing the ambient temperature, the temperature of feed brine (seawater) also increases.Therefore, given a fixed heat transfer rate in the brine heater, the inlet brine enters the stages with higher temperature and energy which leads to higher evaporation and distillate water production.In addition, the amount of distillate water production increases by increasing the number of stages from 16 to 20 stages.
Water 2022, 14, x FOR PEER REVIEW 13 of 20 Figure 6 demonstrates the effect of ambient temperature on produced distillate water in a desalination system with a different number of stages.With increasing the ambient temperature, the temperature of feed brine (seawater) also increases.Therefore, given a fixed heat transfer rate in the brine heater, the inlet brine enters the stages with higher temperature and energy which leads to higher evaporation and distillate water production.In addition, the amount of distillate water production increases by increasing the number of stages from 16 to 20 stages.

Effect of TBT
The effect of top brine temperature (TBT) on produced distillate water and heat trans-

Effect of TBT
The effect of top brine temperature (TBT) on produced distillate water and heat transfer area of the desalination system is shown in Figure 7.As it is clear, the increase in top brine temperature leads to higher inlet energy to stages and as a result, higher distillate water is produced.It is found that with increasing the TBT from 100 • C to 140 • C, distillate water production increases from 33.52 kg/s to 63.1 kg/s.Moreover, due to higher evaporation in each stage, a higher heat transfer area is needed.Results show that when TBT increases from 100 • C to 140 • C, the heat transfer area increases by 242 m 2 .The effect of top brine temperature (TBT) on gained output ratio (GOR) and exergy efficiency of the desalination system is shown in Figure 8. Assuming constant heating steam flow, with increasing the top brine temperature, the amount of distillate water increases which leads to an increase in GOR.It is seen that when TBT increases from 100 • C to 140 • C, GOR increases from 3.25 to 6.12.Furthermore, the exergy efficiency also increases from 47% to 63%.

Effect of Number of Stages
Figure 9A,B illustrate the effect of the number of stages on produced distillate water and heat transfer area of the heat recovery section and heat rejection section in the desalination system, respectively.With increasing the number of stages, a higher amount of inlet brine is evaporated, and therefore, higher distillate water is produced.In addition, due to higher heat transfer and the number of stages, a higher heat transfer area is required.As shown in Figure 9A,B, the increase in distillate water production and heat transfer area of the heat recovery section is higher than the water production and heat transfer area of the heat rejection section.
efficiency of the desalination system is shown in Figure 8. Assuming constant heating steam flow, with increasing the top brine temperature, the amount of distillate water in creases which leads to an increase in GOR.It is seen that when TBT increases from 100 °C to 140 °C, GOR increases from 3.25 to 6.12.Furthermore, the exergy efficiency also in creases from 47% to 63%.The number of stages on gained output ratio (GOR) and exergy efficiency of the heat recovery section and heat rejection section are displayed in Figure 10A,B, respectively.As mentioned, the amount of distillate water production increases with increasing the number of stages which leads to an increase in GOR for a given heating steam flow.Moreover, with increasing the number of stages, the exergy efficiency of the heat recovery section continuously decreases while the exergy efficiency of the heat rejection section increases up to a maximum point at stage six, and then it decreases.The reason is that, due to a decrease in temperature in the last stages, the quality of distillate vapor decreases which results in a reduction of exergy efficiency.Hence, six stages are an optimal number of stages in the heat rejection section.

Exergoeconomic Analysis Results
The exergoeconomic analysis is performed on the MSF-BR desalination system of the Abadan refinery complex with 18 stages in the heat recovery section and four stages in the heat rejection system.The results obtained for exergoeconomic and cost parameters are presented in Table 7 for each stage of the studied desalination system.It is concluded that the total cost rate .Z tot increases from the first stage to the last stage due to an increase in heat transfer area and maintenance costs.In addition, an increase in stage number leads to an increase in the heat transfer rate of the brine heater which increases in fuel cost rate ( .C f ).Moreover, the distillate water production increases which increases the product cost rate ( .C p ).This is while increasing the stage number, the exergy destruction cost rate firstly increases and then it decreases.
nation system, respectively.With increasing the number of stages, a higher amount of inlet brine is evaporated, and therefore, higher distillate water is produced.In addition, due to higher heat transfer and the number of stages, a higher heat transfer area is required.As shown in Figure 9A,B, the increase in distillate water production and heat transfer area of the heat recovery section is higher than the water production and heat transfer area of the heat rejection section.The number of stages on gained output ratio (GOR) and exergy efficiency of the heat recovery section and heat rejection section are displayed in Figure 10A,B, respectively.As with increasing the number of stages, the exergy efficiency of the heat recovery section continuously decreases while the exergy efficiency of the heat rejection section increases up to a maximum point at stage six, and then it decreases.The reason is that, due to a decrease in temperature in the last stages, the quality of distillate vapor decreases which results in a reduction of exergy efficiency.Hence, six stages are an optimal number of stages in the heat rejection section.As it was shown in Figure 10, with increasing the stages, the exergy efficiency increases at first and then decreases.It means that the exergy destruction firstly decreases and then increases.
The parameter of relative cost difference (r), which denotes the difference between product cost and fuel cost in a stage, increases with increasing the stage number.The exergoeconomic factor which is defined as the ratio of stage total cost rate to the sum of stage total cost rate and exergy destruction cost rate indicates the effect of the hidden cost compared with the total cost.Since the exergy destruction cost rate firstly increases and then decreases, therefore, the exergoeconomic factor decreases at first and then increases.Today, due to greenhouse emissions and associated costs, the efficiency improvement of energy systems that consume fossil fuels becomes a major concern.As described earlier, most thermal desalination systems use fossil fuels to desalinate seawater.The waste heat of refinery complexes can be a good source to supply the heating steam of thermal desalination systems.Table 8 presents the energy cost and emission penalty cost of the Abadan refinery complex.It is found that if the steam boiler of the MSF-BR desalination system is replaced by the waste heat of the refinery complex as heating steam, a significant amount of cost savings can be annually obtained.

Conclusions
In this study, the performance of a multi-stage flash brine recirculation (MSF-BR) system powered by the waste heat of the Abadan refinery complex as the heating steam is investigated based on energy, exergy and exergoeconomic analysis.Furthermore, the effects of top brine temperature (TBT), number of stages and ambient temperature on the performance of the desalination system was studied.The main conclusions are as follows: • With increasing the top brine temperature, the exergy efficiency, gained output ratio (GOR) and distillate water production increase by 34%, 47% and 47% respectively.

•
With increasing the number of stages in the heat recovery section, GOR and distillate water production increase while the exergy efficiency decreases.

•
With increasing the number of stages in the heat rejection section, distillate water production increases while GOR firstly increases and then decreases.Thus, the optimal number of stages in the heat rejection section is six stages.

•
The relative cost difference increases by 94% with increasing the stage number.

•
With increasing the stage number, the exergoeconomic factor firstly decreases and then increases.

•
By utilizing the waste heat of the refinery complex as heating steam, 9103 $/year energy cost savings and 193 × 10 4 $/year emission penalty cost savings are obtained.

Figure 2 .
Figure 2. Schematic view of a MSF-BR unit.Figure 2. Schematic view of a MSF-BR unit.

Figure 2 . 20 Figure 3 .
Figure 2. Schematic view of a MSF-BR unit.Figure 2. Schematic view of a MSF-BR unit.Water 2022, 14, x FOR PEER REVIEW 6 of 20

Figure 3 .
Figure 3. MSF-BR desalination system of the Abadan refinery complex.
each component are obtained according to Equations ( b = c out,b c in,cw = c out,cw Water 2022, 14, x FOR PEER REVIEW 12 of 20

Figure 4 .
Figure 4. Variations of temperature and pressure in each stage.

Figure 4 .
Figure 4. Variations of temperature and pressure in each stage.

Figure 5 .
Figure 5. Variations of TDS and inlet energy in each stage.

Figure 5 .
Figure 5. Variations of TDS and inlet energy in each stage.

Figure 6 .
Figure 6.Variations of distillate water in terms of ambient temperature for the different number of stages.

Figure 6 .
Figure 6.Variations of distillate water in terms of ambient temperature for the different number of stages.

Figure 7 .
Figure 7. Variations of distillate water and heat transfer area in terms of top brine temperature.

Figure 8 .
Figure 8. Variations of GOR and exergy efficiency in terms of top brine temperature.

Figure 8 .
Figure 8. Variations of GOR and exergy efficiency in terms of top brine temperature.

Figure 9 .
Figure 9. Variations of production water and heat transfer area in terms of the number of stages for (A) heat recovery section and (B) heat rejection section.

Figure 9 .
Figure 9. Variations of production water and heat transfer area in terms of the number of stages for (A) heat recovery section and (B) heat rejection section.

Figure 10 .
Figure 10.Variations of GOR and exergy efficiency in terms of the number of stages.(A) Heat recovery section and (B) heat rejection section.

Figure 10 .
Figure 10.Variations of GOR and exergy efficiency in terms of the number of stages.(A) Heat recovery section and (B) heat rejection section.

Table 1 .
Summary of studies conducted on MSF systems.
The performance ratio increases by 41.5% with increasing the top brine temperature to 161 • C. Hasan Baig et al. [25] MSF Energy balance 378.8 kg/s High temperature difference in the first stages and decreasing it in the last stages leads to a 3.13% decrease in condenser area and a 2.1% increase in performance ratio.

Table 3 .
Mass, energy and exergy balance equations for desalination system components.

Table 4 .
Capital investment cost (Z k ) for desalination system components.

Table 6 .
Comparison of modeling results and real data.

Table 7 .
Exergoeconomic and cost parameters for each stage of the MSF-BR desalination system.

Table 8 .
Energy consumption, emission production and associated costs in the Abadan refinery complex.