Predicting reverse electrodialysis performance in the presence of divalent ions for renewable energy generation

Reverse electrodialysis (RED) is an electro-membrane process to harvest renewable energy from salinity gradients. RED process models have been developed in the past


Introduction
In the effort to limit global warming and reduce climate change, renewable energy plays a key role [1][2][3].Among renewable energy sources, a promising candidate is salinity gradient energy (SGE), also known as blue energy, which is the energy derived from the controlled mixing of solutions with different salinities, e.g., river and seawater [4][5][6].To harvest SGE, reverse electrodialysis (RED) gained prominence in recent years, with pilot installations and plans for demonstrations at a larger scale [7,8].As described in Fig. 1, the basic principle of RED consists of a stack of cation exchange membranes (CEMs, selective for cations) and anion exchange membranes (AEMs, selective for anions), piled alternately and separated by feedwater compartments.In the feedwater compartments, kept open by non-conductive spacers or by patterns on the surface of profiled membranes [9,10], river and seawater flow alternately, and the salt gradient across each membrane generates a voltage difference [11].An electrode pair placed at both ends of the stack and a redox couple recirculating in the electrode compartments allow the conversion of the ionic current flowing through the membranes into an electronic current when an external load is connected to the electrode and the circuit is closed [12].
A major challenge to the adoption of RED as a renewable energy source is fouling [13][14][15].When harvesting SGE from natural salinity gradients, many undesired elements are present in the feedwaters, e.g., silica particles, natural organic matter, multivalent ions, and microorganisms that cause fouling on the membranes and spacers [14,[16][17][18], leading to reduced RED power output [13,14].Next to organic fouling, especially multivalent ions play an important role in RED as their presence results in a reduction of the electromotive force available and an increase in the electrical resistance of the membranes [19][20][21][22][23].The reduced electromotive force is the consequence of reduced membrane permselectivity and uphill transport.Uphill transport is the spontaneous transport of multivalent ions against their concentration gradient (from the river to the seawater), while monovalent ions are transported from the sea to the river water to balance the charge, maintaining electroneutrality.It derives from the disparity in electromotive forces produced by monovalent ions (higher) and multivalent ions (lower), due to their different valences, which have to be equilibrated [23].Thus, with uphill transport, the concentration gradient for monovalent ions is reduced, without any energy production, leading to a reduced electromotive force [23].Additionally, multivalent ions have larger radii, charge, and dehydration energies [24].This slows down their transport through the membranes and can lead to trapping of multivalent ions in the membrane due to electrostatic bridging of the ionic charges with the fixed membrane charges [21].As a consequence the membrane electrical resistance increases.
To estimate RED performance in a wide range of process conditions, modeling is a useful tool complementing experimental work.In recent years, different approaches were followed to model RED.In the frequently developed semi-empirical models the RED stack is represented as an electrical system and only macroscopic parameters (e.g., membrane electrical resistance and permselectivity) are taken into account [25][26][27].Veerman et al. validated this kind of modeling approach for RED in co-flow and counter-flow configurations, showing the benefits of electrode segmentation [26].Simões et al. also investigated the effect of electrode segmentation and multi-staging, albeit in the crossflow configuration, showing that higher power densities and energy efficiencies are enabled [27,28].Vermaas et al. used the same approach to prove that very high efficiencies (>90%) are possible with RED when electrode segmentation and asymmetric flow rates are employed [29].Tedesco et al. extended this modeling approach to RED with brine and seawater, including the effect of salt concentration on the membrane electrical resistance [25].
An alternate approach consists of the use of the Nernst-Planck equation coupled with electroneutrality conditions.This allows the description of the RED process based on microscopic quantities (e.g., ion diffusion coefficients in the solution and in the membrane phase).The advantage of this approach is that properties such as the membrane resistance and permselectivity are predicted by the model, although this may require the use of fitting parameters to correctly describe experimental data [30].Moreover, the approach based on the Nernst-Planck equation can take the effect of diffusion boundary layers into account as well [31].Tedesco et al. provided an example of this approach applied to RED and electrodialysis quantifying the impact of co-ion transport, water transport, and membrane thickness [31][32][33].
Although they provide valuable indications, the downside of these models is the assumption that the feeds only contain sodium chloride.This results in potentially large overestimation of the power densities that can be generated.As such, the development of RED models that take into account the presence of multivalent ions in the feedwaters is a major step toward more realistic power density predictions.
Moya used a Nernst-Planck based approach to show that it is possible to describe uphill transport within that theoretical framework [34], while Honarparvar et al. used the same approach to model electrodialysis in the presence of multivalent ions [35].Culcasi et al. also used a Nernst-Planck based approach to model an acid-base flow battery [36].The approaches based on the Nernst-Planck equation are able to accommodate the effect of multivalent ions without changes to the underlying theory, but correctly describing experimental trends may require even more adjustments and fitting than in the case with monovalent ions only, e.g., for the value of diffusion coefficients inside the membrane phase [30].Additionally, another downside of a Nernst-Planck based approach is that for a cross-flow RED configuration a full 3D model is required, as discretization is needed not only in the flow directions, but also along the membrane and compartment thicknesses, making it more computationally demanding than a semi-empirical model, where discretization is performed only along the flow directions.
Semi-empirical RED models seem promising thanks to the lower number of parameters, which can be easily measured or found in literature, and their light computational nature.However, existing RED models describing performance with NaCl only need adaptation to include the effect of multivalent ions.Ortiz-Martinez et al. presented an approach based on the use of the same semi-empirical model developed by Veerman et al., but including the membrane electrical resistances measured in mixtures of mono-and multivalent ions to include the effect of multivalent ions on RED [26,37].While valid, its limitation lies in the absence of permselectivity loss and uphill transport, which both have a major impact on power density.Hong et al. also used a semi-empirical model and focused on the effect of multivalent ions on the open circuit voltage (OCV) and feedwater conductivity, but uphill transport, permselectivity loss, and increase in membrane resistance were not taken into account [38].Therefore, the existing semi-empirical models for RED in the presence of multivalent ions are not accounting for all power loss mechanisms, but focus on a single one.
In the present work, a semi-empirical model is derived for RED in a cross-flow configuration with mixtures of sodium, magnesium, chloride, and sulfate in the feedwaters.This model extends the semi-empirical model approach proposed by Veerman et al. [26] and our previous work [27] to account for all power loss mechanisms due to the presence of multivalent ions: uphill transport, membrane permselectivity loss, and increased membrane resistance.The model is validated with RED stack experiments with mixtures of sodium chloride and sodium sulfate and with mixtures of sodium chloride and magnesium chloride.A comparison with experimental literature data on power density loss is also presented and shows good agreement between the model predictions and the experimental data.The potential of the model is then showcased by comparing RED simulations with sodium chloride and with mixtures of mono-and multivalent ions, highlighting their difference and the importance that this tool provides for more realistic predictions of obtainable power densities when using real natural feedwaters.

RED model
The RED model including the effect of sulfate and magnesium was derived from the model presented by Simões et al. [27], which in turn extended the semi-empirical models of Veerman et al. [26] and Vermaas et al. [29].Where the earlier models describe RED behavior for feedwaters containing only sodium chloride, the present models is extended such that it also takes into account the effects of the presence of multivalent ions.To correctly predict RED performance with mixtures of mono-and multivalent ions, the following aspects are taken into account in the model: 1) uphill transport of multivalent ions against their concentration gradient; 2) higher membrane electrical resistance due to the larger size of the multivalent ions and the partitioning of current between different ionic species (downhill transport); 3) membrane permselectivity loss; and 4) change of electrical conductivity of the water compartments when more charges are introduced with the salts containing multivalent ions.

Prediction of RED performance
2.1.1.1.Uphill transport.The voltage produced by the concentration gradient across an ion selective membrane can be calculated with the modified Nernst equation [26], which includes the effect of membrane permselectivity: Where α is the membrane permselectivity , γ sw and γ rw are the molar activity coefficients [− ] of sea and river water, and c sw and c rw are the molar ion concentrations [mol⋅L − 1 ] in sea and river water, respectively.Due to higher valence and lower activity coefficients, a gradient of multivalent ions generates a voltage difference across an ion exchange membrane that is lower than for monovalent ions [23].To balance these two voltages, the monovalent ion gradient is partially consumed to increase the multivalent ion gradient, until the two voltages are balanced [23].This process, known as uphill transport, involves the electroneutral transport of monovalent ions from the high to the low concentration side of the membrane, while an equal amount of charge is moved from the low to the high concentration side by the movement of multivalent ions.
To include uphill transport in the RED model, the batch model developed by Vermaas et al. [23] was converted in the form of equivalent circuits.This approach considers the mono-and multivalent ion gradients across a membrane as two voltage sources connected in parallel, where the generator with the largest electromotive force (emf) drives a current through the other generator to balance the voltage drop in the parallel circuit (Fig. 2).
The uphill transport current is then calculated as: Where J uphill is the uphill transport current density [A⋅m − 2 ], E mono and E multi are respectively the emf [V] for the monovalent and multivalent ions gradients, R mono and R multi are the cell resistances [Ohm⋅m 2 ] for the monovalent and multivalent ions, respectively.The sum of the resistances in the denominator in Eq. ( 2) physically represents monovalent and multivalent ions travelling through the same membrane in opposite directions.

Membrane resistance and current partitioning (downhill transport).
While the circuit in Fig. 2 manages to predict the mono-and multivalent ion fluxes through the AEMs and CEMs due to uphill transport, it is not suitable to represent the downhill transport, i.e., the transport of ions according to their concentration gradient when an ionic current is flowing through the system.It is well known that the electrical resistance of membranes in a mixture of mono-and multivalent ions is higher than what is measured in a solution of monovalent ions only [19,21].However, the parallel connection of two resistors results in an equivalent resistance that is smaller than each individual resistor.Therefore, if used to predict downhill transport (by closing the circuit with an external load), the circuit in Fig. 2 would predict a reduction in electrical resistance when multivalent ions are introduced in the system, which is incorrect.For this reason, the circuit in Fig. 2 is only used to calculate uphill transport, and its solution is superimposed to that of the circuit used to calculate downhill transport (Fig. 3) to obtain the overall RED performance.
To predict downhill transport, the current partitioning between mono-and multivalent ions needs to be determined.To do so, it is necessary to know the membrane selectivity.In RED, membrane selectivity is calculated as [21]: Where P is the monovalent over multivalent ion selectivity of the membrane [-], and ER multi and ER mono are the membrane electrical resistances [Ohm⋅m 2 ] measured in solutions of only multivalent and only monovalent ions, respectively.The selectivity of a membrane between two ions can also be calculated for any ion mixture based on the definition of Sata [39]: Where P is the selectivity of the membrane for ion A (monovalent) over ion B (multivalent , and j is the current density [A⋅m − 2 ].This definition of membrane selectivity expressed in terms of current densities allows the derivation of the current partitioning.Membrane selectivity can be calculated from Eq. (3) and its value can be used in Eq. ( 4) to relate the current densities of mono-(A) and multivalent (B) ions.The overall current density can then be expressed as: The fraction of current transported by ion A (sodium for a CEM, chloride for an AEM) is then: (6) In the case of a binary mixture with only two cations and two anions, the fraction of current transported by ion B (magnesium for a CEM, sulfate for an AEM) becomes: While for the case of more complex mixtures, the selectivity of the membrane for all counter-ions compared to a reference counter-ion needs to be known.
Through this approach, the current partitioning between ion A (monovalent) and B (multivalent) is directly related to the membrane selectivity.This approach relies on the definition of selectivity provided  For CEMs, measurements were performed in a mixture of 90 mol.% NaCl and 10 mol.% MgCl (0.5 M total salt) [21].For AEMs, measurements were performed in a mixture of 75 mol.% NaCl and 25 mol.% Na 2 SO 4 (0.5 M total salt) [19].CEMs: 1) CMH_PES: heterogeneous, standard membrane (Ralex); 2) CEM type I: homogeneous, standard (Fujifilm); 3) CEM T1: homogeneous, multivalent-ion permeable (Fujifilm); 4) CMS: homogeneous, monovalent-ion selective (Neosepta).AEMs: 1) AEM type I and 2) AEM type 10: homogeneous, standard membranes (Fujifilm); 3) AMX: homogeneous, standard membrane (Neosepta); 4) ACS: homogeneous, monovalent-ion selective membrane (Neosepta).Fig. 6.Model predictions and experimental data of the IV and power density curves for the experiments with 100 mol.% NaCl and with the 90 mol.% NaCl + mol.% MgCl 2 mixture. in Eq. ( 3), which considers the selectivity (P A B ) as a constant.If this assumption is not true and the membrane selectivity is largely dependent on the composition of the feedwaters (P A B = f(c A , c B )), the current approach is valid, but more data on the dependence of the membrane selectivity on the feedwater composition are required.
The electrical resistance of a membrane in an ionic mixture of monoand multivalent ions is then expressed as: Where ER eq is the electrical resistance of a membrane in a mixture of ion A and B, f A and f B are the current partitioning coefficients for the given composition (Eqs.( 6) and ( 7)), and ER A and ER B are the membrane electrical resistances measured in solutions containing only counter-ion A and B, respectively.Equation ( 8) assumes a transition between the electrical resistances measured with monovalent ions and the electrical resistance measured with multivalent ions only which is linearly dependent on the current partitioning.For some membranes (e.g., monovalent-ion selective CEMs) this is not the case as small amounts of multivalent ions result already in a large increase of the effective membrane electrical resistance.This issue is further addressed in the model validation section of the results and discussion.
2.1.1.2.1.Membrane permselectivity loss.The apparent membrane permselectivity decreases when multivalent ions are present in the feedwaters [21,40].The apparent membrane permselectivity is related to the transport of both counter-ions and of co-ions [39].With larger   [20] (for magnesium ions) and our previous work [19] (for sulfate) with the model prediction for power density losses at increasing fraction of multivalent ions in the feedwaters.counter-ions that are more difficult to transport through the membrane, the transport of co-ions becomes more significant, resulting in a reduced membrane permselectivity.Additionally, multivalent ions may bind to the fixed charges inside the membrane and decrease its effective charge density [21,41], thus decreasing the membrane permselectivity even further.To include these effects in the RED model, empirical fitting of experimental OCV and permselectivity data was used.For data on the permselectivity loss of CEMs with magnesium, the OCV data presented by Moreno et al. [20] were compared to the equilibrium values after uphill transport estimated with the batch model of Vermaas et al. [23].The excess OCV loss was attributed to a loss in apparent membrane permselectivity following the procedure adopted in our previous study on the effect of sulfate on AEMs [19].For the permselectivity loss of AEMs with sulfate, the experimental OCV and permselectivity data from our previous study were used [19].The literature data and fitting equations are presented in Appendix A.
2.1.1.2.2.Conductivity of the feedwaters.Equation ( 8) (elaborated in Section 2.1.1.2) allows the prediction of membrane electrical resistance with a mixture of mono-and multivalent ions, but to predict stack resistances, the conductivity of the feedwaters needs to be estimated as well.To do so, a simple empirical relationship between the electrical conductivity of the feedwaters and the total dissolved solids exists (provided that all dissolved solids are ionic species) [42]: Where TDS is the amount of total dissolved solids [g⋅L − 1 ], K is an empirical factor, and EC is the electrical conductivity of the solution [mS⋅cm − 1 ].Due to the typical feedwater concentrations in RED, K is equal to 0.63 [42].

Model-based simulations
The approach elaborated in section 2.1.1 leads to an extended version of the model of Simões et al. [27].A detailed overview of all model equations used is reported in Appendix B. Most of the validation experiments were performed with a singlestage unsegmented RED stack (Fig. 4a).To explore the potential of the new cross-flow RED model, three additional configurations were simulated and compared (Fig. 4b-d).
The approach followed for each of these configurations is discussed below in detail.Membrane, stack, and process parameters were chosen to have representative values, similar to the parameters used in the previous studies on the effect of electrode segmentation and multistaging in RED (Appendix G) [27,28].
a) The single-stage cross-flow RED stack with unsegmented electrode (Fig. 4a) was realized by modeling a cross-flow stack (corresponding to those supplied by REDstack BV, The Netherlands) with 10 cell pairs and an active area of 22 cm × 22 cm.Fujifilm Type 10 AEM and CEM (Fujifilm Manufacturing Europe BV, The Netherlands) specifications and 155 µm spacers (corresponding to spacers from Deukum GmbH, Germany) were used for all simulations.Its external load was adjusted for maximum power density using an optimization algorithm (Sequential Least Squares Programming, SLSQP) for different residence times (10 -90 s).For the single-stage RED with unsegmented electrodes, the effect of the seawater fraction (ϕ sw /(ϕ sw +ϕ rw ), where ϕ is the feedwater flow rate [m 3 ⋅s − 1 ]) was also investigated.A constant residence time (30 s, as in [29]) for river water was considered, while varying the seawater fraction between 0.05 and 0.95, similarly to the work of Vermaas et al. [29].For simulations involving the seawater fraction, ideal membranes (negligible electrical resistance, 100% permselectivity, and not allowing any undesired salt or water transport) were considered in addition to Fujifilm Type 10.
b) The single-stage cross-flow RED with segmented (2 × 2) electrodes (Fig. 4b) was obtained by modeling a cross-flow stack with 10 cell pairs and an active area of 22 cm × 22 cm, where the area is symmetrically c) Co-current and d) counter-current multi-stage cross-flow RED configurations were considered.Each stage was modeled as a cross-flow RED stack equipped with 10 cell pairs, an active area of 22 cm × 22 cm, and unsegmented electrodes.For co-current (Fig. 4c), river and seawater were fed to the first stage and then sequentially to the second stage.For the counter-current (Fig. 4d), seawater was fed to the first stage and then to the second stage, while river water was fed into the second stage first and then to the first stage.For both co-current and counter-current multi-stage RED configurations, the independent external loads for the two stages were adjusted to maximize overall power density with SLSQP.The overall residence times under consideration for multi-stage RED simulations were in the range 20 -88 s, which implies residence times in the 10 -44 s range for each stage.

Model validation experiments
To validate the model results, experiments with a single-stage crossflow RED stack (configuration a in Fig. 4) were performed adding MgCl 2 and Na 2 SO 4 in the feedwaters.

RED stack
A cross-flow stack with an active area of 10 cm × 10 cm (REDstack BV, The Netherlands) and titanium mesh electrodes coated with galvanized Pt (Ti mesh 1.0, Pt coating thickness 2.5 µm, MAGNETO Special Anodes BV, the Netherlands) was assembled with ten cell pairs.The cross-flow configuration was chosen for its high energy efficiency compared to co-flow and reduced pressure drop compared to counterflow [29].Fujifilm Type 10 CEMs and AEMs (FUJIFILM Manufacturing Europe BV, The Netherlands) were separated by gasketintegrated spacers with 155 µm thickness (Deukum GmbH, Germany) with a polyester woven netting (Saatifil, Saati SpA, Italy).Double CEMs were used at both ends of the membrane stack to seal the electrode compartments and prevent electrolyte leakage into the feedwaters compartments.

Feedwaters and electrolyte
Artificial river water (17 mM) and artificial seawater (508 mM) were prepared adding sodium chloride (NaCl, 99.5% purity, ESCO, The Netherlands) to demineralized water.To evaluate the effect of magnesium and sulfate, separate runs were performed substituting 10 mol.% NaCl both in river and seawater either with sodium sulfate or magnesium chloride hexahydrate (both > 99% purity, VWR Chemicals, Belgium).The pH of the artificial feedwaters was neutral and did not change during operation, as water splitting did not occur.The electrode rinse solution was made of a mixture of 0.05 M potassium hexacyanoferrate(II) / 0.05 M potassium hexacyanoferrate(III) (both ≥ 96% purity, VWR Chemicals, Belgium) as redox couple and 0.25 M sodium chloride as supporting electrolyte.River and seawater were fed to the stack with a flow velocity of 1 cm⋅s − 1 in a single-pass configuration (150 mL min − 1 ) using peristaltic pumps (Cole-Palmer, Masterflex L/S Digital drive, USA).The electrolyte rinse solution was recirculated between the electrolyte compartments by a peristaltic pump.To prevent bulging of the membrane stack, the electrolyte was kept at a 0.3 bar overpressure by means of a diaphragm valve (KNF FDV 30, KNF-Verder BV, The Netherlands) placed at the outlet of the electrolyte circuit.Temperature and conductivity of the artificial feedwaters were measured before each experiment.

Electrochemical characterizations and water analyses
Two stack experiments were performed for model validation.First, the RED performance with 100 mol.% NaCl and with mixtures of 90 mol.% NaCl and 10 mol.% magnesium chloride was evaluated.Second, the same experiment was repeated with 100 mol.% NaCl and with mixtures of 90 mol.% NaCl and 10 mol.% sodium sulfate.RED performance was measured with constant current steps (0 -5 -10 -12.5 -15 -17.5 -20 -22.5 -25 -30 A⋅m − 2 ), applied for 10 min each using a potentiostat (Iviumstat, Ivium Technologies BV, The Netherlands).Water samples were collected from the stack outlets after 2 min from the beginning of each current step.The ion content of the water samples was analyzed with ion chromatography (Metrohm Compact IC Flex 930, Metrohm Nederland, the Netherlands) after appropriate dilution to be within the instrument detection limits (dilution factors: 70 for river water, 1400 for seawater).

Results and discussion
To assess the validity of the new RED model, its ability to predict membrane electrical resistance in multi-ionic mixtures, RED performance, and ion transport was evaluated by comparing the obtained model results with experimental literature data.Then, validation with experimental stack data was performed, including the current partitioning between mono-and multivalent ions.Finally, the validated model was used to investigate RED performance in a variety of stack and flow configurations.
To validate the model prediction of the membrane electrical resistance in mixtures of mono-and multivalent ions, literature data for a variety of CEMs (from Rijnaarts et al. [21]) and AEMs (from our previous work [19]) were considered.The electrical resistance data in 100 mol.% monovalent ions and in 100 mol.% multivalent ions were used to derive the membrane selectivity (according to Eq. ( 3)), which was then used to predict the electrical resistance in the mixture of mono-and multivalent ions (following Eqs. ( 4)-( 8)).Fig. 5 compares the literature data with the model prediction for CEMs in a mixture containing 10 mol.% magnesium chloride and for AEMs in a mixture containing 25 mol.% sodium sulfate.
For both CEMs and AEMs, the model predictions are in good agreement with the literature data.Despite the more complex nature of ion transport in heterogeneous membranes (Ralex CMH_PES), the model prediction for the Ralex membrane is also good.The monovalent-ion selective CEM (Neosepta CMS) shows a large deviation from the model, which underestimates its electrical resistance.The Neosepta CMS membrane is designed to limit the transport of multivalent cations by size exclusion.The difference between of the model values and the experimental values indicates that even small fractions of magnesium result in a large increase in membrane resistance due to its difficulty in moving through the membrane and possibly due to trapping of the large ion in the membrane.This would suggest that for CEMs with a high monovalent over multivalent ion selectivity the approach described in Eqs. ( 3)-( 8) results in inaccurate predictions.However, the RED model can still be used for these membranes provided that more experimental data on the behavior of their electrical resistance in mixtures of monoand multivalent ions are collected.To demonstrate this point, another example is described in Appendix D. This examples shows that, although the selectivity value calculated with Eq. (3) may not describe the reality, Eqs. ( 4)-( 8) are still valid, provided that a corrected value for the selectivity is considered (Fig. D1 in Appendix D).
For AEMs, the model delivers a good prediction even for the monovalent-ion selective Neosepta ACS.This is explained by the smaller increase in membrane resistance that sulfate induces for AEMs compared to the increase induced by magnesium for CEMs [19].
The proposed approach clearly enables the accurate prediction of membrane electrical resistance in mixtures of mono-and multivalent ions for standard grade membranes and, with additional data, also for monovalent-ion selective CEMs.
Validation of the model predictions of membrane resistance with experimental data is the key to predict current partitioning and RED stack performance, where the effect of feedwater conductivity, uphill transport and decreased permselectivity also come into play.To validate the prediction of RED performance, two stack experiments were performed adding first 10 mol.% MgCl 2 and then 10 mol.% Na 2 SO 4 to both feedwaters.
Fig. 6 shows the IV-curves and power density curves for the RED experiments with MgCl 2 .To describe the RED behavior, the obstruction factor (accounting for the extra resistance from the non-conductive spacers, Eqs.B (7) and B(8) in the Appendix B) was adjusted as fitting factor to the data measured for the run with 100 mol.% NaCl.With that value fixed, only the feedwater composition was then changed to describe the data for the run with 10 mol.% MgCl 2 in both feedwaters.
Both the IV-curve and the power density curve calculated according to the model show good agreement with the experimental data.This is a first indication that the stack electrical resistance, including the feedwater conductivities and membrane resistances, and emf, including uphill transport and permselectivity loss, are correctly predicted in the presence of magnesium chloride.The stack electrical resistance is dominated by the conductivity of the river water [43], which accounts for more than half of the overall resistance (slope of the IV-curve).Replacing an equal molar amount of NaCl with MgCl 2 increases the river water conductivity, while the presence of magnesium chloride in both feedwaters increases the resistance of the CEMs.These two opposite trends need to be correctly embedded in the model for an accurate RED performance prediction.Therefore, the agreement between model and experimental data indicates that not only the membrane resistances but also the feedwater conductivities are correctly predicted when multivalent ions are added to the feedwaters.For the power density, the OCV has a major role since the power density is proportional to the squared OCV (Eqs.(B37) in Appendix B).Therefore, a good agreement between model predictions and experimental data indicates that the decrease in OCV when magnesium chloride is added to the feedwaters is correctly predicted by the model through uphill transport and permselectivity loss.Fig. 7 shows similar results obtained for the run with 10 mol.% Na 2 SO 4 added to both feedwaters.
Also in this case, the agreement between experimental data and model predictions is good.It can be noted that the relative impact of sulfate on RED performance is lower than that of magnesium, due to the smaller permselectivity loss and electrical resistance increase [19].The smaller electrical resistance and higher power density for the run without multivalent ions (100 mol.% NaCl, solid lines and circles) in Fig. 7 compared to Fig. 6 is likely due to air bubbles trapped in the spacer during the stack experiments illustrated in Fig. 6.The results from the stack experiments with magnesium ions or sulfate added to the feedwaters prove the ability of the model to describe RED performance in the presence of multivalent ions.
The last step of the model validation is the comparison of feedwater compositions measured during the stack experiments, at OCV and at the maximum power point (m.p.p.) with the model predictions (Fig. 8).This evaluates the ability of the model to predict uphill transport and current partitioning.Ion and water transport through the membranes determine the ion concentrations in the feedwaters.With multivalent ions present in the feedwaters, salt transport happens also under OCV conditions due to uphill transport, which redistributes mono-and multivalent ions across the membranes.Additionally, when current is applied, both mono-and multivalent ions can act as charge carriers, therefore it is important to correctly predict the current fraction transported by each ion, as this affects the composition of the feedwaters and in turn feedwater conductivity.
Clearly, there is very good agreement between the model predictions and the experimental data, both for OCV and the m.p.p..The similarity in power density indicates the realistic inclusion of uphill transport in the model, while the correct prediction of the feedwater compositions at D. Pintossi et al. m.p.p. validates the current partitioning described in Eqs. ( 3)- (8).
Now that the ability of the model to include all power loss mechanisms induced by multivalent ions is verified, a comparison of predicted model power losses for increasing fractions (up to 50 mol.%) of magnesium ions and sulfate with literature data was performed (Fig. 9).The experimental data from Moreno et al. [20] and our previous work [19] were used and compared to the model predictions obtained in the present work [20].
It should be noted that OCV data from the same datasets were used to derive the empirical fit of permselectivity loss, therefore the comparison of predicted power density losses with the ones reported in these works only validates uphill transport, increased membrane electrical resistance and the increase in feedwater conductivity in the presence of multivalent ions.Nevertheless, the agreement between model and literature data is good.Even at molar fractions of magnesium ions and sulfate significantly higher than those considered in the validation experiments, experimental data and model predictions almost coincide.The only exception is 50 mol.% of magnesium, where the experimental power density loss exceeds the model prediction.This is likely because at such high magnesium concentrations, the increase in membrane electrical resistance due to trapping of the magnesium ions inside the membrane starts to become more dominant, as shown by Moreno et al. [20].
The validated RED model including the effect of sulfate and magnesium ions has the potential to deliver more accurate predictions of obtainable power densities and to help in the design of up-scaled RED systems.It can now be used to predict the actual RED performance under realistic conditions.Fig. 10 shows the behavior of net power density, net energy efficiency, and their product as a function of the seawater fraction.Variations in the seawater fraction were used in the past to show that RED can achieve very high efficiencies, albeit considering only ideal membranes [29].The product is chosen as a useful RED performance indicator as it accounts for both the power density and the energy efficiency granting them an equal weight.
The opposite trends observed for net power density (Fig. 10a) and net energy efficiency (Fig. 10b) determine the shape of the curves in Fig. 10c, with the power density peaking at intermediate seawater fractions (>0.5), while the efficiency peaks at low seawater fractions (<0.1).While ideal membranes provide a very high and optimistic prediction of the RED performance (peaking at a seawater fraction equal to 0.3 with a value of 75.8%⋅W⋅m − 2 ), the inclusion of the behavior of real membranes shows already a more realistic prediction of the RED performance (peaking at a seawater fraction of 0.2 with a maximum value of 34.2%⋅W⋅m − 2 ).The shift of the product peak to lower seawater fractions is due to the different evolution of the net power density, which is more sensitive to the seawater fraction in the range 0.3 -0.8 when ideal membranes are considered.In the same way, including the effect of multivalent ions (peaking at a seawater fraction of 0.18 with a value of 24.2%⋅W⋅m − 2 ) gives an even more realistic estimation of the actual RED performance when using real feedwaters.As such, this model not only helps predicting realistic RED performance, but can also be used to choose optimum process conditions to achieve maximum performance.
The influence of the presence of multivalent ions on RED performance in a variety of different flow configurations, is presented in Fig. 11.For all configurations, four feedwater compositions were considered: NaCl only, a mixture with NaCl and 30 mol. % Na 2 SO 4 , a mixture with NaCl and 30 mol. % MgCl 2 , and a mixture with NaCl and 30 mol. % MgSO 4 .
For all feedwaters compositions, a single stage with electrode segmentation (Fig. 11b) yields the best performance, with increasing benefits at increasing residence times.Similarly, multi-stage configurations (Fig. 11 c and d) outperform the single-stage unsegmented configuration at high residence times.Even though multi-staging yields the same (gross) energy efficiency of the segmented configurations, the higher pumping losses (two stacks against one) result in a lower value of the product between net power density and net energy efficiency (Fig. 11, Figs.E1 and E2 in Appendix E).The advantage of the segmented electrode and multi-stage configurations derives from the possibility to tune the external load to the locally available emf and stack electrical resistance, as discussed by Simões et al. [27,28].However, when considering the presence of multivalent ions, particularly magnesium, the relative advantage of segmentation or multi-staging is reduced and this results in a larger relative loss of power density and efficiency (Fig. F1 in Appendix F).This is the case as uphill transport occurring near the river water inlet reduces the available emf.Additionally, the loss in membrane permselectivity in the presence of multivalent ions further reduces the available emf.These emf losses result in decreased inhomogeneity of the emf between inlet (high emf) and outlet (low emf), an aspect that segmentation and multi-staging address resulting in an increase in power density and efficiency.
Clearly the presented model now allows predicting RED performances and evaluating operational conditions for realistic situations taking into account the complex effects of the presence of multivalent ions on RED performance when using natural feedwaters.With additional experimental selectivity and permselectivity data, the model can easily be extended to more complex, multi-component ionic mixtures as well (as shown in Appendix C for a CEM exposed to a ternary mixture).Future work should focus on the validation of the presented model with multi-ionic mixtures mimicking the composition of real feedwaters.Additionally, the model could be further improved by describing the loss of membrane permselectivity in the presence of multivalent ions not with an empirical fit as in the current formulation, but by developing a quantitative description derived from theory, similar to the equations developed to describe the increase in membrane resistance.

Conclusion
This work presents a model to predict RED performance taking into account the influence of the presence of magnesium and sulfate ions on power production with RED.The presence of multivalent ions results in loss in power due to several effects that are now included in the model.Uphill transport is accounted for in balancing two voltage sources, the increased membrane resistance is introduced based in experimental resistance and selectivity data, the membrane permselectivity loss is introduced by empirical fitting of experimental data, and the change in conductivity of the feedwaters is introduced based on the relationship between the total concentration of charged solids in the solutions and their electrical conductivity.Validation with experimental and literature data was performed and confirmed that the model effectively describes RED performance in the presence of sulfate or magnesium ions.Simulation of RED in various flow configurations and with a variety of feedwater compositions shows the importance of designing RED processes with the complexity of natural feedwaters in mind.Simulated RED behavior in the presence of 30 mol. % MgSO 4 drastically differs from the simulated behavior for feedwaters containing only NaCl.In particular, the advantages of electrode segmentation and multi-staging are mitigated by multivalent ions as the inhomogeneity of the electromotive force is reduced by uphill transport and permselectivity loss.The developed model is not only able to describe experimental data but can also predict RED performances at specific process conditions and as such provides a very valuable tool to design and evaluate RED process systems.

A. Fitting of experimental data for the permselectivity loss factor
To include the permselectivity loss in the RED model, fitting of experimental data was performed.Data for RED experiments with magnesium ions were taken from Moreno et al. [20], while data for sulfate were taken from our previous study [19].It should be noted that data with magnesium ions are not available for the same CEM (Fujifilm CEM Type 10), but only for the similar Fujifilm CEM Type I, which has a slightly lower starting permselectivity.The permselectivity loss is expected to be similar for the two membranes, as is the case for CEM type I and CEM T1 based on the data from Moreno et al. [19].For the sulfate study, data are available for the same AEM used in the present study (Fujifilm AEM type 10).
The OCV data reported in the literature are compared with the expected equilibrium values after uphill transport, as estimated using the model developed by Vermaas et al. [23].The difference is then entirely attributed to a loss in permselectivity (accounted for in the permselectivity loss factor K) for the membrane under investigation (Table A1).
Fitting of the permselectivity loss factor as a function of the multivalent ion fraction is performed with linear interpolation for sulfate, while for magnesium ions a second-degree polynomial is used for fractions below 25 mol.% and linear interpolation is used for fractions higher than 25 mol.%.

Table A1
Permselectivity loss data calculated from the literature OCV data in [19,20].

B. RED model including magnesium and sulfate
The membrane monovalent over multivalent ion selectivities for the CEM and AEM (P [− ]) are calculated based on the membrane electrical resistances measured with monovalent and multivalent ions only [21]: Where R x is the membrane electrical resistance [Ohm⋅m 2 ] measured in a solution containing x as counter-ion.
The current partitioning factor represents the fraction of the total current carried by the transport through the membrane of a certain ion.The current partitioning factors for magnesium, sodium, sulfate and chloride are calculated as follows.
Where c is the molar concentration of the ions in the seawater side [mol⋅L − 1 ], and the factor 0.5 derives from the ratio of the ion valences.The river and seawater resistances are calculated as follows: Where 1/A open is the spacer shadow factor [− ] accounting for the presence of the non-conductive spacers in the feedwater compartments (A open is the fraction of the active area not occupied by the spacer) and for the non-ohmic component of the feedwaters resistance, d is the inter-membrane spacing [m], and EC is the solution conductivity [S⋅m − 1 ] calculated according to Eq. ( 8) of the main text.
With the membrane selectivities (Eqs.B(1) and (B2)), current partitioning factors (Eqs.(B3)-(B6), and the resistances of the water compartments, the cell resistance [Ohm⋅m 2 ] can be calculated: Where R blank is the blank resistance [Ohm⋅m 2 ] accounting for the resistances of the electrodes and sealing CEM, and N cp is the number of cell pairs [− ].
The electromotive force (emf) for the different ions can be calculated using the modified Nernst equation and including the permselectivity loss factors (K [− ]): ) ) ) ) Where α is the membrane permselectivity [− ], R is the universal gas constant [J⋅mol − 1 ⋅K − 1 ], T is the absolute temperature [K], F is the Faraday constant [C⋅mol − 1 ], γ sw and γ rw are the molar activity coefficients [− ] of sea and river water, and c sw and c rw are the ion concentrations [mol⋅L − 1 ] in sea and river water, respectively.The molar activity coefficients are estimated with the three-characteristic-parameter correlation (TCPC) model of Ge et al. [44].The overall emf is taken equal to that of sodium chloride (Eq.S14).When uphill transport balances the potentials of mono-and multivalent ions, this choice has no influence.However, for a small region of the active area close to the river water inlet, where the two potentials are not balanced, this choice for the total potential means considering the highest of the two electromotive forces (emfs), but this may result in only a small overestimation of the total current.Due to uphill transport, the emf of monovalent and multivalent ions is equal, with the exception of the region close to the river water inlet where uphill transport occurs and the two emfs are not balanced yet.In this region, the highest emf is considered to calculate downhill transport.The overall current density for downhill transport is determined by the external load voltage (U load [V]): This formulation ensures continuity of the current across the CEMs and AEMs, while allowing for different partitioning of the current between monovalent and multivalent cations and anions.The downhill current densities (j [A⋅m − 2 ]) for each ion are calculated using the current partitioning factors: To obtain the overall salt transport, the uphill transport current densities (Eq.( 2) from the main text) need to be considered as well: The ion fluxes (J [mol⋅m − 2 ⋅s − 1 ]) from the sea to the river water compartment are obtained from the downhill and uphill current densities, together with an osmotic transport term: Where D are the diffusion coefficients through the membrane [m 2 ⋅s − 1 ], l m is the membrane thickness [m], and the factor 2 in the osmotic transport term derives from diffusion taking place through both the AEM and CEM.D Na is assumed to be equal to D Cl and their value is taken from our previous work [2].D Mg and D SO4 are taken from literature [36].
The osmotic water transport term [m⋅s − 1 ] as formulated by Veerman et al. [26] is given by: Where MW H2O is the molecular weight of water [kg⋅mol − 1 ] and ρ H2O is the density of water [kg⋅m − 3 ].
The change in ion concentrations within the stack active area can be related to the ion and water fluxes, yielding the following partial differential equations (assuming river water flowing along the x direction, while seawater flows along the y direction): Where W and L are the width and length of the stack active area [m], and ϕ is the flow rate of the feedwaters [m 3 ⋅s − 1 ].The active area is discretized into a 500 × 500 grid, and the PDEs (Eqs.(B29)-(B36)) are solved with the Forward Euler method using the inlet concentrations as boundary conditions.The power, power density (net and gross), energy efficiency (net and gross), and thermodynamic efficiency are calculated from the obtained concentration matrices equal to our previous work [27].
Briefly, the power [W] is calculated as follows: Where E is the electromotive force [V], I is the current [A], and R stack is the stack resistance [Ω].The net power is obtained by subtracting the pumping losses, while the power density is obtained by dividing it by the total membrane area (CEMs area + AEMs area).
The energy efficiency is calculated as follows: Where ΔG in is the Gibbs free energy of mixing [J] of the two feedwaters calculated based on the compositions at the inlet.The net energy efficiency is obtained by using the net power in the efficiency calculations.

C. Model extension to ternary mixtures
The developed model can be easily extended to more complex mixtures as well.To illustrate this, a similar approach is followed for a ternary mixture and the equations are derived below (only for a CEM exposed to three generic cations A, B, and C, the same equations would apply to an AEM).All symbols and units in this derivation are consistent with the derivation presented in Appendix B.
The selectivities based on membrane electrical resistance are: While the selectivities as defined in Eq. ( 4) of the main text are: The total current can be expressed as: The fraction of current transported by ion A is then:

D. Membrane electrical resistance model predictions
The example of Neosepta CMS shown in the main text shows that for CEMs having a relatively high selectivity (sodium over magnesium), e.g.monovalent-ion selective membranes, the approach described in Eqs. ( 3)-( 8) of the main text does not deliver an accurate prediction of the membrane electrical resistance in mixtures of monovalent and multivalent ions.This derives from the major increase in electrical resistance that even small fractions of magnesium ions produce for these membranes.
Avci et al. provided electrical resistance data for a Fujifilm CEM-80050 (a highly cross-linked membrane developed for RED applications with brines and seawater) at increasing fractions of magnesium ions in the test solutions [45].Based on their data, the membrane selectivity is calculated to be 7.9 (Eq.( 3) in the main text).Fig. D1 shows a comparison of the experimental data with the prediction made using Eqs.( 4)-( 8) of the main text using a selectivity value equal to 7.9.The observed trends are very different, with magnesium ions producing a much higher electrical resistance increase at low fractions than predicted by the model.
To verify if the inconsistency between the results and the model derives from an invalid assumption in the model (e.g., non-constant selectivity), Eqs. ( 4)-( 8) from the main text were used to fit the experimental data.Interestingly, a constant selectivity value can fit the experimental data (Fig. D1), but it is very different from what Eq. ( 3) (main text) would suggest.The fitted selectivity value of 0.79 (<1) indicates that magnesium ions increase the resistance as if it was the preferential charge carrier.The data from Avci et al. [45] suggest that the proposed model would still be valid even for monovalent-ion selective membranes, provided that extra data are gathered to verify membrane electrical resistance and current partitioning predictions.

Fig. 1 .
Fig. 1.Schematic illustration of the working principle of RED.

Fig. 3 .
Fig. 3. Electrical circuit used to model downhill transport in the RED system.

Fig. 4 .
Fig. 4. Simulated RED configurations: a) single-stage cross-flow RED with unsegmented electrodes; b) single-stage cross-flow RED with four electrode segments in a 2 × 2 pattern; c) multi-stage RED in co-current mode between two cross-flow stages; and d) multi-stage RED in counter-current mode between two cross-flow stages.

Fig. 7 .
Fig. 7. Model predictions and experimental data of the IV and power density curves for the experiments with 100 mol.% NaCl and with the 90 mol.% NaCl + 10 mol.% Na 2 SO 4 mixture.

Fig. 8 .Fig. 9 .
Fig. 8. Experimentally determined feedwater composition during the stack experiments (light color) and feedwater composition predicted by the model (dark color).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 10 .
Fig. 10.Model simulations with variable seawater fraction: a) net power density, b) net energy efficiency, and c) their product as a function of the seawater fraction for ideal membranes (with negligible resistance) and for real membranes with and without sulfate present in the feedwaters.For c), only values where both power density and energy efficiency are positive are displayed.Fujifilm type 10 membranes were chosen as representative RED membranes.

Fig. 11 .
Fig. 11.Simulations with various cross-flow RED configurations (product of efficiency and power density): a) RED performance with single-stage and unsegmented electrode.b) RED performance with single-stage and 2 × 2 electrode segmentation.c) RED performance with multi-stage (2 stages) with co-current configuration.d) RED performance with multi-stage (2 stages) with counter-current configuration.
Fig. A1 illustrates the experimental and fitting values for the permselectivity loss factors.

Fig. A1 .
Fig. A1.Permselectivity loss factor Literature values (dark red) and fitting values (dark blue) for the permselectivity loss factor.
current transported by ion B and C can be calculated from j A and Eqs.C(3) and C(4):

E
Fig. E1 shows the net power density results of the RED simulations for the four flow connfigurations.

Fig. D1 .
Fig. D1.Experimental membrane electrical resistance for a Fujifilm CEM 80,050 (from Avci et al.[9]) (dark red markers) compared to the model predictions obtained for selectivity equal to 7.9 (dark blue dashed line) and 0.79 (grey dashed line).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig
Fig. E2 depicts the net energy efficiency trends for the four flow configurations.F. Relative power density loss with 30 mol. % sulphate Fig. F1 displays the relative power density loss for the four different flow configurations.

Fig. E2 .
Fig. E2.Simulations with various cross-flow RED configurations (net energy efficiency): a) RED performance with single-stage and unsegmented electrode.b) RED performance with single-stage and 2 × 2 electrode segmentation.c) RED performance with multi-stage (2 stages) with co-current configuration.d) RED performance with multi-stage (2 stages) with counter-current configuration.

Fig. F1 .
Fig. F1.Relative power density loss as a function of residence time for the different cross-flow configurations when comparing 100 mol.% NaCl in the feedwaters with a mixture containing 70 mol.% NaCl and 30 mol. % Na2SO 4 . )