Journal of NUCLEAR SCIENCE and TECHNOLOGY, Vol. 44, No. 9, p. 1233–1247 (2007)
ARTICLE
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity of Porous Rocks using Xray Computed Tomography Image Data
Yoshito NAKASHIMA ^{1}^{;} ^{} and Susumu KAMIYA ^{1}
^{1} Exploration Geophysics Research Group, National Institute of Advanced Industrial Science and Technology (AIST), Central 7, Higashi 111, Tsukuba, Ibaraki 3058567, Japan
(Received January 12, 2007 and accepted in revised form April 18, 2007)
Understanding of the transport properties of porous rocks is important for safe nuclear waste disposal because harmful contaminated groundwater can migrate along pore spaces over long distances. We devel oped three original Mathematica ^{} version 5.2 programs to calculate the transport properties (porosity, pore connectivity, surfacetovolume ratio of the pore space, and anisotropic tortuosity of the pore struc ture) of porous rocks using threedimensional (3D) 8bit TIFF or BMP Xray computed tomography (CT) images. The preprocessing program Itrimming.nb extracts a 3D rectangular region of interest (ROI) from the raw CT images. The program Clabel.nb performs clusterlabeling processing of the pore voxels in the ROI to export volume, surface area, and the center of gravity of each pore cluster, which are essential for the analysis of pore connectivity. The random walk program Rwalk.nb simulates diﬀusion of nonsorbing species by performing discrete lattice walks on the largest (i.e., percolated) pore cluster in the ROI and exports the meansquare displacement of the nonsorbing walkers, which is needed to estimate the geo metrical tortuosity and surfacetovolume ratio of the pore. We applied the programs to microfocus X ray CT images of a rhyolitic lava sample having an anisotropic pore structure. The programs are available at http://www.jstage.jst.go.jp/browse/jnst/44/9/ and http://staﬀ.aist.go.jp/nakashima.yoshito/progeng.htm to facilitate the Xray CT approach to groundwater hydrology.
KEYWORDS: anisotropy, diﬀusometry, diﬀusion tensor, MRI, NMR, permeability, percolation cluster, pore size, porous media, selfdiﬀusion coeﬃcient, Xray CT
I. Introduction
For safe nuclear waste disposal, understanding of the mi croscopic aspects of groundwater migration through natural porous rocks is essential because harmful contaminated groundwater can migrate along submillimeter pore spaces over long distances. ^{1}^{,}^{2}^{)} The microscopic aspect of groundwa ter transport in the geosphere depends on the pore structure. Examples of the inﬂuence of the pore structure on macro scopic transport properties are shown in Fig. 1. The geomet rical tortuosity of the pore structure is important because the diﬀusivity and permeability decrease with increasing tor tuosity. ^{3}^{)} A percolated pore cluster enables long distance mi gration of pore ﬂuid molecules by diﬀusion and the Darcy ﬂow, while isolated pores cannot contribute to long distance material transport. ^{4}^{)} Thus, a pore connectivity analysis or a clusterlabeling analysis of the pores is needed to evaluate the transport properties of the rocks. The pore size or the re ciprocal of the surfacetovolume ratio of the pore space is also important for the groundwater ﬂow because the Darcy
^{} Corresponding author, Email: nakashima.yoshito@aist.go.jp _{} Atomic Energy Society of Japan
ﬂow rate strongly depends on the pore size. ^{5}^{)} Because the pore structure is complex and threedimensional (3D), a twodimensional (2D) approach such as photomicroscopy of a thin section is inadequate and a system capable of meas uring the 3D pore structure in porous geological samples is needed. Microfocus or synchrotron Xray Computed Tomography (CT) is a powerful tool to obtain the 3D images of submil limeter pores nondestructively. ^{6}^{,}^{7}^{)} A computer program can then be used to quantitatively analyze the transport proper ties using the digital images. ^{8}^{–}^{1}^{2}^{)} To the best knowledge of the authors, however, few such programs have been made publicly available at little or no cost. Thus, in the present study, we developed Mathematica ^{} version 5.2 programs to calculate the transport properties (porosity, pore connec tivity, surfacetovolume ratio of the pore space, and aniso tropic tortuosity of the pore structure) of the porous rocks. Although the programs are not intended for the Darcy ﬂow simulations, it is possible to estimate the macroscopic per meability (k ) in Fig. 1 using the porosity, surfacetovolume ratio and pore tortuosity values obtained by the programs. ^{1}^{2}^{)} We, then, applied the programs to a CT image set of a nat ural rock sample (vesicular rhyolitic lava having an aniso
1233
1234
Y. NAKASHIMA and S. KAMIYA
Fig. 1 The eﬀects of pore geometry on the macroscopic permea bility (k ) and pore ﬂuid diﬀusivity (D) in porous rocks. (a) Same pore diameter but with diﬀerent tortuosity. The straight or less tortuous pipe yields higher permeability and diﬀusivity. (b) Per colated pore crossing the whole system compared with isolated pores. The former gives higher permeability and diﬀusivity. (c) Same porosity but with diﬀerent pore diameter. The former yields higher permeability.
of porous media. However, these programs had the follow ing limitations: (1) The programs (DMAP.m, RW3D.m, and Kai3D.m) read the 3D CT images as text ﬁles and can not import binary ﬁles such as the Tagged Image File Format (TIFF) and Bit MaP (BMP) ﬁles. (2) DMAP.m and RW3D.m assume an isotropic pore structure and, thus, are not applica ble to the anisotropic porous media. (3) It is not possible to apply RW3D.m to the CT images for which the pore size is as large as the total system size. (4) Kai3D.m cannot export the clusterlabeled 3D pore images, which are essential for performing computer simulations of a random walk on a per colated pore cluster. These limitations no longer exist in the new programs.
II. Descriptions of the Mathematica ^{} Programs
1. General
All programs developed in the present study are of the notebook type and are for the Mathematica ^{} version 5.2 or later. It should be noted that, although there are some 2D illustrations below for simplicity and pedagogical purposes, all the programs are for the 3D image analysis. Thus, users should prepare 3D 8bit (not 16bit) CT images as a set of contiguous 2D slices. The dimensions of the voxel (a vol ume element) of each image should be cubic. If they are not cubic, Clabel.nb cannot calculate the correct surface area value of each pore cluster and Rwalk.nb cannot calculate the correct value of the meansquare displacement of random walkers. The programs, user manuals, and an example of 3D CT images of a rhyolitic lava sample are available at http://www.jstage.jst.go.jp/browse/jnst/44/9/ and http://staﬀ. aist.go.jp/nakashima.yoshito/progeng.htm. The programs are outlined brieﬂy below and summarized in Table 1. For further information, such as details about data preparation and program execution, readers should refer to the ‘‘readme’’ text ﬁle available at the URLs above.
tropic pore structure) to calculate the pore connectivity and anisotropic tortuosity and to discuss the reliability of the pro grams’ performance. We oﬀer the programs on the Internet (http://www.jstage.jst.go.jp/browse/jnst/44/9/ and http://staﬀ. aist.go.jp/nakashima.yoshito/progeng.htm) to facilitate the Xray CT approach to groundwater hydrology. We previously made available on the Internet free pro grams for calculation of the tortuosity (i.e., DMAP.m ^{1}^{3}^{)} and RW3D.m ^{1}^{4}^{)} ) and pore connectivity (i.e., Kai3D.m ^{1}^{5}^{)} )
2. Itrimming.nb
The function of the Itrimming.nb program is to trim the raw CT images and to export the trimmed rectangular im ages in TIFF, BMP, CommaSeparated Values (CSV), or TabSeparated Values (TSV) format. This program should be run before using Clabel.nb and Rwalk.nb to extract a 3 D rectangular region of interest (ROI) from a set of the raw CT images. Both pore connectivity analysis (i.e., clus terlabeling analysis) and random walk simulations will be performed on the extracted 3D rectangular image system.
Table 1
Outline of the three notebooktype Mathematica ^{} programs
Program name 
Function 
Input 
Output 
Itrimming.nb 
Image trimming of ROI 
Raw CT image 
Trimmed CT image 
Clabel.nb 
Cluster labeling of pores 
Trimmed CT image 
Voxel intensity histogram of the 3D image Labeled CT image Volume and surface area of each cluster 
Rwalk.nb 
Random walk in a pore cluster 
Labeled CT image ^{} 
Meansquare displacement of walkers 3D trajectories of some walkers 
^{} Preprocessing of the labeled CT image by pre Rwalk image.nb or pre Rwalk csv.nb is required to convert into an internal binary format ﬁle.
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity
_{1}_{2}_{3}_{5}
Fig. 2 Example of CT image trimming to extract a region of in terest (ROI). This 2D image of a cylindrical andesitic lava sam ple (eﬀective porosity 22 vol.%) has an image dimension of 512 ^{2} voxels = 7:8 ^{2} mm ^{2} . Pores and ambient air are dark in the CT image. The trimmed ROI inscribed within the cylindrical rock image is indicated by the open square.
An example of selecting an ROI is shown in Fig. 2. The sample is porous andesite lava obtained from Sumikawa, Akita, Japan. ^{1}^{6}^{)} An Xray CT image visualizes the spatial distribution of the Xray linear absorption coeﬃcient (LAC) within the sample. ^{1}^{7}^{)} Thus, it is straightforward to distinguish between solid areas with high LAC and airﬁlled pores with a low LAC. The ambient air and pores with the low LAC are shown by the dark voxels while groundmass and phenocrysts appear as the light areas (in particular, ironrich highdensity phenocrysts such as pyroxene are very light). Because ambient air is not needed to estimate the transport properties of the andesite sample, the ambient air voxels located at the four corners of the image system should be eliminated. As a result, an ROI inscribed within the cylin drical sample was chosen. In the program, users are requested to specify the coordi nates of the upper left corner of the rectangular ROI and the dimensions of the rectangle in a righthanded coordinate sys tem. The program extracts the rectangles from all slices (i.e., 2D images) and saves them as TIFF, BMP, CSV, or TSV ﬁles. A histogram of the 8bit voxel intensity of the trimmed 3D image dataset is calculated and saved as a CSV text ﬁle. This histogram is useful for specifying the threshold for dis criminating between airﬁlled pores with a low LAC and solid areas with a high LAC, which is required to run the Clabel.nb program.
3. Clabel.nb
Clabel.nb is a clusterlabeling program. Pore clusters are connected pore voxels and cluster labeling refers to the ex amination of the 3D pore connectivity in order to export a
3D image set of the labeled pore clusters. ^{1}^{8}^{)} All pore voxels in the porous media are colored cluster by cluster and are as signed to one of the pore clusters by this processing. This clusterlabeling analysis is important for understanding the contribution of pores to groundwater migration. Some pores in the porous media are threedimensionally connected to form a single large percolation cluster responsible for the macroscopic transport of materials; other pores are isolated and do not contribute to macroscopic diﬀusion and the Dar cy ﬂow. The Clabel.nb program allows us to characterize such pore clusters. Voxels are arranged like a simple cubic lattice in the 3D digital CT image set and the program scans the pore voxel connectivity systematically voxel by voxel. When a pore voxel is in full contact with another voxel, the two voxels are judged to be connected. When the two pore voxels are in contact only at a vertex or an edge, the clusters are con sidered to be disconnected. This cluster neighborhood rule is commonly used in the connectivity analysis, ^{1}^{8}^{,}^{1}^{9}^{)} and shown in Fig. 3. The fast algorithm of Hoshen and Kopelman (1976) ^{1}^{8}^{,}^{2}^{0}^{)} was employed for Clabel.nb, and an example of the algo rithm for a 2D case is shown in Fig. 4. This algorithm re quires only two scans of the whole image system. The ﬁrst scan is carried out following the criterion of Fig. 3. The di rection of the ﬁrst scan is shown in Fig. 4. This line scan starts from the origin (the left top corner) and checks the pore connectivity voxel by voxel along the arrow indicated. If a pore voxel is not faceadjacent to any of the surrounding pore voxels, the voxel is labeled with a cluster color denot ing a new voxel intensity. If a pore voxel is faceadjacent to a surrounding pore voxel, the voxel is labeled with the same cluster color as the adjacent pore voxel. The number of ad jacent voxels to be checked during the line scan is two in the 2D case of Fig. 4 (three in the 3D case). Unfortunately, the cluster color of the two (or three) adjacent voxels is not al ways common. As a result, the ﬁrst scan occasionally yields mislabeling in which two or more colors are labeled to a sin gle cluster. An example of this mislabeling is shown for a U shaped cluster in Fig. 4. During the ﬁrst scan, this mislabel ing is recorded in a temporary errata ﬁle stating that the cluster colors ‘‘1’’ and ‘‘2’’ should be identical. The second scan is performed to correct the mislabeling. The direction of the second scan is the same as that of the ﬁrst scan. By referencing the errata ﬁle, the program changes the cluster colors and exports a labeled 3D image set in which each pore cluster is labeled with a single unique color. Clabel.nb exports a labeled 3D image set as TIFF, BMP, CSV, or TSV ﬁles. In the ﬁles, each pore cluster is colored according to a color table (the ﬁle name: color.txt) provided by the user. This labeled pore image set is essential to prob ing the tortuosity by the longdistance random walk simula tion of pore ﬂuid molecules along a percolated pore cluster using Rwalk.nb. The program also exports a record of the volume, surface area, and 3D coordinates of the center of gravity for each pore cluster as a text ﬁle. The surfaceto volume ratio of each pore cluster is obtained by dividing the cluster surface area by the cluster volume. This ratio is an important transport property because its reciprocal is
VOL. 44, NO. 9, SEPTEMBER 2007
1236
Y. NAKASHIMA and S. KAMIYA
Fig. 3 Criterion of pore voxel connectivity in a 3D simple cubic image system. Adjacent voxels are judged as connected when they share a face. Voxels are not connected when they make con tact by an edge or vertex. The connected pore voxels form a sin gle pore cluster, and pore ﬂuid molecules can migrate within the pore cluster by Darcy ﬂow and/or diﬀusion.
nearly equal to the pore diameter. ^{5}^{)} The output about the center of gravity is useful for analyzing the 3D positions of small pore clusters. There are two possible methods for calculating the surface area of a pore cluster; which one of these is used depends on the judgment of whether or not the rim of the image system is a real pore–solid interface (Fig. 5). If one considers that the blue rim of Fig. 5 is not real and disappears when a larg er ROI is selected, then, the surface area (perimeter in the 2 D case) of the orange cluster is counted using only the green interface. On the other hand, if one considers the blue rim to be real, the total surface area of the orange pore cluster is the sum of the green and blue lines. Clabel.nb exports both sur face area values. Clabel.nb was applied to a synthetic 3D test image of which the volume and surface data of each pore cluster is
Fig. 4 Twodimensional example of the clusterlabeling algo rithm by Hoshen and Kopelman (1976). ^{2}^{0}^{)} The 1bit graylevels of the pore voxels and solid voxels are 1 and 0, respectively, in the CT image before labeling. The ﬁrst scan starts from the origin (left top corner) and proceeds along the ﬁrst row of the 2D ma trix as indicated by an arrow. The line scan along the second row follows in the same direction of the arrow. After the completion of the 2D matrix scan of a single CT slice image, the program continues the scan of the adjacent 2D slice to accomplish the scan of the whole image system. After the ﬁrst scan, the Ushap ed gray pore cluster contains two diﬀerent cluster colors (i.e., voxel intensities), namely 1 and 2. This contradiction is corrected using the errata ﬁle after the second scan. The color of each pore cluster after the second scan obeys the color table provided by the user.
known. It was conﬁrmed that Clabel.nb outputted the correct volume and surface data, demonstrating good performance reliability. The cluster labeling of pore images of a pack of glass beads ^{1}^{5}^{)} and natural sand grains ^{2}^{6}^{)} has been carried out using Kai3D.m. Clabel.nb was applied to these images to conﬁrm that the Clabel.nb output results were identical to those by Kai3D.m, supporting again the reliability of the program.
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity
_{1}_{2}_{3}_{7}
Fig. 5 Two possible deﬁnitions, A and B, of the surface area of the pore cluster. In this example, the orange pore cluster reaches the rim of a 2D image system of 7 7 voxels. The dimension of each voxel is unity. A: If the edge of the pore voxels at the rim (blue) is not considered to be a real pore–solid interface, the total surface area (total perimeter in the 2D case) of the orange cluster is the sum of the green lines, namely 22. B: If the blue rim is ac cepted as a real pore–solid interface, the total perimeter is the sum of the green and blue lines, namely 22 þ 10 ¼ 32.
4. Rwalk.nb Rwalk.nb is a 3D random walk program to simulate the diﬀusion of nonsorbing species (e.g., H _{2} O, Br ^{} , and I ^{} ) in the pores. The random walk should be nonsorbing be cause the purpose is to calculate the geometrical tortuosity of the pore structure and the undesirable eﬀects of the sorp tion of walkers on the solid surface should be eliminated. The random walk performed by Rwalk.nb is a discrete lattice walk in a simple cubic lattice ^{1}^{8}^{)} (not an oﬀlattice walk). An example of a random walk trajectory is shown in Fig. 6 for a 2D case. The walker migrates on discrete voxels whose graylevels correspond to the pore space. A pore voxel is chosen randomly from among the whole image system as the start position of the lattice walk trial at ¼ 0, where is the dimensionless integer time. The walker executes a ran dom jump to one of the nearest pore voxels (the maximum number of the nearest pore voxels is six for a 3D simple cu bic lattice); is incremented by a unit time after the jump so that the time becomes þ 1. If the randomly selected voxel is a solid voxel, the jump is not performed, but, the time still becomes þ 1. The main output of Rwalk.nb is the meansquare displace ment, hr ^{2} i, of the walkers as a function of (the ﬁle name:
Rwalk.csv).
hr ð Þ ^{2} i ¼
1
n
n X
i¼1
½ðx _{i} ð Þ x _{i} ð0ÞÞ ^{2} þ ð y _{i} ð Þ y _{i} ð0ÞÞ ^{2}
þ ðz _{i} ð Þ z _{i} ð0ÞÞ ^{2}
ð1Þ
Fig. 6 Example of a 2D latticewalk trajectory in a porous medi um over 200 time steps. The image system consists of 30 30 discrete voxels. The initial and ﬁnal positions of the walker are marked by solid and open circles, respectively.
where n is the number of the random walkers and x _{i} ð Þ, y _{i} ð Þ, and z _{i} ð Þ are the 3D coordinates of the walker’s position at time for the ith walker. The xy plane is embedded within the 2D CT slice and z is the stacking direction of the slices based on a righthanded coordinate system. The exact solu tion of the meansquare displacement for a lattice walk in a free space (i.e., porosity = 100 vol.%), hr ^{2} i _{f}_{r}_{e}_{e} , is given
_{b}_{y} 15,18)
hr ^{2} i _{f}_{r}_{e}_{e} ¼ 6D _{0} t ¼ a ^{2}
ð2Þ
where t is the time, D _{0} is the diﬀusion coeﬃcient of the walker in the free space without solids (e.g., H _{2} O selfdiﬀu sivity in bulk water), and a is the lattice constant of the sim ple cubic lattice (i.e., the dimension of a cubic CT voxel). For diﬀusion in rock pores, hr ^{2} i is reduced compared with hr ^{2} i _{f}_{r}_{e}_{e} owing to the obstruction eﬀects of solids. The degree of the reduction is measured quantitatively by the tortuosity as follows. The meansquare displacement is important be cause the (scalar) diﬀusion coeﬃcient, D, of the nonsorbing species in the threedimensionally isotropic porous media is related to the timederivative of hr ^{2} i:
Dðt Þ ¼
1
d hr ^{2} i
6
dt
ð3Þ
The tortuosity of the pore structure is a key transport prop erty for the systems with small Pe´ clet numbers and is deﬁned as the limiting value of the ratio of D in the free space to D in the porous media:
Tortuosity ¼
D
0
a ^{2} d hr ð Þ ^{2} i d
Dðt Þ
¼
as t and !1
ð4Þ
Although the tortuosity is deﬁned as the square root of Eq. (4), namely, ðD _{0} =DÞ ^{1}^{=}^{2} in some literatures, ^{3}^{,}^{2}^{1}^{)} we obey
VOL. 44, NO. 9, SEPTEMBER 2007
1238
Y. NAKASHIMA and S. KAMIYA
the deﬁnition of Eq. (4), which is commonly used in the nu clear magnetic resonance diﬀusometry. ^{2}^{2}^{)} It should be noted that, while the diﬀusivity in the free space is timeindependent, it in the porous media depends on the time or the diﬀusion distance because the diﬀusion is restricted by obstacles (i.e., solids). ^{2}^{3}^{,}^{2}^{4}^{)} For unrestricted diﬀusion, for example, H _{2} O selfdiﬀusion in bulk water,
hr ðt Þ ^{2} i, is linear with respect to t , and, thus, D is constant be cause of the homogeneity of the space. On the other hand, because local heterogeneity (an ﬁnite pore size) exists, D is timedependent for a random walk in the porous media (Fig. 7). Solid parts of the porous media are obstacles to the diﬀusing material and, thus, the random walk trajectory is restricted by the obstacles, which reduces the diﬀusion co eﬃcient in the porous media compared to that in bulk ﬂuid. The degree of the diﬀusivity reduction is governed by the average pore size and the characteristic diﬀusion distance (rootmeansquare displacement) of walkers. In the limit of t ! 0, the rootmeansquare displacement becomes smaller than the pore size. The walkers rarely collide with solid walls and the obstruction eﬀects of solids are weak. As a re sult, the diﬀusion coeﬃcient in the porous media normalized to that in bulk ﬂuid is slightly smaller than unity. This slight decrease in the diﬀusion coeﬃcient is proportional to the surfacetovolume ratio of the porous media with negligible solid surface relaxivity of the nuclear spin: ^{2}^{3}^{–}^{2}^{5}^{)}
D
D
0
¼ 1
4
S
9
p ﬃﬃﬃ
V
pore
p ﬃﬃﬃﬃﬃﬃﬃ
D 0 t
þ c _{1} t as t ! 0 ð5Þ
where ðS=V Þ _{p}_{o}_{r}_{e} is the surfacetovolume ratio of the pore space and c _{1} is a constant. Nakashima and Yamaguchi (2004) converted t into using Eq. (2) and integrated
Eq. (5) to obtain a useful expression for the simulation data ﬁtting robustly against random noise: ^{2}^{6}^{)}
hr ð Þ ^{2} i
hr ð Þ ^{2} i _{f}_{r}_{e}_{e}
¼ 1
8a p ﬃﬃﬃﬃﬃﬃ
6
S
27
V
pore
p ﬃﬃﬃ
þ c _{2}
as ! 0
ð6Þ
where c _{2} is a constant. Equation (6) allows us to calculate ðS=V Þ _{p}_{o}_{r}_{e} by performing the random walk simulations in the shorttime limit if the 3D pore structure is isotropic. The random walk approach for the estimation of ðS=V Þ _{p}_{o}_{r}_{e} mentioned above is timeconsuming and less accurate owing to the stochastic nature of the random walk simulations com pared with the deterministic clusterlabeling approach. How ever, this diﬀusometrybased method is, in principle, appli cable to the in situ nuclear magnetic resonance (NMR) well logging ^{2}^{7}^{)} of the watersaturated porous strata of a nuclear waste disposal site. Magnets of a special design (i.e., one sided magnets) are equipped on the NMR logging sonde ^{2}^{5}^{)} to enable the measurement of selfdiﬀusion coeﬃcients of the pore ﬂuid molecules several centimeters inside the bore hole wall. The obtained diﬀusion data are used to character ize the pore structure and ﬂuid species, which are diﬃcult to perform by other logging methods. Thus, diﬀusometry using the CT images and Eq. (6) is useful for interpreting the phys ical background revealed by the NMR logging data. As time elapses, a random walker in the porous rocks mi grates further than the average pore size (Fig. 7). In this longtime limit, the random walkers fully experience the
Fig. 7 Schematics of a random walk of pore ﬂuid molecules in a
ﬂuidsaturated tortuous pipe of diameter d . (a) Example of a tra jectory of a random walker (solid circle) diﬀusing in the pore space. At t d ^{2} =ð6D _{0} Þ where D _{0} is the selfdiﬀusion coeﬃcient of bulk ﬂuid, the walker rarely collides with grains, so the diﬀu sion is nearly equal to that in free space. The collision frequency increases with time, reducing the meansquare displacement in the porous rock. The walker eventually negotiates many solid walls and experiences the full geometrical tortuosity of the po
rous media at t
d ^{2} =ð6D _{0} Þ. (b) Meansquare displacement of
the random walk in (a). There is a transition from the unrestricted diﬀusion regime to the restricted diﬀusion regime. The transition occurs at about t ¼ d ^{2} =ð6D _{0} Þ when the rootmeansquare dis placement is nearly equal to the pore diameter, d .
high tortuosity of the porous media and the slope of hr ^{2} i reaches a constant value. ^{2}^{2}^{)} The geometrical tortuosity of the porous rocks can, then, be calculated by using this slope in Eq. (4). Hence, it is possible to calculate the tortuosity by
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity
_{1}_{2}_{3}_{9}
(a)
(b)
Fig. 8 Boundary conditions for the random walk simulation for a 2D example. The green square denotes the original image system, and the red square is a super system made by a mirror operation. (a) A straightforward periodic boundary condition with parallel arrangement of the green square. Note that the undesirable discontinuity of the pore structure occurs, through which pore ﬂuid molecules cannot jump into an adjacent image system. (b) A modiﬁed periodic boun dary condition using a super system (red) containing mirror copies. The parallel arrangement of the red square yields a continuous and percolated pore network through which random walkers can travel the long distance essential for the correct estimation of the tortuosity value.
performing the longtime random walk simulations using the 3D CT image data. Natural rocks often possess an anisotropic pore struc ture. ^{2}^{8}^{–}^{3}^{0}^{)} If the pore is anisotropic, D is a tensor ^{3}^{1}^{)} (not a scalar) and Eqs. (3) to (6) break down. Directional mean square displacement, hx ^{2} i, hy ^{2} i, and hz ^{2} i, is needed to discuss the tortuosity of anisotropic porous rocks:
hxð Þ ^{2} i ¼
1
n
n X
i¼1
ðx _{i} ð Þ
x _{i} ð0ÞÞ ^{2}
hyð Þ ^{2} i ¼
1
n
n X
i¼1
ð y _{i} ð Þ y _{i} ð0ÞÞ ^{2}
hzð Þ ^{2} i ¼
1
n
n X
i¼1
ðz _{i} ð Þ z _{i} ð0ÞÞ ^{2}
ð7Þ
ð8Þ
ð9Þ
Rwalk.nb exports Eqs. (7) to (9) as well as Eq. (1) as a func tion of . Their exact solutions for the lattice walk in the free space (i.e., porosity = 100 vol.%), hx ^{2} i _{f}_{r}_{e}_{e} , hy ^{2} i _{f}_{r}_{e}_{e} , and hz ^{2} i _{f}_{r}_{e}_{e} , are given by:
^{h}^{x} ^{2} ^{i} free
^{¼} ^{h}^{y} ^{2} ^{i} free
^{¼} ^{h}^{z} ^{2} ^{i} free
^{¼}
1
_{3}
hr ^{2} i free ¼
1
_{3}
a ^{2}
ð10Þ
The directional tortuosity can be calculated using Eqs. (7) to (10). For example, the tortuosity in the xdirection is the timederivative of Eq. (10) (i.e., a ^{2} =3) divided by that of Eq. (7). Longtime data on the meansquare displacement are
needed to correctly compute the tortuosity deﬁned by Eq. (4). However, as time elapses, the random walkers even tually go out of a 3D CT image system of a ﬁnite size. This outleaching is undesirable because the lattice walk (e.g., Fig. 6) cannot be carried out for the walkers outside the sys tem. A periodic boundary condition is useful to avoid this diﬃculty. It should be noted, however, that a simplistic pe
riodic boundary condition (Fig. 8a) is useless because the
pore connectivity breaks down at the boundary and the walk ers cannot migrate beyond the boundary. A modiﬁed boun
dary condition using a mirror operation on the original 3D
image was employed in the present study to solve the discon
tinuity problem (Fig. 8b).
Some programming techniques were implemented in Rwalk.nb to conserve a memory and to reduce the CPU cal culation time. In the 3D case, the mirror operation of Fig. 8b requires a memory allocation eight times larger than the method of Fig. 8a. As this could sometimes exceed the installed RAM limit of a user’s computer, we load only
the original image set (the green frame in Fig. 8b) into
RAM and calculate the position in the red frame using the mirror symmetry, reducing the memory use by 7/8. The cal culation of the meansquare displacement at every time step is one of the most timeconsuming processes of Rwalk.nb. To save the CPU time, we implemented vectorization in the process of adding hr ^{2} ð Þi data for the latest ith walker to hr ^{2} ð Þi summed for the ﬁrst to i 1th walkers. This vec
VOL. 44, NO. 9, SEPTEMBER 2007
1240
Y. NAKASHIMA and S. KAMIYA
Fig. 9 Photomicrograph of a thin section of Niijima lava (open nicol). Pores are ﬁlled with blue resin. The volcanic glass is white. The brown mineral at left is biotite. The thin section and cylindrical sample for CT were made from the same rock sample.
torization drastically reduced the CPU time (e.g., from 34 hours to 15 hours for the Niijima lava sample case described below). When running Rwalk.nb, users should import a la beled porecluster image data set and perform the lattice walk repeatedly to ﬁnd the optimum simulation parameters (e.g., number of walkers and number of time steps) by trial and error. Importing a labeled 3D CT image set as text, TIFF, or BMP ﬁles is another timeconsuming step. To save time, we made a preprocessor, pre Rwalk csv.nb (or pre Rwalk image.nb), which converts the CSV text ﬁles (or the TIFF/BMP image ﬁles) into an internal binary format ﬁle (the ﬁle name: NT.mx). Rwalk.nb imports the NT.mx ﬁle (not the labeled raw CSV/TIFF/BMP ﬁles) as a 3D perco lated porecluster image data set. As NT.mx is optimized for fast input/output by Mathematica ^{} , we conﬁrmed that im porting the NT.mx ﬁle is about six times faster than import ing the labeled raw CSV/TIFF/BMP ﬁles.
III. Application to Rhyolitic Lava Sample Images
The programs Itrimming.nb, Clabel.nb, and Rwalk.nb were applied to a CT image set of a rhyolitic lava sample to demonstrate their performance. A personal computer (PC) with an Intel Core2 ^{} Duo T7600 CPU (2.33 GHz) and 2 GB RAM running Windows XP ^{} was used for the demonstration. A CT image set of rhyolitic lava from the Mukaiyama volcano, ^{3}^{2}^{)} Niijima Island, Japan was used in the present study. This sample was chosen because (1) pores in rhyolitic lava are as large as several hundred micrometers in dimension (Fig. 9) and can be readily imaged by a con ventional microfocus Xray CT apparatus, and (2) rhyolitic lava has a strong pore anisotropy ^{2}^{1}^{)} suitable for examining the diﬀusion anisotropy using the Rwalk.nb program. The total porosity of the lava sample was measured by an con ventional laboratory method; it was 68 vol.%, calculated by 1 minus (bulk density of the porous rock)/(true density of the solid), where the bulk density of the porous rock
Fig. 10 Example of CT image trimming for the cylindrical sam ple images of Niijima rhyolitic lava. Pores and ambient air are dark, and phenocrysts and groundmass are light in the CT image. The original image dimensions are 512 ^{2} voxels = 7:8 ^{2} mm ^{2} . The trimmed ROI indicated by the open square is 256 ^{2} voxels = 3:9 ^{2} mm ^{2} .
was 0.76 g/cm ^{3} and the true density of the solid ^{2}^{1}^{)} was
2.39 g/cm ^{3} .
A cylindrical sample of the lava (7.5 mm in diameter,
8.1 mm in length) was prepared and scanned by a conebeam microfocus Xray CT scanner (Nittetsu Elex Co., Ltd., Tokyo, Japan). The imaging conditions were as follows: ac celeration voltage, 50 kV; tube current, 0.035 mA; number of projections, 1,800; time required for 360 ^{} projection, 39 min; ﬁeld of view of the 2D slice, 7:8 ^{2} mm ^{2} ; cubic voxel dimen sions, 15:2 ^{3} mm ^{3} (i.e., a ¼ 15:2 mm); reconstruction ﬁlter, Shepp Logan; reconstructed 3D image system, 512 512 256 voxels. First, the original 3D image system consisting of 512 512 256 voxels was trimmed using Itrimming.nb to extract a cubic ROI of 256 ^{3} voxels = 3:9 ^{3} mm ^{3} . The CPU time required was 9 min for the PC used. An example of a trimmed 2D square region is shown in Fig. 10. Because a lava sample is highly porous and mechanically weak, the pore structure very near the surface of the cylindrical sample may be destroyed during cutting. To avoid including such a destroyed pore structure within the ROI, a smaller square re gion (not inscribed within the cylinder) compared to that shown in Fig. 2 was chosen. The trimmed 3D TIFF images are available at the previously mentioned URLs to enable readers to reproduce the clusterlabeling and tortuosity anal ysis described below. Itrimming.nb exports a histogram of the 8bit (i.e., 0 to 255) voxel intensity of the trimmed 256 ^{3} voxels (Fig. 11). An analysis of the histogram is essential for the best choice of the threshold for discriminating between solid and airﬁll ed pores. Figure 11 shows a bimodal distribution having a
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity
_{1}_{2}_{4}_{1}
voxel intensity
Fig. 11 Histogram of the 8bit (i.e., 0 to 255) voxel intensity of the 3D ROI of 256 ^{3} voxels = 3:9 ^{3} mm ^{3} . The peaks of the pore and solid voxels are 39 and 205, respectively, yielding a mid point (threshold) of 122. This threshold value yields a total po rosity of 69 vol.%.
peak (intensity 39) of airﬁlled pore voxels with a low LAC and a peak (intensity 205) of solids with a high LAC. The boundary between solids and pores is blurred owing to the ﬁnite spatial resolution of the CT system. This is the undesir able partialvolume eﬀect, ^{4}^{2}^{)} which is responsible for the voxels located between the two peaks, namely 39 and 205 in Fig. 11. It is reasonable to assume that the probability of occupying a voxel at a solidpore boundary is equal for both solids and pores. ^{1}^{5}^{)} This assumption leads to the choice of the midpoint (i.e., intensity 122) of the peaks as the threshold, implying that the voxels with an intensity equal to or smaller than 122 are pores. Based on this threshold val ue, the number of pore voxels is 11,554,125 and, thus, the total porosity of the ROI is 11;554;125=256 ^{3} 69 vol.%. The choice of the threshold value is critical to the results of the poreconnectivity analysis and tortuosity calculation. Thus, the validity of the choice should be crosschecked by other methods. The total porosity of 69 vol.% is consis tent with that of 68 vol.%, measured by the conventional lab oratory method, implying that the choice of the midpoint as the threshold is reasonable. With a threshold of 122, Clabel.nb was applied to a cubic ROI of 256 ^{3} voxels = 3:9 ^{3} mm ^{3} , the output image ﬁle of Itrimming.nb. The results are shown graphically in Figs. 12–14 and are summarized in Table 2. The CPU time required was 29 min for the PC used. Clabel.nb outputs the volume and surface area of each pore cluster, and the output is plotted in Fig. 12a. The volume of the largest or percolat ed pore cluster is 11,507,114 voxels = 40.4 mm ^{3} . The sur face areas of the largest cluster calculated according to def initions A and B in the caption of Fig. 5 are 683 and 743 mm ^{2} , respectively. Thus, ðS=V Þ _{p}_{o}_{r}_{e} is 683/40.4
pore cluster volume (mm ^{3} )
(a)
(b)
Fig. 12 Statistics of the labeled pore clusters. (a) Crossplot of the volume, V , and surface area, S, of each pore cluster; 923 pore clusters were identiﬁed. The surface area was calculated accord ing to deﬁnition A of the caption of Fig. 5. The theoretical upper and lower limits (Eqs. (11) and (12)) of the data points are shown by dotted lines. (b) 3D pore structures for the theoretical upper and lower limits plotted in (a). A latticelike ﬁne pore network contact at a single face to the adjacent pore voxel is an example of the upper limit. An isolated blocky sphere yields the lower limit of the surfacetovolume ratio for a speciﬁed pore volume.
VOL. 44, NO. 9, SEPTEMBER 2007
1242
Y. NAKASHIMA and S. KAMIYA
Fig. 13 Clusterlabeling processing. (a) Example of a 2D slice (8bit gray scale) at z ¼ 200 before cluster labeling for the ROI shown in Fig. 10; 256 ^{2} voxels = 3:9 ^{2} mm ^{2} . A 3D Cartesi an coordinate system is indicated. (b) Labeled color image of (a) after the 3D cluster labeling for the cubic system of 256 ^{3} voxels = 3:9 ^{3} mm ^{3} . Yellow, the largest or percolated pore clus ter; green, solid; purple, isolated pore clusters.
(a)
(b)
Fig. 14 Results of 3D porecluster labeling. A commercially available 3D viewer, T3D (ITT Visual Information Solutions, Colorado, USA), was used to visualize the 3D image. The xy plane is embedded within the 2D CT slice, and z is the stacking direction of the slices based on the righthanded coordinate sys tem. (a) 256 ^{3} voxels = 3:9 ^{3} mm ^{3} ; coloring as in Fig. 13b and Table 2. (b) Shaded part (slab of 31 256 ^{2} voxels = 0:47 3:9 ^{2} mm ^{3} ) extracted from (a). Solid and isolated pore voxels are made transparent in (b). Pores are elongated in the xdirection.
mm ^{} ^{1} = 1:69 10 ^{4} m ^{} ^{1} or 743/40.4 mm ^{} ^{1} = 1:84 10 ^{4} m ^{} ^{1} . The value of (the largest porecluster volume)/ (total porecluster volume) is as high as 11,507,114/ 11,554,125 = 99.6%, implying that almost all of the pores in the lava sample are connected to form a single percolated pore cluster responsible for the longdistance material trans port in the rock by diﬀusion and the Darcy ﬂow. It should be noted that the conventional 2D photomicroscopy of a single
thin section (e.g., Fig. 9) cannot perform the 3D pore con nectivity analysis mentioned above. This is the advantage of the Xray CT method over the photomicroscopy in the 3D pore connectivity analysis. Although isolated pores occupy only 100 99:6 ¼ 0:4% of the pore space of the ROI, their number is as large as 922 (Table 2); this remarkable statistic is plotted in Fig. 12a.
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity
Table 2
Results of clusterlabeling analysis of pore voxels in the 3D 256 ^{3} system of Fig. 14a
1243
Color of voxels 
Number of pore clusters 
Number of voxels 
Total surface area ^{} (mm ^{2} ) 

Percolated pore 
Yellow 
1 
11,507,114 
683 
Isolated pores 
Purple 
922 
47,011 
15 
Solid 
Green 
— 
5,223,091 
— 
Total 
923 
256 ^{3} 
698 
^{} The deﬁnition A of Fig. 5 was employed.
This loglog plot of the isolated pore cluster data follows a slope (exponent) of 0.76. This is slightly larger than 2=3 0:67, the exponent of completely similar 3D objects. It is useful to note here the theoretical upper and lower limits for suﬃciently large clusters in Fig. 12a. For large clusters consisting of cubic voxels of dimension a, the upper limit is given by
4 

S ¼ 
V as V !1 
ð11Þ 

a 

where S and V are the surface area and volume of the pore cluster, respectively. The 3D shape of the pore cluster for 

the upper 
limit 
is 
not 
unique; 
an example is shown in 
Fig. 12b. This is a ﬁne pipe network characterized by the crosssectional area of each pipe being as small as a ^{2} . On
the other hand, the 3D shape for the lower limit is unique; it is an isolated spherical pore:
S ¼ 6
3V
4
^{} 2=3
as V !1
ð12Þ
It should be noted that, in a simple cubic lattice system, the surface of a sphere is not smooth but blocky (Fig. 12b). This rough surface yields an inevitable overestimation of the ðS=V Þ _{p}_{o}_{r}_{e} value ^{1}^{5}^{)} and the overestimation factor, 1.5, was considered in Eq. (12). The data points for the lava sample fall within the theoretical upper (S / V ^{1} ) and lower (S / V ^{2}^{=}^{3} ) limits, suggesting that cluster labeling was per formed in a reliable manner. A detailed analysis of the Clabel.nb output revealed that there are two types of isolated pore clusters in Figs. 13b, 14a, and Table 2. The ﬁrst type is pore clusters completely embedded within the 256 ^{3} image system. The number of clusters of this type was 784 and the total volume was 24,347 voxels. Figure 13b depicts these pores, which are small subspherical vesicles probably formed during degass ing from a cooling magma. The second type is pore clusters that reached the surface of the 256 ^{3} image system. The num ber of clusters of this type was 138 and the total volume was 22,664 voxels. Figure 14a includes examples of the isolated pore clusters that are connected to the surface of the 256 ^{3} image system. This suggests that, if a larger ROI (e.g., 512 ^{3} voxels) was employed, some of the 138 clusters would possibly be judged to be connected to the percolated clus ter. ^{1}^{2}^{)} Although the program Kai3D.m ^{1}^{5}^{)} cannot export the la beled 3D images, it can output the volume and surface area of each pore cluster. Thus, Kai3D.m was applied to the same 3D data set of the Niijima sample to check the performance
of Clabel.nb. The results (the volume and surface area of each cluster) by Kai3D.m were completely identical to those by Clabel.nb of Fig. 12a, demonstrating that Clabel.nb was programmed correctly. Because of the large porosity and high pore connectivity (Fig. 14), the percolated pore occupies a signiﬁcant portion of the ROI, implying a small tortuosity. Figure 14 also
shows a pore anisotropy that indicates that the pores are
somewhat oblate (compressed in the ydirection), suggesting a relatively large tortuosity in the ydirection. These points were conﬁrmed quantitatively by the random walk simula tions described below. Before running Rwalk.nb, preprocessing with pre Rwalk csv.nb was performed to import the labeled CT images of Fig. 14a in a CSV format and to export an internal binary format ﬁle, NT.mx. The CPU time required was 1 min for the PC used. Then, the main program, Rwalk.nb, was run by importing NT.mx to output the meansquare displace
ment (text ﬁles) and 3D trajectories (on the PC display). The number of the walkers was 10,000 and the maximum time step was 400,000 for the tortuosity estimation. The walkers should travel a suﬃciently long distance to probe the tortuosity according to Eq. (4). This condition is satisﬁed if the walkers travel a distance larger than the characteristic pore size. Because the pore size is typically 30 voxels (Fig. 13), the rootmeansquare displacement should be larg er than 30 voxels. The maximum time step value, 400,000, was chosen to allow the walkers to migrate a distance much larger than 30 voxels. The CPU time required was 15 hours for the PC used. If the vectorization technique mentioned above was not used, the time increased to 34 hours. An ex ample of a longdistance random walk is shown in Fig. 15. The 3D system size indicated by the wire frame in the ﬁgure was expanded 3 3 3 times the original 256 ^{3} image sys tem by the mirror operation described in Fig. 8b. It is evi dent that the walkers leached out of the original system and traveled a long distance much larger than the character istic pore size of 30 voxels. Therefore, the simulation is completely under the restricted diﬀusion regime (Fig. 7) for which the tortuosity can be calculated using Eq. (4). The meansquare displacement of 10,000 walkers is shown in Fig. 16. Equations (2), (4), and (10) become sim ple if a is unity (dimensionless). Thus, a ¼ 1 was assumed in the ﬁgure, yielding a dimensionless meansquare displace ment. A random walk in the free space without solids was also performed and plotted. The ﬁtted slopes are 0.334, 0.334, 0.335, and 1.003 for hx ^{2} i, hy ^{2} i, hz ^{2} i, and hr ^{2} i, respec tively. These agree well with theoretical predictions, namely,
VOL. 44, NO. 9, SEPTEMBER 2007
1244
Y. NAKASHIMA and S. KAMIYA
(a)
(b)
Fig. 15 Example of a 3D trajectory of a single random walk trial through the percolated pore space in the Niijima lava sample with the boundary condition of Fig. 8b. The total time step is
400,000. The initial ( ¼ 0)
and ﬁnal ( ¼ 400;000) positions
of the walker are marked by open circles. (a) Projected trajectory.
(b) Bird’seyeview trajectory.
τ
Fig. 16 Dimensionless meansquare displacement of random walks in the Niijima percolated pore cluster averaged over 10,000 walkers. Results for a random walk in free space (i.e., po rosity = 100 vol.%) are also shown. (a) Dimensionless mean square displacement in the orthogonal directions, hx ^{2} i, hy ^{2} i, and hz ^{2} i calculated by Eqs. (7) to (9). The quantities, hx ^{2} i, hy ^{2} i, and hz ^{2} i in free space are indistinguishable, giving a common slope value of 1=3. (b) Dimensionless meansquare displace ment, hr ^{2} i, calculated by Eq. (1).
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
dimensionless meansquare displacement
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity
_{1}_{2}_{4}_{5}
3000
2500
2000
1500
1000
500
0
0
1000
2000
0.152, 0.114, 0.177, and 0.442 for hx ^{2} i, hy ^{2} i, hz ^{2} i, and hr ^{2} i,
respectively. Therefore, the tortuosity averaged over all di
rections is 1=0:442 2:3. This value is signiﬁcantly smaller
than that of the typical sedimentary rocks ^{1}^{2}^{,}^{2}^{2}^{,}^{3}^{3}^{)} probably
due to the large porosity and high pore connectivity of
the lava sample. The directional tortuosity is 1=ð3
0:152Þ 2:2, 1=ð3 0:114Þ 2:9, 1=ð3 0:177Þ 1:9,
for the x, y, and zdirections, respectively. The results indi
cate that the pore structure is most tortuous in the ydirec tion. This is consistent with the oblate pore structure of Fig. 14a. Similar diﬀusion anisotropy has been observed
for rhyolitic lava by the conventional laboratory diﬀusion experiments, ^{2}^{1}^{)} suggesting that the Rwalk.nb simulation per formed reliably.
A Rwalk.nb simulation for a very short travel distance was performed to estimate the surfacetovolume ratio of the per colated pore. The number of the walkers was 50,000 and the
maximum time step was 5,000. The rootmeansquare dis placement should be smaller than the characteristic pore size of 30 voxels to calculate the surfacetovolume ratio (Fig. 7). The maximum time step, 5,000, was chosen to allow the
(a) walkers to travel a distance as short as 30 voxels. According to the algorithm of Rwalk.nb, the start position of the 50,000
3000
τ
4000
5000
walkers was chosen randomly from among the percolated pore clusters consisting of 11,507,114 voxels. Thus, it should be noted that the calculated meansquare displacement and derived ðS=V Þ _{p}_{o}_{r}_{e} are quantities averaged over the whole im
age system of 256 ^{3} voxels. This is essential for the quantita tive comparison of the ðS=V Þ _{p}_{o}_{r}_{e} value by Eq. (6) and that by Clabel.nb (Table 2 and Fig. 12a) which was obtained by the poreconnectivity scan of the whole image system. The NT.mx ﬁle used for the longdistance random walk of
Figs. 15 and 16 was used again for this shortdistance ran dom walk. The CPU time required was 55 min for the PC used.
The obtained dimensionless meansquare displacement, assuming a ¼ 1, is shown in Fig. 17a; a convex mean
square displacement curve can be seen. This is evidence for a transition from the unrestricted diﬀusion regime to the restricted diﬀusion regime as described in Fig. 7. The di mensionless meansquare displacement is mostly less than 1,000 and, thus, the rootmeansquare displacement is small er than 30 voxels, satisfying the shortdistance random walk condition of Fig. 7. Figure 17a shows that hx ^{2} i hy ^{2} i hz ^{2} i for 1;000, ensuring that Eq. (6), which was developed for the isotropic porous media, is applicable to the anisotrop
1
0.9
0.8
0.7
0.6
(b) ic lava sample if 1;000. Equation (6) was ﬁtted to the normalized hr ^{2} i data to obtain ðS=V Þ _{p}_{o}_{r}_{e} ¼ 1:70 10 ^{4} m ^{} ^{1} (Fig. 17b). The modiﬁed periodic boundary condition with the mirror operation (Fig. 8b) adopted for Rwalk.nb suggests that deﬁnition A in the caption of Fig. 5 should be used for the calculation of ðS=V Þ _{p}_{o}_{r}_{e} . According to the results of Clabel.nb (Table 2 and Fig. 12a), ðS=V Þ _{p}_{o}_{r}_{e} for deﬁnition A is 1:69 10 ^{4} m ^{} ^{1} , nearly equal to 1:70 10 ^{4} m ^{} ^{1} . This good agreement supports the reliability of (1) the perform ance of Clabel.nb and Rwalk.nb programs and also (2) the methodology of the surfacetovolume ratio estimation by diﬀusometry and cluster labeling.
Fig. 17 Very early time stage of a random walk in the Niijima percolated pore cluster. (a) Dimensionless meansquare displace ment averaged over 50,000 walkers. Note that hx ^{2} i hy ^{2} i hz ^{2} i for 1000. (b) Meansquare displacement, hr ^{2} i, of (a) normal ized by hr ^{2} i _{f}_{r}_{e}_{e} ¼ a ^{2} (solid curve). A dotted curve, Eq. (6), was ﬁtted to the data points for 1000 to obtain ðS=V Þ _{p}_{o}_{r}_{e} ¼ 1:70 10 ^{4} m ^{} ^{1} .
1/3 and 1 (see Eqs. (2) and (10)), suggesting that the simu lation performed reliably. The ﬁtted slopes for the random walk in the percolated pore cluster in the lava sample are
VOL. 44, NO. 9, SEPTEMBER 2007
1246
Y. NAKASHIMA and S. KAMIYA
IV. Conclusions
We have developed three original Mathematica ^{} pro grams for the analysis of the 3D pore connectivity and tor tuosity of anisotropic porous rocks. These programs were successfully applied to the conventional microfocus Xray CT images of a rhyolitic lava sample having the anisotropic pore structure with 15.2 mm voxel dimension. The use of more advanced CT apparatus systems will allow a wider range of porous samples to be analyzed. For example, a su per highresolution synchrotronbased microtomographic system with submicrometer voxel dimensions is being de veloped, ^{3}^{7}^{)} with which it will be possible to probe the pore structure of ﬁnegrained bentonite ^{3}^{8}^{–}^{4}^{1}^{)} by Xray CT. Our programs run on the Mathematica ^{} version 5.2 installed in the various operating systems (Windows, Macintosh, Unix, and Linux). Threedimensional pore images obtained by nu clear magnetic resonance imaging ^{3}^{4}^{,}^{3}^{5}^{)} and neutron CT ^{3}^{6}^{)} (not Xray CT images) are also acceptable. Thus, our pro grams will be useful for a microscopic approach using the 3D pore images for diverse studies on the transport of groundwater and contaminants through the natural and arti ﬁcial barriers at radioactive waste disposal sites.
Acknowledgements
The authors are grateful to Dr. T. Nakano for preprocess ing the raw CT images used in this study and also wish to thank others who provided helpful comments during the preparation of this paper. The ﬁnancial support was provided by the Budget for Nuclear Research, Ministry of Education, Culture, Sports, Science and Technology of Japan with screening and counseling provided by the Atomic Energy Commission.
References
1) 
Japan Nuclear Cycle Development Institute, ‘‘Second Progress 
2) 
Report on Research and Development for the Geological Dis posal of HLW in Japan H12: Project to Establish the Scientiﬁc and Technical Basis for HLW Disposal in Japan, Supporting Report 2 Repository Design and Engineering Technology,’’ JNC Technical Report, JNC TN1410 2000003 (2000). Japan Nuclear Cycle Development Institute, ‘‘Second Progress 
8)
ity in complex lithologies using highresolution Xray comput ed tomography,’’ J. Hydrol., 302, 92 (2005). P. Spanne, J. F. Thovert, C. J. Jacquin, et al., ‘‘Synchrotron
computed microtomography of porous media: Topology and transports,’’ Phys. Rev. Lett., 73, 2001 (1994). 9) L. M. Schwartz, F. Auzerais, J. Dunsmuir, et al., ‘‘Transport and diﬀusion in threedimensional composite media,’’ Physica A, 207, 28 (1994).
10)
N. S. Martys, H. D. Chen, ‘‘Simulation of multicomponent ﬂu
ids in complex threedimensional geometries by the lattice Boltzmann method,’’ Phys. Rev. E, 53, 743 (1996). 11) F. M. Auzerais, J. Dunsmuir, B. B. Ferreol, et al., ‘‘Transport in sandstone: A study based on three dimensional microtomog raphy,’’ Geophys. Res. Lett., 23, 705 (1996). 12) Y. Nakashima, T. Nakano, K. Nakamura, et al., ‘‘Threedi mensional diﬀusion of nonsorbing species in porous sand stone: Computer simulation based on Xray microtomography using synchrotron radiation,’’ J. Contam. Hydrol., 74, 253
(2004).
13) Y. Nakashima, T. Yamaguchi, ‘‘DMAP.m: A Mathematica program for threedimensional mapping of tortuosity and po rosity of porous media,’’ Bull. Geol. Survey Japan, 55, 93
(2004). (Available at http://www.gsj.jp/Pub/Bull new/vol 55/ 55 03/55 03 03.pdf). 14) Y. Watanabe, Y. Nakashima, ‘‘RW3D.m: Threedimensional random walk program for the calculation of the diﬀusivities in porous media,’’ Comp. Geosci., 28, 583 (2002).
15) 
Y. Nakashima, Y. Watanabe, ‘‘Estimate of transport properties of porous media by microfocus Xray computed tomography 
16) 
and random walk simulation,’’ Water Resour. Res., 38, article number 1272, DOI number 10.1029/2001WR000937, (2002). Y. Nakashima, T. Kikuchi, ‘‘Estimation of the apertures of wa tersaturated fractures by nuclear magnetic resonance well log ging,’’ Geophys. Prospect., 55, 235 (2007). 
17) O. G. Duliu, ‘‘Computer axial tomography in geosciences: An overview,’’ EarthSci. Rev., 48, 265 (1999). 18) D. Stauﬀer, A. Aharony, Introduction to Percolation Theory,
19) 
Revised 2 ^{n}^{d} Edition, Taylor & Francis, London, 192 (1994). S. Ikeda, T. Nakano, Y. Nakashima, ‘‘Threedimensional study 
on the interconnection and shape of crystals in a graphic gran ite by Xray CT and image analysis,’’ Miner. Mag., 64, 945 

(2000). 

20) 
J. Hoshen, R. Kopelman, ‘‘Percolation and cluster distribution. I. Cluster multiple labeling technique and critical concentra tion algorithm,’’ Phys. Rev. B, 14, 3438 (1976). 
21) T. Yokoyama, S. Nakashima, ‘‘Diﬀusivity anisotropy in a
rhyolite and its relation to pore structure,’’ Eng. Geol., 80,
Report on Research and Development for the Geological Dis 


posal of HLW in Japan H12: Project to Establish the Scientiﬁc 
22) 
L. L. Latour, R. L. Kleinberg, P. P. Mitra, et al., ‘‘Poresize 

and Technical Basis for HLW Disposal in Japan, Supporting Report 3 Safety Assessment of the Geological Disposal Sys tem,’’ JNC Technical Report, JNC TN1410 2000004 (2000). 
distributions and tortuosity in heterogeneous porous media,’’ J. Magn. Reson., A 112, 83 (1995). 23) P. P. Mitra, P. N. Sen, L. M. Schwartz, ‘‘Shorttime behavior 

3) J. H. Scho¨ n, Physical Properties of Rocks: Fundamentals and Principles of Petrophysics, Pergamon, Amsterdam, 583 
of the diﬀusion coeﬃcient as a geometrical probe of porous media,’’ Phys. Rev. B, 47, 8565 (1993).


(2004). 
24) 
L. L. Latour, P. P. Mitra, R. L. Kleinberg, et al., ‘‘Timede 

4) D. L. Turcotte, Fractals and Chaos in Geology and Geophy sics, Cambridge Univ. Press, Cambridge, 231 (1993). 5) Y. Gue´ guen, V. Palciauskas, Introduction to the Physics of 6) D. Wildenschild, J. W. Hopmans, C. M. P. Vaz, et al., ‘‘Using 
pendent diﬀusion coeﬃcient of ﬂuids in porous media as a probe of surfacetovolume ratio,’’ J. Magn. Reson., A 101, 

Rocks, Princeton University Press, Princeton, 294 (1994). Xray computed tomography in hydrology: systems, resolu tions, and limitations,’’ J. Hydrol., 267, 285 (2002). 
25) K.J. Dunn, D. J. Bergman, G. A. Latorraca, Nuclear Magnetic Resonance Petrophysical and Logging Applications, Perga mon, Amsterdam, 293 (2002). 26) Y. Nakashima, T. Yamaguchi, ‘‘Original free Mathematica 

7) 
R. A. Ketcham, G. J. Iturrino, ‘‘Nondestructive highresolution visualization and measurement of anisotropic eﬀective poros 
programs for the calculation of transport properties of porous media,’’ In: Xray CT for Geomaterials; Soils, Concrete, 
JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY
Mathematica Programs for the Analysis of ThreeDimensional Pore Connectivity and Anisotropic Tortuosity _{1}_{2}_{4}_{7}
Rocks. (Edited by J. Otani and Y. Obara) A. A. Balkema, Lisse, 103 (2004). 27) R. Freedman, ‘‘Advances in NMR logging,’’ J. Petrol. Tech nol., 58, 60 (2006). 28) S. Pﬂeiderer, H. C. Halls, ‘‘Magnetic susceptibility anisotropy of rocks saturated with ferroﬂuid: A new method to study pore fabric,’’ Phys. Earth Planet. Inter., 65, 158 (1990). 29) S. Siegesmund, H. Kern, A. Vollbrecht, ‘‘The eﬀect of orient ed microcracks on seismic velocities in an ultramylonite,’’ Tectonophys., 186, 241 (1991). 30) H. Du¨ rrast, S. Siegesmund, ‘‘Correlation between rock fabrics and physical properties of carbonate reservoir rocks,’’ Int. J. Earth Sci., 88, 392 (1999). 31) S. Capuani, C. Rossi, M. Alesiani, et al., ‘‘Diﬀusion tensor imaging to study anisotropy in a particular porous system:
The trabecular bone network,’’ Solid State Nucl. Magn. Reson., 28, 266 (2005). 32) N. Isshiki, Geology of the Nii Jima district. Geological sheet map scale 1:50 000, Geological Survey of Japan [in Japanese with English abstract] (1987). 33) S. Nakashima, ‘‘Diﬀusivity of ions in pore water as a quanti tative basis for rock deformation rate estimates,’’ Tectono phys., 245, 185 (1995). 34) D. A. Doughty, L. Tomutsa, ‘‘Multinuclear NMR microscopy of twophase ﬂuid systems in porous rock,’’ Magn. Reson. Imaging, 14, 869 (1996).
35)
M. Yamaguchi, K. Kobori, K. Suzuki, et al., ‘‘Imaging of water distribution in thermally fractured granites by SPRITE,’’ Magn. Reson. Imaging, 23, 325 (2005).
36) B. Winkler, K. Knorr, A. Kahle, et al., ‘‘Neutron imaging and neutron tomography as nondestructive tools to study bulk rock samples,’’ Euro. J. Mineral., 14, 349 (2002).
37)
H. Yasuda, I. Ohnaka, S. Fujimoto, et al., ‘‘Fabrication of
aligned pores in aluminum by electrochemical dissolution of monotectic alloys solidiﬁed under a magnetic ﬁeld,’’ Scr. Mater., 54, 527 (2006). 38) T. Kozaki, S. Suzuki, N. Kozai, et al., ‘‘Observation of micro structures of compacted bentonite by microfocus Xray com puterized tomography (microCT),’’ J. Nucl. Sci. Technol., 38, 697 (2001). 39) Y. Nakashima, ‘‘Diﬀusivity measurement of heavy ions in Wyoming montmorillonite gels by Xray computed tomogra phy,’’ J. Contam. Hydrol., 61, 147 (2003). 40) S. Suzuki, H. Sato, T. Ishidera, et al., ‘‘Study on anisotropy of eﬀective diﬀusion coeﬃcient and activation energy for deuter ated water in compacted sodium bentonite,’’ J. Contam. Hy drol., 68, 23 (2004). 41) Y. Nakashima, ‘‘H _{2} O selfdiﬀusion coeﬃcient of waterrich
42)
MX80 bentonite gels,’’ Clay Miner., 41, 659 (2006). R. A. Ketcham, W. D. Carlson, ‘‘Acquisition, optimization and interpretation of Xray computed tomographic imagery: appli cations to the geosciences,’’ Comp. Geosci., 27, 381 (2001).
VOL. 44, NO. 9, SEPTEMBER 2007