## 2 Electro-Membrane Technologies: Current Status and Challenges
### 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\(\cdot\)m\({}^{-3}\) of freshwater of HCl and 30-60 g\(\cdot\)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  
Figure 2: Alternative A0 flow chart. 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\(\cdot\)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\(\cdot\)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) self-supply 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 self-supply, the semi-batch operation mode presents some drawbacks such as high SEC (up to 43.5 kWh\(\cdot\)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.