Blue Energy and Desalination with Nanoporous Carbon Electrodes: Capacitance from Molecular Simulations to Continuous Models

Capacitive mixing (CapMix) and capacitive deionization (CDI) are currently developed as alternatives to membrane-based processes to harvest blue energy—from salinity gradients between river and sea water— and to desalinate water—using charge-discharge cycles of capacitors. Nanoporous electrodes increase the contact area with the electrolyte and hence, in principle, also the performance of the process. However, models to design and optimize devices should be used with caution when the size of the pores becomes comparable to that of ions and water molecules. Here, we address this issue by simulating realistic capacitors based on aqueous electrolytes and nanoporous carbide-derived carbon (CDC) electrodes, accounting for both their complex structure and their polarization by the electrolyte under applied voltage. We compute the capacitance for two salt concentrations and validate our simulations by comparison with cyclic voltammetry experiments. We discuss the predictions of Debye-Huckel and Poisson-Boltzmann theories, as well as modified Donnan models, and we show that the latter can be parametrized using the molecular simulation results at high concentration. This then allows us to extrapolate the capacitance and salt adsorption capacity at lower concentrations, which cannot be simulated, finding a reasonable agreement with the experimental capacitance. We analyze the solvation of ions and their confinement within the electrodes—microscopic properties that are much more difficult to obtain experimentally than the electrochemical response but very important to understand the mechanisms at play. We finally discuss the implications of our findings for CapMix and CDI, both from the modeling point of view and from the use of CDCs in these contexts.


I. INTRODUCTION
Electric power production from salinity gradients-by harvesting the free energy lost during the mixing of river with sea water in estuaries-in principle, has the potential of becoming a significant source of electricity on the global scale [1][2][3][4][5].The main technologies developed for that purpose to date, namely, pressure-retarded osmosis and reverse electrodialysis, exploit the osmotic pressure difference using hydrostatic pressure or electric potential differences applied across membranes [6].Despite the promises of these approaches-in particular, thanks to the control of flow through single nanotubes for the design of improved membranes [7]-a completely different strategy is also under consideration, to avoid the efficiency loss induced by membrane fouling.In 2009, Brogioli demonstrated the feasibility of capacitive mixing (CapMix) from cycling charge-discharge of a capacitor at high-low salinity [8].Since then, both the fundamental understanding and practical improvement of this idea have been remarkable [9][10][11].In the reverse process, capacitive deionization (CDI) offers an alternative to membrane-based desalination techniques [12,13].
For both CapMix and CDI, the use of porous carbon electrodes allows for the increase of surface area with the electrolyte, thereby increasing the specific capacitance.As in the context of energy storage in supercapacitors, also known as electric double layer capacitors (EDLC), this has naturally turned the attention of the community to nanoporous carbons.In particular, an unexpected increase in the capacitance of EDLCs using ionic liquids and organic electrolytes with carbide-derived carbon (CDC) electrodes was observed as the pore size decreased down to the size of electrolyte ions [14][15][16][17].Such materials have already been considered for CDI [18,19], as "the pore volume associated with micropores is particularly attractive for CDI" [12].
A fundamental understanding of the cation and anion adsorption inside the electrodes is essential to predict the capacitance and salt retention and its dependence on salt concentration in the electrolyte, which are the key factors governing the efficiency of both CapMix and CDI processes.While in situ x-ray and neutron experiments now provide information at various scales on the localization of ions inside the electrodes [20,21], quantitative predictions of the ionic concentrations, or equivalently the capacitance and salt adsorption, essentially rely on models of the electric double layer (EDL).The most commonly used models in these contexts are Debye-Hückel (DH) and Poisson-Boltzmann (PB)-possibly including excluded volume effects-theories [22][23][24][25][26][27][28][29], as well as modified Donnan (mD) models [30].Recently, a better description of steric effects and electrostatic correlations has also been introduced in this context using classical density functional theory (DFT) [31][32][33].
However, these continuum-based models may fail under extreme confinement down to the nanometer scale, where the discreteness of ions and water and interactions with the carbon surface on the molecular scale play an important role.Previous work on CDC electrodes with ionic liquids and organic electrolytes for EDLC applications has demonstrated that molecular simulation is a powerful tool to investigate charge storage and transport in this limit [34][35][36] and that it can be used as a starting point for a multiscale description of these systems [37].Such simulations have also emphasized the role of ion solvation at the interface and under confinement [38][39][40][41].
Aqueous electrolytes and model carbon-based materials have already been investigated by molecular simulation in the context of desalination by reverse osmosis [42][43][44] or for nanofluidic osmotic diodes [45].Molecular simulation provided insights into the structure and dynamics of water and aqueous electrolytes in carbon nanotubes and nanopores [46][47][48].Striolo and co-workers also simulated such electrolytes confined between charged carbon walls as model electrochemical cells for desalination [49,50] and reviewed the modeling challenges and opportunities of carbon-water interfaces for the water-energy nexus [51].Michaelides also emphasized the challenges associated with the description of the interactions between water and carbon surfaces [52], as well as the peculiar properties of water on graphene [53] and metals in general [54].However, our previous work demonstrated the importance of accounting for the polarization of carbon electrodes in contact with ionic liquids by using a method in which the potential between the electrode is held fixed (i.e., constant potential molecular dynamics, MD) [55].In the case of aqueous systems, this approach has been applied to pure water or ion pairs in order to understand the water-platinum interface [56][57][58][59].
We report here a constant-potential molecular dynamics study of realistic electrochemical cells based on an aqueous electrolyte and nanoporous carbon electrodes.In addition to polarization, under applied voltage, by the electrolyte, the complex structure of the CDC (pore-size distribution, relatively disordered structure) is also taken into account.We compute the capacitance for two salt concentrations and validate our simulations by comparison with cyclic voltammetry experiments.We then discuss the predictions of Debye-Hückel and Poisson-Boltzmann theories, as well as modified Donnan models, which are commonly used to predict the capacitance and salt adsorption for blue energy harvesting by capacitive mixing and for desalination by capacitive deionization.We show that it is possible to use the molecular simulation results to parametrize a modified Donnan model, which we then use to extrapolate the capacitance and salt adsorption capacity at lower concentrations relevant for CapMix and CDI, for which molecular simulations are not possible.A reasonable agreement is obtained with the experimental capacitance.We analyze the solvation of ions and their confinement within the electrodes-microscopic properties that are much more difficult to obtain experimentally than the electrochemical response but are very important to understand the mechanisms at play.We finally discuss the implications of our findings for CapMix and CDI.Methods are described in Sec.II, while results are presented and discussed in Sec.III.

A. Molecular dynamics simulations
The simulated system consists of two nanoporous carbon electrodes and an aqueous NaCl solution as an electrolyte (see Fig. 1).The carbon structure for the porous electrodes was obtained by quenched molecular dynamics [60], and it corresponds to the structure of a CDC synthesized at 800 °C.The geometrical analysis of the porous structure, which has a mass density ρ solid ¼ 0.939 g cm −3 , is performed with the ZEO++ software [61] using a probe radius r probe ¼ 1.3 Å, which corresponds approximately to the radius of a water molecule, resulting in a porosity of Φ ¼ 23.3% and a specific surface area of S ¼ 1934 AE 2 m 2 g −1 (for a probe size of 1.7 Å corresponding to an argon probe, the values are 18% and 1553 AE 2 m 2 g −1 , respectively).Two systems are simulated, corresponding approximately to average salt concentrations of 0.5 and 1.0 M, respectively.
The force field consists of pairwise additive Coulomb and Lennard-Jones interactions, with Lorentz-Berthelot mixing rules for the Lennard-Jones parameters.We use the SPC/E model of water [62], whereas the parameters for carbon and for the ions are taken from Refs.[63,64].MD simulations are performed in the NVT ensemble using a time step of 1 fs.The temperature of the fluid is maintained at T ¼ 298 K using the Nosé-Hoover thermostat with a time constant of 1 ps, while the electrode atoms are kept fixed.Two-dimensional periodic boundary conditions are used (there is no periodicity in the direction z perpendicular to the electrodes), and Ewald summation to compute electrostatic interactions is adapted to this geometry [65,66].The water molecules are kept rigid with the SHAKE algorithm [67,68].
A voltage of Δψ ¼ 1 V is maintained between the electrodes by treating them as perfect conductors using the method of Refs.[65,69], in which the charge of each electrode atom is recomputed at each step of the simulation in order to satisfy the constraint of a fixed potential.As a result, the total charge of the electrode fluctuates in response to the instantaneous microscopic configuration of the electrolyte (see Fig. 1, where the central panels illustrate the heterogeneous charge distribution within the electrodes for a given configuration of the electrolyte, as shown in the bottom panels).This is necessary for a realistic description of the electrode-electrolyte interface [55], and it provides quantitative information on the capacitance and on the interfacial properties [70].We have shown previously that this method is suitable for the simulation of ionic liquids and organic electrolytes in nanoporous carbon electrodes [34][35][36]38].
Each electrode contains 3821 carbon atoms, and repulsive walls are placed on each side of the nonperiodic dimension of the simulation cell in order to prevent the molecules from exiting.The system corresponding to an average concentration of 0.5 M (resp. 1 M) contains 7700 (resp.7615) water molecules and 70 (resp.139) NaCl pairs.The box dimensions are 43.3 × 43.3 × 183.0 Å 3 .Together with the above number of atoms, this results in the correct density in the bulk region (see the definition of the regions in Fig. 1 and the density in Sec.III).Despite being the state of the art of molecular simulations of such systems, the relatively small size does not allow the simulation of dilute electrolytes because of the small number of ions involved, which would require simulations that are too computationally expensive to sample the equilibrium properties.The systems are first preequilibrated by fixing the electrode atom charges to zero for about 600 ps.Then, a voltage Δψ ¼ 1.0 V is applied, and the system is allowed to evolve until a steady state is reached (several nanoseconds).Finally, the charge of the electrode and the positions of the species at a steady state are averaged over about 3.2 ns to compute the capacitance, the density profiles, and the solvation and confinement properties.

B. Electrochemistry experiments
CDC powder (Carbon-Ukrain) is prepared by chlorination of TiC powder at 800 °C as reported elsewhere [14,15].The material is annealed for 2 h at 600 °C under H 2 to remove traces of chlorine and other surface groups [71].Electrochemical tests are performed using a two-electrode Swagelok cell.Active films are made by mixing 95 wt % CDC with 5 wt % polytetrafluoroethylene (PTFE from Dupont TM) binder.Once calendered, 11-mm-diameter electrodes are cut.The active film thickness is around 300 μm, with a weight loading of 15 mg cm −2 .Platinum disks are used as current collectors, and two layers of 25-μm-thick porous cellulose (from Nippon Kodoschi FIG. 1.The simulated system (top panel) consists of two nanoporous carbon electrodes, with a structure corresponding to carbide-derived carbons synthesized at 800 °C (cyan lines) and an aqueous NaCl solution as an electrolyte (here at 1 M; sodium is shown in blue, chloride in orange, oxygen in red, and hydrogen in white).A potential difference of 1 V is applied between the electrodes, and the charge q of each electrode atom fluctuates in response to the instantaneous configuration of the electrolyte (see the color scale in the central panels, where water is not shown).The bottom parts illustrate the electrolyte confined in the electrodes.
Corporation, NKK) are used as a separator.Cyclic voltammetry experiments are carried out with a multichannel potentiostat (VMP3, Biologic) for several NaCl concentrations (0.05, 0.1, 0.5 and 1 M) at a scan rate of 1 mV s −1 .Two series of measurements per system for two ranges, between 0.0 and 0.6 V and between 0.0 and 0.7 V, are performed, leading to four estimates of the capacitance for each of them.The values and uncertainties reported here are the corresponding averages and standard deviations.Such voltages are sufficiently low to avoid faradic (redox) processes linked with water decomposition on the highsurface-area carbon electrodes.

A. Capacitance
Figure 2 shows the cyclic voltammograms (CV) for different salt concentrations for potentials varying between 0.0 and 0.6 V.The electrochemical response is indeed capacitive in the considered range of concentrations and voltages.The experimental capacitance is then calculated from the derivative with respect to the potential of the electrode charge, which is obtained by integrating the electric current during the discharge of the electrochemical cell.In molecular simulations, we compute the integral cell capacitance from the average charge hQi of the electrodes as C cell ¼ hQi=Δψ, which is related to the capacitance of both electrodes as The corresponding electrode capacitance is then obtained by assuming that the electrodes behave symmetrically (C þ ¼ C − ).Experiments performed using a three-electrode cell confirm that this is a reasonable assumption, with C − being only slightly larger than C þ (less than 10%).
The capacitances from molecular simulations and experiments are summarized in Table I.We first note that the results are in remarkable agreement for both salt concentrations.Such a quantitative agreement is in fact better than that previously obtained in similar simulations of CDC with ionic liquids and organic electrolytes (e.g., about 20% in Ref. [72]).In the latter cases, discrepancies are mainly due to the Ohmic drop in the experiments with no or little solvent.We now compare these results with the predictions of three theories that are commonly used in the contexts of CapMix and CDI, namely, DH and PB theories, and the mD model.
The simplest description of the EDL capacitance follows from DH theory, which treats the electrolyte as point ions in a continuous medium of relative permittivity ϵ r , which interact only via mean-field electrostatics (as in Poisson-Boltzmann theory) in the limit where these interactions are weak, i.e., ½ðeψÞ=ðk B TÞ ≪ 1, with e the elementary charge, ψ the potential (with respect to the bulk value), k B Boltzmann's constant, and T the temperature.The corresponding capacitance per unit area is with ϵ 0 the vacuum permittivity and λ D the Debye screening length in the bulk electrolyte: where the sum runs over concentrations of ions, c i , with valencies z i (in the present case of a 1-1 electrolyte with salt concentration c salt , this sum is simply 2c salt ).
In order to improve the predictions, it is not sufficient to simply numerically solve the nonlinear PB equation without introducing other physical effects.Indeed, in that case, the predicted capacitance would be even larger than within DH.This is because the nonlinearity of the PB equation increases the potential drop across the EDL and results in concentrations so large that interactions between ions beyond mean-field electrostatics-in particular, the effect of excluded volume due to the finite size of the ions  -cannot be neglected.Therefore, we only discuss the extension of PB, which captures packing effects (if not electrostatic correlations) [73,74].Following Freise's approach for electrolytes [75], which was also successfully applied by Kornyshev in the context of ionic liquids [76], we introduce a maximum salt concentration c max , which captures the saturation of the EDL due to the finite volume of the ions.The differential capacitance per unit area is then given by with γ ¼ 2c salt =c max the lattice saturation parameter and φ the potential drop across the EDL (φ ¼ Δψ=2 for a symmetric capacitor).In macroporous or mesoporous materials, the next natural step to improve these models of the EDL is to include a Stern layer of condensed ions [22], with an associated capacitance per unit surface However, in the present case (CDC material) where the pore size is comparable to that of the ions and solvent molecules, the distinction between Stern and diffuse layers is certainly ambiguousand the quantification of ϵ St and λ St is somewhat arbitrary.Therefore, while it would be possible to use C St as a fitting parameter, we will not follow this approach here.When the screening length in the electrolyte becomes comparable to the electrode pore size, the overlap between EDLs within an electrode renders the description more difficult.However, in the limit where the EDL is larger than the pore size, it is possible to obtain a simplified description where the potential inside the micropore is uniform, with a potential difference called the Donnan potential Δψ D between the micropore and the bulk electrolyte.The ionic concentrations inside the micropores are then related to that in the bulk as follows: , where μ att is an attractive excess chemical potential that results in a larger salt concentration inside the micropores even in the absence of the Donnan potential.This parameter is usually kept at a fixed value (typically 2-3k B T), but a selfconsistent determination has also been suggested by introducing another relation: μ att ¼ E=c mi;ions , with c mi;ions ¼c mi;þ þc mi;− ¼2c bulk e μ att =k B T cosh½ðeΔψ D Þ=ðk B TÞ the salt concentration in the micropores and E a parameter arising from the polarizability of the electrode [77].The charge density per unit volume of micropore, σ mi F ¼ ðc mi;þ − c mi;− ÞF ¼ −2Fc bulk e μ att =k B T sinh½ðeΔψ D Þ=ðk B TÞ, with F Faraday's constant, is then written as with Δψ St the Stern potential difference and C St;vol a capacitance per unit volume of micropore, which is usually parametrized as For the symmetric electrochemical cell considered here, with identical electrodes, the cell voltage under equilibrium conditions, i.e., vanishing electric current, is related to the Donnan and Stern potentials as For comparison with molecular simulations and experiments, we finally compute the specific capacitance (per unit mass of the electrode) from the capacitance per unit area of the DH and PB models by multiplying by the specific surface area S and from the electrode capacitance per unit volume of micropore of the modified Donnan model (−σ mi F=ðΔψ=2Þ, the factor of 2 arising from converting the cell capacitance to electrode capacitance) by multiplying by the porosity Φ and dividing by the mass density ρ solid of the electrode.
The predictions of these three models, using reasonable assumptions for the corresponding parameters, are summarized in Table II.In particular, for the DH and PB models, we consider, for the dielectric constant of the solvent, both the bulk value for water and a value (arbitrarily) reduced by an order of magnitude.This allows us to account for, in a simple manner, the change in the dielectric response of water at an electrified interface and under confinement, even though such a response is more complex because of, in particular, the symmetry breaking induced by the walls [78][79][80][81][82] and may result in an unexpected enhancement of permittivity in specific geometries [83].
We first observe that DH overestimates the capacitance, compared to the molecular simulations and experiments of Table I, by more than 1 order of magnitude, even when a reduced permittivity is introduced.The increase in capacitance with salt concentration observed in Table I is captured by DH theory, even though the scaling as the square root of concentration overestimates this increase.The order of magnitude of the capacitance predicted by PB theory can be made comparable to the experiments if one uses the reduced permittivity and a maximum salt concentration inside the EDL of c max ¼ 1 M, even though such a value is small (see, in particular, the discussion of salt concentrations inside the micropores below).A larger value, c max ¼ 5 M (still below the solubility of NaCl in water at room temperature), results in an overestimate of the capacitance.In addition, the PB theory predicts that the considered conditions fall in the saturation regime, where the capacitance decreases slightly when the salt concentration increases, in contradiction with the experimental and molecular simulation results.
Finally, the modified Donnan model, using typical values from the literature for the various parameters, underestimates the capacitance by a factor of about 2-3 when a fixed value of μ att is used, but it roughly captures the slight increase in capacitance with salt concentration.Since the effect of the self-consistent scheme to determine μ att is to reduce the capacitance [77], it does not improve the agreement with the experimental and molecular simulation results in the present case.Overall, none of these models is able to correctly capture the order of magnitude of the capacitance and its increase with the salt concentration.Nevertheless, one should distinguish between the DH and PB models, which apply a priori better for planar walls or large pores [84], and the modified Donnan model, which applies in the full double-layer overlap regime, even though it describes the interactions of the ions with the surrounding fluid and electrode in a simplified mean-field way, which does not properly account for interactions on the molecular scale.We have therefore attempted to parametrize such a modified Donnan model from our molecular simulation results for the capacitance, changing as few parameters as possible.As shown in Table II (case c), this can be achieved by increasing the value of C St;vol;0 by a factor of about 2.25.Since the parameters of the modified Donnan model are sensitive to many factors such as surface area or porosity and therefore depend on the preparation process, it is not unexpected that the values from the literature (even though for similar materials) are not straightforwardly transferable to the present experimental results.However, this underlines the need for experimental data to fit the modified Donnan model, whereas the present molecular simulation approach only uses the experimental capacitances for validation purposes.

B. Water density and ionic concentration
Molecular simulations further provide information on the fluid confined inside the electrodes.Figure 3 shows the density profiles of water and ions across the simulation cell in the two simulated systems (the local carbon density is also indicated), while Table III summarizes the corresponding average ion concentrations in the bulk and inside both electrodes (per unit pore volume) as well as the associated water density.The water density profile in the region far from the electrodes is flat, and the corresponding density is equal to that of bulk water.Some layering over 2-3 water layers is observed at the interface between the electrode and the bulk region due to the discreteness of the fluid.The water density per unit length of simulation box is smaller inside the electrodes than in the bulk because of the presence of the carbon matrix.However, the water density inside the pores (see Table III) is in fact larger than in the bulk.Such an increase may be due to several factors, including confinement, which perturbs the structure of the fluid, in particular, the ability to form hydrogen bonds, or electrostriction in the presence of the local electric fields inside the electrode [85].We also note that there is an asymmetry between the electrodes, with a slightly larger water density in the positive electrode correlated with a TABLE II.Single-electrode capacitance in F g −1 from DH, PB, and mD theories.Here, c max is the maximum concentration allowed in the PB theory, accounting for volume saturation in Ref. [76] For the modified Donnan model, with fixed or self-consistent attraction parameter μ att , we use values from the literature for similar materials for the Stern capacitance parameters C St;vol;0 and α (see text), and the electrode capacitance is computed from the charge of a symmetric electrochemical cell under a voltage of 1.0 V. Uncertainties are based on that for the specific surface area.slightly smaller ion concentration.Such an asymmetry is likely due to the different ionic radii and solvation properties or to the effect of the surface charge distribution on the orientation of the water molecules [40,70,86], which are not simple dipoles-features that are not included in any of the DH, PB, or modified Donnan models-and it is consistent with the above-mentioned slight asymmetry observed on the experimental capacitances.An asymmetry could be introduced using additional parameters, e.g., different c max or γ (resp.μ att ) for different ions in the PB (resp.modified Donnan) model, which would have to be parametrized accordingly.

Capacitance (F g
The average cation and anion concentrations in the bulk are equal and slightly lower than the ones anticipated when designing the simulations with the average target concentration; correspondingly, the ionic concentration inside the pores is larger than in the bulk.This observation is consistent with the experimental observations that motivated the introduction of the attractive excess chemical potential in the modified Donnan model.The magnitude of this increase corresponds to μ att ∼ 1-2k B T, i.e., slightly smaller than but comparable to the values used in the literature.The increase in ion concentration inside the electrodes may also contribute to the smaller permittivity inside the pores, even though in the bulk the decrease for such concentrations does not go beyond a factor of 2 [87].
The ionic concentration inside the electrodes obtained from MD simulations is compared to the predictions of the modified Donnan model in Table IV.The mass of adsorbed ions is computed as the total mass of ions inside the electrodes, divided by the mass of both electrodes [12], where the subscripts refer to the ions and the superscripts to the electrodes, and M Na and M Cl are the molar masses of the ions.The mD model underestimates the ionic concentration by a factor of about 3-4 if values from the literature are used for the parameters μ att and C St;vol;0 .As for the capacitance, using the self-consistent μ att scheme of Ref. [77] results in a slight decrease of the ionic concentration inside the electrodes; i.e., it does not improve the    b Same C St;vol;0 and α as above but with μ att ¼ E=c ion;mi , with c ions;mi the ionic concentration in the pores and E ¼ 300k B T mol m −3 ; see Ref. [77].prediction.Using the values of μ att and C St;vol;0 fitted to the MD simulation results for the capacitance at high concentration, which reasonably reproduce the experimental capacitance at lower concentrations, also improves the prediction for the adsorbed salt, even though the agreement with simulations is not quantitative.
In addition, the ionic concentration is larger in the negative electrode, where cations are in excess compared to anions.Such an asymmetry, which cannot be predicted at the level of DH, PB, or modified Donnan models, likely arises from the difference in size between the cations, even though the asymmetry of the water molecule may also play a role (as it does in the solvation of ions in the bulk).This difference in volume occupied by the ions is also anticorrelated with the difference in water density inside the electrodes.This is consistent with previous simulations of ionic liquids and organic electrolytes inside CDC electrodes, which indicated that the overall volume of the liquid inside the pores is more or less unchanged [34,38].The asymmetric ion concentrations also seem to suggest that the electrodes do not carry the same charge.However, this is not the case because the interfacial regions (where water is layered; see Fig. 1) also carry an excess ionic charge, which is larger on the negative electrode size.We finally note that this asymmetry also suggests that the capacitance of the positive and negative electrodes may differ slightly.However, going beyond this assumption to determine the electrode capacitances from the cell capacitance would require dedicated approaches that go beyond the scope of the present work [88].

C. and confinement inside the electrodes
Before examining the consequences of the above considerations for CapMix and CDI on the macroscopic scale, as will be done in the next section, here we provide some additional microscopic information on the solvation of ions and their confinement within the electrodes.Such information is indeed much more difficult to obtain experimentally than the electrochemical response, while it is very important to understand the mechanisms at play.The solvation number of each ion is the number of water molecules in its solvation shell, defined by a cutoff radius determined from the position of the first minimum of the radial distribution functions (3.3 and 3.9 Å for Na þ and Cl − , respectively).In addition, the degree of confinement (d.o.c.) of each ion can be computed as the fraction of the solid angle occupied by electrode atoms within the first coordination shell of the ions [38].
Figure 4 illustrates the solvation number distribution for Na þ and Cl − , in the bulk and inside the positive and negative electrodes for the 1.0 M system (similar results, not shown, are obtained for the 0.5 M system).While in the bulk the distribution for Na þ is narrow around 6 water molecules, under confinement the average solvation number decreases (to 5.4 and 5.7 in the positive and negative electrodes, respectively) and the distribution becomes broader.Similar behavior is observed for Cl − , with a decrease from 7.4 in the bulk to about 7 in both the positive and negative electrodes and a broadening of the distribution.
While the decrease in solvation number under extreme confinement may seem rather limited compared to our previous studies on ionic liquids and organic electrolytes [34,38], it is worth noting that Na þ ions are "traditionally thought to have an almost unbreakable solvation shell," as discussed by Sayer et al. [89].We have therefore further examined the link between the coordination number and the confinement of the ions.The broadening of the distribution points to the existence of several microscopic environments experienced by both ions inside the electrodes.We further investigate this issue by computing the joint distribution of solvation number and degree of confinement, illustrated for the 1.0 M system in Fig. 5   More generally, these results show that charging the capacitor not only unbalances the ionic concentrations inside the electrode micropores but also depends on more complex molecular features.While a detailed study of such specific effects is clearly out of the scope of the present work, are likely to play a role in the charge and discharge and are therefore important in practice for the applications.Molecular simulation provides an appropriate tool to investigate such effects without introducing them a priori in a model.

D. Implications for CapMix and CDI
Finally, we now discuss the implications of our findings for the harvest of blue energy by capacitive mixing and CDI.The CapMix cycle is illustrated in the charge-voltage plane in Fig. 6.Using a symmetric electrochemical cell with a voltage supply of Δφ and two electrolytes with different concentrations (leading to cell capacitances C 1 > C 2 for sea and river water, respectively), the energy extracted per cycle is given by the area of the shaded trapezoidal region as where is an effective capacitance corresponding to the two capacitors in series (note that here C 1 and C 2 refer to full electrochemical cell and not electrode capacitances).We now estimate ΔE cycle for the CDC considered here by considering typical concentrations of river and sea water (20 and 500 mM, respectively) and a typical voltage supply Δφ ¼ 300 mV, as done in previous studies [8][9][10].Table V reports the capacitance and ion adsorption predicted by the mD model with parameters fitted to the simulation data at 0.5 and 1.0 M, as a function of salt concentration.While not perfect, the agreement with the available experimental capacitance (see Table I) seems sufficient to estimate the capacitance at an even lower concentration of 20 mM, with the result 74 F g −1 .In turn, Eq. ( 5) predicts a theoretical energy per cycle of ΔE cycle ∼ 0.6 J g −1 .Such a value is smaller than the value anticipated for CDCs by Brogioli when introducing the idea of CapMix [8], namely, 1.6 J g −1 with comparable salt concentrations (24 and 600 mM).However, this estimate was based on the assumption of a capacitance of 300 F g −1 , which is too large compared to the actual one (see Table I).The order of magnitude, however, remains comparable.In addition, this lower value remains about 3-4 times larger than the experimental data reported for the same voltage with a porous carbon with larger pores (density 0.58 g cm −3 , porosity of 65%, SSA 1330 m 2 g −1 ) [9].This confirms the potential interest of CDCs for CapMix.Previous studies of CDC electrodes focused on their application to CDI rather than CapMix, so a direct comparison of the capacitance and adsorbed salt content is difficult.Indeed, in such cases, the experiments are performed at low salt concentration because at high concentrations, CDI consumes more energy than other desalination processes such as reverse osmosis [12].For example, Porada et al. reported capacitances of about 10-15 F g −1 and salt adsorption capacities of 10-15 mg g −1 for concentrations of 5 mM and various CDCs when working with voltages of about 1 V [18,19].From the mD model with parameters fitted to reproduce our MD simulation results for the capacitance (at high concentration), we extrapolate the salt adsorption capacity to 10 mg g −1 .Keeping in mind that this model even underestimates the simulation results at high concentration, this confirms the potential of CDCs, in general, for CDI compared to other materials (with typical values mainly in the range 1-10 mg g −1 ; see, e.g., Table 1 in Ref. [12]) and simultaneously suggests that there is room for improvement to optimize CDCs for this application.

IV. CONCLUSION AND PERSPECTIVES
We have shown that molecular simulation provides a reliable tool to investigate aqueous electrolytes in realistic nanoporous carbon electrodes, for sufficiently large salt concentrations for which such simulations can be done in practice.The predicted capacitances are in excellent agreement with experiments.In contrast, Debye-Hückel and Poisson-Boltzmann theories cannot be applied under such extreme confinement, even by taking into account the decrease in permittivity induced by the latter or by introducing excluded volume following the approach that was successful with ionic liquids.These models should be used with caution for nanoporous carbons such as CDCs to estimate the capacitance or the extracted energy.In contrast, we have shown that the molecular simulation results at high concentrations can be used to parametrize a modified Donnan model, which then allows one to extrapolate the predictions to lower concentrations relevant for river water in CapMix and for CDI, finding reasonable agreement with the experimental capacitance.This approach is therefore fundamentally different from fitting the experimental data to a modified Donnan model, which is standard practice in CDI (such models are used much less in the CapMix community, where Poisson-Boltzmann theory is usually preferred).
While here we have not considered classical DFT, recent work capturing excluded volume and electrostatic correlations between ions suggests that these effects may increase the energy produced per unit area [31], therefore further overestimating this quantity.Nevertheless, it would be necessary to investigate the predictions of classical DFT under comparable conditions and, ideally, also in more realistic geometries.Molecular simulations could then provide reference data to validate DFT or even help build better functionals for that case [47].Explicitly including the structure of the solvent [90][91][92] may also significantly improve the accuracy of the description of the confined fluid.In turn, classical DFT would also provide predictions at low salt concentrations, which are out of reach for molecular simulations.Meanwhile, we have shown that the modified Donnan model may be a reasonable alternative to make simple predictions, provided that the corresponding parameters are correctly adjusted.
Overall, the present results underline the potential of CDCs for both CapMix and CDI, thanks to their pore size comparable to that of the ions.Even though the associated computational cost, which, in particular, prevents us from reaching the low concentration regime, does not position molecular simulation as an alternative for the daily prediction of material properties for applications, the present work clearly demonstrates its interest to investigate in future work the factors governing charge storage and salt adsorption in these materials, by quantifying, e.g., solvation numbers and degrees of confinement, as shown here, or diffusion coefficients of ions and water inside the pores.More generally, it will also help to understand, on the molecular scale, the effects of physiochemical factors such as the geometry of the electrodes (considering not only CDCs but also other nanoporous carbon materials), hydrophilicity [93], ion specific effects, or the possible presence of chemical moieties such as carboxylic groups, and hence to guide the design of improved materials.Future work should also investigate the dynamics and the energy loss during charging and discharging, which may be larger than with more porous materials, even though previous work with ionic liquids and organic electrolytes demonstrated that the dynamics was not slowed down to a point preventing their use in supercapacitors (see, e.g., Ref. [36]).As in previous work in this latter context, molecular simulation can serve as the starting point for a multiscale description [37], which captures possible heterogeneities on larger scales, such as the finite size of carbon grains, on the scale of tens or hundreds of micrometers [35].

FIG. 2 .
FIG. 2. Cyclic voltammograms of electrochemical cells basedon CDC and aqueous solutions of sodium chloride at concentrations ranging from 0.05 to 1.0 M as electrolytes.The potential scan rate is 1 mV s −1 .

FIG. 3 .
FIG.3.Density profiles along the simulation cell, for an average salt concentration of 0.5 and 1.0 M (top and bottom, respectively).The negative (resp.positive) electrode is on the left (resp.right) side of the cell.
FIG. 4. Distribution of solvation number for Na þ (left panel) and Cl − (right panel) ions in the bulk, negative and positive electrodes, for the 1.0 M system.

FIG. 5 .
FIG. 5. Joint distribution of solvation number and d.o.c. of Na þ (left panel) and Cl − (right panel) ions in positive (dark blue, red) and negative (light blue, orange) electrodes, for the 1.0 M system.The histograms correspond to the discrete values of the solvation number and to finite intervals of the continuous d.o.c.(of width 2% and 10% for Na þ and Cl − , respectively).

TABLE I .
Electrode capacitance (in F g −1 ) from molecular simulations and experiments.Note that the simulations cannot be performed for the lower concentrations.
with ϵ St and λ St the effective permittivity and width of the Stern layer, respectively), in series with that for the diffuse layer C DL ¼ C DH or C PB .The total capacitance of the interface is then obtained as [77] Ref.[18]: μ att ¼ 3k B T, C St;vol;0 ¼ 200 MF m −3 , and α ¼ 30 F m 3 mol −2 .St;vol;0 and α as above but with μ att ¼ E=c ion;mi , with c ions;mi the salt concentration in the pores and E ¼ 300k B T mol m −3 ; see Ref.[77].

TABLE III .
Cation and anion concentrations, as well as water density, in the bulk and in the electrode pores, from molecular simulation under a voltage of 1 V.The uncertainties are of order 0.1 M for the ion concentrations and 0.01 g cm −3 for the water densities.

TABLE IV .
Ionic concentration inside the electrode micropores for a symmetric electrochemical cell under a voltage of 1.0 V, from molecular dynamics simulations and from the modified Donnan model with various assumptions.Results are given as the total mass of ions inside both electrodes, per unit mass of both electrodes [see Eq.
decrease in its average solvation number, most of the Na þ cations do not experience direct contact with the electrode: In the negative (resp.positive) electrode, more than 91% (resp.96%) have a d.o.c.smaller than 2%, and no cations with a d.o.c.larger than 8% were observed, resulting in an average d.o.c. of only 0.4% (resp.0.2%) in the negative (resp.positive) electrode.While the majority of Cl − anions in the negative electrode (about 92%) have a d.o.c.smaller than 10%, about 20% of the anions in the positive electrode have a d.o.c.larger than 10% and a corresponding larger decrease in the solvation number (6.5 or less).Highly confined Cl − anions are also observed inside the positive electrode (about 3%), with a d.o.c.larger than 30% and a solvation number as small as 3.However, the average d.o.c. of Cl − remains moderate: about 3% (resp.7%) in the negative (resp.positive) electrode.The larger ability of Cl − to desolvate compared to Na þ is consistent with their different hydration free energies.
FIG.6.Capacitive mixing thermodynamic cycle, using two electrolytes with different salt concentrations.Segment A: the electrochemical cell is charged under a supply voltage Δφ in the presence of the more concentrated electrolyte (sea water), corresponding to a large cell capacitance C 1 .Segment B: the voltage between the electrodes rises when the electrolyte is replaced by the more dilute one (river water, small cell capacitance C 2 ) under open circuit conditions.Segment C: the electrochemical cell is then discharged down to the supply voltage Δφ, before being flushed with a concentrated electrolyte under open circuit conditions (segment D).The energy extracted per cycle, ΔE cycle , is equal to the area of the shaded region.