Chemical and Energy Recovery Alternatives in SWRO Desalination through Electro-Membrane Technologies

: Electro-membrane technologies are versatile processes that could contribute towards more sustainable seawater reverse osmosis (SWRO) desalination in both freshwater production and brine management, facilitating the recovery of materials and energy and driving the introduction of the circular economy paradigm in the desalination industry. Besides the potential possibilities, the implementation of electro-membrane technologies remains a challenge. The aim of this work is to present and evaluate different alternatives for harvesting renewable energy and the recovery of chemicals on an SWRO facility by means of electro-membrane technology. Acid and base self-supply by means of electrodialysis with bipolar membranes is considered, together with salinity gradient energy harvesting by means of reverse electrodialysis and pH gradient energy by means of reverse electrodialysis with bipolar membranes. The potential beneﬁts of the proposed alternatives rely on environmental impact reduction is three-fold: (a) water bodies protection, as direct brine discharge is avoided, (b) improvements in the climate change indicator, as the recovery of renewable energy reduces the indirect emissions related to energy production, and (c) reduction of raw material consumption, as the main chemicals used in the facility are produced in-situ. Moreover, further development towards an increase in their technology readiness level (TRL) and cost reduction are the main challenges to face.


Introduction
Membrane processes have undergone great development and implementation in the last decades. Within these technologies, pressure-driven processes, such as Microfiltration (MF), Nanofiltration (NF), or Reverse Osmosis (RO), have reached a high Technology Readiness Level (TRL) in different industrial applications. On the other hand, electricallydriven processes, which are those that operate under an electrical gradient and use ionexchange membranes (IEMs) allowing the selective flow of ions of two confronted solutions with different concentrations, present a lower implementation in real processes requiring a higher degree of research and technical development to overcome the current challenges minding their potential integration in a number of industrial applications.
Specifically, the development of RO has allowed great advances in the water desalination industry, being the most widespread technology to date. In particular, the seawater reverse osmosis (SWRO) represents 34% of the total desalination capacity (32.4 million m 3 ·day −1 ) [1]. However, research development of electro-membrane processes has established the production of freshwater through electrodialysis (ED) as a competitive process compared to RO when the feed used is brackish water (BW, 3000-20,000 mg·L −1 TDS) [2].
Nevertheless, together with the production of freshwater, SWRO plants generate around 45 million m 3 ·day −1 of brines [1], estimating that this volume could be increased in the near future. SWRO brines have approximately twice the concentration of Total Dissolved Solids (TDS) found in seawater and may additionally contain small amounts of chemicals used in the pre-treatment and cleaning stages of the desalination plant [3,4]. As an example, Table 1 lists the main components present in SWRO brines reported in the literature. Currently, under the framework of a linear economy conception, discharge of such brines into water receiving bodies is the common management option. The need for an improvement of desalination sustainability, together with the establishment of the Circular Economy concept, has increased the interest in developing technologies capable of recovering diverse materials and/or energy from brines. Moreover, electro-membrane processes such as electrodialysis with bipolar membranes (EDBM), reverse electrodialysis (RED), or reverse electrodialysis with bipolar membranes (R-EDBM) can be applied in desalination brine (hypersaline residual substreams) management, allowing the recovery of both materials and energy. Thus, electro-membrane technologies are versatile processes that could contribute towards more sustainable desalination in both freshwater production and brine management.
Additionally, desalination is a clear example of energy-intensive technology, with a wide range of variability in energy consumption, between 4 kWh·m −3 and 27 kWh·m −3 of freshwater [10], depending on the technology employed. Desalination technologies are commonly divided into two main groups: (i) thermal, where the energy is employed as heat to evaporate water, and (ii) membrane, where the energy is employed for the generation of pressure or electric gradients. Thermal desalination technologies are characterized by having higher specific energy consumptions; for instance, multi-stage flash distillation (MSF) requires 20-27 kWh·m −3 , compared to 4-6 kWh·m −3 for SWRO [10].
Therefore, an increment of renewable energies (RE) use is crucial for the achievement of the Agenda 2030 of the United Nations [11] and the Green Deal of the European Commission [12], in which one of the main objectives is to stop climate change (CO 2 and other Greenhouse Gases reduction) in addition to ensure access to affordable, reliable, sustainable and modern energy for all.
Several RE have been evaluated in order to consider the potential integration to reverse osmosis (RO) desalination, solar PV energy (PV-RO), and solar hybrid systems point out [13,14]. Nevertheless, RE desalination must deal with the intermittent and stochastic nature of these energy sources, and this is not a trivial matter as RO is characterized by slow dynamics that rarely adapt to the power fluctuations of RE [15].
Despite the potential environmental benefits of RE, efforts have been made to adapt the different processes to the intermittent or variable nature of RE, such as solar photovoltaic (PV) energy or wind energy. For this, one of the most widespread options is the use of batteries that allow the accumulation of energy surplus to be used when energy input is insufficient. In this sense, electrochemical batteries such as lead-acid, li-ion, and vanadium-redox are currently employed at an industrial scale; nevertheless, these batteries present environmental issues regarding chemical disposal [16,17]. Therefore, new alternatives that allow energy storage under favorable environmental conditions, such as the couple EDBM and R-EDBM, should be evaluated.
In this sense, the salinity gradient energy (SGE) embodied in brines can cope with the RE limitations in a threefold way: (i) it can provide a stable and safe energy supply, (ii) it can be used as energy storage, and (iii) it contributes to the improvement of the environmental performance of desalination associated to brine management and disposal. The integration of electro-membrane technologies in desalination facilities allows in-situ productions together with self-supply, thus contributing to the improvements of processes from a Circular Economy approach.
Therefore, the aim of the present work is to present the current status and challenges of electro-membrane processes: ED, RED, EDBM, and R-EDBM and evaluate different approaches for their integration in SWRO brines valorization processes aiming at (i) harvesting RE and (ii), generating self-supply commodities like acids and bases to be used in desalination pre, post-treatment and cleaning stages.

Electro-Membrane Technologies: Current Status and Challenges
In this section, the previously mentioned electro-membrane technologies will be presented, and their main characteristics will be illustrated in Figure 1 and Table 2, respectively.
As previously mentioned, electro-membrane processes are electrically-driven processes that require IEMs in order to achieve a selective transport of ions between two confronted solutions. Thus, IEMs are semi-permeable membranes that allow the flow of certain ions while blocking others. Cationic membranes (CM) are negatively charged IEMs; therefore, cations are able to flow across them while blocking anions. Otherwise, anionic membranes (AM) are positively charged IEMs that allow anion flow, whereas cations are blocked. Additionally, bipolar membranes, constituted by a cation and an anion exchange layer, generate the dissociation of water when an energy field is applied.
Moreover, an electro-membrane stack also requires electrodes which are solid electric conductors that are in charge of carrying the electrical current to the solutions involved in the process. Reduction and oxidation reactions take place at the cathode and anode electrodes, respectively. Whether an electrode operates as a cathode or anode depends on the operation mode of the cell, galvanically (i.e., producing energy) or as an electrolytic cell (i.e., consuming energy), switching from cathode to anode and vice versa if the operation mode is changed.
As shown in Figure 1a, in ED, when an electric potential is applied to a saline solution, a selective transport of ions through AM and CM occurs, producing a low salinity solution, or dilute, and a high salinity solution, or concentrate. ED development on an industrial scale started more than 50 years ago. The increase in ED implementation is closely related to the advance in IEM properties, as deeply detailed in several studies [18]. In this way, taking advantage of the reduction in chemical reagents required compared to other processes, a number of works have attempted to optimize ED performance for various applications in the chemical, food, and drug industry as well as wastewater treatment or other environmental applications [19][20][21]. When ED is used in the desalination industry for freshwater production, it generates both freshwater (dilute) and brines (concentrate). The ED technology adapts to power fluctuations better than RO; thus, the integration of ED with RE has shown a better performance [15,22], being a promising alternative if it is integrated with solar PV energy (ED-PV) [13]. Several ED-PV pilot-scale plants have been built [23]. The main current drawbacks and challenges for ED development are related to the intensive use of energy required, the development of antifouling and anti-scaling strategies, and the high costs of IEM [13,23,24].
As its name suggests, RED is the opposite process of electrodialysis (ED). So, in RED (Figure 1b), when a low salinity solution, such as river water or wastewater, and a high salinity solution, such as brine, are faced, the difference in concentrations generates ion flux between the different compartments, which generates an electric current between the anode and the cathode [25]. The magnitude of the electric current obtained is dependent on the difference of the concentrations of the input streams and the number of cell pairs (repetitive units) in the stack, among other parameters. Thus, SGE can be harvested by means of RED obtaining a continuous source RE which has great advantages compared to traditional REs that are characterized by their intermittence. Moreover, RED presents insignificant Greenhouse Gases emissions compared to other well-established RE sources such as solar PV, wind, or hydropower [26]. Even though there is financial support for big projects such as the pilot plant in Afsluitdijk site (Netherlands) [26,27], RED presents many limitations that need to be overcome in order to be marketable. Among these limitations, membrane electrical properties and stability improvements, together with a cost reduction to be economically competitive, stand out. EDBM ( Figure 1c) is a technology able to generate acids and bases from feed saline streams by the application of electric potential and the configuration of bipolar membranes (BM) besides the AM and CM in the cell stack. The key element of EDBM is the bipolar membrane, which role is the dissociation of water when an energy field is applied. In this sense, protons (H + ) and hydroxyl ions (OH − ) are generated and migrate to the acid and base compartment, respectively. EDBM applications for product purification and waste valorization have been reported in the literature under different frameworks such as the food industry (casein, protein isolates) [28]; however, its application in desalination brine management for the production of HCl and NaOH stands out [29,30]. Nevertheless, further development of bipolar membranes towards improvements on the longevity (pH stability) and the unwanted co-ion leakages should be carried out in addition to a reduction of their synthesis cost in order to be competitive with the current technologies [31].
As with RED and ED, R-EDBM (Figure 1d) is the opposite technology to EDBM, so that, with a membrane stack configuration such as that used in EDBM, acidic and alkaline solutions are selectively transported, mixed, and neutralized, enabling the generation of electric energy. Energy could be recovered from brines by means of both RED and R-EDBM. Nevertheless, while RED is a well-developed to date technology, R-EDBM is still in the early development stages with few research publications, although its potential has been known for a long time. The couple EDBM and R-EDBM is presented as a sustainable energy storage system for RE surplus [32] configuring the so-called Acid-Base Flow Batteries. Thus, the acidic and alkaline solutions produced by EDBM will act as a charge for the battery that could be discharged in the neutralization by R-EDBM. As seen in Table 2, R-EDBM presents one order of magnitude higher power densities compared to RED; however, it is still at low TRL due to the limitations regarding the use of the bipolar membranes.
More details regarding these technologies' application into the desalination industry are given in the next sections of this work.
TRL is a method that describes the maturity of technology by using a nine-level scale from level 1-basic principles observed to level 9-actual system proven in an operational environment. Indeed, research and development under a certain technology favor moving up in the TRL scale. As seen in Table 2, the described electro-membrane technologies are at medium to high TRL. Both EDBM and R-EDBM are at lower TRL compared to ED and RED; however, research efforts carried out in the technologies and in their components such as BM will enable to achieve higher TRLs.  [32,34] Hence, desalination is a challenging industry for the integration of the EDBM and R-EDBM couple system with two approaches: (a) chemical recovery with the aim of achieving self-supply and (b) energy harvesting. Additionally, it could notably reduce the indirect emissions of CO 2 and other Greenhouse Gases related to energy consumption by its integration with RE. In particular, Morales-Mora et al. [35] reports that the combination of solar PV energy and bipolar electrodialysis flow battery demonstrated the best environmental performance.

Alternatives for Electro-Membrane Technologies Integration for Brine Management in SWRO Facilities
In this section, the different alternatives for electro-membrane technologies integration for brine management in SWRO facilities will be presented and discussed.
For the purpose of this study, all the steps in the SWRO desalination plant (pretreatments, RO, and post-treatments) are included in a black box in the evaluation of the different alternatives represented in figures. Besides other chemicals are required in such processes, only the acid, in terms of HCl and base, in terms of NaOH, and the need for energy in the process (3.5-4.5 kWh·m −3 [36]) will be considered as inputs.
The integration will start from the management of SWRO brines (brines from other desalination technology could be considered), and three electro-membrane technologies may be considered: RED, EDBM, and R-EDBM. Table 3 summarizes the electro-membrane technologies involved in the different alternatives. Table 3. Electro-membrane technologies employed for each alternative.
As will be presented below, desalination brines could be employed as feed to both EDBM and RED. In the case of using EDBM, HCl and NaOH required in pre-treatment stages, cleaning, and maintenance of SWRO facilities would be produced. Also, in the case of producing a surplus of acids and bases, R-EDBM technology can be used for pH gradient energy harvesting. On the other hand, if brines are diverted to the RED, salinity gradient energy would be recovered. Thus, three loops (chemicals, pH gradient energy, and salinity gradient energy) would be created, which would contribute to the improvement of the sustainability of desalination from the point of view of Circular Economy principles and contributing to the development of Zero Liquid Discharge (ZLD) systems.
Nevertheless, between the extreme scenarios of not carrying out any brine management (alternative A0 from Table 3) and using the three previously mentioned electromembrane technologies (alternative A5 from Table 3), intermediate scenarios could be considered. Next, the alternatives will be presented.

Alternative A0-Direct Brine Disposal
This alternative, A0, depicted in Figure 2, is the baseline scenario considered, and it represents the current "business as usual" in regard to SWRO brine management and relies on the direct discharge of brine to the receiving water bodies as other proposed alternatives are far from being technically, socially, economically, or environmentally feasible [37]. Likewise, it was considered that the receiving media was capable of the assimilation and correction of the high concentrations of brines; thus, no environmental impact was associated with this direct disposal. Since marine organisms live in an osmotic balance with their environment, flora and fauna in the surroundings of brine discharges may be affected due to alterations in the physicochemical characteristics of the media, mainly salinity and temperature [38]. In this sense, the perspective on brines has undergone an evolution as the desalination capacity and the associated brine disposal increased [39][40][41][42].
Firstly, remarkable research efforts have been made to document and quantify the environmental impacts of brine disposal on the receiving marine media [43][44][45][46][47][48][49][50][51][52]. These studies concluded that typical discharge concentrations are higher than the desired disposal concentrations [53]. Although there are few legislations regarding brine disposal, several authors have been working on the development of systems for brine management. The initial strategies carried out to reduce the environmental impacts associated with brine disposal were the development of more efficient discharge systems at the time of facilitating the dilution of the brine itself in the receiving media, such as the mixing with other effluents (for example, cooling water from power plants or wastewater) and the use of systems that modify the discharge, such as diffusers or jets [37,54]. Next, the strategies were focused on minimizing the discharge volumes, many of them based on the evaporation of water, which requires large areas [4]. More recently, efforts in the development of Zero Liquid Discharge (ZLD) systems which combine different techniques in order to manage, reduce, and even make brines profitable and able to reintroduce them into the supply chain, have been made. Several technologies have been reported for brine management; however, emerging technologies which additionally are able to generate valuable products have been highlighted in the literature [55]. Thus brines, considered as waste until now, become a raw material, in accordance with the Circular Economy principles [56]. As an example, SAL-PROC [57] processes are able to sequentially extract different salts such as yeso gypsum, sodium chloride, magnesium hydroxide, calcium chloride, calcium carbonate, and sodium sulfate from brines. Emphasis has been placed on emerging technologies such as vacuum membrane distillation, membrane distillation coupled with crystallization, direct osmosis, and electrodialysis for the recovery of existing salts [58]. In addition, desalination brines have been identified as a potential source for the extraction of metals [9,59], many of them considered to be critical raw materials. European projects such as Sea4value [60] or SEArcularMine [61] aim to recover the material from saline waste streams. Therefore, the following alternatives will propose the management and use of brines in such a way as to avoid the environmental burdens associated with their direct discharge (alternative A0 from Table 1) and, in turn, the harvesting of high value-added products which can be used in situ in the desalination facility.

Alternative A1-Chemicals towards Self-Supply
In alternative A1 (Figure 3), the target is the chemical self-supply of the SWRO facility in order to take advantage of the high concentrations in brines and the ability of bipolar membranes to generate acids and bases. EDBM technology is able to produce HCl and NaOH from brines. Both chemicals are consumed in highly variable amounts. For example, an SWRO plant located in the Mediterranean area requires 0.2-0.5 g·m −3 of freshwater of HCl and 30-60 g·m −3 of freshwater of NaOH [33]. Although H 2 SO 4 is commonly used in desalination plants due to its low price, it has certain disadvantages, such as the high scaling potential of sulfate [62,63], so replacing it with HCl is an interesting alternative, even more so if an in-situ production is considered. Thus, electro-membrane technologies could contribute to the self-supply of chemicals and energy in a desalination facility. Thus, a fraction of the total volume of brine is used as input to the EDBM process in order to produce HCl and NaOH. The presence of divalent ions in brines and, thus, in the acids and bases generated from them will be scarce since divalent ions are removed in pre-treatment stages previous to the RO process. Regardless of the operating mode, as the volume of brines required for self-supply is low and the remaining volume of brine is directly disposed of, as in alternative A0, the benefits obtained from this alternative are those associated with the in-situ production of the chemicals: (i) savings related to the external purchase, and (ii) avoiding the burdens associated to the transport of external purchased chemicals. Thus, alternative A1 requires the integration of other technologies for brine management and is not enough to improve the environmental performance of SWRO brine direct disposal. In the authors' previous works, the technical feasibility of both the semi-continuous production of 1.0 M HCl and 1.5 M NaOH from simulated SWRO brines (1.0 M NaCl) and the reduction of brine concentration to 0.5 M NaCl (similar to seawater) by means of EDBM, powered by both grid mix and solar PV energy, was proven [64]. Also, a reduction of the specific energy consumption (SEC) to 4.4 kWh·kg −1 of HCl was achieved thanks to the use of two control loops: (i) control loop for the pH in the acid tank (the pumps are activated when the pH is under 1), and (ii) control loop for the conductivity of the brine (the pump is activated when the conductivity is under 50 mS·cm −1 ). Moreover, the environmental feasibility assessment of the SWRO and EDBM integrated process reported that the use of solar PV energy could notably reduce the environmental burdens of the overall process [65,66]. Furthermore, the opportunity of chemicals (HCl and NaOH) selfsupply is presented, estimating that less than 2% of the brine will be required as input to the EDBM. Nevertheless, additional efforts should be carried out if higher concentrations of HCl and NaOH are required in order to reduce pumping and dosage costs. With this idea in mind, experimental work in semi-batch mode was carried out, achieving concentrations of HCl and NaOH up to 3.3 M and 3.6 M, respectively, both higher than has been reported in the literature so far [33]. Although these concentrations support the chemical selfsupply, the semi-batch operation mode presents some drawbacks such as high SEC (up to 43.5 kWh·kg −1 of HCl), long operation times (40 h), and no reduction of brine concentration. Thus, the integration of RE, such as solar PV energy, into a brine management EDBM system contributes to the strengthening of Circular Economy principles in desalination.
Since EDBM is a process with high energy consumption, the use of RE would significantly contribute to improving the sustainability of the process. Both the technical and environmental feasibility of an integrated EDBM-PV process have been proven in previous works by the authors [33,64-66]; however, further development is still required.
Both in a semi-continuous mode [64] of operation and in a semi-batch [33] mode, it has been possible to obtain approximately the same concentrations and specific energy consumptions with the use of solar PV energy (variable current densities) as when using the grid mix (constant current densities), as long as the same average current densities are applied. In this sense, the adaptation of the EDBM process to the variable nature of solar PV energy has been satisfactory.
Thus, the technical feasibility of EDBM powered by variable RE such as solar PV energy has been proven with satisfactory results and aiming that they can be used without significant changes after any subsequent improvement of the process.

Alternative A2-Salinity Gradient Energy Harvesting
Alternative A2 (Figure 4) considers the harvesting of salinity gradient energy contained in SWRO brines. In this alternative, no chemical self-supply could be achieved. Gurreri et al. [19] report a summary of recent studies focused on energy recovery from desalination brines by means of RED, being able to reduce the external energy consumption of desalination processes. In this work, maximum power densities in a wide range in the order of~1 W·m −2 are reported for the different experimental conditions, mainly feed concentrations and number of pair cells. In this sense, the integration of RED into desalination facilities is presented as a promising alternative towards the achievement of self-sufficient or low-energy consuming systems, although capital costs are still limiting its installation. Moreover, life cycle assessments of RED units conclude that RED is environmentally competitive with other RE such as solar PV energy or wind energy [67].
Thus, in alternative A2, in order to maximize energy recovery, as much brine as possible should be conveyed to the RED plant, and in the event that a fraction of the brine cannot be used, it will be directly disposed of. Although the self-supply of chemicals is not considered, as alternative A1 did, with RED, a larger volume of brines could be achieved, which decreases the environmental burdens associated with the direct disposal of brines. In addition, energy recovery from salinity gradients is considered a renewable and sustainable power supply [68][69][70], environmentally competitive with other well established RE such as solar PV or wind [67], that could reduce up to up to 8 Gt of CO 2 -eq.·year −1 (24% of the total emissions of Greenhouse Gases related to the energy sector).
Tristan et al. [71] estimated the maximum SGE available in terms of net power density and the net specific energy delivered by a RED system in six SWRO desalination plants distributed worldwide, obtaining net specific energy maximum values in the range of 0.08-0.15 kWh·m −3 of desalted water and net power densities up to 3.7 W·m −2 . Moreover, recent studies [25] concluded that if all the salinity gradient energy is harnessed,~40% of the energy demand of an SWRO facility could be supplied; however, a reduction to the 10% of the supply is estimated due to the energy conversion irreversibility and untapped salinity gradient energy.

Alternative A3-Chemicals towards Self-Supply and pH Gradient Energy Harvesting
In alternative A3 (Figure 5), the main target is the combination of material and energy harvesting, i.e., the chemical self-supply of the SWRO facility, and additionally, the achievement of pH gradient energy harvesting in order to use the surplus of acids and bases produced. As in A1, a fraction of the total volume of brine is used as input to the EDBM process. The difference relies on taking advantage of the solar PV energy peaks to produce with low CO 2 emissions and acid and base surplus that could be employed in R-EDBM as Acid-Base Flow Battery. Again, the brine fraction not used in the generation of acids and bases would be directly disposed of. So, by considering the couple EDBM and R-EDBM, both recovery of chemicals and energy would be achieved. Nonetheless, the energy recovered is intrinsically dependant on the surplus of acid and bases generated, i.e., the volume of brine used to feed the EDBM.
R-EDBM, at its current low TRL, is able to produce high energy densities (considering concentrations of 1.0 M of acid and base) approximately one order of magnitude than the ones reported for mixing salt and freshwater [72]. Most of the research works in literature to date [32,[72][73][74][75][76][77][78][79][80] use HCl as the acidic solution and NaOH as the alkaline solution, both with concentrations up to 1.0 M. Even if 1.0 M concentrations are the standard maximum so far, higher concentrations could enhance the performance of R-EDBM [72], due to higher pH gradients. Aside from HCl and NaOH, R-EDBM could recover energy from acidic and alkaline byproduct or waste streams, achieving by its integration improvements in the environmental performance of the processes. Among the mentioned studies, Xia et al. [76] and Zaffora et al. [79] are those that report higher power densities, with~15 W·m −2 (stack of 20 membrane triplets) and~17 W·m −2 (stack of 10 membrane triplets), respectively, for current densities of 100 A·m −2 .
Thus, the A3 alternative raises improvements compared to the A1 alternative in such a way that a larger volume of brine is managed, being able to maintain the self-supply of chemicals, in addition to harvesting RE. Alternative A3 is clearly meaningless if an RE source is not considered as the power supply for the EDBM as it would cause energy losses.
Moreover, the pH gradient energy is proposed as a source of renewable energy in desalination that can be included in hybrid systems.

Alternative A4-Chemicals towards Self-Supply and Salinity Gradient Energy Harvesting
In alternative A4 (Figure 6), both chemicals towards self-supply and salinity gradient energy are recovered from brines by means of EDBM and RED, respectively. Thus, the advantages obtained in alternatives A1 and A2 are achieved simultaneously, and at the same time, the disadvantages of these alternatives are partially avoided, as the two main inputs to the SWRO considered (chemicals and energy) are produced in-situ. Since it is estimated that with percentages lower than 2% of the produced brine, enough acid and base would be obtained to achieve self-supply, there is an opportunity to consider another brine management process such as the SGE harvesting by means of RED. Thus, the brine stream would be split between the EDBM and the RED stages. However, if a greater amount of brine is allocated to the EDBM process, the overproduction of acid and base could be stored for future needs or used in other activities.
Although RED harvest energy from brines, at the current state of the art of the technology, an additional supply for the SWRO and EDBM processes should be considered. Commonly the grid mix is used as a power supply; however, the potential benefits of the integration of RE such as solar PV have been presented throughout this paper.

Alternative A5-Chemicals towards Self-Supply, pH Gradient Energy and Salinity Gradient Energy Harvesting
The production of acids and bases through EDBM and their subsequent use of the surplus production in energy recovery by means of R-EDBM, as well as energy recovery through RED, are considered in alternative A5 (Figure 7). In this way, the brine is divided between the EDBM and the RED processes so that enough brine is conducted to the EDBM to produce the chemicals required in the SWRO facility and a surplus if peaks of solar PV energy allow. Thereby, the largest fraction could be employed in RED. Indeed, in the case that the EDBM and the RED do not have enough capacity, the remaining brine volume would be directly disposed of.
In this way, alternative A5 improves alternative A4 in two points: (i) RE peaks are used for acidic and alkaline solution productions in order to charge Acid-Base Flow Batteries for further pH gradient energy recovery, and (ii) R-EDBM is employed, which present higher power densities than RED although being in a lower TRL.
Thus, it seems that alternative A5 presents the greater potential recovery of chemicals and energy from both pH and salinity gradient.

Benefits and Challenges of the Proposed Alternatives for Electro-Membrane Technologies Integration for Brine Management in SWRO Facilities
The alternatives presented in the previous section have certain advantages mainly related to the environmental impact reduction of SWRO; however, there are also disadvantages that must be taken into account before selecting which alternative is the most favorable for a specific desalination plant. Comparison between the alternatives A0 to A5 attending to different criteria will be carried out in this section.
In this sense, environmental benefits can be obtained in terms of waste management, but also in terms of the consumption of externally produced chemicals that require transport (and therefore emissions related to this) to the plant. HCl and NaOH are consumed in highly variable amounts. For example, an SWRO plant located in the Mediterranean area requires 0.2-0.5 g·m −3 of freshwater of HCl and 30-60 g·m −3 of freshwater of NaOH [33]. In the authors' previous works, the potential environmental benefits of the in-situ production of HCl and NaOH from brines for the self-supply of desalination plants have been reported, especially when solar PV energy is employed [33,65,66]. Additionally, avoiding the environmental burdens associated with brine disposal into water bodies, chemicals self-supply presents the potential benefits of the economic savings related to the external purchase of the chemicals and the potential reduction of the indirect emissions related to the transport of these chemicals, which is not a trivial matter as they are considered hazardous substances. Hence, alternatives A1, A3, A4, and A5 present the chemical selfsupply. Moreover, salinity and pH gradient energy are renewable energy sources low in CO 2 and other Greenhouse Gases emissions. Alternatives A2, A4, and A5 consider energy harvesting from brines by means of RED. Moreover, alternatives A3 and A5 also consider energy harvesting from acid and base surplus productions by means of R-EDBM. While this is an interesting alternative, it seems obvious that consuming energy in order to then be able to recover it will lead to energy losses. So, energy harvesting from pH salinity gradients should only be considered if the surplus of acid and bases is generated under peaks of RE. In this sense, this work contributes to present feasible scenarios for the integration of Acid-Base Flow Batteries in desalination facilities. So, improvements on the two main environmental drawbacks [37,65,66,81,82], both direct impacts associated with brine disposal and indirect emissions associated with high non-renewable energy consumption, of desalination (SWRO in particular) could be achieved. Table 4 presents a qualitative comparison under different criteria of the alternatives proposed. The symbols are employed for a scenario comparison representation, meaning 0 is a neutral behavior (not an absolute value), + and + + represent improvement, andand --represent weakening. As seen in Table 4, alternatives A1 to A5 present a better environmental performance than alternative A0 as an environmental impact reduction can be expected in terms of climate change, water bodies protection, and the reduction of the consumption of raw materials. These improvements in the environmental performance of desalination are in accordance with the Sustainable Development Goals (United Nations) [11] and the European Green Deal (European Commission) [12]. The use of brines for the recovery of chemicals and energy and, therefore, the avoidance of direct brine disposal protects water bodies and their ecosystems. Thus, as the usage of brine increases, the impact reduction into water bodies increases, i.e., increases from A0 to A5. Simultaneously, the reduction of raw material consumption is achieved as products required in the facility are obtained from a waste stream instead of being externally purchased. Moreover, the indirect emissions related to the transport of the chemicals to the facility are eliminated by the in-situ production. Also, the indirect emissions related to energy production from non-renewable sources are avoided if the energy obtained from salinity and pH gradients is employed in the facility. Thus, both climate change and raw material consumption impacts are reduced as more brine is treated; this means that the environmental performance increases through the alternatives (from A0 to A5).
In addition, potential economic benefits could be achieved by the savings in the purchase of external energy and chemicals. Indeed, as many chemicals and energy are recovered, the potential economic benefits are higher. In this sense, facilities must find a balance between capital expenditure (CAPEX) and operating expenses (OPEX) to minimize costs. As expected, the integration of new technologies in the facility increases the costs associated with the acquisition or improvement of fixed assets, CAPEX. Commonly, a larger inversion on installations, i.e., higher CAPEX, reduces the OPEX and vice versa. Thus, specifically, in the proposed scenarios, a reduction in the OPEX can be achieved by the in situ production of chemicals and energy capital investment (CAPEX), related to the price of the electro-membrane technologies, which is highly dependent on the material and technological development. RED, EDBM, and R-EDBM are still at low TRL, especially R-EDBM technology. This fact is limiting its implementation since alternatives A1-A5 are still not competitive towards the current alternatives (A0). In this way, the interest and the feasibility of alternatives A1-A5 will depend on the further research efforts and the developments that would be achieved.
Among the electro-membrane technologies challenges, high prices of ion exchange membranes and, in particular, bipolar membranes stand out. Several authors [26,83,84] have reported the potential environmental and economic benefits of salinity gradient energy (from RED) when compared to both non-renewable and renewable energies; however, the results reported in this work assume very high power densities and low membrane prices. As an example, Pärnamäe et al. [32] report the CAPEX calculations for both a pilot-scale demonstration plant (year 2020) and a projected first-of-a-kind commercial unit (expected for year 2025) for an Acid-Base Flow Battery of 1 kW/7 kWh and 100 kW/700 kWh, respectively. For both units, the main contributor to the overall CAPEX are membranes, representing 62% and 46% of the total cost estimation. It should be emphasized that it is calculated that the power unit cost decreases from 19,600 €·kWh −1 to 470 €·kWh −1 . These power energy costs are competitive if compared with other redox flow batteries, such as vanadium redox flow batteries [85].
Thus, price reduction coupled to improvements in the membrane properties, such as stability and selectivity, or reductions in the electrical resistance would mean a breakthrough in the techno-economic feasibility of the processes.

Conclusions
Electro-membrane processes are advanced separation technologies that can contribute to implementing the Circular Economy philosophy in different industrial activities. As a case of study, the integration of electro-membrane processes in the management of SWRO brines under different alternatives allowing the recovery of material, energy, or both together has been presented.
Despite still requiring further development, the RED, EDBM, and R-EDBM present great potential for the management of SWRO brines in an isolated or combined way as described in the different alternatives throughout this work, or even to be integrated into more ambitious ZLD systems.
The potential benefits rely on environmental impact reduction is three-fold: (a) protection of water bodies as the direct brine discharge is avoided, (b) improvements in the climate change indicator, as the recovery of renewable energy reduces the indirect emissions related to energy production, and (c) reduction of raw material consumption as the main chemicals used in the facility can be produced in-situ (also the emissions related to their transportation are avoided). On the other hand, the proposed alternatives require further development towards an increase in their TRL, presenting the high costs of these technologies as one of the main challenges to face. In this sense, a reduction of the OPEX of the process (savings in the purchase of energy and chemicals) is related to an increase in the CAPEX, mainly due to the high prices of membranes, especially bipolar membranes. Therefore, further development of the membranes that improve their properties and also lowers their costs will be decisive for the industrial implementation of these processes.