# Pore-Scale Textural Changes upon Ion Adsorption in Voltage-Polarized Nanoporous Carbon Electrodes

Romain Dupuis* and Katerina Ioannidou

LMGC, Univ. Montpellier, CNRS, Montpellier, France

Roland J.-M. Pellenq

European Membrane Institute (IEM), Université de Montpellier, CNRS, 34090 Montpellier, France

<figure><img src="image_1.png" /></figure>

(Received 18 March 2024; revised 23 January 2025; accepted 4 March 2025; published 2 April 2025)

This study investigates the dynamic behavior of aqueous electrolytes in porous carbon electrodes under voltage, with a focus on the impact of electrode flexibility on the pore texture. Utilizing a constant-voltage approach with a reactive interaction potential, we examine the heterogeneous charge distribution on carbon atoms within the electrode, revealing the role of chemical defects. Comparisons between flexible- and frozen-electrode models highlight the significant influence of flexibility on ion-adsorption intake and dynamics. The total ion docking for $Cs^+$ and $Cl^-$ is overestimated by a factor of 2–3 in the frozen approximation, depending on the voltage. Furthermore, we explore ion-induced swelling and modifications in pore-size distribution for $Li^+$, $Na^+$, $K^+$, and $Cs^+$ ions, revealing that different alkali ions induce different degrees of swelling leading to nanoscale plasticity. This permanent deformation induces aging and underlines the importance of the flexibility. The study provides valuable insights into the intricate interplay between ion interactions and porous carbon flexibility.

DOI: 10.1103/PRXEnergy.4.023001

## I. INTRODUCTION

Porous carbon electrodes have emerged as cost-efficient electrochemical devices due to their high specific surface area and good electrical conductivity [1]. The porosity inherent in these electrodes facilitates high capacitance (approximately 100 F g$^{-1}$), driven in part by physical ion docking in subnanometric pores [2,3], qualifying them as supercapacitors or as capacitive desalination systems [4,5]. For the same reasons, they can be used as catalysts fostering elevated reaction rates and ensuring efficient charge transfer [6], thereby finding applications in enhanced hydrogen [7] and oxygen evolution reactions. In particular, activated carbons, generated through the activation process of nanoporous carbons derived from organic precursors, are of great interest for supercapacitor electrode materials [8]. The activation, often involving high concentrations of $K^+OH^-$ or steamed water at elevated temperatures, lowers electronic conductivity due to the introduction

of oxygen-containing groups, while it improves supercapacitor performance by increasing energy and power densities [8,9].

Atomistic simulations comprise a tool of choice to investigate the molecular scale and have revealed that the capacitance originates both at the external surface (including that of large mesopores) and as a result of the subnanometric porosity [10]. Due to the porosity and the disordered nature of porous carbons, conducting ab initio simulations is unfeasible. Instead, classical reactive force fields coupled to advanced statistical-physics techniques offer a promising alternative, enabling simulations of larger systems.

Applying voltage in a molecular system with force fields is usually performed using either constant-voltage (CV) or constant-charge (CC) methods [11–14]. While the CC method is computationally less expensive, with faster dynamics [12,15], it does not account for charge redistribution occurring upon the movement of the ions. Besides, ignoring the chemical (O or H atoms) or topological defects (non-sp$^2$ carbon atoms) in the charge distribution induces unrealistic docking of all ions in the center of the electrode [2]. Using the CV method with the same assumptions leads to unrealistic ion adsorption at the interface between the carbon and the solution due to the fact that edge carbon atoms receive additional charge due to voltage polarization [2]. This shows that the electrode chemistry needs to be taken into account, as shown with the CC

<footnote>*Contact author: romain.dupuis@umontpellier.fr</footnote>

<footnote>Published by the American Physical Society under the terms of the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.</footnote>
method in Dupuis et al. [2]. Defects, particularly non-sp² carbon atoms and heteroatoms, have been found experimentally and theoretically to impact the capacitance [16, 17] and influence the charge localization [18]. The oxidation of carbide-derived carbons modifies the ion dynamics and can improve the capacitance for ionic liquids [19,20]. The chemically driven charge-localization approach has been proposed to take into account the defective nature of the electrodes in the CC approximation. However, to our knowledge, all CC and CV atomistic simulations of porous carbon electrodes have been carried out using a frozen-electrode approximation [2,12,13,15].

As highlighted in recent reviews [12,13], the motion of the atoms in the electrodes has been largely overlooked in atomistic simulation studies of porous carbon and/or electrolyte systems because of computational costs [2,3,13,15,21]. The importance of the subnanometric pores for ion docking, which implies the proximity of species at very short range, necessarily induces poromechanical effects, i.e., the coupling between the ion movements (due to charge redistribution) and carbon-matrix relaxation (including pore breathing, pore accessibility, plasticity, and capacitance).

Our work focuses on addressing these challenges by simulating the adsorption of alkali ions in porous carbon electrodes while accounting for flexibility by enabling atomic displacements of carbon atoms. We meticulously investigate key aspects of ionic adsorption, including the interaction of carbon electrodes with adsorbed ions, and compare these findings to the frozen-electrode approximation. Considering flexibility, coupled with chemical reactivity, opens avenues to the study of degradation processes resulting from ionic adsorption, pH, or voltage fluctuations. In this paper, we focus on evaluating the role of electrode flexibility on capacitance in relation to the aging of the electrode, which remains a key issue in the deployment of this carbon-based technology.

## II. METHODS

The simulations have been carried out using LAMMPS [22] on a symmetrical simulation cell with two electrodes (C₄₉₃₆O₉₇H₁₉₄), deploying a setup similar to that used in the work by Dupuis et al. [2], as shown in Fig. 1. The model for the electrodes has been obtained by using hybrid reverse Monte Carlo [23] and is made of a porous carbon texture that is found to be realistic for charcoal and activated carbon as well as for mature kerogen [8,24]. The ReaxFF [25,26] reactive force field has been used, with parametrization for alkali ions in solution [27]. Simulation details can be found in the Supplemental Material [28].

The voltage has been applied by modifying the electron-attracting ability $\chi_i$ used in the charge-equilibration method [29] to determine the atomic partial charge at each frame. Applying $\chi_i = \chi_i^0 \pm \Delta\phi/2$ (— for the anode, + for

<figure><img src="image_2.png" /><figcaption>FIG. 1. A schematic view of the system at a simulation time of 0.5 ns for a flexible electrode, featuring $Cs^+$ and $Cl^-$ ions highlighted in orange and light blue, respectively; the water is omitted for clarity. The carbon atoms are showcased on a blue-to-red scale, illustrating their dynamic charge ($q$). The charges of the carbon atoms undergo fluctuations over the course of the simulation.</figcaption></figure>

the cathode) results in a potential difference $\Delta\phi$ between the two electrodes [30–33] (see the Supplemental Material [28]). In this work, $\chi$ is modified in the initial step of the simulation; nonetheless, the partial atomic charges still fluctuate, making this a CV approach. The atomic partial charge is heterogeneous and can even be negative in the anode, as shown in Fig. 1.

## III. RESULTS AND DISCUSSION

We have conducted simulations to explore the adsorption behavior of $Cs^+$ in the cathode and $Cl^-$ ions in the anode on both frozen and flexible models under identical voltages, force fields, and voltage methods (constant-$\chi$ scheme). $Cs^+$ has been selected as the cation to investigate the influence of electrode flexibility since it has a relatively large size when solvated (approximately 8 Å [34] in bulk electrolyte) but its ionic radius is about 1.81 Å, which makes it a good candidate for desolvation and adsorption in pores of small radius (< 5 Å). We also first consider a 4-V polarization, which is the largest value we have used in this work, for which we expect the largest ionic adsorption.

As shown in Fig. 2(a), in the case of $Cs^+$, ions have exhibited slower adsorption dynamics in the case of the
<figure><img src="image_3.png" /><figcaption>FIG. 2. (a) The number of ions inside the subnanopores during 1.5 ns of simulation at 4 V for a frozen cathode (orange), a frozen anode (blue), a flexible cathode (red), and a flexible anode (light blue); ions located at the interface with bulk water are omitted. (b),(c) Snapshots showing the localization of the ions and displaying the region inside the subnanoporosity and at the surfaces, defined as a 5-Å-thickness region at the edges of the electrodes, centered on the outermost C atom, in which the electric double layer is formed: (b) frozen electrode; (c) flexible electrode. (d), (e) The radial distribution function (RDF) sampled over all of the trajectory illustrates the relationship (d) between Cl⁻ ions and H atoms of the anode and (e) between Cs⁺ ions and C atoms of the cathode. (f), (g) The total number (inside subnanopores and surfaces) of (f) Cs⁺ cations or (g) Cl⁻ anions adsorbed after 3 ns of polarization at 0 V, 1 V, 2 V, or 4 V for flexible (red) and frozen electrodes (black).</figcaption></figure>

flexible model with respect to the frozen model. This contradicts the common idea that flexibility would induce more capacitance because of increased mobility of ions or gases in porous systems [35,36]. The absence of Cs⁺ adsorption before 0.6 ns suggests that flexibility delays adsorption, indicating that it could simply be a kinetic effect. Nonetheless, the simulation up to 4 ns (see the Supplemental Material [28]) has revealed that a plateau is reached at 1.5 ns, indicating that the flexibility effect

also influences the system capacitance at equilibrium [Fig. 2(f)]. The frozen model has exhibited about 80% adsorption of Cl⁻ in subnanometric pores, with ions penetrating deep into the anode [Fig. 2(g)], whereas none are adsorbed in those pores in the flexible case. Ion adsorption within the subnanopores modifies the carbon charges, which reinforces the electric double layer at the outer surface. As observed in Figs. 2(b) and 2(c), more ions are adsorbed at the outer surface of the electrodes when
more ions are docked within the subnanopores. In our model, since the pores are smaller than 1 nm in size, we do not observe ion-pair adsorption as it can be observed in simulation on systems with larger pores; in particular, carbide-derived carbon [37].

Flexibility allows stronger interactions between the ions and the outer surface, which can be observed both for $Cs^+$ and $Cl^-$, as shown in Figs. 2(d) and 2(f), and which contains many defects and a high excess charge due to the voltage. The first maximum peak of the density for Cl and H is sharper and at a shorter distance shorter (2 Å) than for Cs and C (2.6 Å), showing a stronger $Cl^-$ interaction with $H^+$ atoms; in particular, since the charge on the $H^+$ atoms is higher than that on the C atoms. The same reinforcement of the electric double layer is observed for $Cs^+$ as for $Cl^-$. Cation docking increases the carbon charge, which in return attracts more cations, as shown in Figs. 2(b) and 2(c) and in the Supplemental Material [28].

In our model, we evaluated the accessible surface area of the electrodes using a probe of 5 Å radius using a Monte Carlo approach as implemented in Zeo++ [38,39] and found that it is 5633 Å² and 572 m² g⁻¹. The electrode density is 1.3 g cm⁻², lower than 1.4 g cm⁻², implying that the pore network is highly connected [9]. At 1 V and with $ ^{55}Cs^+ $ ions, which corresponds to a concentration of 1.5 mol l⁻¹, the maximum theoretical capacitance that we can reach is 90 F g⁻¹ if all ions are docked, which is close to the experimental values for supercapacitors of 80–110 F g⁻¹[10]. Under this approximation, the estimated capacitance due to $Cs^+$ at 2 V after 3 ns is approximately 45 F g⁻¹ (0.07 F m⁻²) for the rigid model, in the same order of magnitude as prior simulations for $Na^+$ [2,10]. For the flexible model, the estimated capacitance is around 16 F g⁻¹ (0.03 F m⁻²). In the models, the capacitance is lower than the experimental values, which is attributed to low ion concentration in the solution and the fact that our models do not contain pores of size larger than 1 nm. In order to improve the estimation of the capacitance, performing constant-concentration solution simulations would be interesting, as we expect that this would increase the capacitance. Our findings reveal that frozen models overestimate the capacitance by a factor of 3 at 2 V. Additionally, the frozen approach lacks the flexibility to modify the porosity during ion adsorption, an aspect that is investigated hereafter.

We have analyzed the vibrational density of states of the carbon electrodes using the Green-Kubo formulation [40,41], based on the calculation of the velocity autocorrelation function [42], as shown in Fig. 3(a). The C—H stretching mode, at 3500 cm⁻¹, is overestimated compared to the expected values of about 3100 cm⁻¹ [43]. The C—C stretching modes at about 1100 cm⁻¹ and 1600 cm⁻¹ are in good agreement with experimental data [43]. Overall, the vibrational spectra confirm that the force field is suited for simulated carbon electrodes. Interestingly, the vibrational properties of the electrodes are not affected by the applied

voltage despite the change in the porosity. This is due to the fact that the atomic partial charge due to the voltage increase is about 0.1 *e* on average for a 2-V variation. We have also calculated a bulk modulus of approximately 20 GPa, in agreement with other models with similar density [44].

Exploring the flexibility of the electrodes allows us to investigate the pore modifications upon ion docking in terms of plasticity. Hereafter, three other alkali ions ($Li^+$, $Na^+$, and $K^+$) have been simulated in the case of a flexible electrode at 4 V. First, the analysis of the pore-size distribution before and after ion docking (and eventually residual water molecules from the ionic hydration shell) shows a neat electrode volume swelling (approximately $Li^+$ 1%, $K^+$ 2.5%, $Na^+$ 1.1%, and $Cs^+$ 2% swelling). The pore-volume increase is related to both the ion type and the quantity. Before adsorption, the hydration shell is 5.6 for $Na^+$, 7.0 for $K^+$, and 8.5 for $Cs^+$ water molecules, in agreement with experiments [34]. In fact, for $Li^+$, $K^+$, and $Cs^+$, the ions are easily adsorbed within the nanoporosity, whereas for $Na^+$, ions mostly remain on the outer surface. This is a consequence of the tight $Na^+$ hydration shell, due to its small ionic radius, which stabilizes $Na^+$ and its hydration shell of about 6.7 Å in diameter at the external surface. On the other hand, a $Li^+$ ion can get into the nanoporosity with its full hydration shell (about 5.3 Å in diameter), which is compatible with the pore size and disturbs the pore structure. In the case of $K^+$ and $Cs^+$, because their hydration shells are loose, these ions can enter accompanied with a fraction of their hydration shell and induce swelling. These findings align consistently with the observed increase in porosity, as shown in Figs. 3(b), 3(c), and 3(d). Hantel *et al.* [45] have shown that only the cathode swells and not the cathode, which agrees with our simulations and is related to ion docking in subnanometric pores.

In Fig. 3(c), we observe that the difference in the pore-size distribution shows a shift toward larger sizes for some peaks, such as the one located at 6.5 Å, while those at less than 5 Å shift to lower values. We can therefore put forward the mechanisms shown in Figs. 3(e) and 3(f): small pores can dock bare ions that strongly interact with nearby negatively charged C atoms, leading to attractive electrostatic forces; in larger pores, either one ion with some water molecules or several ions can adsorb, switching the local interaction balance to a swelling situation. Our observations align with simulations in highly flexible organic porous networks, which show shrinking of small pores and swelling of larger pores [36]. Experimental studies of gas and vapor adsorption in zeolites, microporous carbons, porous silicon, and low-*k* films also demonstrate a common trend: at low vapor pressure, the system contracts, followed by swelling at higher vapor pressure [46–49]. In our system, the resulting swelling ranges from 1% to 2.5% depending on the ion, comparable to the molecular case,
<figure><img src="image_4.png" /><figcaption>FIG. 3. (a) The vibrational density of states (DOS) for the electrodes obtained via velocity-autocorrelation functions [42] (see the Supplemental Material [28]). (b) The cumulative volume for alkali ions (Li⁺, Na⁺, K⁺, and Cs⁺), showing a general trend of an increase in the porosity compared to the case with no ions. The gray line corresponds to the pore-size distribution (PSD) shown in (a). (c) The pore-size distribution in the cathode depicted before (black) and after (red) Cs⁺ ion adsorption. The dashed line represents the cumulative volume of pores (arbitrary units). (d) The pore-size distribution difference in the electrode with ions and with no ions adsorbed. The shrinking and expansion of pores is indicated with arrows: shrinking is identified when the arrow is pointing left, which indicates an increase in smaller pores and a decrease in larger pores, while expansion is the opposite. The percentage corresponds to the contribution to the total difference in the cumulated pore-size distribution. (e) The scheme of the electrostatic forces in a pore of < 5 Å. (f) The scheme of the electrostatic forces in a pore of > 5 Å. (g) The nonaffine squared displacement for carbon atoms between initial t = 0 ns and final t = 3 ns states during the adsorption of Cs⁺ in a flexible cathode. The red parts are plastically deformed (nonaffine displacement), leading to nonreversible changes in the pore-size distribution and global porosity. Cs⁺ ions are symbolized in blue.</figcaption></figure>

which gives a swelling of about 1% for methane and 5% for CO₂ [50].

Finally, in Fig. 3(g), which shows nonaffine displacements, we observe that the carbon atoms that are more displaced during the simulation are the ones near to the adsorbed ions or at the external surface. It is interesting to observe that the structure far from adsorbed ions is mostly intact (only affine displacements). Simulating a desorption by inverting the 4-V polarization, we have observed that approximately 7% of the ions remain permanently trapped into the porosity, which has also been observed on frozen models [2]. Moreover, if docked ions are manually removed from the electrodes, the nonaffine deformation is sustained: ion docking under voltage-polarized electrodes induces nanoscale plasticity.

## IV. CONCLUSIONS

In this work, we have investigated, by means of molecular simulations, the influence of electrode flexibility for a system of two porous carbon electrodes in an aqueous electrolyte under polarized-voltage conditions using

a CV ensemble coupled with a reactive force field. The charge distribution is heterogeneous due to the presence of chemical and topological defects.

Using this approach, we have simulated the adsorption of alkali ions (Li⁺, Na⁺, K⁺, and Cs⁺) in the case of a frozen-electrode model and a flexible-electrode model. We have observed large differences in the adsorption properties, indicating that flexible-electrode models are key to properly evaluating the capacitance.

We have shown that ion docking induces permanent electrode-texture changes (plasticity) that depend upon both the ionic type and the amount. The smallest pores may be subjected to contraction while larger pores may swell. Overall, ion docking induces swelling at the scale of the electrodes. This key result highlights the importance of considering models that include flexibility to simulate porous systems under voltage. The potential impact of these poromechanical effects on the structural stability and long-term performance of porous materials and devices needs further investigation.

The findings on electrode swelling and porosity modifications could affect the adsorption capacity of other types
of species (per- and polyfluoroalkyl substances, nanoplas-
tics, CO₂, etc.) depending on the porous carbon structures,
extending the applicability of this research to diverse areas.

ACKNOWLEDGMENTS

This work was supported by the High Performance
Computing (HPC) resources of the National Computer
Center for Higher Education (CINES), the Très Grand
Centre de Calcul (TGCC), and Grand équipement national
de calcul intensif (GENCI (Projects No. A0170914406,
No. AD010911009, and No. AD010915898). The work
is part of the Laboratory of Excellence (LabEx) Digital
and Hardware Solutions for the Environmental and Life
Sciences (NUMEV) project for investigating capacitive
desalination.

[1] R. Vinodh, C. V. V. M. Gopi, V. G. R. Kummara, R. Atchudan, T. Ahamad, S. Sambasivam, M. Yi, I. M. Obaidat, and H.-J. Kim, A review on porous carbon electrode material derived from hypercross-linked polymers for supercapacitor applications, *J. Energy Storage* **32**, 101831 (2020).

[2] R. Dupuis, P.-L. Valdenaire, R. J.-M. Pellenq, and K. Ioanidou, How chemical defects influence the charging of nanoporous carbon supercapacitors, *Proc. Natl. Acad. Sci. USA*, e2121945119 (2022).

[3] E. H. Lahrar, P. Simon, and C. Merlet, Carbon-carbon supercapacitors: Beyond the average pore size or how electrolyte confinement and inaccessible pores affect the capacitance, *J. Chem. Phys.* **155**, 184703 (2021).

[4] L. Borchardt, Q.-L. Zhu, M. E. Casco, R. Berger, X. Zhuang, S. Kaskel, X. Feng, and Q. Xu, Toward a molecular design of porous carbon materials, *Mater. Today* **20**, 592 (2017).

[5] Y. Zhang, C. Prehal, H. Jiang, Y. Liu, G. Feng, and V. Presser, Ionophoricity of carbon sub-nanometer pores enables efficient desalination at high salinity, *Cell Rep. Phys. Sci.* **3**, 100689 (2022).

[6] K. A. Sammed, A. Farid, S. Mustafa, A. Kumar, M. Tabish, A. A. Khan, S. Ajmal, Z. Mo, A. R. Akbar, G. Yasin, Y. Jia Zeng, and W. Zhao, Developing next-generation supercapacitor electrodes by coordination chemistry-based advanced functional carbon nanostructures: Progress, current challenges and prospects, *Fuel Process. Technol.* **250**, 107896 (2023).

[7] M. Heckova, M. Streckova, R. Orinakova, J. Hovancova, A. Guboova, T. Sopcak, A. Kovalcikova, B. Plesingerova, D. Medved, J. Szabo, and J. Dusza, Porous carbon fibers for effective hydrogen evolution, *Appl. Surf. Sci.* **506**, 144955 (2020).

[8] J. Pikunic, C. Clinard, N. Cohaut, K. E. Gubbins, J.-M. Guet, R. J.-M. Pellenq, I. Rannou, and J.-N. Rouzaud, Structural modeling of porous carbons: Constrained reverse Monte Carlo method, *Langmuir* **19**, 8565 (2003).

[9] A. Obliger, F.-J. Ulm, and R. Pellenq, Impact of nanoporosity on hydrocarbon transport in shales’ organic matter, *Nano Lett.* **18**, 832 (2018).

[10] N. Ganfoud, A. Sene, M. Haefele, A. Marin-Laflèche, B. Daffos, P.-L. Taberna, M. Salanne, P. Simon, and B. Rotenberg, Effect of the carbon microporous structure on the capacitance of aqueous supercapacitors, *Energy Storage Mater.* **21**, 190 (2019).

[11] S. R. Tee and D. J. Searles, Constant potential and constrained charge ensembles for simulations of conductive electrodes, *J. Chem. Theory Comput.* **19**, 2758 (2023).

[12] L. Zeng, J. Peng, J. Zhang, X. Tan, X. Ji, S. Li, and G. Feng, Molecular dynamics simulations of electrochemical interfaces, *J. Chem. Phys.* **159**, 091001 (2023).

[13] L. Scalfi, M. Salanne, and B. Rotenberg, Molecular simulation of electrode-solution interfaces, *Annu. Rev. Phys. Chem.* **72**, 189 (2021).

[14] R. S. Sitlapersad, A. R. Thornton, and W. K. den Otter, Charging and discharging a supercapacitor in molecular simulations, *J. Chem. Phys.* **160**, 044111 (2024).

[15] C. Merlet, B. Rotenberg, P. A. Madden, P.-L. Taberna, P. Simon, Y. Gogotsi, and M. Salanne, On the molecular origin of supercapacitance in nanoporous carbon electrodes, *Nat. Mater.* **11**, 306 (2012).

[16] S. A. Evlashin, F. S. Fedorov, P. V. Dyakonov, Y. M. Maksimov, A. A. Pilevsky, K. I. Maslakov, Y. O. Kuzminova, Y. A. Mankelevich, E. N. Voronina, S. A. Dagesyan, V. A. Pletneva, A. A. Pavlov, M. A. Tarkhov, I. V. Trofimov, V. L. Zhdanov, N. V. Suetin, and I. S. Akhatov, Role of nitrogen and oxygen in capacitance formation of carbon nanowalls, *J. Phys. Chem. Lett.* **11**, 4859 (2020).

[17] T. Hussain, E. Olsson, K. Alhameedi, Q. Cai, and A. Kar-
ton, Functionalized two-dimensional nanoporous graphene
as efficient global anode materials for Li-, Na-, K-, Mg-,
and Ca-ion batteries, *J. Phys. Chem. C* **124**, 9734 (2020).

[18] A. Maslechko, T. Verstraelen, T. S. van Erp, and E. Ric-
cardi, Multiscale partial charge estimation on graphene for
neutral, doped and charged flakes, *Phys. Chem. Chem.
Phys.* **20**, 20678 (2018).

[19] B. Dyatkin, Y. Zhang, E. Mamontov, A. I. Kolesnikov, Y. Cheng, H. M. Meyer III, P. T. Cummings, and Y. Gogotsi, Influence of surface oxidation on ion dynamics and capacitance in porous and nonporous carbon electrodes, *J. Phys. Chem. C* **120**, 8730 (2016).

[20] B. Dyatkin, N. C. Osti, Y. Zhang, H.-W. Wang, E. Mamontov, W. T. Heller, P. Zhang, G. Rother, P. T. Cummings, D. J. Wesolowski, and Y. Gogotsi, Ionic liquid structure, dynamics, and electrosorption in carbon electrodes with bimodal pores and heterogeneous surfaces, *Carbon* **129**, 104 (2018).

[21] Y. Mao, V. R. Ardham, L. Xu, P. Cui, and D. Wu, Insight into electrosorption behavior of monovalent ions and their selectivity in capacitive deionization: An atomic level study by molecular dynamics simulation, *Chem. Eng. J.* **415**, 128920 (2021).

[22] A. P. Thompson, H. M. Aktulga, R. Berger, D. S. Bolintineanu, W. M. Brown, P. S. Crozier, P. J. in 't Veld, A. Kohlmeyer, S. G. Moore, T. D. Nguyen, R. Shan, M. J. Stevens, J. Tranchida, C. Trott, and S. J. Plimpeton, LAMMPS—a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales, *Comput. Phys. Commun.* **271**, 108171 (2022).

[23] C. Bousige, A. Bołan, F.-J. Ulm, R. J.-M. Pellenq, and B. Coasne, Optimized molecular reconstruction procedure
combining hybrid reverse Monte Carlo and molecular dynamics, J. Chem. Phys. **142**, 114112 (2015).

[24] S. K. Jain, R. J.-M. Pellenq, J. P. Pikunic, and K. E. Gubbins, Molecular modeling of porous carbons using the hybrid reverse monte carlo method, Langmuir **22**, 9942 (2006).

[25] A. C. T. van Duin, S. Dasgupta, F. Lorant, and W. A. Goddard, ReaxFF: A reactive force field for hydrocarbons, J. Phys. Chem. A **105**, 9396 (2001).

[26] O. Rahaman, A. C. T. van Duin, W. A. I. Goddard, and D. J. Doren, Development of a ReaxFF reactive force field for glycine and application to solvent effect and tautomerization, J. Phys. Chem. B **115**, 249 (2011).

[27] M. V. Fedkin, Y. K. Shin, N. Dasgupta, J. Yeon, W. Zhang, D. van Duin, A. C. T. van Duin, K. Mori, A. Fujiwara, M. Machida, H. Nakamura, and M. Okumura, Development of the ReaxFF methodology for electrolyte-water systems, J. Phys. Chem. A **123**, 2125 (2019).

[28] See the Supplemental Material at http://link.aps.org/supplemental/10.1103/PRXEnergy.4.023001 for simulation details, details on the methodology for the polarization, charge distribution, additional adsorption curves, and deformation information and at http://link.aps.org/supplemental/10.1103/PRXEnergy.4.023001 for the ReaxFF parametrization used in this work.

[29] A. K. Rappe and W. A. Goddard III, Charge equilibration for molecular dynamics simulations, J. Phys. Chem. **95**, 3358 (1991).

[30] N. Onofrio and A. Strachan, Voltage equilibration for reactive atomistic simulations of electrochemical processes, J. Chem. Phys. **143**, 054109 (2015).

[31] N. Onofrio, D. Guzman, and A. Strachan, Atomic origin of ultrafast resistance switching in nanoscale electrometallization cells, Nat. Mater. **14**, 440 (2015).

[32] X. Hu and A. Martini, Atomistic simulations of contact area and conductance at nanoscale interfaces, Nanoscale **9**, 16852 (2017).

[33] X. Hu, J. Lee, D. Berman, and A. Martini, Substrate effect on electrical conductance at a nanoasperity-graphene contact, Carbon **137**, 118 (2018).

[34] J. Mähler and I. Persson, A study of the hydration of the alkali metal ions in aqueous solution, Inorg. Chem. **51**, 425 (2012).

[35] A. Ghoufi, K. Benhamed, L. Boukli-Hacene, and G. Maurin, Electrically induced breathing of the MIL-53(Cr) metal-organic framework, ACS Central Sci. **3**, 394 (2017).

[36] R. Dupuis, M. Barboiu, and G. Maurin, Unravelling the pore network and gas dynamics in highly adaptive rubbery organic frameworks, Chem. Sci. **13**, 5141 (2022).

[37] N. Ganfoud, A. Sene, M. Haefele, A. Marin-Laflèche, B. Daffos, P.-L. Taberna, M. Salanne, P. Simon, and B. Rotenberg, Effect of the carbon microporous structure on the capacitance of aqueous supercapacitors, Energy Storage Mater. **21**, 190 (2019).

[38] T. F. Willems, C. H. Rycroft, M. Kazi, J. C. Meza, and M. Haranczyk, Algorithms and tools for high-throughput geometry-based analysis of crystalline porous materials, Microporous Mesoporous Mater. **149**, 134 (2012).

[39] R. L. Martin, B. Smit, and M. Haranczyk, Addressing challenges of identifying geometrically diverse sets of crystalline porous materials, J. Chem. Inf. Model. **52**, 308 (2011).

[40] M. S. Green, Markoff random processes and the statistical mechanics of time-dependent phenomena. II. Irreversible processes in fluids, J. Chem. Phys. **22**, 398 (1954).

[41] R. Kubo, Statistical-mechanical theory of irreversible processes. I. General theory and simple applications to magnetic and conduction problems, J. Phys. Soc. Jpn. **12**, 570 (1957).

[42] L. T. Kong, J. F. Li, Q. W. Shi, H. J. Huang, and K. Zhao, Dynamical stability of iron under high-temperature and high-pressure conditions, Europhys. Lett. **97**, 56004 (2012).

[43] Q. Ma, S. Dutta, K. C.-W. Wu, and T. Kimura, Analytical understanding of the materials design with well-described shrinkages on multiscale, Chemistry A European J **24**, 6886 (2018).

[44] C. Bousige, C. M. Ghimbeu, C. Vix-Guterl, A. E. Pomerantz, A. Suleimenova, G. Vaughan, G. Garbarino, M. Feygenson, C. Wildgruber, F.-J. Ulm, R. J.-M. Pellenq, and B. Coasne, Realistic molecular model of kerogen's nanostructure, Nat. Mater. **15**, 576 (2016).

[45] M. M. Hantel, V. Presser, J. K. McDonough, G. Feng, P. T. Cummings, Y. Gogotsi, and R. Kötz, In situ electrochemical dilatometry of onion-like carbon and carbon black, J. Electrochem. Soc. **159**, A1897 (2012).

[46] B. P. Bering, O. K. Krasil'nikova, A. I. Sarakhov, V. V. Serpinskii, and M. M. Dubinin, Alteration of zeolite granule dimensions under krypton adsorption, Russ Chem Bull **26**, 2258 (1977).

[47] A. A. Fomkin, Adsorption of gases, vapors and liquids by microporous adsorbents, Adsorption **11**, 425 (2005).

[48] G. Dolino, D. Bellet, and C. Faivre, Adsorption strains in porous silicon, Phys. Rev. B Condens. Matter **54**, 17919 (1996).

[49] K. P. Mogilnikov and M. R. Baklanov, Determination of Young's modulus of porous low-k films by ellipsometric porosimetry, Electrochem. Solid-State Lett. **5**, F29 (2002).

[50] L. Brochard, M. Vandamme, and R.-M. Pellenq, Poromechanics of microporous media, J. Mech. Phys. Solids **60**, 606 (2012).