Introduction

The problem of hazardous compounds present at low concentrations in water sources spans domains from public health to heavy industry. Toxic heavy metals such as lead, cadmium, and arsenic enter water sources due to both anthropogenic activity and natural processes1, while boron, present in seawater and groundwater, can have detrimental health effects when present at sufficiently large concentrations2. Selective ion removal is an emerging water treatment approach for removing contaminants from water supplies while retaining desirable dissolved species3,4,5,6, and it is a relevant technique for the environmental pollutants listed above as well as for recovery of high-value materials, such as Li+ for use in lithium-ion batteries7.

A promising application of selective removal is the treatment of water for agricultural irrigation, which accounts for 80% of total water consumption in the United States8. Two important factors in determining irrigation water quality are conductivity and relative Na+ content, the latter of which is quantified via the sodium adsorption ratio (SAR). Crop yields and health usually suffer from excessive conductivity and high SAR, the latter of which also negatively impacts soil permeability and water infiltration rate9. Conductivity and SAR tolerances are known to vary between crops. For example, a 6-year study conducted by Singh et al.10 found that pearl-millet tolerated water with SAR < 10 while wheat tolerated SAR < 20. Furthermore, the same study found that long-term use of high-conductivity and high-SAR waters lead to increased salt accumulation and clay dispersion, which necessitate occasional treatment to restore soil quality11. A system performing selective removal can reduce both conductivity and SAR in incoming water by selectively removing Na+ ions while permitting important minerals to remain in the treated water. This can increase crop yields and can reduce costs incurred either by restorative soil treatments or by use of non-selective water treatment necessitating water remineralization.

Conventional membrane-based technologies have limited capability to remove specific ions, and when they are selective, they tend to reject divalent ions12,13,14, thus potentially increasing the SAR of the feedwater. Reverse osmosis (RO) typically removes >95% of all dissolved ions indiscriminately when used for seawater desalination and requires additional post-treatments, including pH adjustment, to remove boron and remineralization to reintroduce divalent ions12. Electrodialysis membranes are typically divalent selective. The emerging use of a thin polyelectrolyte layer with a charge opposite to that of the membrane bulk can inhibit divalent counterion passage and thus enable monovalent selectivity15,16, typically at the cost of lifetime and membrane resistivity12,17. Nanofiltration is perhaps the most promising membrane technology for selective separation, where addition of either a positively or negatively charged layer to the membrane feed side can enhance selectivity of either monovalent or divalent ions12,18,19. However, membrane charge density is not dynamically tunable, and thus adjusting such a system to varying feedwater composition or changes in effluent requirements is challenging. Further, membrane fouling, concentration polarization, and often-high membrane costs are significant issues in membrane separation methods12,20. The need for tuneable, highly selective technologies relying on inexpensive active elements has spurred exploration into next-generation water treatment processes and materials13,21.

CDI is a water treatment technology that does not require membranes and is promising for selective ion removal4,5,22,23. Typical CDI operation involves applying a constant voltage or current between two electrodes, which are often inexpensive and widely available activated carbons, in the presence of a feed stream (Fig. 1a)4. The electric field applied to the system causes the ions in the feed stream to electromigrate into the electrodes, where they are stored electrostatically in electric double layers (EDLs) formed in electrode nanopores (Fig. 1b). Once fully charged, the electrodes are regenerated electrically, by either short-circuiting or reversing the applied current, and the discharged ions are released from the EDLs to form a concentrated brine waste stream. CDI has been identified as a promising emerging water treatment technology for brackish water desalination and ion-selective separations4,5,24, but a major bottleneck to widespread deployment is short electrode lifetime25. A major cause of electrode degradation are Faradaic side reactions which oxidize the anode and reduce dissolved oxygen at the cathode26,27,28,29,30,31. In addition to activated carbons, alternate electrode materials that rely on intercalation processes and redox conversion reactions to deionize water are currently under investigation for selective ion removal23,32,33,34,35. Relative to capacitive electrodes, these materials enable higher salt storage per charge and reduced or equal energy consumption36, but typically allow for less energy recovery37, and generally suffer from higher electrode capital costs4,33,38.

Fig. 1: CDI concept for agricultural irrigation water treatment.
figure 1

a Schematic of a CDI cell fed with water containing excessive Na+ which must be treated for direct use in irrigation. The cell is charged at an applied cell voltage Vch at or above 1 V and for a time tch significantly shorter than the time to reach equilibrium, teq. b The cathode nanopore is functionalized with strong-acid sulfonic groups, which enhances the preferential storage of monovalent Na+ over divalent Ca2+ at short charging times. Use of stable sulfonic (SO3) groups and charging to short times minimizes Faradaic side reactions and thus electrode degradation. c The treated water has significantly reduced sodium absorption ratio (SAR) and ionic conductivity, rendering it suitable for direct use in irrigation.

In activated carbon CDI electrodes, a number of ion properties have been found to influence selectivity, such as valence19,39,40,41, hydrated size39,41,42,43, hydration shell energy and structure44,45, and bulk concentration21,40,46. Numerical and computational methods such as molecular dynamics and Monte Carlo simulations are useful for deeply probing equilibrium nanopore selectivity mechanisms, but are difficult to integrate into cell-level models capturing system dynamics47,48. In contrast, the modified Donnan (mD) model for nanopore EDLs at equilibrium is widely used to model selectivity in CDI, as it is a relatively simple analytical formulation, can be fit readily to experimental data, and is easy to integrate into a cell-level dynamic model27,40,43. However, equilibrium models are insufficient to fully characterize dynamic selectivity processes, as it is well-known that during charging in competitive ionic environments, monovalent ions are initially preferred but are gradually exchanged with divalent ions in the electrode nanopores as the system approaches equilibrium. Seo et al.49 observed the dynamic replacement of Na+ by Mg2+ and Ca2+ during a CDI cycle. Zhao et al.40 found that Na+ and Ca2+ were initially stored in proportion to their bulk concentrations, yet Ca2+ replaced Na+ at longer times, and both ions approached equilibrium values predicted by modified Donnan theory after 5 h of charging, whereas other dynamic models were utilized for selectivity analysis considering other EDL models50,51. Furthermore, Choi et al.52 observed short cycle time and high charging voltage increase monovalent ion removal relative to divalent ion removal. Thus, connecting between equilibrium nanopore models and cell-level dynamic models is important to fully explore and synergize between parallel ion selectivity mechanisms in CDI.

Electrode morphology and surface chemistry strongly influence selectivity in carbon electrodes. Techniques to enhance selectivity broadly follow two main approaches, physical tuning of nanopore size and chemical surface functionalization. Regarding the former approach, sufficiently narrow pores allow small ions to enter while larger ions are physically excluded, an effect known as ion sieving44,53,54. Regarding the latter approach, chemically deposited surface functional groups have been shown to improve selective removal in CDI by enhancing size-based exclusion effects43, and by binding preferentially to specific ions like NO3 and Pb2+55,56. Furthermore, functional groups have been shown to increase salt adsorption capacity57,58,59, cell charge efficiency57,58,59,60, and long-term cycling stability28,30,61,62. Surface functional groups behave as either acids or bases and exhibit either weak or strong dissociation behavior. While weak acid groups have been shown to enhance selectivity43, their performance can be significantly affected by variations in incoming feed pH63. Group stability is also critical, as Guyes et al.43 showed that cathode functionalization with weak acid carboxylic groups improved selectivity of K+ over Li+, though significant loss of chemical surface charge was observed after only a few charge–discharge cycles. Functionalization with sulfonic groups can possibly remediate both issues, as their strong-acid behavior (pKa ≈ −3) makes them insensitive to local pH. They have excellent stability towards reduction, and therefore will be less susceptible to faradaic reactions in the typical CDI operational voltage regime (ΔV ≤ 1.2 V). Furthermore, sulfonation has been shown to improve charge efficiency64,65, adsorption capacity64,65,66,67, and pore wettability66,68,69 in lab-scale tests on feedwaters containing solely NaCl. However, to our knowledge, the effect of sulfonic groups on ion-selective removal and its long-term stability upon CDI cell charge–discharge cycling has not yet been explored.

In this work, we demonstrate a monovalent-selective CDI cell that can simultaneously reduce feed conductivity and SAR (Fig. 1c), and is stable over 1000 charge–discharge cycles with a Coulombic efficiency greater than 96%. We first employ a combined dynamic-mD model and predict that functionalized electrodes enhance monovalent selectivity at short charging times relative to pristine electrodes. We validate this prediction experimentally using a cell with a sulfonated cathode, demonstrating enhanced separation factor and reductions of both SAR and feedwater conductivity compared to a cell with a pristine cathode. Moreover, we show that short charging times enables charging the cell at extended voltage windows of up to 2.5 V, well beyond those where electro-corrosion of the anode normally occurs. We show that such high-voltage operation leads to further reductions in conductivity and SAR, while maintaining a Coulombic efficiency greater than 90%, indicating a low rate of Faradaic side reactions, though separation factor is not improved. We compare flush and no-flush CDI operation in the extended voltage range and show that despite gains in productivity and charge efficiency achieved with flushing, desalinated water SAR, Ca2+ selectivity, and conductivity increase relative to no-flush operation, indicating that possible inclusion of a flush step for a selectivity process must be carefully evaluated. Finally, we cycled a cell with a sulfonated cathode 1000 times with a charging voltage of 1.2 V, achieving excellent electrochemical stability and reduced effluent SAR with increasing cycle number. Overall, we demonstrate that sulfonated electrodes can serve as the foundation for long-lasting, monovalent selective, membraneless CDI systems, which potentially can be utilized to improve irrigation water quality.

Results and discussion

Simulations

Zhao et al.40 described a time-dependent selectivity between Na+ and Ca2+, where at short charging times, Na+ is adsorbed selectively due to its larger concentration in the feed, but at longer times approaching equilibrium, Ca2+ is preferred due to the stronger electric force acting on the higher-valence ion. However, the latter study did not develop a dynamic model for a full CDI cell, incorporate the effects of ion size, or study the impact of chemically charged electrodes on selectivity. Building on our previous work in dynamic CDI modeling43,70, we here develop a model which addresses the latter elements by capturing the dynamics of a complete CDI cell with an electrolyte containing competing smaller-sized Na+ and larger Ca2+, and includes a nanopore chemical charge concentration, σchem, such as that created by strong-acid (e.g. sulfonic) groups. We consider two electrode types, a pristine electrode in which σchem = 0, and a chemically functionalized electrode in which σchem is constant and equal to −2M, such as from strong-acid sulfonic groups. We simulate two CDI cell configurations under an applied charging voltage of Vch = 1.0 V, the first comprised of a pristine anode and pristine cathode (P–P cell), and the second consisting of a pristine anode and functionalized cathode (F–P cell). Both electrodes have thickness le and are electrically isolated by a separator with thickness lsp, while the cathode is placed upstream (Fig. 2a).

Fig. 2: CDI simulation design and predictions.
figure 2

a Schematic of the CDI system used in simulations with either pristine (P) or functionalized (F) cathodes, with electrode and separator thicknesses le and lsp, respectively. Feedwater with ion concentrations cfeed,i enters the cell at x = 0 while charging at Vch, and the resulting desalinated effluent is collected for various scaled charging times, \(\hat t\), to quantify Na+ and Ca2+ concentration, ceffluent,i, and separation factor, \(\beta _{{\mathrm {Ca}}^{2+}}^{{\mathrm {Na}}^+}\). b Predictions of scaled Na+ ion adsorption, \({\Gamma}_{{\mathrm {Na}}^+}/{\Gamma}_{{\mathrm {Na}}^+, {\mathrm {eq}}}^{{\mathrm P} - {\mathrm P}}\) (left axis, green lines), Ca2+ ion adsorption, \({\Gamma}_{{\mathrm {Ca}}^{2+}}/{\Gamma}_{{\mathrm {Ca}}^{2+},{\mathrm {eq}}}^{{\mathrm P} - {\mathrm P}}\) (left axis, red lines), and \(\beta _{{\mathrm {Ca}}^{2+}}^{{\mathrm {Na}}^+}\) (right axis, blue lines), as functions of \(\hat t\). Calculations are for a model cell with either two pristine electrodes (P–P cell, solid lines) or a cell with a chemically functionalized cathode (F–P cell, dotted lines).

To gain insight into ion adsorption dynamics, in Fig. 2b we plot ion adsorption per unit electrode mass, Γi (defined in “Simulations” in “Methods”, Eq. (6)), for the P–P cell and F–P cell, scaled by \({\Gamma}_{i,{\mathrm{eq}}}^{{\mathrm{P - P}}}\), the adsorption of the P–P cell at equilibrium, where the subscript i denotes either Na+ or Ca2+. On the horizontal axis is time scaled by the cell diffusion timescale, \(\hat t \equiv tD_{{\mathrm{Na}}^ + }/l_{\mathrm{e}}^2\), where t is time and \(D_{{\mathrm{Na}}^ + }\) is the Na+ ion diffusivity at infinite dilution. Our dynamic model displays an expected time-dependent selectivity as \({\Gamma}_{{\mathrm{Na}}^{\mathrm{ + }}}/{\Gamma}_{{\mathrm{Na}}^{\mathrm{ + }},{\mathop{\rm{eq}}\nolimits} }^{{\mathop{\rm{P}}\nolimits} - {\mathrm {P}}}\) for the P–P cell (solid lines) reaches a maximum of 2.25 at \(\hat t = 0.87\) and then decreases. Meanwhile, \({\Gamma}_{{\mathrm{Na}}^{+}}/{\Gamma}_{{\mathrm{Na}}^{+},{\mathop{\rm{eq}}\nolimits} }^{{\mathop{\rm{P}}\nolimits} - \rm {P}}\) for the F–P cell (dotted lines) reaches a slightly lower maximum of 2.20 at \(\hat t = 0.90\). Turning our attention to Ca2+, \({\Gamma}_{{\mathrm{Ca}}^{{\mathrm{2 + }}}}/{\Gamma}_{{\mathrm{Ca}}^{{\mathrm{2 + }}},{\mathop{\rm{eq}}\nolimits} }^{{\mathop{\rm{P}}\nolimits} - {\mathrm {P}}}\) of both the P–P and F–P cells is negative for very early times, indicating net Ca2+ desorption, followed by monotonically increasing Ca2+ adsorption, reaching values of 0.46 and 0.41 at \(\hat t = 2\), respectively. Figure 2b also shows the predicted separation factor42,46,71,72,

$$\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + } \equiv \frac{{c_{{\mathrm{feed,Ca}}^{2 + }}}}{{c_{{\mathrm{feed,Na}}^ + }}}\frac{{{\Gamma}_{{\mathrm{Na}}^ + }}}{{{\Gamma}_{{\mathrm{Ca}}^{2 + }}}},$$
(1)

which quantifies selective adsorption of Na+ over Ca2+ for the P–P cell and the F–P cell. For both cell designs, we see \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + }\) approaches a negative asymptote at very short charging times as Ca2+ is net desorbed from the cell. This is followed by very high positive values of \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + }\) at early times of \(\hat t \ll 1\), indicating strong monovalent selectivity, which sharply decreases to near-zero values for \(\hat t \ll 1\). In the P–P cell, \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + }\) drops below unity much earlier, at \(\hat t = 0.053\), as compared to the F–P cell which remains monovalent-selective until \(\hat t = 0.52\). Thus, our model predicts that the F–P cell can deliver improved monovalent selectivity for longer charging times relative to the P–P cell, and that charging for longer times enables greater ion storage. Thus, we conclude that functionalizing the cathode is predicted to enhance Na+ removal from the feedwater.

Electrode characterization

Given the prediction from our dynamic theory that functionalizing the cathode with a strong-acid group enables improved monovalent selectivity (Fig. 2), we prepared a sulfonated activated carbon electrode (see “Methods”). Transmission Fourier Transform Infrared (FTIR) spectra of the pristine and sulfonated electrode materials are shown in Fig. 3a. The sulfonated electrode spectrum displays distinctive peaks at 1162 and 1157 cm−1, corresponding to the R-SO3 group, and multiple peaks in the band 1315–1220 cm−1, corresponding to the RO-SO3 group, thus confirming the presence of sulfonic functional groups on the electrode surface. We further quantified the concentration of nanopore chemical charge, σchem, by fitting experimental results of direct titrations of the carbon material (Fig. 3b) immersed in a strong basic solution (see “Methods”)43,63. Results show the pristine material is mildly charged with a significant pH dependence of the measured chemical charge, indicating the presence of weak acidic and basic functional groups. By contrast, the sulfonated electrode is strongly negatively charged, presenting σchem values between approximately −1.25 and −2.5M for the tested pH range, indicating the existence of fixed negative charges due to the presence of strongly acidic functional groups. Thus, sulfonated electrodes possess high negative nanopore chemical charge concentration regardless of local cell pH environment, a required condition for enhanced monovalent selectivity, as identified by the model shown in Fig. 2b.

Fig. 3: Electrode characterization.
figure 3

a Measured transmission FTIR spectra for a pristine electrode and an electrode after sulfonation. b Measured nanopore chemical charge concentration, σchem, of these electrodes determined from direct titration experiments.

CDI experiments

Figure 4a schematically shows the differences between pristine and sulfonated cathode nanopores. The pristine nanopore contains a small amount of native chemical charge, while the sulfonated nanopore contains a high concentration of negatively charged sulfonic groups (Fig. 3b). To verify the theoretical predictions of improved monovalent selectivity via functionalized cathodes (Fig. 2b), we built and characterized a CDI cell with either a pristine cathode and a pristine anode (P–P cell) or a sulfonated cathode and a pristine anode (S–P cell). All experiments involved equally long charging and discharging steps and a feed solution consisting of 14 mM NaCl and 0.5 mM CaCl2. Results presented are from the limit cycle, which is the cycle at which the conductivity profile reaches a dynamic steady state24. Figure 4b depicts the measured Na+ separation factor, \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + }\), calculated via Eq. (1), vs. charging voltage, Vch, for a discharge voltage of 0 V and for full-cycle times (FCTs) of 6, 15, and 30 min (which have charging steps corresponding to \(\hat t\) of 0.67, 1.67, and 3.33, respectively). The results at 15 and 30 min FCT are very similar for P–P and S–P cells, with a strong Ca2+ preference for both charging times. For example, at 30 min FCT and 0.4 V, \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + } = 0.1\) in the P–P cell, and at 1.2 V it rises to 0.49. However, the two cells exhibit significantly different trends at 6 min FCT. The P–P cell separation factor ranges between 0.49 at 0.4 V and 0.85 at 1.2 V, whereas in the S–P cell the increase is much sharper, from 0.25 at 0.4 V to 0.96 at 1.2 V. This latter result indicates that the sulfonated cathode enables stronger divalent selectivity at low Vch, yet stronger monovalent selectivity at high Vch relative to a pristine cathode (see Supplementary Fig. 1 for measured Na+ and Ca2+ adsorption). These findings are consistent with the theoretical trends of Fig. 2b, which predicts similar selectivity between the two cells for \(\hat t\) > 1 but enhanced monovalent selectivity for the cell with a functionalized cathode when \(\hat t\) < 1.

Fig. 4: Experimental selectivity and output water quality.
figure 4

a A schematic representation of a cathode nanopore in the P–P cell and the S–P cell containing charged sulfonic (SO3) groups. b Measured separation factor, \(\beta _{{\mathrm {Ca}}^{2+}}^{{\mathrm {Na}}^+}\), for the P–P and S–P cells for full-cycle times (FCTs) of 6, 15, and 30 min. c Measured desalinated water SAR and conductivity for the P–P and S–P cells for FCT of 30, d 15, and e 6 min. In panels ce, feed conditions are represented by dashed horizontal and vertical lines.

Separation factor, defined by Eq. (1), is a fundamental metric which can be compared across different water treatment technologies. However, separation factor alone is not sufficient to evaluate a technology’s suitability for treating water for irrigation applications. Additionally, the application-specific metrics of ionic conductivity, κ, and SAR are also important due to their importance to soil quality and crop health. The latter is defined as

$${\mathrm{SAR}} \equiv \frac{{c_{{\mathrm{Na}}^ + }}}{{\sqrt {c_{{\mathrm{Ca}}^{2 + }} + c_{{\mathrm{Mg}}^{2 + }}} }},$$
(2)

where the ion concentrations \(c_{{\mathrm{Na}}^ + }\), \(c_{{\mathrm{Ca}}^{2 + }}\), and \(c_{{\mathrm{Mg}}^{2 + }}\) have units of mM. In this work, \(c_{{\mathrm{Mg}}^{2 + }} = 0\) and so \({\mathrm{SAR}} = c_{{\mathrm{Na}}^ + }/\sqrt {c_{{\mathrm{Ca}}^{2 + }}}\). The effects of Vch, FCT, and cell type on product water ionic conductivity and SAR are shown in Fig. 4c–e, with dashed horizontal and vertical lines representing the feed conditions (κfeed = 1.75 mS/cm, SARfeed = 19.8). At the longest FCT tested of 30 min, Fig. 4c shows that for both the P–P and S–P cells, increasing Vch decreases effluent conductivity, but for every Vch, SAR is increased above its feed value by up to several units. This is the expected result when approaching equilibrium, as the nanopore will select the ion with higher valence due to a higher electric force exerted on such ions (Fig. 2b)40. For an FCT of 15 min (Fig. 4d), both cells deliver a reduction in conductivity as compared to the feed, but the output SAR remains at or above the feed value at all tested conditions. By contrast, the FCT of 6 min is sufficiently short to selectively store Na+ and reduce SAR below the feed value. Figure 4e shows monotonic reductions of SAR and conductivity with increasing Vch for the P–P cell, with output values of 17.3 and 1.22 mS/cm at 1.2 V, respectively. The S–P cell achieves improved performance with an output SAR of 16.0 and a conductivity of 1.12 mS/cm at 1.2 V. These findings are again consistent with the trends predicted in Fig. 2b and show experimentally that use of a strong-acid functionalized cathode allows for enhanced monovalent selectivity.

With the promising results obtained with short cycle times in Fig. 4e, we hypothesized that short charging times would also limit electrode degradation. Thus, we explored extending the charging voltage window to further reduce SAR and conductivity of the treated water. Figure 5a shows that increasing Vch to 1.5, 2, and 2.5 V with a 6 min FCT in the S–P cell achieved this goal, culminating at 2.5 V with \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + }\) of 0.89, SAR of 14, and conductivity of 0.81 mS/cm, a decrease of 6 SAR units and a 54% conductivity reduction from the feed solution. Furthermore, a second pass of product water from the 1.2 V and 6 min FCT experiment resulted in an even lower SAR of 13.3 and conductivity of 0.69 mS/cm, also shown in Fig. 5a, with \(\beta _{{\mathrm{Ca}}^{2 +}}^{{\mathrm{Na}}^+}\) = 0.91. We also explored incorporating a flush step into the CDI cycle, where the flush step involved pumping feedwater through the cell for 1 min at 5 mL/min after each half-cycle while the cell was held at zero current. Such flush steps prevent resalination of the product water and desalination of the brine73. Figure 5a shows that flushing increased SAR of the product water significantly, but still resulted in a net reduction from the feed SAR at 2.5 V. Further, the flush step increased product water conductivity relative to no-flush operation, as some feedwater was flushed into the product water. This served to raise productivity from ~46 L/h/m2 without flushing to ~93 L/h/m2 with flushing.

Fig. 5: Evaluation of extended voltage windowing and flushing on produced water quality in the S–P cell.
figure 5

a Measured product water SAR and conductivity. b Measured Coulombic efficiency ηcoul and charge efficiency λcycle.

To evaluate further the strategy of extended voltage windowing and flushing, Fig. 5b shows the measured Coulombic and charge efficiencies from the experiments in Fig. 5a. Coulombic efficiency is an indicator of the charge magnitude lost to Faradaic side reactions, and is defined as \(\eta _{{\mathrm{coul}}} \equiv \left| {q_{{\mathrm{dis}}}/q_{{\mathrm{ch}}}} \right|\), where \(q_{{\mathrm{ch}}}\) is the electric charge transferred between the electrodes during the charge step and \(q_{{\mathrm{dis}}}\) is the charge stored in the electrodes and subsequently released during the discharge step. Coulombic efficiencies of approximately 100% imply that side reactions are nearly absent, while lower values reveal that significant charge is lost to side reactions, and that degradation of the electrodes likely occurs during cycling29. Figure 5b shows that Coulombic efficiency differs by no more than 5% between the flush and no-flush modes for each Vch. Furthermore, the Coulombic efficiency remains greater than 93% up to 2 V, which shows that extending the voltage window is a promising strategy for improved monovalent selectivity. At 2.5 V, Coulombic efficiency drops to 85% (flush) and 88% (no flush), indicating that this Vch may be less suitable for long-term CDI operation. Figure 5b also shows the flush step increases the charge efficiency by ~20–40% relative to the no-flush mode. Charge efficiency for this system is \({\Lambda}_{{\mathrm{cycle}}} \equiv m\left( {{\Gamma}_{{\mathrm{Na}}^ + } + 2{\Gamma}_{{\mathrm{Ca}}^{2 + }}} \right)/Fq_{{\mathrm{dis}}}\), where F is the Faraday constant, and indicates the ratio of moles of ions removed to moles of electric charged stored in the electrodes (calculated from qdis). The low charge efficiencies of 40–50% in the no-flush experiments likely result from re-salinization of the desalted water present in the cell immediately after charging73. Overall, incorporating a flush step leads to increases in charge efficiency and productivity, but the output irrigation water quality is lowered in terms of conductivity and SAR.

The results of Figs 4 and 5 show that over many experimental conditions, our cell can simultaneously reduce SAR and conductivity of the feedwater, and that extending the voltage window can be an effective strategy. To further evaluate our results, Fig. 6a shows the energy consumption per unit product water, Ev, for the results shown in Figs 4 and 5 (excluding the second pass results). Energy consumption increases by over an order of magnitude, from ~0.01–0.1 kWh/m3 at separation factors of order 0.1, to ~0.3 kWh/m3 for separation factors of ~1. Higher energy consumptions of ~1 kWh/m3, obtained with applied voltages of 2 V or greater, did not further improve separation factor. In context of the performance evaluation of Hawks et al.74, we find typical energy usage of 0.2–0.4 kWh/m3 for Cl concentration reductions of 4–6 mM and a throughput of ~46 L/h/m2 (Supplementary Table 1). For comparison, Cerón et al.54 reported 0.21–0.24 kWh/m3 for a concentration reduction of 4–6 mM using a 20 mM NaCl feed and 17–19 L/h/m2 productivity. Thus, we conclude that our system consumes similar levels of energy but at higher throughput than Cerón et al.

Fig. 6: Measured energy consumption, Ev, and thermodynamic energy efficiency (TEE), for the case of zero energy recovery.
figure 6

Marker color indicates the product water pH. a Measured energy consumption per m3 of product water. Coulombic efficiency is indicated for the point with \(\beta _{{\mathrm {Ca}}^{2+}}^{{\mathrm {Na}}^+} = 0.96\) (experimental parameters of 1.2 V, 6 min FCT), which consumed 0.36 kWh/m3. Inset shows the fraction of total energy use lost to resistive dissipation, Ev,resist/Ev, vs. separation factor. b TEE of the data shown in panel a, where lines are meant to guide the eye.

To understand possible sources of energy loss, we calculate the resistive losses per unit product water, approximated via \(E_{{\mathrm{v,resist}}} \approx \left\langle {I^2} \right\rangle \cdot {\mathrm{FCT}} \cdot R_{\mathrm{s}}/\overline V\)62, where \(\left\langle {I^2} \right\rangle = \left( {1/{\mathrm{FCT}}} \right){\int}_{{\mathrm{FCT}}}^{\,} {I^2{\mathrm d}t}\) is the time-averaged squared current over a full charge–discharge cycle and Rs is the series resistance for one separator layer, the latter of which is determined from electrode impedance spectroscopy (EIS) measurements (see “Methods”). The inset in Fig. 6a reveals that series resistive losses are a significant fraction of overall energy input, between 24 and 56% of the overall energy usage, and that the lowest fractions of resistive losses occur when attaining high separation factors in the S–P cell. In this work, no energy recovery was implemented on cell discharge. Energy recovery has been shown experimentally to capture up to 50% of the input energy during the discharge half-cycle75, while the highest possible energy recovery fraction is in excess of 80%76. The results shown in the inset of Fig. 6a show that such recovery will be an effective strategy, as a majority of the energy input for highly selective conditions was not lost to series resistances, but may instead be stored capacitively. Returning to the main plot of Fig. 6a, the S–P cell tends to acidify the output water to a greater degree than the P–P cell as evidenced by the color of each marker, particularly at separation factors greater than ~0.7. At a separation factor of 0.96, the output pH is reduced to 5.1 from a feed value of ~7, even with a Coulombic efficiency of 97.5% (1.2 V, 6 min FCT, S–P cell). At higher Vch acidification is more severe, though flushing somewhat mitigates this (Supplementary Table 1).

Also of interest is the thermodynamic energy efficiency (TEE), a useful measure for quantifying the input energy lost to irreversibilites such as resistive losses and parasitic side reactions77,78. For our CDI system, which separates feedwater into brine and product streams, TEE is calculated by dividing Ev by the minimum thermodynamic desalination energy Emin, given by

$$E_{\min } = RT\mathop {\sum}\limits_i {\left[ {\frac{{c_{{\mathrm F},i}}}{{WR}}\ln \left( {\frac{{c_{{\mathrm B},i}}}{{c_{{\mathrm F},i}}}} \right) - c_{{\mathrm P},i}\ln \left( {\frac{{c_{{\mathrm B},i}}}{{c_{{\mathrm P},i}}}} \right)} \right]} .$$
(3)

Here i includes Na+, Ca2+, and Cl, and the subscripts F, B, and P represent feed, brine, and product streams, respectively. Water recovery is \(WR = V_{\mathrm P}/V_{\mathrm F}\), where VP and VF are the volumes of the product and influent feed streams, respectively. Further details on the derivation and use of Eq. (3) are given in the Supplementary Discussion. Equation (3) has been applied by a number of authors to CDI operation62,79,80,81,82, though to our knowledge there are no previous studies evaluating TEE for a process investigating monovalent ion selectivity in CDI. Figure 6b displays the TEE of the results in Fig. 6a, and we see that TEE is not correlated with separation factor, but is generally higher for the S–P cell. This can be explained by the fact that the S–P cell generally exhibits higher Coulombic and charge efficiencies (Supplementary Table 1). We emphasize that values reported in Fig. 6 for energy consumption and TEE are for zero energy recovery since discharge occurs at 0 V, and furthermore for a largely unoptimized cell. TEEs of up to ~9% have been reported for optimized CDI cells62, and we expect that future cell optimization will significantly reduce the series resistances83,84.

Returning to the results of Fig. 4e, the significant SAR and conductivity reductions at 1.2 V and 6 min FCT in the S–P cell are accompanied by a Coulombic efficiency of 97.5% (Supplementary Table 1). The relatively insignificant faradaic losses suggest that the electrodes are stable under long-term cycling at these conditions. To evaluate this, we performed a 1000-cycle experiment at these experimental conditions and evaluated water quality at the beginning (limit cycle), middle, and end of cycling. The results in Fig. 7a reveal that the Na+ separation factor, \(\beta _{{\mathrm{Ca}}^{2 + }}^{{\mathrm{Na}}^ + }\), increases from 0.83 to 1.6, indicating that the electrodes are unequivocally selective for Na+ over the majority of tested cycles. Coulombic efficiency remains between 96 and 98% from the limit cycle (cycle 11) until the end of the experiment. The inset in Fig. 7a surprisingly reveals that SAR of the produced water continually improves during cycling, from 17.7 at the limit cycle to 15.8 at the end of the experiment. This improvement is due to a drastic reduction in Ca2+ adsorption from 2.6 to 1.1 µmol/g, whereas Na+ adsorption only modestly decreases from 65 to 55 µmol/g (Supplementary Table 1). We further see that the effluent conductivity is quite stable and increases by only 8%, from 1.12 to 1.20 mS/cm, from the limit cycle to the final cycle. Furthermore, the effluent pH becomes more neutral, rising from 5.11 to 6.57 (Supplementary Table 1). We therefore conclude that the CDI system is not only electrochemically stable and monovalent selective at the given conditions, but the output water quality actually improves with repeated cycling due to a decrease in SAR and a more-neutral pH.

Fig. 7: Selectivity, output water quality, and cell stability in long-term cycling.
figure 7

a Measured water separation factor and Coulombic efficiency for 1000-cycle experiment at 1.2 V and 6 min FCT, S–P cell. Inset: product water SAR and conductivity. b Comparison of Cl adsorption capacity for long-term CDI cycling experiments in this and other works27,28,29,57,85,86,87,88,89. Marker position on the vertical axis indicates initial Cl capacity, and color indicates the percentage of retained Cl adsorption capacity at the final cycle.

In Fig. 7b we compare our results with other CDI longevity studies that used capacitive carbon electrodes without membranes27,28,29,57,85,86,87,88,89. Since the other studies presented utilize NaCl alone in the feedwater whereas we use NaCl and CaCl2, we employ chloride adsorption, \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - } = {\mathrm{{\Gamma}}}_{{\mathrm{Na}}^ + } + 2{\mathrm{{\Gamma}}}_{{\mathrm{Ca}}^{2 + }}\), as the comparison metric. The vertical axis position indicates \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) at the beginning of the experiment, and marker color indicates the percentage of \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) retention at the final cycle (studies with \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) retention of 100% or greater are shown as white open markers27,28,86,87). Our CDI system surpasses the next-longest cycling study by ~400 cycles, and to our knowledge is the CDI stability study with the highest achieved cycles number to date, and furthermore retains 82% of its initial \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) of 70 μmol/g at the 1000th cycle. Notably, CDI systems with higher \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) in Fig. 7b typically exhibited similar levels of \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) capacity loss after only 100 cycles. We expect this capacity-degradation tradeoff to also apply to the S–P cell, as the maximum \({\mathrm{{\Gamma}}}_{{\mathrm{Cl}}^ - }\) achieved in this study of 220 μmol/g was accompanied by a Coulombic efficiency of 83% (1.2 V, 30 min FCT).

Overall,our study reveals that functionalized CDI electrodes are promising candidates for SAR reduction in irrigation water and possibly other monovalent-selective water treatment applications, as they exhibit stable, monovalent-selective behavior and significant conductivity reduction under conditions of short cycle time and high charging voltage for potentially thousands of cycles. We expect that improvements in water recovery and TEE, already demonstrated by other authors for CDI62, as well as the incorporation of energy recovery systems, will further reduce the overall energy requirements. We further expect that additional study of the underlying selectivity processes at play in CDI systems will reveal novel methods for further increasing monovalent selectivity.

Methods

Simulations

We model a one-dimensional flow-through electrode (FTE) CDI cell filled by salt water containing Na+, Ca2+, and Cl (Fig. 2a). The mass balance equation for each of the dissolved ions is of the form

$$p_{{\mathrm{mA}}}\frac{{\partial c_{{\mathrm{mA}},i}}}{{\partial t}} + p_{{\mathrm{np}}}\frac{{c_{{\mathrm{np}},i}}}{{\partial t}} = - \frac{{\partial J_i}}{{\partial x}} = \frac{{p_{{\mathrm{mA}}}}}{{\tau _{{\mathrm{mA}}}}}\frac{\partial }{{\partial x}}\left( {D_i\frac{{\partial c_{{\mathrm{mA}},i}}}{{\partial x}} + z_iD_ic_{{\mathrm{mA}},i}\frac{{\partial \phi _{{\mathrm{mA}}}}}{{\partial x}}} \right) - U\frac{{\partial c_{{\mathrm{mA}},i}}}{{\partial x}}.$$
(4)

Here \(p_{{\mathrm{mA}}}\) and \(p_{{\mathrm{np}}}\) are the macropore and nanopore porosities, respectively; \(c_{{\mathrm{mA}},i}\) and \(c_{{\mathrm{np}},i}\) are the ion concentrations in the macropores and nanopores, respectively; and the subscript i refers to the i-th ion. Also, Ji is the superficial ionic flux, given by the extended Nernst–Planck equation, U is the superficial velocity, and \(\tau _{{\mathrm{mA}}}\) is the macropores’ tortuosity described by the Bruggeman equation, \(\tau _{{\mathrm{mA}}} = p_{{\mathrm{mA}}}^{ - 1/2}\). Further, Di and zi are the molecular diffusion coefficient at infinite dilution and ion valence, respectively; \(\phi _{{\mathrm{mA}}}\) is the bulk electric potential scaled by the thermal potential \(V_{\mathrm{T}} \equiv RT/F\), where R is the ideal gas constant; and T is absolute temperature. We invoke electroneutrality in the bulk solution, \(\mathop {\sum}\nolimits_i {z_ic_{{\mathrm{mA,}}i} = 0}\). We find the bulk potential from the charge balance equation,

$$p_{{\mathrm{np}}}\frac{{\partial \sigma _{{\mathrm{ion}}}}}{{\partial t}} = - \frac{{\partial J_{\mathrm{e}}}}{{\partial x}} = \frac{{p_{{\mathrm{mA}}}}}{{\tau _{{\mathrm{mA}}}}}\mathop {\sum}\limits_i {\left[ {\frac{\partial }{{\partial x}}\left( {z_iD_i\frac{{\partial c_{{\mathrm{mA}},i}}}{{\partial x}} + z_i^2D_ic_{{\mathrm{mA}},i}\frac{{\partial \phi _{{\mathrm{mA}}}}}{{\partial x}}} \right)} \right]} .$$
(5)

Here \(J_{\mathrm{e}} \equiv \mathop {\sum}\nolimits_i {z_iJ_i}\) is the ionic current, \(\sigma _{{\mathrm{ion}}} \equiv \mathop {\sum}\nolimits_i {z_ic_{{\mathrm{np}},i}}\) is the ionic charge concentration in the nanopores, and the summation is performed over all dissolved ions Na+, Ca2+, and Cl.

Nanopore concentrations are calculated by applying the modified Donnan (mD) model90,91, \(c_{{\mathrm{np}},i} = c_{{\mathrm{mA}},i}\exp \left( { - z_i{\Delta}\phi _{\mathrm{D}} - {\Delta}\mu _i^{{\mathrm{ex}}}} \right)\), where \({\Delta}\phi _{\mathrm{D}}\) is the Donnan potential drop. Further, \({\Delta}\mu _i^{{\mathrm{ex}}}\) is the excess potential, accounting here for the hydrated size of ions, utilizing the Boublik–Mansoori–Carnahan–Starling–Leland equation of state41,42,43,92,93. The Donnan potential drop is found from \(\phi _{{\mathrm{el}}} - \phi _{{\mathrm{mA}}} = {\Delta}\phi _{\mathrm{D}} + {\Delta}\phi _{\mathrm{S}}\), where \(\phi _{{\mathrm{el}}}\) is the scaled electrode potential and \({\Delta}\phi _{\mathrm{S}}\) is Stern potential drop given by \({\Delta}\phi _{\mathrm{S}} \equiv F\sigma _{{\mathrm{elec}}}/V_{\mathrm{T}}C_{\mathrm{S}}\). Here, \(C_{\mathrm{S}}\) is the Stern layer capacitance and \(\sigma _{{\mathrm{elec}}}\) is the nanopore electronic charge concentration found from nanopore charge balance, \(\sigma _{{\mathrm{ion}}} + \sigma _{{\mathrm{chem}}} + \sigma _{{\mathrm{elec}}} = 0\). The boundary conditions employed to solve Eq. (4) are \(\left. {J_i} \right|_{x = 0} = Uc_{{\mathrm{feed,}}i}\) and \(\left. {\left( {J_i - Uc_{{\mathrm{mA}},i}} \right)} \right|_{x = 2l_{\mathrm{e}} + l_{{\mathrm{sp}}}} = 0\), where \(c_{{\mathrm{feed,}}i}\) is the feed concentration, the x-axis origin is placed at the cell inlet, and \(l_{\mathrm{e}}\) and \(l_{{\mathrm{sp}}}\) are the thicknesses of an electrode and separator, respectively. The latter boundary conditions are appropriate for the case of high Peclet numbers, where the reservoir is long compared to the cell (\(l_{{\mathrm{res}}}/l_{\mathrm{e}} > 10\))94. The boundary conditions employed for Eq. (5) are zero current at the electrodes’ edges, \(\left. {J_{\mathrm{e}}} \right|_{x = 0} = \left. {J_{\mathrm{e}}} \right|_{x = 2l_{\mathrm{e}} + l_{{\mathrm{sp}}}} = 0\). For Eq. (4), the initial conditions are \(c_{{\mathrm{mA,}}i}\left( {x,t = 0} \right) = c_{{\mathrm{feed,}}i}\), while for Eq. (5), the initial condition is constant potential, \(\phi _{{\mathrm{mA}}}\left( {x,t = 0} \right) = \phi _0\). To calculate \(\phi _0\), we introduce the total charge balance of the system at equilibrium, \({\int}_{V_{\mathrm{A}}} {p_{{\mathrm{np}}}\sigma _{{\mathrm{elec,A,0}}}{\mathrm d}V_{\mathrm{A}}} + {\int}_{V_{\mathrm{C}}} {p_{{\mathrm{np}}}\sigma _{{\mathrm{elec,C,0}}}{\mathrm d}V_{\mathrm{C}}} = 0\), where \(V_{\mathrm A}\) and \(V_{\mathrm C}\) are the anode and the cathode volumes, respectively, and \(\sigma _{{\mathrm{elec,A,0}}}\) and \(\sigma _{{\mathrm{elec,C,0}}}\) are the nanopore electronic charge concentrations before charging, at the anode and the cathode, respectively. The concentrations \(\sigma _{{\mathrm{elec,A,0}}}\) and \(\sigma _{{\mathrm{elec,C,0}}}\) are functions of \(\phi _0\), and therefore solving the charge balance equation results in finding \(\phi _0\). The set of equations was solved by COMSOL Multiphysics using the parameters presented in Supplementary Table 2.

The adsorption per unit electrode mass of ion i, either Na+, Ca2+, or Cl, is defined as

$${\Gamma}_i \equiv \left( {c_{{\mathrm{feed}},i} - c_{{\mathrm{effluent}},i}} \right)\bar V/m,$$
(6)

where \(\bar V\) is the collected effluent water volume, m is the combined mass of the dry anode and cathode, and \(c_{{\mathrm{feed,}}i}\) and \(c_{{\mathrm{effluent,}}i}\) are the ion concentrations of the feedwater and collected effluent, respectively.

Electrode material

The pristine electrode material used in this work is activated carbon cloth (ACC-5092-15; Kynol Europa GmbH, Germany) with ~600 μm thickness and ~1400 m2/g surface area, with the latter determined from N2 gas sorption and BET analysis. This material was characterized in several previous CDI works30,43,95,96.

The sulfonated electrode material was prepared as follows97. Pristine carbon cloth weighing about 4 g was inserted into a flask containing at least 28 mL of 20% fuming sulfuric acid (H2SO4xSO3). The flask was then closed with a stopper. After 24 h, the cloth was removed from the flask and soaked with an excess of hexane for 5–10 min. The cloth was then transferred to a beaker with deionized water at 0 °C and soaked for 5–10 min. The cloth was then washed by soaking in deionized (DI) water at room temperature three additional times, each time for 30 min, and then dried in air at 80 °C for 12 h.

The pristine and sulfonated materials were cut into electrode squares with a cross-sectional area of 6.25 cm2. Electrodes were rinsed with deionized (DI) water (18.2 MΩ, Synergy Water Purification System, Merck Millipore KGaA), dried at 80 °C for 3 h, then immediately weighed, as the carbon is hygroscopic. The specific nanopore volumes of the pristine and sulfonated materials are approximately 0.53 and 0.51 mL/g, respectively, as determined from N2 adsorption (Supplementary Fig. 2).

Fourier transform infrared spectroscopy

The pristine and sulfonated materials were characterized with FTIR to determine functional group bonds. Potassium bromide (KBr) was dried in a furnace before usage, and then about 400 mg was ground into powder before mixing with about 0.05 mg of electrode. Approximately 150 mg of the well-mixed powder was transferred to a KBr pellet die and pressed with 5 t of force for about 1 min. The prepared KBr pellet was then tested with FTIR (Bruker Tensor 27, Bruker Corporation, USA) using the transmission mode. Raw data were smoothed, baseline-calibrated and normalized with the peak at 804 cm−1.

Titrations

Approximately 0.2 g of electrode material was ground to a powder and added to a vessel containing 35 mL of 0.05 M NaOH and 35 mL of 18.2 MΩ DI water (Synergy Water Purification System; Merck Millipore, USA). The solution was bubbled with N2 gas under stirring for 20 min, then sealed and equilibrated under stirring for 24 h. The solution was then transferred to a closed vessel in the titration system (iAquatrode Plus and 904 Titrando, Metrohm AG, Switzerland) and bubbled with N2 for an additional 16 min. The nitrogen flow was then reduced to one bubble every several seconds to prevent air intrusion in the vessel. The solution was stirred for 4 min, then automatically titrated with 70 mL of 0.05 M HCl with a drift criterion of 0.5 mV/min. A blank sample without electrode was titrated in the same manner without the initial 20-min bubbling and 24 h equilibration steps. The titration curves are shown in Supplementary Fig. 3.

Titration modeling

The chemical charge concentrations of Fig. 3b were obtained from a model-to-data fitting process using the equilibrium acid–base model of Guyes et al.43 with an additional strong acid term. Briefly, the model considers an electrode of mass m and nanopore volume per unit electrode mass \(v_{{\mathrm{np}}}\), immersed in a strong base (NaOH) of initial volume V0 and concentration cNaOH, which is titrated with volume V of a strong-acid (HCl). Two phases are considered, the electrode nanopores and the bulk solution. No external electric potential is applied to the electrode, but the presence of charged surface groups causes a Donnan potential drop, \({\Delta}\phi _{\mathrm{D}}\), to form between the nanopores and the bulk. The surface groups considered are a single weak acid group, A, a single strong-acid group assumed to be a sulfonic group, –SO3H, and a single weak base group, B. The groups A, –SO3H, and B dissociate according to their equilibrium constants \(K_{{\mathrm{a}}1} = c_{m,{\mathrm{H}}^ + }c_{{\mathrm{A}}^ - }/c_{{\mathrm{HA}}}\), \(K_{{\mathrm{a2}}} = c_{m,{\mathrm{H}}^ + }c_{{\mathrm{SO}}_{\mathrm{3}}^{\mathrm{ - }}}/c_{{\mathrm{SO}}_3{\mathrm{H}}}\), and \(K_{{\mathrm{a3}}} = c_{m,{\mathrm{H}}^ + }c_{\mathrm{B}}/c_{{\mathrm{BH}}^ + }\), respectively, where \(c_{{\mathrm{HA}}}\), \(c_{{\mathrm{SO}}_3{\mathrm{H}}}\), and \(c_{\mathrm{B}}\) and are the nanopore concentrations of the groups in uncharged form; \(c_{{\mathrm{A}}^ - }\), \(c_{{\mathrm{SO}}_{\mathrm{3}}^{\mathrm{ - }}}\), and \(c_{{\mathrm{BH}}^ + }\) are the concentrations of the groups in charged form; and \(c_{m,{\mathrm{H}}^ + }\) is the micropore hydronium concentration (all concentrations are per unit nanopore volume).

In the absence of an applied potential, the nanopore charge balance is

$$\sigma _{{\mathrm{chem}}} + \sigma _{{\mathrm{ionic}}} = 0,$$
(7)

where the nanopore chemical charge is

$$\sigma _{{\mathrm{chem}}} = F\left( { - \frac{{c_{{\mathrm{HA}}} + c_{{\mathrm{A}}^ - }}}{{1 + c_{m,{\mathrm{H}}^ + }/K_{{\mathrm{a}}1}}} - \frac{{c_{{\mathrm{SO}}_3} + c_{{\mathrm{SO}}_3{\mathrm{H}}}}}{{1 + c_{m,{\mathrm{H}}^ + }/K_{{\mathrm{a2}}}}} + \frac{{c_{\mathrm{B}} + c_{{\mathrm{BH}}^ + }}}{{1 + K_{{\mathrm{a3}}}/c_{m,{\mathrm{H}}^ + }}}} \right),$$

and the nanopore ionic charge is \(\sigma _{{\mathrm{ionic}}} = - 2\left( {c_{{\mathrm{Na}}^ + } + c_{{\mathrm{H}}^ + }} \right)\sinh \left( {{\Delta}\phi _{\mathrm{D}}} \right)\). Ion size effects are neglected for simplicity. The nanopore charge balance Eq. (7) is solved numerically along with Na+ and Cl- balances between the bulk and nanopores,

$$V_0c_{{\mathrm{NaOH}}} - mv_{{\mathrm{np}}}c_{{\mathrm{Na}}^ + }\exp \left( { - {\Delta}\phi _{\mathrm{D}}} \right) - \left( {V_0 + V - m\nu _{{\mathrm{np}}}} \right)c_{{\mathrm{Na}}^ + } = 0,$$
(8)
$$Vc_{{\mathrm{HCl}}} - mv_{{\mathrm{np}}}c_{{\mathrm{Cl}}^ - }\exp \left( {{\Delta}\phi _{\mathrm{D}}} \right) - \left( {V_0 + V - m\nu _{{\mathrm{np}}}} \right)c_{{\mathrm{Cl}}^ - } = 0,$$
(9)

where \(c_{{\mathrm{Na}}^ + }\) and \(c_{{\mathrm{Cl}}^ - }\) are bulk concentrations, and electroneutrality in the bulk,

$$c_{{\mathrm{Na}}^ + } + c_{{\mathrm{H}}^ + } - c_{{\mathrm{Cl}}^ - } - \frac{{K_{\mathrm{w}}}}{{c_{{\mathrm{H}}^ + }}} = 0.$$
(10)

The model was fitted to the data using the fitting parameters given in Supplementary Table 3. For further details, the reader is referred to Guyes et al.43 and Hemmatifar et al.63.

CDI characterization

Cell design

The custom-built FTE CDI cell consists of two electrodes electronically isolated by a separator (Whatman 2 cellulose filter paper, GE Life Sciences, 2.7 cm × 2.7 cm, 190 μm thickness). Graphite current collectors (FC-GR, Graphitestore.com) contact the posterior side of each electrode. A 9 × 9 grid of 1.5 mm diameter holes was milled into each collector to allow water passage. The cell is enclosed on both sides with milled PVDF blocks, which each contain one fluid flow line and a vent line for air removal. A funnel was cut into the downstream-side block to facilitate water flow toward the fluid line. Compressible, laser-cut ePTFE gaskets (Gore-Tex NSG16X-GP; W.L. Gore & Associates, ~1.4 mm uncompressed thickness) provide sealing. The cell was assembled and fastened with stainless steel bolts. The internal cell volume is approximately 2 mL. A cell schematic is provided in Supplementary Fig. 4.

Electrochemical impedance spectroscopy (EIS)

The separator resistance Rsp, the external electronic resistance REER, and the series resistance Rs were determined from a method based on Hawks et al.74 and used as simulation parameters. EIS spectra were taken over the frequency range 700 kHz to 40 mHz in the CDI cell with a potentiostat (Reference 3000, Gamry, USA). A two-point configuration was used, where the cathode was connected to the counter and reference wires and the anode was connected to the working and working sense wires. Both P–P and S–P configurations were evaluated, and feed solution was flowed through the cell at 1 mL/min. Spectra were taken with different separator thicknesses, achieved by stacking 1–4 separators together (Supplementary Fig. 5a, b). The minimum Re(Z) on each spectrum is the point of minimum phase angle, which we treat as Rs. Supplementary Fig. 5c shows Rs vs. separator thickness with a linear fit, where the vertical intercept is REER (1.35 Ω for the P–P cell and 0.721 Ω for the S–P cell), and the slope is Rsp (7.28 Ω/separator for the P–P cell and 7.75 Ω/separator for the S–P cell).

CDI setup and experiments

The CDI experimental setup consists of a 0.5 L glass bottle that served as the feedwater reservoir, a peristaltic pump (Masterflex 07551-30, Cole-Parmer, USA), the CDI cell, a conductivity sensor (Tracedec 390-70; Innovative Sensor Technologies GmbH, Austria), and a voltage source (2400 Source Meter, Keithley Instruments, USA), the latter of which was connected to the cell’s current collectors. The pump, cell, and conductivity sensor were connected via flexible tubing. Feedwater was drawn from the reservoir and first passed through the cell, and then through the conductivity sensor. The cell was oriented so that water first passed through the cathode (electrode at negative potential) and then the anode (positive potential). The voltage source and pump were remotely controlled with a Matlab script. Current and voltage data were collected in Matlab, and conductivity data were recorded in the conductivity sensor software.

Feedwater comprised of 0.5 mM CaCl2 and 14 mM NaCl was prepared with CaCl2 (>96%; Fisher Scientific UK), NaCl (>99.5%, SDFCL, India) and DI water. Prior to experiments, N2 gas was bubbled at a high rate in the feedwater reservoir for 20 min to remove dissolved oxygen, and then maintained at a lower rate for the duration of the experiment. The feedwater was then pumped through the system at a flow rate of 1 mL/min and the cell was discharged at 0 V until the current was negligible (<|0.1| mA in the S–P cell or <|0.01| mA in the P–P cell) in order to equilibrate the electrodes with the feedwater before beginning the experiment.

Experiments were carried out under the general framework described by Hawks et al.74, and performance metrics and indicators are reported according to the definitions therein. In each experiment, the cell was charged at a constant voltage (0.4–2.5 V) and discharged at 0 V in repeated cycling with a 1 mL/min feedwater flow rate. Each cycle lasted for a full-cycle time (FCT) of 6–30 min, which was divided equally into charge and discharge steps. Conditioning cycles were carried out until the cell reached the limit cycle, which is the cycle where the conductivity curve reaches dynamic steady-state behavior. Desalinated effluent was then collected for the limit cycle while the effluent conductivity was lower than the feedwater conductivity, and water with conductivity above the feed value was discarded to a waste container. For FCT 6 min, the limit cycle and the two following cycles were collected in the same manner and then combined in order to accumulate enough liquid for post-CDI analysis (see the Supplementary Table 1 for a breakdown of the limit cycle according to FCT and cell type). Each collected sample was weighed to calculate its volume with an assumed liquid density of 1 g/mL.

Post-CDI analysis

Sample conductivity and pH determinations

The conductivity sensor was calibrated with KCl 1.41 mS/cm standard (1.01203, Merck) at a 1 mL/min flow rate. Each desalinated water sample was pumped through the conductivity sensor at 1 mL/min until the reading stabilized (~3 min). The sensor and tubing were flushed with DI water between measurements.

The pH electrode and module (iAquatrode Plus and 904 Titrando, Metrohm AG, Switzerland) were calibrated with standard Metrohm buffers of pH 4, 7, and 9. The pH of each sample was measured under stirring with a drift criterion of 1 mV/min. These measurements were always carried out after conductivity measurements so as not to artificially increase the sample conductivity with the pH sensor filling electrolyte (KCl 3 M). The electrode was thoroughly rinsed with DI water between measurements.

Ca2+ and Na+ concentration determinations

The Ca2+ concentrations were measured via standard addition. In preparation, 5 mL of sample and 10 mL of 1 M KCl ionic strength adjuster (ISA) were pipetted into a glass beaker. Before each measurement, the Ca2+ ion-selective electrode (6.0510.100, Metrohm) was rinsed for at least 30 s in DI water. The electrode was immersed in the sample/ISA mixture, and 0.1 M CaCl2 standard (21059, Sigma-Aldrich, USA) was manually pipetted in increments of 0.1, 0.2, and 0.5 mL under stirring. A drift criterion of 1 mV/min was used for each increment. Each measurement was performed at constant temperature (~25 °C), and the DI rinsing water was replaced after 2–3 measurements to prevent contamination. The Ca2+ concentration of each sample was back-calculated to account for the initial dilution with ISA.

The Na+ concentrations were calculated via

$$c_{{\mathrm {Na}}^+}\left({\mathrm{mM}} \right) = \frac{{{\kappa} - 2c_{{\mathrm{Ca}}^{2 + }}{\Lambda}_{{\mathrm{CaCl}}_2} - 10^{3 - {\mathrm{pH}}}{\Lambda}_{{\mathrm{H}}^{\mathrm{+}}}^0}}{{{\Lambda}_{{\mathrm{NaCl}}}}},$$
(11)

where \({\kappa}, c_{{\mathrm{Ca}}^{2 + }}\), and pH are the conductivity, Ca2+ concentration, and pH of the sample, respectively. The equivalent conductivities \({\Lambda}_{{\mathrm{CaCl}}_2}\) = 115.59 mS/cm/mM and ΛNaCl = 115.7 mS/cm/mM are values at 20 mM concentration98, while \({\Lambda}_{{\mathrm{H}}^ + }^0 = 349.65\,{\mathrm{mS/cm/mM}}\) is at infinite dilution99. The concentrations \(c_{{\mathrm{Na}}^ + }\) and \(c_{{\mathrm{Ca}}^{2 + }}\) were used to calculate experimental separation factor with Eq. (1), SAR with Eq. (2), minimum desalination energy with Eq. (3), ion adsorption with Eq. (6), and additional performance metrics and indicators tabulated in Supplementary Table 1.