To adapt the NIST CEMHYD3D cement hydration and microstructure development computer model to examining drying/hydration in fresh cement pastes, several enhancements to the most recent documented version of the code  were required. These included a modification of the model boundary conditions, an extension of the model physical dimensions, and the addition of subroutines to implement the actual creation of empty porosity due to the drying.
The previous versions of CEMHYD3D typically simulate the hydration of a 100 pixel x 100 pixel x 100 pixel cubic volume with periodic boundaries along all faces of the volume . To examine drying in thin cement pastes, the periodic boundary conditions at the top and bottom surfaces are removed and movement of model diffusing species across these faces is prohibited. Furthermore, when generating the starting 3-D microstructure, during particle placement, no particles are allowed to protrude across the top and bottom hydration volume surfaces. To simulate approximately the complete thickness of the specimens studied experimentally, the model dimensions are extended to study microstructures either 1000 pixels or 4000 pixels thick. With each pixel 1 µm in dimension, these models systems are thus either 1 mm or 4 mm thick.
Originally, it had been planned to simulate the drying process of a hydrating cement paste by "intruding" a drying front from the top exposed surface at a user-specified rate. However, the initial X-ray absorption results (to be presented below) indicated that, instead of proceeding as a sharp intruding front, the drying actually occurs relatively uniformly throughout the specimen thickness. It appears that the largest pores everywhere empty first, followed by the next largest, etc. This behavior can be conveniently modelled in the same way that self-desiccation due to chemical shrinkage had previously been implemented in the CEMHYD3D model [6,12,13]. To assess the size of the "pores" in the 3-D microstructure, a digitized spherical template (diameter = 13 pixels) is centered at each pixel, and the number of underlying pixels assigned to be water-filled porosity or previously emptied porosity is determined. These values are then sorted from largest to smallest and the largest pores emptied first at a rate determined by a user-supplied drying (rate) datafile. While this algorithm is relatively slow in implementation for a 100 x 100 x 4000 microstructure, it could easily be parallelized to obtain a faster turnaround time on a multi-processor computer.