Carbon Xerogels: The Bespoke Nanoporous Carbons Carbon Xerogels: The Bespoke Nanoporous Carbons

This chapter focuses on the main features of resorcinol-formaldehyde – based carbon xerogels. The first part of the chapter discusses ways of synthesizing these materials and the different variables involved. Then a review of the ways in which the meso- and macroporosity of organic xerogels can be controlled by adjusting the synthesis conditions is undertaken. Special attention is paid to the pH and components of the precursor solution and how these variables are interrelated with each other. The formation of the microporosity during the carbonization or activation processes that give rise to the carbon xerogels is also briefly discussed. Besides the fact that the porosity of these materials can be tailored during the synthesis, another notable characteristic is that, compared with most porous carbons, they possess a relatively high electrical conductivity, which make them ideal materials for use as electrodes in energy storage devices. Their use in supercapacitors and in lithium ion batteries is addressed in the last part of the chapter.


Synthesis of resorcinol-formaldehyde xerogels
The most common way of synthesizing organic gels is via the polymerization reaction between resorcinol (R) and formaldehyde (F), using water as solvent and a basic catalyst as the reaction promoter [1][2][3][4][5]. This polymerization reaction consists of two stages: an addition reaction ( Figure 1) and a condensation reaction ( Figure 2).
Resorcinol is a benzyl compound with two hydroxyl groups at positions 1 and 3, which allow formaldehyde to be added at positions 2, 4 and 6 (see Figure 1) [6,7]. In the presence of a basic catalyst, the ionization of the resorcinol occurs through the abstraction of hydroxyl hydrogens, resulting in resorcinol anions. Resorcinol anions are more reactive than resorcinol itself, which favors the addition of formaldehyde leading to the formation of hydroxymethyl derivatives, as shown in Figure 1 [8,9]. These hydroxymethyl derivatives are the monomers that are necessary for polymerization to occur. At the same time as the addition reaction, the condensation reaction takes place, in which the hydroxymethyl derivatives lose OH groups to form a benzyl cation ( Figure 2) [10]. This cation reacts with a benzene ring of another molecule by bonding the rings with methylene and ether bridges [11,12], giving rise to the formation of polymeric particles, known as nodules. The nodules are aggregated and cross-linked by polymer chains to form a three-dimensional porous network in a liquid medium ( Figure 2).
The appearance of the nodules decreases the fluidity of the precursor mixture. The time required from the start of the reaction to the point where the solution starts to lose fluidity, i.e., when the gel begins to form, is known as the gelation time, whereas the exact moment at which the gel is obtained is called the gelation point [13]. After reaching this point of gelation, the solid structure that is immersed in the liquid continues to evolve. This stage is called  curing, where the remaining hydroxyl groups continue to undergo polymerization, thereby increasing the number of cross-linkages between the nodules [14].
The formation of the nodules, their growth and cross-linking between polymer chains depend on the concentration of each of the reagents used. The final polymeric structure will depend on the values of these variables. This is of great importance since it is the polymeric structure that determines the physical and chemical properties of the materials and, therefore, their adaptability to the requirements of a specific application.
After the gelation and curing processes, i.e., the polymerization and cross-linking reactions, a stable three-dimensional polymer is obtained. However, the polymer is imbibed in the reaction media. Usually, the steps mentioned above (i.e., polymerization and curing) occur in covered containers [9,[15][16][17]. This means that all the reaction media or solvent used is covering the polymer, filling all the pores of the structure. The next step of the process is to eliminate the solvent in order to obtain a dry polymer with all its pores available. Three drying methods are found in the literature [4,6,18]: (i) supercritical drying, (ii) cryogenic drying and (iii) subcritical drying, giving rise to three different kinds of gel commonly referred to as aerogels, cryogels and xerogels, respectively, ( Figure 3).
The most common method of solvent elimination is by supercritical drying [8,12,14,16,[19][20][21][22][23][24][25]. This method consists in exchanging the solvent used for the synthesis, by CO 2 under supercritical conditions, (i.e. under high values of pressure and temperatures), and then eliminating the CO 2 as a gas simply by changing the operating conditions (i.e., reducing the pressure). If water has been used as the solvent, as in the present case, it must first be replaced by an organic solvent due to the high solubility of the CO 2 in water. The main advantage of this procedure is that the polymeric structure is not subjected to any surface tension forces, as the final solvent, CO 2 , is eliminated in gas phase. In this way, the previously tailored porosity is preserved. However, the several solvent exchanges and the high pressures required for the supercritical drying make this option expensive and too long. The gels obtained by this method are known as aerogels.  Under cryogenic drying, the solvent used must be frozen and then eliminated by sublimation. As in the first case, when water is the dissolvent used for the synthesis, before the freezing process, it must be replaced by an organic solvent in order to avoid the formation of ice crystals inside the polymer structure, which would lead to the uncontrolled formation of megalopores or voids [18,26]. The gels obtained in this drying process have high pore volumes [18] and are known as cryogels. Despite the fact that this procedure is more affordable than supercritical drying, it is still expensive due to the need for using exchanging solvents, very low operating temperatures and numerous long steps.
The performance of the third drying method is based on the direct evaporation of the solvent and the generation of gels known as xerogels. Unlike the two cases mentioned above, under subcritical drying conditions, a liquid-vapor interphase takes place. This interphase generates high superficial tensions that may cause the collapse of the porous structure of the gel. When water is the solvent used during the synthesis of the gel, one possible solution to this problem can be to replace the water by another solvent with less surface tension, such as acetone or cyclohexane. However, some authors [18,[27][28][29][30][31][32] have demonstrated that a suitable choice of operating conditions during the drying stage minimizes the shrinkage of the gel structure. In other words, the porosity of the gel is preserved without the need for solvent exchanges. For this reason, subcritical drying is the cheapest, easiest and fastest method, and consequently the most upscalable alternative for producing gels on a large scale.

Tailoring the meso-and macroporosity
Perhaps the most relevant property of carbon xerogels is that their mesoporosity (i.e., pores with an average size between 2 and 50 nm) and macroporosity (i.e., pores with an average size greater than 50 nm) can be tailored during the synthesis of the organic xerogels by selecting the appropriate synthesis conditions and, above all, by predetermining the characteristics of the precursor solution.
During the gelation stage, the polycondensation of resorcinol and formaldehyde leads to the formation of quasi-spherical nodules (nucleation) that become attached to each other during the curing step (cross-linking). Then, when the solvent is removed, during the drying step, the empty interspaces between the nodules form pores with a size that depends on the size of the nodules formed in the previous stages of the synthesis. A sketch representing the formation of the nodules and the way they cross-link with the pores formed in the resorcinol-formaldehyde (RF) gel is presented in Figure 4.
As reported in many studies, the size of the nodules and hence of the mesopores (or macropores) can be varied by changing the synthesis conditions, such as the pH [5,19,[33][34][35][36], type and amount of solvent [6,37], the concentration of the reactants [6,20,37], the type of catalyst [7,25], the temperature and time of synthesis [25,28], etc. As there are so many variables involved, the meso-or macroporosity of the xerogels can be tailored with a relatively high degree of precision by adjusting these variables. This is, of course, a great advantage, as it means that it is possible to design specific porous textures for specific applications. However, these variables are not independent of each other. Therefore, in order to be able to predict how changes in more than one of them will affect the porosity of the resultant xerogel, it is necessary to know the way in which they are interrelated, which is not a straightforward task [34,37,38].
The complexity of the problem can be explained briefly as follows. Resorcinol is responsible for the formation of the nodules or clusters and so the greater the amount of resorcinol that is used, the more the clusters that will be generated, while formaldehyde strengthens the gel by generating a structure that is more branched and/or interconnected. The volume of solvent added affects the distance between the nodules and so the greater the volume of solvent that is used, the more segregated the nodules will be, while the pH influences the speed of the reaction, i.e., the higher the pH is, the faster the resorcinol anions will be formed and consequently more nodules of small size will be created. All of these differences in the polymer structure affect the final porosity of the RF gel. Finally, the type of catalyst and the composition of the formaldehyde solution also influence the porosity formed by the RF gel [34]. However, as mentioned above, it is obvious that the modifications in porosity brought about by changes in the pH of the precursor solution, for example, will not be the same if the amount of solvent also changes. This is exemplified in Figure 5, where scanning electron microscope photographs, and the sketches in the insets, show for instance how increasing the pH of the precursor solutions from 5 to 5.8 leads to a polymeric structure with larger nodules (and hence wider pores) if the dilution is increased at the same time from 5.7 to 11.7.
Interestingly, the mesoporosity (or macroporosity) of the organic xerogels is preserved with only slight variations when thermal treatments such as carbonization and/or activation are applied [39]. The meso-or macroporosity of the carbon xerogels that is designed before and formed during the synthesis of the organic xerogel persists in the carbon xerogel, occasionally with a slight shrinkage of the pores when the carbonization or activation temperature is higher than 900 C [40][41][42]. However, as this shrinkage is a function of the temperature and heating rate, it can easily be predicted. Therefore, by taking this into account, it is possible to predesign the mesoporosity (or macroporosity) of the carbon xerogels before they are produced.

Tailoring the microporosity
As stated above, mesopores and macropores, which are the voids between the nodules of polymer that make up the organic xerogel polymeric structure, are predetermined during the synthesis of the organic xerogel. However, in order to obtain the carbon xerogel, it is necessary to subject the organic gel to a carbonization process or, in other words, to a thermal treatment in an inert atmosphere. During the carbonization, as the temperature increases, diverse volatile compounds are released from the organic xerogel, while reorganization and condensation reactions occur, leading to a thermally stable material that is mainly composed of carbon with a dominant sp2 structure. The release of the volatile molecules (mainly H 2 , CO, CO 2 and light hydrocarbons) leaves behind small holes or micropores. This microporosity is allocated to the carbonized nodules that constitute the carbon xerogel. This process is schematized in Figure 6.
Although the amount (pore volume) and size of these micropores may differ depending on the carbonization conditions and the type of organic xerogel being carbonized, in practice, for carbonization temperatures between 800 and 1000 C, the microporosity is similar for any carbon xerogel no matter the starting organic xerogel used [9,27,30,43]. However, the microporosity can be modified by performing an activation process, which can be performed either during or after the carbonization. Either chemical activation (with KOH, phosphoric acid, etc.) or physical activation (with CO 2 , steam or both) can be employed [40,42]. An appropriate selection of the activation process is essential for tailoring the microporosity of the carbon xerogel. Thus, different micropore volume and micropore size distributions can be obtained by varying the xerogel/activating agent ratio, the type of activating agent or the reaction time and temperature [40,42].

Unique exohedral porosity
A particularity of carbon xerogels is their unique porous structure, which completely differs from that of most porous carbons. Thus, carbon xerogels have a hierarchical porous structure that is composed of both micro-and mesopores (or macropores). Moreover, as stated in the previous sections, the size, and to some extent the pore volume, of the larger pores (meso-or macropores) can be tailored during the synthesis of the organic xerogel, whereas the pore volume and the size of the micropores can be predetermined during the carbonization or activation processes that give rise to the carbon xerogels. Consequently, the entire porosity (micro-and meso-/macroporosity) of carbon xerogels can be independently tailored to conform to predetermined specifications.
In addition, most porous carbons have slit-shaped pores, with more or less flat walls, or cylindrical pores, with negative surface curvatures (endohedral). However, the mesopores (or macropores) of carbon xerogels, due to their polymeric structure of interconnected nodules, have a positive surface curvature (exohedral), which is quite unusual for porous carbons (Figure 7).
The exohedral geometry of mesopores may have important implications for some applications where carbon xerogels are used [44], because the heterogeneous interaction of this kind of positive surface with gases or liquids differs from the interactions that occur with other types of carbon surfaces. For example, the positive curvature facilitates double layer formation in electrochemical capacitors, which is the subject of this chapter. The double layer, which is the basis of charge storage in this kind of device, is favored due to the reduced electrical field near to the positive surface, as a result of which the driving force behind counter-ion adsorption and co-ion desorption is decreased [45]. This has a positive influence on energy, but especially on the power density of supercapacitors.

Combining a high porosity and a high electrical conductivity
Unlike other carbonaceous materials, another remarkable feature of carbon xerogels is that despite being materials with a high porosity they also show low electrical resistivity, i.e., they are good electrical conductors, which are usually opposed characteristics. This is because good electrical conductors are usually materials with ordered carbonaceous structures, with condensed aromatic rings to a greater or lesser extent that have some delocalized π electrons that are free to migrate in the plane, making these kinds of material electrically conductive. This is the case of graphite or graphene [46]. On the other hand, porous materials have disordered structures due to their numerous defects, voids, etc., which are responsible for their high porosity. Such structural defects are not favorable for the movement of the electrons, and therefore porous material is usually synonymous with insulation. In fact, a lot of current research is focused on obtaining the optimal combination of both properties (porosity and electric conductivity) in a single material. The approaches for achieving this involve doping techniques or creating composites of porous materials with highly conductive ones such as carbon nanofibers or graphene. In this way, the resultant composite or doped material retains the porosity of the matrix, but its inherent electrical resistivity is reduced [41,[47][48][49][50][51][52].
However, even without doping, carbon xerogels have high electrical conductivities of 110 S m À1 when their S BET is around 1600 m 2 g À1 , which is double the electrical conductivity of a commercially activated carbon (50 S m À1 ) with the same specific area (YP-50F of Kuraray) [41]. This is due to their peculiar carbonaceous structure. On the one hand, as mentioned above, the polymeric structure of carbon xerogels consists of interconnected carbonaceous nodules with the most characteristic porosity between them. These nodules make up the carbonaceous network described in Figure 2. Such polycondensed structures are susceptible to ordering due to the effect of temperature resulting in a polymeric structure formed by ordered nodules interconnected with each other. The end product is a very special macroscopically porous material, but ordered at the level of nodules. As a consequence, carbon xerogels differ from active carbons in that they are able to combine a perfect porosity and electrical conductivity. On the other hand, during the carbonization/activation step not only is microporosity generated, but also the carbonaceous structure of the polymeric network undergoes a certain ordering and reorganization due to the high temperatures used (i.e., 1000 C). In fact, when carbon xerogels with specific surface areas of 2400 m 2 g À1 are produced, i.e., more porous xerogels, their electrical conductivity also increases to ca. 240 S m À1 . This is because to obtain a high porosity, the carbonization/activation conditions must be more intense, i.e., more residence time is required. As a result, although extra microporosity is created, the carbon structure has more time to reorganize and order itself. Figure 8 presents HRTEM images of the nanostructure of a carbon xerogel and YP-50F. As can be seen, both materials are composed of interconnected carbon sheets. Nevertheless, the structure of this carbon xerogel is dense and compact unlike that of YP-50F where there are some voids. According to Canal-Rodríguez et al. [41], these structural differences possibly explain the differences in their electrical conductivity.
This special feature of carbon xerogels, i.e., the combination of a tailored porosity with a high electrical conductivity, makes them perfect candidates for a wide variety of applications in many different areas such as (i) clean energy, i.e., for use as active materials in energy storage devices (this application will be discussed in detail in the following sections) or even in energy generation devices such as fuel cells [53][54][55]; (ii) environmental issues and better use of natural resources, in water-treatment and in the desalination of brackish water devices that function on the basis of capacitive deionization [56][57][58][59][60][61][62]; (iii) biotechnology, where they are used as supports of biomolecules as active materials in sensors [63,64], etc.

Nanoporous carbon xerogels in energy storage
Electrical energy storage is required in numerous applications, not only as a result of the increasing number of electronic devices that we use in our daily life but also as a means to ensure a more rational and sustainable use of energy resources. Thus, there is an increasing demand for more efficient energy storage devices in telecommunications, stand-by power systems, uninterruptible power supply systems, electric/hybrid vehicles, energy recovery systems, burst and regenerative power in industry and transportation, electric grid modulation or as complements to renewable energies.  The specifications for the energy storage devices are given in terms of energy stored (W h) and power (W) as well as size and weight, cost and durability. The most common electrical energy storage device is the battery. Batteries can store large amounts of energy within relatively small confines of volume and weight. However, the problem with battery systems is their life-span as their energy storage method is based on a chemical process that degrades the components of the battery and reduces the cycling life [65]. Furthermore, the current development of electronic applications demands devices with high power requirements, far beyond the capability of standard batteries. Supercapacitors, also known as electrochemical double layer capacitors (EDLC), store energy via a physical process based on the formation of an electric double layer at the electrode/electrolyte interface [65]. Therefore, the charge/discharge process is very fast and totally reversible with a very low level of degradation of the components. As a consequence, supercapacitors offer a high power density and a very long cycle life.
In general, batteries are used for their relatively high energy density, while supercapacitors are employed for their high power density. Therefore, both devices, if combined, could fulfill complementary functions. Currently both technologies require further optimization of their performance and the incorporation of safer and more cost-effective components. Research and industrial developments for storage devices are currently oriented toward improving energy and power density with new electrode materials, new electrolytes and new electrochemical concepts. Moreover, some research is currently focused on developing hybrid devices where in one electrode energy storage is based on a chemical process, while in the other, it is based on a physical double layer [66,67].
An EDLC consists of two porous carbon electrodes in contact with the current collector, separated by a porous film and impregnated with an electrolyte solution. When there is an electric potential difference between the electrodes, the electrons in the negatively polarized electrode (anode) are balanced by an equal number of positive cations at the electrode/electrolyte interface, while the storage holes in the positively polarized electrode (cathode) are electrically balanced by the anions from the electrolyte. Figure 9 shows the scheme of the basic principle of energy storage in this kind of device.
The capacitance of a single electrode (C e ) is proportional to the surface area of the electrode (S) according to Eq. (1), where ε 0 is the vacuum permittivity (8.854 10 À12 F m À1 ), ε is the relative permittivity of the dielectric electrolyte used and d is the effective thickness of the double layer. According to this equation, the capacitance of a single electrode will increase as the effective surface area of the electrode increases and the thickness of the double layer decreases (i.e., better contact between electrode and ions of electrolyte). This is the reason for using carbons with well-developed porosity (i.e., a high effective surface area, which means a higher surface area accessible to the electrolyte) as active materials in supercapacitors. Moreover, a greater or lesser ability to accommodate electrolyte ions on the surface of the electrode will also influence the thickness (d) of the double layer. Some studies show that the curvature of the surface (i.e., whether it is positive or negative) will influence the way in which solvated and desolvated ions of the electrolyte are accommodated [68,69]. In this respect, exohedral surfaces are more receptive, as it was mentioned above.
For a capacitor, two electrodes are needed, which is the equivalent to two capacitors in series.
The resultant capacitance C can be expressed by the following equation Eq. (2), where C + and C À are the capacitance of the cathode and the anode, respectively. Consequently, the difference between the capacitance values of a single electrode or complete capacitor is of great importance because if both electrodes have the same thickness, size, mass and material, the difference between both capacitances (in F g À1 , i.e., the most common parameter employed in the bibliography) will be a factor of four. The maximum energy stored in a supercapacitor (E) is proportional to its capacitance and is given by Eq. (3), where ΔE is the operation voltage. The most commonly used operation voltage value is 1 V for aqueous electrolytes and around 2.7 V for organic electrolytes. Higher voltages would lead to the degradation of the components. It is clear that increasing the operation voltage is the most effective way to increase the energy density of a supercapacitor, which is why organic electrolytes are widely used in commercial devices, even though their conductivity, and their capacitance values (see Eq. (1)), are lower. However, the most common organic electrolytes (quaternary ammonium salts in polycarbonate or acetonitrile) have a number of disadvantages that can cause environmental problems; they are highly inflammable and chemically unstable, etc. In order to overcome these problems, research has been oriented toward developing organic electrolytes and ionic liquids, the latter being able to work up to 3.5 V. The wider range of electrolytes available will lead to a correspondingly wider range of porosities in the active material used, which is the topic of this chapter.  As already mentioned and in accordance with Eq. (1), the capacitance of an EDLC is proportional to the surface area of the electrode. However, this surface area is the effective surface area required for the interaction between the electrode-electrolyte, and it might not be the same as, for example, the most common specific surface area values determined by N 2 adsorption-desorption isotherms at À196 C. The presence of microporosity in the electrode is necessary, as micropores are the main contributors to the surface area of the electrode. However, the electrolyte must have access to all the microporosity. Therefore, the presence of feeder pores, i.e., mesopores, is also a determinant. Moreover, the ability to adjust the size of the mesopores to the electrolyte is important in order to favor its movement without penalizing the volumetric capacitance of the electrode. Apart from this, Gogotsi and col. [70] showed that the size of micropores also has a relevant role to play as if this is optimized, the electrolyte ions can be adsorbed in a desolvated or partially desolvated form, thereby minimizing the thickness of the double layer and increasing the capacitance of the electrode (see Eq. (1)). In summary, the ideal electrode will have a very large surface area with the size of micro-and mesopores optimized for the specific electrolyte that is going to be used in the EDLC. Carbon xerogels would appear to be the most suitable candidates for this kind of application, as their micro-and mesoporosity can be tailored to have both the required porosity and a good electrical conductivity.
Clearly, each electrolyte will have different cation and anion sizes. Table 1 shows some recorded values for the most common electrolytes used in supercapacitors. However, it must be taken into account that these sizes refer to desolvated ions, and it is a known fact that ions move and may be adsorbed in solvated or partially solvated form. Thus, for example, the sizes of TEA + and BF 4 À are 0.69 and 0.46 nm, respectively, but the same ions solvated in acetonitrile double that size (i.e., 1.30 and 1.16 nm for TEA + and BF 4 À , respectively) [45]. Moreover, new electrolytes are continuously being developed in order to increase the operation voltage of EDLCs and these have a great influence on the maximum energy storage of the device (see Eq. (3)). For these reasons, certain materials susceptible to porosity manipulation, such as carbon xerogels, appear to be the key to future supercapacitor developments.
What is more, there is no general agreement about the optimum micro-and mesopore size, as many factors influence the final performance of the supercapacitor, such as the electrical conductivity of the active material, its chemical composition, the technique used to fabricate the electrodes and even the design and engineering aspects involved in the fabrication of the device. Also important is the final application of the supercapacitor: whether it is to be used for energy or power applications or portable or stationary applications (where the volume of the device will be important), etc.
Another factor that has a considerable influence on the capacitance of the supercapacitors is the presence of heteroatoms such as O, N, P or B in the structure of the electrode materials. On the one hand, these surface groups improve the wettability of the electrodes, facilitating contact and diffusion of the aqueous electrolyte in the electrode. On the other hand, if the electrode material has too many surface groups, faradaic reactions are likely to take place (redox reactions). This phenomenon widely known as pseudocapacitance may contribute substantially to increase the total capacitance of the EDLC. However, the presence of some functional groups (e.g., oxygen functional groups) can considerably reduce the electrical conductivity of the active material to the detriment of the overall performance of the supercapacitor, especially in relation to the power supply, as shown below. Moreover, the presence of pseudocapacitance, which is a chemical process, favors the degradation of the components, shortening the life span of the supercapacitor, which is one of the features that distinguishes it from batteries.
The other main feature that distinguishes supercapacitors from batteries is that they are able to supply great power densities. The maximum power density of the supercapacitor also depends on the maximal applicable voltage, see Eq. (4), but it is inversely proportional to the equivalent series resistance (ESR) of the system. The ESR corresponds to the sum of the (i) resistance of the active material used as electrode (i.e., electronic resistance and ionic diffusion resistance), (ii) resistance of the electrolyte selected and (iii) resistance of the assembly of the supercapacitor cell (electrode/current collector contact, type of current collectors and sheet separators, etc.) [41].
Organic electrolytes and ionic liquids have another advantage over aqueous electrolytes that affects the operating voltage of the supercapacitor, namely that they result in higher power density values. In contrast, aqueous electrolytes have considerably higher electrical conductivities, i.e., several orders of magnitude higher, compared to organic and ionic liquids, besides lower viscosities that facilitate their diffusion in the porous structure and the ion movement during charge/discharge process. These characteristics may give higher capacitance values, compensating only partially the lower operating voltage used. It is clear that the properties of the active materials, in terms of porosity and electrical conductivity, will be the key to achieving a high power density, if the same electrolyte and supercapacitor cell configuration are used. Carbon materials with high electrical conductivities combined with an appropriate pore size distribution in order to facilitate ionic diffusion are essential for achieving a first-rate EDLC. Carbon xerogels are able to combine both characteristics, which is not usual in other porous carbons. They have therefore become the most sought-after active materials in supercapacitors.
The most common representation of the relation between the main characteristics of a supercapacitor (i.e., energy and power) is the Ragone plot. Figure 10 shows the typical Ragone plot where the role of supercapacitors occupying the gap left to be filled by the conventional capacitors and batteries is highlighted. It is clear that the development of new carbon materials, with the appropriate porosity and electrical conductivity for use in supercapacitors, should be focused on the upper right zone of the plot. To this end, carbon xerogel used as an active material offers a truly unique polymeric structure with a high electrical conductivity combined with a modulable micro-and mesoporosity and therefore optimizable supercapacitor energy and power supply. Figure 10 shows the location on the Ragone plot of a series of commercial carbons available for the supercapacitor market for use in EDLCs with aqueous electrolyte, in addition to the performances of different carbon xerogels. The advantage of the bespoke nanoporous carbon xerogels discussed in this study is evident.
Batteries are energy storage devices whose performance is based on the conversion of chemical energy into electrical energy via reversible reactions that take place between the anode and cathode electrodes. The working principle is based on the reversible migration of ions from the cathode during the charge stage, after which they migrate through the electrolyte to intercalate into the structure of a carbon-based anode material [73][74][75][76][77]. Figure 11 shows a schematic representation of a lithium-ion battery.
However, during charging, secondary reactions also take place leading to the formation of a stable passivation layer, known as the solid-electrolyte interface that entraps the ions, reducing the energy storage over time. As a consequence, the service life of batteries is limited. The formation of this layer and the diffusion of the ions through the anode material are complex mechanisms that depend largely on the chemical composition and porous properties of the active material used as anode.
Batteries provide high capacitances, i.e., they supply great energy densities, which is their most advantageous characteristic. However, the chemical process is relatively slow and so, unlike supercapacitors, the main challenge of batteries is to achieve high power densities. Different compounds can be used as electrodes: NaS, Ni-Cd, ion-Li, etc. Graphite is the most commonly used active material as anode material in lithium-ion batteries [1,73,78]. Nevertheless, its maximum specific capacity is limited to 372 mAhg À1 , corresponding to one lithium atom per six carbon atoms. Moreover, changes in volume that occur during the successive insertion-deinsertion cycles can cause cell failure when an active material such as graphite is used [1,73,78]. One possible remedy is to use alternative materials that combine electrical conductivity, an appropriate porous structure that permits a rapid charge-discharge and free space to accommodate variations in volume. To achieve this combination of properties is no easy task.
Carbon xerogels are porous materials whose porosity can be designed and adapted for use in ion-Li batteries as anodes, or at least to give some light on the mechanisms involved in the reactions occurring inside the carbon anode, which are still unclear [79].

Conclusions
Nanoporous carbon xerogels have a great potential in numerous applications since their nanoporosity can be tailored quite accurately. Mesoporosity can be predetermined during the synthesis of the organic xerogel relatively easily by controlling the proportion of each component of the solution precursor. However, the numerous variables involved, i.e., pH and type of catalyst used, degree of dilution, proportion of methanol that comes with the formaldehyde and R/F ratio, require a better knowledge of how their interrelation influences the resulting mesoporosity. The mesoporosity formed in this stage is relatively well preserved during the subsequent carbonization and/or activation processes, during which the micropososity of the carbon xerogel is formed. Depending on the carbonization or activation method selected for obtaining the carbon xerogel, the microporosity can also be tailored. The versatility of these nanoporous carbons makes them suitable for use in numerous applications. Additionally, carbon xerogels possess a good balance between porosity and electrical conductivity, two opposite properties. Thus, high surface area carbon xerogels have an electrical conductivity that is superior to other high surface area carbons. This makes carbon xerogels the ideal materials for use as electrodes in storage devices like supercapacitors where a high surface area and high conductivity are required. The potential of carbon xerogels for serving as electrode in lithium-ion batteries is also currently under investigation with promising results.