Moisture uptake in nanocellulose: the effects of relative humidity, temperature and degree of crystallinity

Foams made from cellulose nanomaterials are highly porous and possess excellent mechanical and thermal insulation properties. However, the moisture uptake and hygroscopic properties of these materials need to be better understood for their use in biomedical and bioelectronics applications, in humidity sensing and thermal insulation. In this work, we present a combination of hybrid Grand Canonical Monte Carlo and Molecular Dynamics simulations and experimental measurements to investigate the moisture uptake within nanocellulose foams. To explore the effect of surface modification on moisture uptake we used two types of celluloses, namely TEMPO-oxidized cellulose nanofibrils and carboxymethylated cellulose nanofibrils. We find that the moisture uptake in both the cellulose nanomaterials increases with increasing relative humidity (RH) and decreases with increasing temperature, which is explained using the basic thermodynamic principles. The measured and calculated moisture uptake in amorphous cellulose (for a given RH or temperature) is higher as compared to crystalline cellulose with TEMPO- and CM-modified surfaces. The high water uptake of amorphous cellulose films is related to the formation of water-filled pores with increasing RH. The microscopic insight of water uptake in nanocellulose provided in this study can assist the design and fabrication of high-performance cellulose materials with improved properties for thermal insulation in humid climates or packaging of water sensitive goods.

Abstract Foams made from cellulose nanomaterials are highly porous and possess excellent mechanical and thermal insulation properties. However, the moisture uptake and hygroscopic properties of these materials need to be better understood for their use in biomedical and bioelectronics applications, in humidity sensing and thermal insulation. In this work, we present a combination of hybrid Grand Canonical Monte Carlo and Molecular Dynamics simulations and experimental measurements to investigate the moisture uptake within nanocellulose foams. To explore the effect of surface modification on moisture uptake we used two types of celluloses, namely TEMPO-oxidized cellulose nanofibrils and carboxymethylated cellulose nanofibrils. We find that the moisture uptake in both the cellulose nanomaterials increases with increasing relative humidity (RH) and decreases with increasing temperature, which is explained using the basic thermodynamic principles. The measured and calculated moisture uptake in amorphous cellulose (for a given RH or temperature) is higher as compared to crystalline cellulose with TEMPO-and CM-modified surfaces. The high water uptake of amorphous cellulose films is related to the formation of water-filled pores with increasing RH. The microscopic insight of water uptake in nanocellulose provided in this study can assist the design and fabrication of high-performance cellulose materials with improved properties for thermal insulation in humid climates or packaging of water sensitive goods.

Introduction
Cellulose is one of the most abundant biopolymers on Earth. It can be found in wood, algae, tunicates, and cotton usually combined with other components such as hemicellulose and lignin (Cosgrove 2005). Cellulose is a light-weight and versatile material that exhibits a structural hierarchy from the ångstrom-to the micrometer scale, and cellulose nanomaterials (CNMs) display a high surface area and tunable surface chemistry making them versatile materials for a variety of applications (Klemm et al. 2011;Moon et al. 2011;Thomas et al. 2018). CNMs in the form of cellulose nanocrystals (CNCs) or cellulose nanofibrils (CNFs) can be produced by acid hydrolysis or mechanical and chemical defibrillation, respectively (Phanthong et al. 2018). Sulfuric acid hydrolysis or the chemical modification (i.e., TEMPO mediated oxidation or carboxymethylation) replaces the primary hydroxyl group (-OH) on cellulose surface by common functional groups such as sulfate (-OSO 3 -), carboxylate (-COO -) and carboxymethyl (-CH 2-COO -) (Saito and Isogai 2004;Liimatainen et al. 2013;Eyley and Thielemans 2014;Candido and Gonçalves 2016;Kaldéus et al. 2018).
CNFs and CNCs have been extensively used to make thin films (Lavoine and Bergström 2017;Kontturi and Spirk 2019), foams and aerogels (Lavoine and Bergström 2017;Kontturi and Spirk 2019) for a wide range of applications including e.g., packaging (Trache et al. 2016), photonics (Shrestha et al. 2017;Chen et al. 2020), thermal insulation (Antonini et al. 2019), pharmaceuticals (Picheth et al. 2017), and membranes (Li et al. 2019). CNM-based materials often display excellent mechanical, optical, barrier, and heat insulation properties (Lavoine and Bergström 2017;Hamad 2017;Parker et al. 2018). However, cellulose is naturally hygroscopic, i.e., its properties change drastically when exposed to a humid environment due to the presence of hydroxyl groups on the surface. Indeed, the moisture content in wood, which consists mainly of cellulose, lignin, hemicellulose and extractives, can vary from 10 to 40% depending on the relative humidity (RH), where RH at a given temperature is defined as the ratio of partial pressure of vapor to the vapor pressure of water. Interestingly, the moisture uptake depends also on functionalization of cellulose. For example, TEMPOoxidized cellulose nanofibrils adsorb more moisture compared to the sulfated cellulose nanofibrils at a RH of 95% (Guo et al. 2018). Furthermore, there are numerous studies that have showed that the strength, toughness and Young's modulus of cellulosic films is significantly reduced with increasing RH (Benítez et al. 2013;Benítez and Walther 2017) and that the fiber-matrix adhesion can be reduced by moisture uptake (Haslach 2000;Mokhothu and John 2015). Moisture uptake by packaging materials for the pharmaceutical industry can also cause stability problems for moisture sensitive drugs (Mihranyan et al. 2004). However, the quick and sensitive response of cellulose towards moisture can be used in humidity sensors following the change in gravimetric or viscoelastic properties due to water uptake (Solin et al. 2020). Similarly, humidity-responsive chiral nematic CNC films utilize the increase in the chiral nematic pitch of the helix with uptake of water to the change of color of the film (Chen et al. 2020). Recently, it was also shown that moisture-induced swelling of CNM-based foams can also reduce the thermal conductivity due to enhanced phonon scattering (Apostolopoulou-Kalkavoura et al. 2021).
The water uptake in cellulose is a microscopic phenomenon that can be captured by atomistic modelling. The moisture uptake in cellulose depends on several factors such as the cellulose-cellulose, cellulose-water and cellulose-counterion interactions which are governed by van der Waals and Coulombic interactions. The hydration of cellulose and the bound water inside the cellulose were studied using molecular dynamics (MD) simulation (Garg et al. 2020). However, to investigate the effect of the RH on the moisture uptake inside the porous material the Grand Canonical Monte Carlo (GCMC) simulations are required. This is because the GCMC simulations allow the number of atoms in the system to fluctuate, which is needed to describe the case when water molecules are absorbed. Note that the GCMC simulations possess the drawback of constant volume meaning that the structure of cellulose does not change during the GCMC steps. However, the water uptake in cellulose is accompanied by structural changes and increase in pore volume. This cannot be captured by GCMC simulations alone and thus requires MD simulations as well (Kulasinski et al. 2015;Chen et al. 2018).
To design and fabricate high-performance biopolymer-based materials, the mechanism of moisture uptake must be well understood in order to utilize these materials efficiently in various applications. For instance, the moisture uptake in chitosan films decreases with increasing temperature (Aguirre- Loredo et al. 2017). The presence of surface charge and counterions seems to influence the sorption behavior of cellulose indicating that moisture sorption in sulfated cellulose is higher with H ? and Na ? counterion as compared to Ca 2? counterion (Berthold et al. 1994). However, even if it is known that crystallinity, surface modification and temperature are crucial parameters affecting the moisture uptake of cellulose and CNMs (Kulasinski et al. 2015;Kulasinski 2016), their effect is not fully explored and remains not well understood.
Here we combined a hybrid Grand Canonical Monte Carlo/Molecular Dynamics simulation (GCMC/MD) with gravimetric moisture uptake measurements to investigate the effect of temperature and the degree of crystallinity on moisture uptake of nanocellulose. The experimental measurements were performed on CNM foams prepared from CNCs and CNFs with different surface modifications and the simulations were performed on amorphous cellulose films and crystalline bundles with corresponding surface modifications. The moisture uptake was calculated at temperatures between 285 and 313 K and RH between 20 and 80%. The calculated data were correlated to various microscopical properties such as the radial distribution functions and the pore size distribution to understand the microscopic mechanism of moisture uptake.
The TEMPO-oxidized cellulose nanofibers (TCNFs) were prepared as previously reported using the TEMPO/NaBr/NaClO system with 10 mmol of NaClO per gram of cellulose (Saito and Isogai 2004). The TEMPO-mediated oxidation was performed at pH 10 for 4 h. The residual aldehyde and ketone groups in the TEMPO-oxidized cellulose pulp were reduced by adding 0.1 g of NaBH 4 per gram of cellulose to the pulp suspension at pH 10 and allowing it to stir for 3 h (Saito and Isogai 2006). The TEMPO-oxidized cellulose pulp obtained was washed thoroughly with deionized water (DI) to remove the excess reagents. The final TCNF material was obtained by grinding the TEMPO-oxidized cellulose pulp using a Supermasscolloider grinder (Model MKZA10-15 J, Masuko Sangyo Co., Ltd, Japan) equipped with non-porous grinding stones containing silicon carbide (Disk model MKE), using a gap clearance of 100 lm at a motor frequency of 30 Hz.
The TEMPO-oxidized CNCs (TCNCs) were obtained from TCNFs prepared with 10 mmol/g of NaClO. The TCNCs were obtained by HCl (2.5 M) acid hydrolysis of the TCNFs for 4 h at 105°C (Tanaka et al. 2015) as previously reported followed by centrifugation at 12000 G for 10 min and dialysis through a membrane with a molecular weight cut-off of 14 000 Da against deionized water for 2 weeks to thoroughly clean the final material.
As mentioned above, the same never-dried sulfite dissolving pulp (Aditya Birla, Domsjö Fabriker AB) was also used for the preparation of carboxymethylated cellulose nanofibers (CMCNFs).
Prior to use the pulp was washed with acid (HCl, pH 2), DI-water and base (NaOH, pH 9) followed by a thorough wash with DI-water and reslushed at 30,000 revolutions (PTI Austria).
CMCNFs were prepared following procedures previously described (Wågberg et al. 2008;Kaldéus et al. 2018). In short, cellulose fibers (3 g) were solvent exchanged to ethanol (96%, 150 mL, 15 min) four times, where after the fibers were impregnated for 30 min in monochloroacetic acid (0.3 g) in isopropanol (150 mL). The fibers were then placed in an alkaline alcoholic solution (0.49 g NaOH, 15 mL MeOH and 60 mL iso-PrOH) at 82°C under reflux. The carboxymethylation was conducted for 60 min where after work-up was conducted by washing and filtration steps; DI-water (1 L), acetic acid (100 mL, 0.1 M), and DI-water (1 L). To convert the pulp into the Na ? form, the fibers were immersed in NaHCO3solution (4 wt%) and post-filtered with DI water (1 L). Finally, the carboxymethylated pulp was mechanically disintegrated in a high pressure microfluidizer (M-110EH, Microfluidics) by a single pass through the 400 lm and 200 lm chambers and four times through the 200 lm and 100 lm chambers. The homogenized fibers were diluted with Milli Q-water (0.15 wt%) then ultrasonicated (10 min, 30% amplitude, using microtip probe (6 mm in diameter)) on a Vibracell VCX750 (Sonics & Materials Inc., US). Thereafter, the sonicated dispersions were centrifuged for 1 h at a gravitational force of 4100 g using a Rotina 420 bench-top centrifuge (Andreas Hettich GmbH & Co.KG, Germany) and the supernatant was collected.
Note that the initial pulp was never-dried and its moisture content was 10-15%. After performing the TEMPO oxidation and carboxymethylation followed by mechanical disintegration we obtained TCNF and CMCNF homogeneous and flowable colloidal dispersions with a concentration of 0.5 wt%, respectively. The same applied for the TCNC dispersion which had a concentration around 0.1 wt% after dialysis and was concentrated up to 0.5 wt% using a rotary evaporator. The aqueous dispersions were homogenized using an UltraTurrax before freezecasting to ensure the homogeneity of the dispersions.

Preparation of anisotropic CNM foams
Anisotropic TCNF, TCNC and CMCNF foams were prepared by unidirectional ice templating (Wicklein et al. 2015;Munier et al. 2016) from 0.5wt% dispersions 0.5 wt% in DI. The unidirectional icetemplating was performed using teflon molds of 4 cm diameter and 2.5 cm height equipped with copper bottom plate that were filled with TCNF, TCNC or CMCNF dispersion and placed in contact with a dry ice block, giving a final cooling rate of 3 K min -1 . The final dry foams were obtained by removing the ice by sublimation at 0.024 mbar and room temperature for four days using a freeze-dryer (Christ Alpha 1-2LDplus, Germany). TCNF, TCNC and the CMCNF foams prepared from the same type of starting materials (and same batch) were used in all the experiments.
CNM particle and CNM Foam characterization AFM (Dimension 3100, Bruker, USA) operated in tapping mode was used to determine the CNM dimensions ( Fig. 1). A droplet of 0.001 0.005 wt% aqueous CNM dispersion was deposited onto freshly cleaved mica substrate and dried at ambient conditions. Conductometric titration (Committee 2002) with NaOH as titrant was used to determine the surface charge of CNMs to be 1.60 mmol COOper gram of cellulose for the TCNFs and TCNCs, and 0.65 mmol COOper gram of cellulose for the CMCNFs.
SEM images of the CNM foam cross-section were taken using a HITACHI TM-3000 (Germany) using a 5 kV electron beam at a magnification of 9 500 (Fig. 2). The foam samples were coated with gold in argon atmosphere for 20 s.
The apparent density, q, of the foams was calculated from the mass and the volume (height 9 pr 2 ) of the foams, kept for 3 d at 50% RH and 295 K.
The porosity (P) of the foams was determined from the skeletal (q skel ) (Wicklein et al. 2015) and the apparent foam density (q app ).
The crystallinity index (CI) of the CNM foams was calculated from 1D diffractograms obtained with a Panalytical X 0 Pert PRO diffractometer operated with Cu Ka radiation and in Bragg-Brentano diffraction geometry. Thin pressed CNM foam samples with a thickness less than 1 mm that were prepared by axially compressing CNM foams were mounted on a Si wafer zero-background holder spinning at a constant rate of 30 rpm and diffraction patterns were measured for 2h between 5 and 50°with 0.0167°step size.
The CI was then calculated using the Segal method (Segal et al. 1959) (Eq. 1).
where I 200 and I am are the intensity values for the (200) peak of crystalline cellulose located at 2h = 22-23°a nd the minimum in the intensity located at 2h = 18-19°that represent the amorphous content.
The angular values were measured with a copper (Cu) X-ray source.
Gravimetric moisture uptake The moisture uptake of the CNM foams under controlled RH and temperature was determined gravimetrically by measuring the weight change using a high-precision balance (BP 210 S, Sartorius, Germany) placed inside a humidity chamber as described previously (Apostolopoulou-Kalkavoura et al. 2018).
Prior to the measurements, the foams were dried at 313 K and 20% RH. The moisture content on dry weight (w) basis, H 2 O w , (i.e., the weight of water divided by the weight of dry cellulose) as a function of RH (20, 35, 50, 65 and 80%) was assessed at 285, 295, 303, 308 and 313 K. Each measurement at a specific temperature and RH lasted six hours to ensure that steady state was reached, the foam mass was measured every five minutes and the mass of the foam changed less than 1% during the final hour of equilibration.

Computational model
The amorphous and crystalline cellulose were modeled in the present work where TEMPO-oxidized (TEMPO) cellulose and carboxymethylated (CM) cellulose were considered. The cellulose chains with both the functionalities are shown in Figs. 3a, b, where a conventional numbering of carbon atoms (1-6) is indicated. For TEMPO-oxidized cellulose both hydrogen atoms of C6 carbon atom were removed and replaced by one oxygen, and the hydrogen atom of O6 carbon was removed. In case of CM-modification, the hydrogen atom of O6 oxygen atom was replaced by -CH 2 COOgroup. For both TEMPO and CM-modified cellulose, Na ? is used as the counter ion to make the system charge neutral. The degree of substitution was 1.6 mmol COO -/g of cellulose and 0.6 mmol CH 2 COO -/g of cellulose for TEMPO-and CM-cellulose respectively (both amorphous and nanocrystalline cellulose). For amorphous cellulose, all chains were modified and for crystalline cellulose only surface chains were modified. The number of substituents per glucose residue for TEMPO-amorphous cellulose was 0.256 and for CM-amorphous cellulose was 0.1. For crystalline cellulose the surface chains only were modified and the number of substituents per glucose residue on the surface is 0.3416 for TEMPO-crystalline cellulose and 0.127 for CM-crystalline cellulose.
The amorphous cellulose chains were generated with Avogadro (Hanwell et al. 2012). The computational box with 16 cellulose chains containing 10 repeating glucose units was generated with an initial density of 1 gm/cm 3 . To generate the amorphous film, we followed the thermal annealing protocol where the   water molecules are depicted in blue. d Array of four TEMPOmodified cellulose nanocrystals arranged in bundle at initial dry state and hydrated state when subjected to 80% RH at 285 K. The cellulose chains and water molecules are shown in grey and blue color respectively film is first heated above the glass transition temperature of polymer and then quenched to the desired temperature. First the cellulose chains were equilibrated at a high temperature of 800 K in the NPT (constant number of particles, pressure, and temperature) ensemble with Nosé-Hoover thermostat and barostat with a coupling constant of 0.1 and 1 ps respectively. After equilibration at high temperature the amorphous film was quenched from 800 K to desired temperatures of 285 K, 295 K and 313 K at a cooling rate of 0.1 K/ps. The films were then equilibrated at these temperatures. The total time for equilibration was 10 ns and the final density of the film converged to 1.3 g/cm 3 . Figure 3c and Figure S1a, b show snapshots of amorphous film prepared using the above-mentioned procedure.
The crystalline cellulose consists of a cellulose nanocrystal (CNC) of dimensions 2.3 9 2.3 9 11 nm 3 . The cellulose chains within the fibril were arranged in a square lattice with I b crystal structure (Nishiyama et al. 2002). Each fibril consists of 16 chains of cellulose with 20 repeating glucose units. Four CNCs were used, and they were arranged in a form of a bundle having a square cross section, see Fig. 3d. Note that the periodic boundary conditions are used, such that this arrangement corresponds to an infinite periodic structure. In order to make a dry film of CNC bundle we run a short NPT simulation (constant number of particles, pressure, and temperature) in vacuum to form a bundle. The initial and final configuration of the CNCs in the bundle arrangement is illustrated in Fig. 3d. Figure S1c, d show snapshots of TEMPO-crystalline cellulose and CM crystalline cellulose.
This approach was chosen to create a parallel arrangement of the CNCs with respect to each other as it is done in the experiments.
Note that degree of crystallinity of cellulose can be quantified by the Ramachandran plot showing the distribution of the main dihedral angles about their glycosidic linkage (Khodayari et al. 2021;French et al. 2021). We calculated these distributions for the crystalline and amorphous cellulose for both TEMPOand CM-modified cellulose, see Figure S2.

Simulation details
All simulations were run in LAMMPS molecular dynamics simulation software (Plimpton 1995). The OPLS-AA force field parameters for cellulose was used for describing bonded and non-bonded interactions and were generated using the Maestro software suit of Schrödinger software (Schrödinger 2018). The TIP3P water model is used for sorption (Mark and Nilsson 2001). The water molecules were made rigid by using rigid body command in LAMMPS. The Ewald summation method was used for the long-range electrostatic interactions. The moisture uptake was measured by running hybrid Grand Canonical Monte Carlo (GCMC) and Molecular Dynamics (MD) simulations (Plimpton 1995;Chen et al. 2018)). The GCMC simulation allows the insertion/deletion of atoms at a constant volume and a specific chemical potential and MD simulation allows the relaxation of the system at constant stress. In this way the GCMC/ MD approach allows the water intake in a static structure followed by a structural relaxation. The simulations at a specific temperature were performed by running both MD and GCMC steps. Each simulation window consists of running 100 MD steps followed by 1000 GCMC steps. The MD simulations were run in NrT (constant number of particles, stress, and temperature) ensemble with Nosé-Hoover thermostat and a constant stress of 0 Pa was maintained by Nosé-Hoover barostat. The time step for MD simulations was 1 fs. This was then followed by GCMC steps. The GCMC simulations were run in lVT (constant chemical potential, volume, and temperature) ensemble, where the water molecules can be adsorbed or desorbed from the cellulose at a specific chemical potential. To equilibrate the system using hybrid GCMC/MD simulations 10 5 windows of coupled GCMC/MD steps were run, which corresponds to a total time of 10 ns for each simulation.

Pore size calculations
A size of a pore at any point inside the material is defined as the maximal size of a sphere that can be fitted at that point without an overlap with other atoms. To calculate the pore size first we remove the water from the system. After that pore size inside the cellulose film is calculated using Zeo ? ? code (Pinheiro et al. 2013). For all the calculations, the probe diameter of 1 Å was used.

Results and discussions
Three different types of CNM foams were produced by ice-templating of 0.5 wt% TCNF, TCNC and CMCNF aqueous suspensions in a mold equipped with a copper bottom and teflon walls to allow unidirectional freezing. The foams were anisotropic with tubular macropores along the freezing direction (Fig. 2). Interestingly, the surface charge density of the TCNF fibrils and the TCNC rods is identical although the different CNMs had quite different crystallinity indexes (CI = 51 and 68 respectively) and aspect ratio (202 and 89, respectively) ( Table 1). On the other hand, the CMCNFs possess a lower surface charge density than TCNFs and TCNCs but a similar particle diameter and CI as the TCNFs. The shrinkage after freeze drying resulted in a slightly higher density of the TCNC foams compared to the more robust TCNF foams. The water uptake was determined after conditioning the anisotropic CNM foams for 6 h at 285, 295, 303, 308 and 313 K and 20-80% RH (Apostolopoulou-Kalkavoura et al. 2018).
The effect of RH and temperature on the water uptake was also determined computationally by hybrid GCMC/MD simulations on bundles of 100% crystalline CNCs (Fig. 2d), and amorphous cellulose films (Fig. 2c) with different surface modifications. The RH depends on the vapor pressure (P) at a specific temperature which in turn is related to the chemical potential. The RH is equal to P/P 0 , with P 0 being the saturation vapor pressure. The saturation pressure of water at 285 K, 295 K and 313 K is 1200 Pa, 2300 Pa and 7000 Pa respectively. At these temperatures, the water vapor is assumed to be ideal gas with chemical potential (l) according to Eq. 2.
where l 0 is the chemical potential of water at saturation vapor pressure, T is the temperature and k B is the Boltzmann constant. Figure 3c, d present snapshots of the initial and final configurations of both amorphous and crystalline celluloses at 80% RH and temperature of 285 K. For the case of the amorphous cellulose (Fig. 3c) the water molecules (blue beads) are distributed in regions of different sizes. For the case of the crystalline cellulose (Fig. 3d) water is primarily distributed at the interface between the cellulose nanorods in the bundle, and very little water is sorbed inside the nanocrystal. The calculated and measured moisture uptake as a function of relative humidity and temperature is shown in Fig. 4 for both TEMPO oxidized and carboxymethylated CNM foams. It should be noted that the simulated materials, amorphous cellulose (CI = 0) and crystalline cellulose (CI = 100) were studied at 0 and 100% crystallinity, whereas in the experimentally studied samples the crystallinity varied between CI = 46 and 68 as specified in Table 1. The simulated and measured dependencies are consistent with each other and show the expected behavior as a function of the RH and temperature as prescribed by Eq. (2). Namely, as the RH increases the moisture uptake in cellulose increases due to the increase of the chemical potential of water according to Eq. (2). At the same time, at a given RH, as the temperature increases the moisture sorption decreases because of the decrease in the chemical potential of water according to Eq. 2. (Note that in Eq. 2, ln RH \ 0).
The calculated moisture uptake in amorphous cellulose (for a given RH or temperature) is higher as compared to the crystalline cellulose for both TEMPO-and CM-modified surfaces, see Fig. 4a, b, e, f. Note that the calculated moisture uptake curves sometimes show ''non-smooth'' features, as e.g., a pronounced moisture uptake between 40 and 60% RH at 295 K. We relate this behavior to the finite size of our simulated system, and such features are expected to be smoothed out for larger systems. The experimental measurements for TEMPO-modified cellulose show the same trend where the moisture uptake (for a given RH or temperature) is higher for more amorphous material, i.e., for TCNFs with CI = 51.1 as compared to TCNFs with CI = 67.8, see Figs. 4c, d. (Note that experimental measurements for CMCNFs are available only for one degree of crystallinity). It is noteworthy that the higher water uptake on less crystalline CNMs corresponds well to previous work by Kulasinski et al. (Kulasinski et al. 2015;Kulasinski 2016). The CMCNF foams exhibit a slightly lower moisture uptake compared to the TCNF foams. However, a direct comparison for carboxymethylated and TEMPO oxidized celluloses cannot be made because of the lower degree of surface modification in the CMCNFs compared to the TCNFs.
Let us now compare quantitatively the experimental and simulated results. The moisture uptake of TCNFs and TCNCs at the relatively low temperatures of T = 285 K, and 295 K lies in between the corresponding simulated results for the amorphous and crystalline cellulose (Fig. 4a-d). The same also applies for CMCNFs for the case of T = 295 K ( Fig. 4e-g). This difference is expected because the crystallinity CI of the experimental measured materials is in between of the simulated amorphous and completely crystalline materials. However, the experimentally determined moisture uptake at high temperatures is lower than the simulated moisture uptake. It should be noted that the moisture uptake at high temperature is significantly lower than at low temperature, which means that small variations in the residual water after preconditioning at 313 K and 20% RH can result in a higher error of the experimentally measured moisture uptake. However, more studies are needed in order to clarify this issue. Moisture uptake on cellulose microfibrils (containing crystalline cellulose and amorphous hemicellulose) estimated by molecular simulations was found to be about 15% at 80% RH at 300 K (Kulasinski et al. 2015), which is comparable to the moisture uptake in this study. Wood CNF nanopapers, sisal cellulose nanocrystals and sisal microfibrillated cellulose were also found to have a moisture uptake up to 15 wt% at 80% RH and 298 K (Belbekhouche et al. 2011). The moisture uptake at 298 K of cellulose powders with different crystallinities was found to range between 10 and 16 wt% at 80% RH, and the moisture uptake was found to decrease with increasing crystallinity at 0-80% RH but the trend was reversed at RH [ 80% RH. The large water uptake of the highly crystalline Cladophora cellulose was related to the large pore volume (Mihranyan et al. 2004).
To obtain an insight of the moisture uptake on an atomistic level, let us investigate the changes in the morphology of the cellulose when the temperature changes. In what follows, we present results for the case of TEMPO-oxidized cellulose only. CM-modified cellulose shows a similar behavior, and the corresponding results are presented in SI ( Figure S3). Figures 5a, c show the calculated pore diameter distribution for different temperatures for respectively TEMPO-amorphous and TEMPO-crystalline cellulose. A comparison of these distributions clearly shows that pores are larger in the amorphous cellulose films compared to crystalline bundles. (Note that this can also be seen in the morphology snapshots presented in Figs. 3c,d). In addition, for the case of the crystalline cellulose the pore diameter distribution practically does not change when the temperature is varied. In the amorphous cellulose water can penetrate anywhere, whereas in the crystalline cellulose bundle the preferential adsorption sites are the interfaces between the CNCs. The adsorption of water molecules involves steric repulsions of polymer chains, and the energy penalty to disturb a crystalline rigid structure is higher as compared to disordered amorphous structure. As a result, rigid structure is less porous as compared to the amorphous structure, and less susceptible to formation of new pores. In contrast, for the case of amorphous cellulose (which is less rigid and more structurally flexible), the pore size increases when the temperature decreases (i.e., when the water intake increases). It is noteworthy that for the case of the crystalline cellulose practically all water is absorbed at the interface region where the cellulose nanocrystals are TEMPO-oxidized and held together by counterion ions due to electrostatic interactions, see Fig. 2d. Only less than \ 1% of the absorbed water molecules are able to intercalate between crystalline cellulose sheets. In order to give a more detailed picture of how many water molecules are absorbed at interface, we calculated the ratio of number of water molecules on the surface to the number of surface cellobiose units as a function of RH for TEMPOoxidized crystalline cellulose as shown in Figure S4. Firstly, the water molecules get absorbed due to the hydrophilic nature of both the surface chains as well as counterions. Secondly, number of water molecules increases from two to four as the RH increases from 20 to 80%. The increase in the number of water molecules is due to the increase in chemical potential of water molecules as a function of RH.
The slopes of the simulated water intake dependencies as a function of RH are steeper for the amorphous cellulose as compared to crystalline cellulose (Figs. 4a, b and 3e,f), which is directly related to the difference in water-filled pore size and porosity between the two materials.
Figures 5b, d show the calculated radial distribution functions (g O --OW (r)) between the oxygen (O -) of carboxyl group in cellulose and oxygen (OW) of water for respectively TEMPO-amorphous and TEMPO-crystalline cellulose (Note that the distribution functions g O -OW (r) defines the probability to find a water molecule (to be precise, oxygen of the water molecule, OW) near oxygen (O -) belonging to the carboxyl group as a function of distance r). The distribution functions exhibit a pronounced peak at r & 3 Å signifying a formation of the hydration shells around the oxygen in the carboxyl group. (A weaker peak between 4 and 5 Å corresponds to the second hydration shell). The evolution of g O --OW (r) with temperature is strikingly different for the amorphous and crystalline cellulose and is fully consistent with the evolution of the pore size distribution discussed above. Namely, for the case of the amorphous structure the peak practically does not change with temperature (and thus with the water content), which means that the number of water molecules surrounding the oxygen in the carboxyl group remains the same. This is because in this case water molecules fill in additional pores that are formed during water intake. In contrast, no additional pores are created in the case of crystalline cellulose. As a result, the number of absorbed water molecules between the nanocrystals in the bundle increases, which is reflected in the increase of the peak of the distribution function g O --OW (r) as the temperature drops (i.e., when water content increases).
Note that above we presented the analysis of the pore diameter evolution with the change of the temperature. We also performed a similar analysis of the case when the RH changes. As discussed above ( Fig. 4 and related discussion in the text), the increase of the RH leads to same effect of the increase of the water intake as the decrease of the temperature. Therefore, as expected, the evolution of the pore size distribution and the changes in the distribution function g O --OW (r) with the change of RH exhibit very similar behavior as the one discussed above, see Figure S5.

Conclusions
In this study, we investigated the moisture uptake in cellulose nanomaterial foams using a combination of the hybrid Grand Canonical Monte Carlo and Molecular Dynamics simulations for TEMPO-oxidized or carboxymethylated amorphous and crystalline cellulose films and experimental measurements on foams made by TEMPO-oxidized cellulose nanofibrils (TCNFs) and nanocrystals (TCNCs) and carboxymethylated cellulose nanofibrils (CMCNFs). The TCNFs and TCNCs exhibited the same surface chemistry, which allowed us to investigate the effect of varying crystallinity on the moisture uptake. The CMCNF fibrils having different surface chemistry but similar particle diameter and crystallinity as TCNFs provided useful insight of the surface chemistry effect on the moisture uptake.
Both experiments and simulations showed that the moisture uptake is enhanced when the relative humidity (RH) is increased, or when the temperature is decreased. This behavior is explained by the basic thermodynamics (Eq. (2)) governing the change of the chemical potential of water as a function of the temperature and the RH. Overall, the experimental moisture uptake in all studied materials is in good agreement with the simulations, especially at lower temperatures (T = 285-295 K). At higher temperatures (T = 313 K) the moisture uptake in experiments is lower compared to simulations. We attribute this to the presence of the bound water in experimental samples that is difficult to remove. TCNFs and CMCNFs exhibit a similar moisture uptake as a function of temperature and RH, both in experiments and in simulations.
We find that the water uptake in amorphous cellulose (for a given RH or temperature) is higher as compared to the crystalline cellulose for both TEMPO-and CM-modified surfaces. The higher water uptake of amorphous cellulose is related to formation of numerous water-filled large pores.
We hope that the microscopic understanding of the mechanism of water uptake provided in this study will pave the way to prepare high-performance cellulose materials with improved properties for selected applications such as thermal insulation in humid climates or transportation of moisture sensitive goods.