3d random walk

15
Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity of Porous Rocks using X-ray 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 1-1-1, Tsukuba, Ibaraki 305-8567, 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, surface-to-volume ratio of the pore space, and anisotropic tortuosity of the pore struc- ture) of porous rocks using three-dimensional (3-D) 8-bit TIFF or BMP X-ray computed tomography (CT) images. The pre-processing program Itrimming.nb extracts a 3-D rectangular region of interest (ROI) from the raw CT images. The program Clabel.nb performs cluster-labeling 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 diffusion of non-sorbing species by performing discrete lattice walks on the largest (i.e., percolated) pore cluster in the ROI and exports the mean-square displacement of the non-sorbing walkers, which is needed to estimate the geo- metrical tortuosity and surface-to-volume 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://staff.aist.go.jp/nakashima.yoshito/progeng.htm to facilitate the X-ray CT approach to groundwater hydrology. KEYWORDS: anisotropy, diffusometry, diffusion tensor, MRI, NMR, permeability, percolation cluster, pore size, porous media, self-diffusion coefficient, X-ray 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 sub-millimeter 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 influence 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 diffusivity and permeability decrease with increasing tor- tuosity. 3) A percolated pore cluster enables long distance mi- gration of pore fluid molecules by diffusion and the Darcy flow, while isolated pores cannot contribute to long distance material transport. 4) Thus, a pore connectivity analysis or a cluster-labeling analysis of the pores is needed to evaluate the transport properties of the rocks. The pore size or the re- ciprocal of the surface-to-volume ratio of the pore space is also important for the groundwater flow because the Darcy flow rate strongly depends on the pore size. 5) Because the pore structure is complex and three-dimensional (3-D), a two-dimensional (2-D) approach such as photomicroscopy of a thin section is inadequate and a system capable of meas- uring the 3-D pore structure in porous geological samples is needed. Micro-focus or synchrotron X-ray Computed Tomography (CT) is a powerful tool to obtain the 3-D images of sub-mil- limeter pores nondestructively. 6,7) A computer program can then be used to quantitatively analyze the transport proper- ties using the digital images. 8–12) 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, surface-to-volume 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 flow simulations, it is possible to estimate the macroscopic per- meability (k) in Fig. 1 using the porosity, surface-to-volume ratio and pore tortuosity values obtained by the programs. 12) We, then, applied the programs to a CT image set of a nat- ural rock sample (vesicular rhyolitic lava having an aniso- ÓAtomic Energy Society of Japan Corresponding author, E-mail: [email protected] Journal of NUCLEAR SCIENCE and TECHNOLOGY, Vol. 44, No. 9, p. 1233–1247 (2007) 1233 ARTICLE

Upload: maurice-politis

Post on 01-Apr-2015

400 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 3d random walk

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity

and Anisotropic Tortuosity of Porous Rocks using X-ray

Computed Tomography Image Data

Yoshito NAKASHIMA1;� and Susumu KAMIYA1

1Exploration Geophysics Research Group, National Institute of Advanced Industrial Science and Technology (AIST),Central 7, Higashi 1-1-1, Tsukuba, Ibaraki 305-8567, 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 disposalbecause 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, surface-to-volume ratio of the pore space, and anisotropic tortuosity of the pore struc-ture) of porous rocks using three-dimensional (3-D) 8-bit TIFF or BMP X-ray computed tomography (CT)images. The pre-processing program Itrimming.nb extracts a 3-D rectangular region of interest (ROI) fromthe raw CT images. The program Clabel.nb performs cluster-labeling processing of the pore voxels in theROI to export volume, surface area, and the center of gravity of each pore cluster, which are essential forthe analysis of pore connectivity. The random walk program Rwalk.nb simulates diffusion of non-sorbingspecies by performing discrete lattice walks on the largest (i.e., percolated) pore cluster in the ROI andexports the mean-square displacement of the non-sorbing walkers, which is needed to estimate the geo-metrical tortuosity and surface-to-volume 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 availableat http://www.jstage.jst.go.jp/browse/jnst/44/9/ and http://staff.aist.go.jp/nakashima.yoshito/progeng.htmto facilitate the X-ray CT approach to groundwater hydrology.

KEYWORDS: anisotropy, diffusometry, diffusion tensor, MRI, NMR, permeability, percolationcluster, pore size, porous media, self-diffusion coefficient, X-ray CT

I. Introduction

For safe nuclear waste disposal, understanding of the mi-croscopic aspects of groundwater migration through naturalporous rocks is essential because harmful contaminatedgroundwater can migrate along sub-millimeter pore spacesover long distances.1,2) The microscopic aspect of groundwa-ter transport in the geosphere depends on the pore structure.Examples of the influence 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 thediffusivity and permeability decrease with increasing tor-tuosity.3) A percolated pore cluster enables long distance mi-gration of pore fluid molecules by diffusion and the Darcyflow, while isolated pores cannot contribute to long distancematerial transport.4) Thus, a pore connectivity analysis or acluster-labeling analysis of the pores is needed to evaluatethe transport properties of the rocks. The pore size or the re-ciprocal of the surface-to-volume ratio of the pore space isalso important for the groundwater flow because the Darcy

flow rate strongly depends on the pore size.5) Because thepore structure is complex and three-dimensional (3-D), atwo-dimensional (2-D) approach such as photomicroscopyof a thin section is inadequate and a system capable of meas-uring the 3-D pore structure in porous geological samples isneeded.

Micro-focus or synchrotron X-ray Computed Tomography(CT) is a powerful tool to obtain the 3-D images of sub-mil-limeter pores nondestructively.6,7) A computer program canthen be used to quantitatively analyze the transport proper-ties using the digital images.8–12) To the best knowledge ofthe authors, however, few such programs have been madepublicly available at little or no cost. Thus, in the presentstudy, we developed Mathematica� version 5.2 programsto calculate the transport properties (porosity, pore connec-tivity, surface-to-volume 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 flowsimulations, it is possible to estimate the macroscopic per-meability (k) in Fig. 1 using the porosity, surface-to-volumeratio and pore tortuosity values obtained by the programs.12)

We, then, applied the programs to a CT image set of a nat-ural rock sample (vesicular rhyolitic lava having an aniso-

�Atomic Energy Society of Japan

�Corresponding author, E-mail: [email protected]

Journal of NUCLEAR SCIENCE and TECHNOLOGY, Vol. 44, No. 9, p. 1233–1247 (2007)

1233

ARTICLE

Page 2: 3d random walk

tropic pore structure) to calculate the pore connectivity andanisotropic tortuosity and to discuss the reliability of the pro-grams’ performance. We offer the programs on the Internet(http://www.jstage.jst.go.jp/browse/jnst/44/9/ and http://staff.aist.go.jp/nakashima.yoshito/progeng.htm) to facilitate theX-ray CT approach to groundwater hydrology.

We previously made available on the Internet free pro-grams for calculation of the tortuosity (i.e., DMAP.m13)

and RW3D.m14)) and pore connectivity (i.e., Kai3D.m15))

of porous media. However, these programs had the follow-ing limitations: (1) The programs (DMAP.m, RW3D.m,and Kai3D.m) read the 3-D CT images as text files and can-not import binary files such as the Tagged Image File Format(TIFF) and Bit MaP (BMP) files. (2) DMAP.m and RW3D.massume an isotropic pore structure and, thus, are not applica-ble to the anisotropic porous media. (3) It is not possible toapply RW3D.m to the CT images for which the pore size isas large as the total system size. (4) Kai3D.m cannot exportthe cluster-labeled 3-D pore images, which are essential forperforming computer simulations of a random walk on a per-colated pore cluster. These limitations no longer exist in thenew programs.

II. Descriptions of the Mathematica� Programs

1. GeneralAll programs developed in the present study are of the

notebook type and are for the Mathematica� version 5.2 orlater. It should be noted that, although there are some 2-Dillustrations below for simplicity and pedagogical purposes,all the programs are for the 3-D image analysis. Thus, usersshould prepare 3-D 8-bit (not 16-bit) CT images as a set ofcontiguous 2-D slices. The dimensions of the voxel (a vol-ume element) of each image should be cubic. If they arenot cubic, Clabel.nb cannot calculate the correct surface areavalue of each pore cluster and Rwalk.nb cannot calculate thecorrect value of the mean-square displacement of randomwalkers. The programs, user manuals, and an example of3-D CT images of a rhyolitic lava sample are available athttp://www.jstage.jst.go.jp/browse/jnst/44/9/ and http://staff.aist.go.jp/nakashima.yoshito/progeng.htm. The programsare outlined briefly below and summarized in Table 1. Forfurther information, such as details about data preparationand program execution, readers should refer to the ‘‘readme’’text file available at the URLs above.

2. Itrimming.nbThe function of the Itrimming.nb program is to trim the

raw CT images and to export the trimmed rectangular im-ages in TIFF, BMP, Comma-Separated Values (CSV), orTab-Separated Values (TSV) format. This program shouldbe run before using Clabel.nb and Rwalk.nb to extract a 3-D rectangular region of interest (ROI) from a set of theraw CT images. Both pore connectivity analysis (i.e., clus-ter-labeling analysis) and random walk simulations will beperformed on the extracted 3-D rectangular image system.

Fig. 1 The effects of pore geometry on the macroscopic permea-bility (k) and pore fluid diffusivity (D) in porous rocks. (a) Samepore diameter but with different tortuosity. The straight or lesstortuous pipe yields higher permeability and diffusivity. (b) Per-colated pore crossing the whole system compared with isolatedpores. The former gives higher permeability and diffusivity. (c)Same porosity but with different pore diameter. The formeryields higher permeability.

Table 1 Outline of the three notebook-type Mathematica� programs

Program name Function Input Output

Itrimming.nb Image trimming of ROI Raw CT image Trimmed CT imageVoxel intensity histogram of the 3-D image

Clabel.nb Cluster labeling of pores Trimmed CT image Labeled CT imageVolume and surface area of each cluster

Rwalk.nb Random walk in a pore cluster Labeled CT image� Mean-square displacement of walkers3-D trajectories of some walkers

�Pre-processing of the labeled CT image by pre Rwalk image.nb or pre Rwalk csv.nb is required to convert into an internal binary format file.

1234 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 3: 3d random walk

An example of selecting an ROI is shown in Fig. 2. Thesample is porous andesite lava obtained from Sumikawa,Akita, Japan.16) An X-ray CT image visualizes the spatialdistribution of the X-ray linear absorption coefficient(LAC) within the sample.17) Thus, it is straightforward todistinguish between solid areas with high LAC and air-filledpores with a low LAC. The ambient air and pores with thelow LAC are shown by the dark voxels while groundmassand phenocrysts appear as the light areas (in particular,iron-rich high-density phenocrysts such as pyroxene are verylight). Because ambient air is not needed to estimate thetransport properties of the andesite sample, the ambient airvoxels located at the four corners of the image system shouldbe 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 thedimensions of the rectangle in a right-handed coordinate sys-tem. The program extracts the rectangles from all slices (i.e.,2-D images) and saves them as TIFF, BMP, CSV, or TSVfiles. A histogram of the 8-bit voxel intensity of the trimmed3-D image dataset is calculated and saved as a CSV text file.This histogram is useful for specifying the threshold for dis-criminating between air-filled pores with a low LAC andsolid areas with a high LAC, which is required to run theClabel.nb program.

3. Clabel.nbClabel.nb is a cluster-labeling program. Pore clusters are

connected pore voxels and cluster labeling refers to the ex-amination of the 3-D pore connectivity in order to export a

3-D image set of the labeled pore clusters.18) All pore voxelsin the porous media are colored cluster by cluster and are as-signed to one of the pore clusters by this processing. Thiscluster-labeling analysis is important for understanding thecontribution of pores to groundwater migration. Some poresin the porous media are three-dimensionally connected toform a single large percolation cluster responsible for themacroscopic transport of materials; other pores are isolatedand do not contribute to macroscopic diffusion and the Dar-cy flow. The Clabel.nb program allows us to characterizesuch pore clusters.

Voxels are arranged like a simple cubic lattice in the 3-Ddigital CT image set and the program scans the pore voxelconnectivity systematically voxel by voxel. When a porevoxel is in full contact with another voxel, the two voxelsare judged to be connected. When the two pore voxels arein contact only at a vertex or an edge, the clusters are con-sidered to be disconnected. This cluster neighborhood ruleis commonly used in the connectivity analysis,18,19) andshown in Fig. 3.

The fast algorithm of Hoshen and Kopelman (1976)18,20)

was employed for Clabel.nb, and an example of the algo-rithm for a 2-D case is shown in Fig. 4. This algorithm re-quires only two scans of the whole image system. The firstscan is carried out following the criterion of Fig. 3. The di-rection of the first scan is shown in Fig. 4. This line scanstarts from the origin (the left top corner) and checks thepore connectivity voxel by voxel along the arrow indicated.If a pore voxel is not face-adjacent to any of the surroundingpore voxels, the voxel is labeled with a cluster color denot-ing a new voxel intensity. If a pore voxel is face-adjacent toa surrounding pore voxel, the voxel is labeled with the samecluster color as the adjacent pore voxel. The number of ad-jacent voxels to be checked during the line scan is two in the2-D case of Fig. 4 (three in the 3-D case). Unfortunately, thecluster color of the two (or three) adjacent voxels is not al-ways common. As a result, the first scan occasionally yieldsmislabeling 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 first scan, this mislabel-ing is recorded in a temporary errata file stating that thecluster colors ‘‘1’’ and ‘‘2’’ should be identical. The secondscan is performed to correct the mislabeling. The directionof the second scan is the same as that of the first scan. Byreferencing the errata file, the program changes the clustercolors and exports a labeled 3-D image set in which eachpore cluster is labeled with a single unique color.

Clabel.nb exports a labeled 3-D image set as TIFF, BMP,CSV, or TSV files. In the files, each pore cluster is coloredaccording to a color table (the file name: color.txt) providedby the user. This labeled pore image set is essential to prob-ing the tortuosity by the long-distance random walk simula-tion of pore fluid molecules along a percolated pore clusterusing Rwalk.nb. The program also exports a record of thevolume, surface area, and 3-D coordinates of the center ofgravity for each pore cluster as a text file. The surface-to-volume ratio of each pore cluster is obtained by dividingthe cluster surface area by the cluster volume. This ratio isan important transport property because its reciprocal is

Fig. 2 Example of CT image trimming to extract a region of in-terest (ROI). This 2-D image of a cylindrical andesitic lava sam-ple (effective porosity � 22 vol.%) has an image dimension of5122 voxels = 7:82 mm2. Pores and ambient air are dark in theCT image. The trimmed ROI inscribed within the cylindricalrock image is indicated by the open square.

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1235

VOL. 44, NO. 9, SEPTEMBER 2007

Page 4: 3d random walk

nearly equal to the pore diameter.5) The output about thecenter of gravity is useful for analyzing the 3-D positionsof small pore clusters.

There are two possible methods for calculating the surfacearea of a pore cluster; which one of these is used depends onthe judgment of whether or not the rim of the image systemis a real pore–solid interface (Fig. 5). If one considers thatthe 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 greeninterface. On the other hand, if one considers the blue rim tobe real, the total surface area of the orange pore cluster is thesum of the green and blue lines. Clabel.nb exports both sur-face area values.

Clabel.nb was applied to a synthetic 3-D test image ofwhich the volume and surface data of each pore cluster is

known. It was confirmed that Clabel.nb outputted the correctvolume and surface data, demonstrating good performancereliability. The cluster labeling of pore images of a pack ofglass beads15) and natural sand grains26) has been carriedout using Kai3D.m. Clabel.nb was applied to these imagesto confirm that the Clabel.nb output results were identicalto those by Kai3D.m, supporting again the reliability ofthe program.

Fig. 3 Criterion of pore voxel connectivity in a 3-D simple cubicimage system. Adjacent voxels are judged as connected whenthey 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 fluid molecules can migrate within thepore cluster by Darcy flow and/or diffusion.

Fig. 4 Two-dimensional example of the cluster-labeling algo-rithm by Hoshen and Kopelman (1976).20) The 1-bit gray-levelsof the pore voxels and solid voxels are 1 and 0, respectively, inthe CT image before labeling. The first scan starts from the origin(left top corner) and proceeds along the first row of the 2-D ma-trix as indicated by an arrow. The line scan along the second rowfollows in the same direction of the arrow. After the completionof the 2-D matrix scan of a single CT slice image, the programcontinues the scan of the adjacent 2-D slice to accomplish thescan of the whole image system. After the first scan, the U-shap-ed gray pore cluster contains two different cluster colors (i.e.,voxel intensities), namely 1 and 2. This contradiction is correctedusing the errata file after the second scan. The color of each porecluster after the second scan obeys the color table provided bythe user.

1236 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 5: 3d random walk

4. Rwalk.nbRwalk.nb is a 3-D random walk program to simulate the

diffusion of non-sorbing species (e.g., H2O, Br�, and I�)

in the pores. The random walk should be non-sorbing be-cause the purpose is to calculate the geometrical tortuosityof the pore structure and the undesirable effects of the sorp-tion of walkers on the solid surface should be eliminated.The random walk performed by Rwalk.nb is a discrete latticewalk in a simple cubic lattice18) (not an off-lattice walk). Anexample of a random walk trajectory is shown in Fig. 6 for a2-D case. The walker migrates on discrete voxels whosegray-levels correspond to the pore space. A pore voxel ischosen randomly from among the whole image system asthe 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 maximumnumber of the nearest pore voxels is six for a 3-D simple cu-bic lattice); � is incremented by a unit time after the jump sothat the time becomes � þ 1. If the randomly selected voxelis a solid voxel, the jump is not performed, but, the time stillbecomes � þ 1.

The main output of Rwalk.nb is the mean-square displace-ment, hr2i, of the walkers as a function of � (the file name:Rwalk.csv).

hrð�Þ2i ¼1

n

Xni¼1

½ðxið�Þ � xið0ÞÞ2 þ ðyið�Þ � yið0ÞÞ2

þ ðzið�Þ � zið0ÞÞ2� ð1Þ

where n is the number of the random walkers and xið�Þ, yið�Þ,and zið�Þ are the 3-D coordinates of the walker’s position attime � for the ith walker. The x-y plane is embedded withinthe 2-D CT slice and z is the stacking direction of the slicesbased on a right-handed coordinate system. The exact solu-tion of the mean-square displacement for a lattice walk ina free space (i.e., porosity = 100 vol.%), hr2ifree, is givenby15,18)

hr2ifree ¼ 6D0t ¼ a2� ð2Þ

where t is the time, D0 is the diffusion coefficient of thewalker in the free space without solids (e.g., H2O self-diffu-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 diffusion in rock pores, hr2i is reduced compared withhr2ifree owing to the obstruction effects of solids. The degreeof the reduction is measured quantitatively by the tortuosityas follows. The mean-square displacement is important be-cause the (scalar) diffusion coefficient, D, of the non-sorbingspecies in the three-dimensionally isotropic porous media isrelated to the time-derivative of hr2i:

DðtÞ ¼1

6

dhr2idt

ð3Þ

The tortuosity of the pore structure is a key transport prop-erty for the systems with small Peclet numbers and is definedas the limiting value of the ratio of D in the free space to D

in the porous media:

Tortuosity ¼D0

DðtÞ¼

a2

dhrð�Þ2id�

as t and � ! 1 ð4Þ

Although the tortuosity is defined as the square root ofEq. (4), namely, ðD0=DÞ1=2 in some literatures,3,21) we obey

Fig. 5 Two possible definitions, A and B, of the surface area ofthe pore cluster. In this example, the orange pore cluster reachesthe rim of a 2-D image system of 7� 7 voxels. The dimension ofeach 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 totalsurface area (total perimeter in the 2-D case) of the orange clusteris 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 thesum of the green and blue lines, namely 22þ 10 ¼ 32.

Fig. 6 Example of a 2-D lattice-walk trajectory in a porous medi-um over 200 time steps. The image system consists of 30� 30

discrete voxels. The initial and final positions of the walker aremarked by solid and open circles, respectively.

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1237

VOL. 44, NO. 9, SEPTEMBER 2007

Page 6: 3d random walk

the definition of Eq. (4), which is commonly used in the nu-clear magnetic resonance diffusometry.22)

It should be noted that, while the diffusivity in the freespace is time-independent, it in the porous media dependson the time or the diffusion distance because the diffusionis restricted by obstacles (i.e., solids).23,24) For unrestricteddiffusion, for example, H2O self-diffusion in bulk water,hrðtÞ2i, 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 finite pore size) exists, Dis time-dependent for a random walk in the porous media(Fig. 7). Solid parts of the porous media are obstacles tothe diffusing material and, thus, the random walk trajectoryis restricted by the obstacles, which reduces the diffusion co-efficient in the porous media compared to that in bulk fluid.

The degree of the diffusivity reduction is governed by theaverage pore size and the characteristic diffusion distance(root-mean-square displacement) of walkers. In the limit oft ! 0, the root-mean-square displacement becomes smallerthan the pore size. The walkers rarely collide with solidwalls and the obstruction effects of solids are weak. As a re-sult, the diffusion coefficient in the porous media normalizedto that in bulk fluid is slightly smaller than unity. This slightdecrease in the diffusion coefficient is proportional to thesurface-to-volume ratio of the porous media with negligiblesolid surface relaxivity of the nuclear spin:23–25)

D

D0

¼ 1�4

9ffiffiffi�

pS

V

� �pore

ffiffiffiffiffiffiffiD0t

pþ c1t as t ! 0 ð5Þ

where ðS=VÞpore is the surface-to-volume ratio of the porespace and c1 is a constant. Nakashima and Yamaguchi(2004) converted t into � using Eq. (2) and integratedEq. (5) to obtain a useful expression for the simulation datafitting robustly against random noise:26)

hrð�Þ2ihrð�Þ2ifree

¼ 1�8a

27ffiffiffiffiffiffi6�

pS

V

� �pore

ffiffiffi�

pþ c2� as � ! 0 ð6Þ

where c2 is a constant. Equation (6) allows us to calculateðS=VÞpore by performing the random walk simulations inthe short-time limit if the 3-D pore structure is isotropic.

The random walk approach for the estimation of ðS=VÞporementioned above is time-consuming and less accurate owingto the stochastic nature of the random walk simulations com-pared with the deterministic cluster-labeling approach. How-ever, this diffusometry-based method is, in principle, appli-cable to the in situ nuclear magnetic resonance (NMR) welllogging27) of the water-saturated porous strata of a nuclearwaste disposal site. Magnets of a special design (i.e., one-sided magnets) are equipped on the NMR logging sonde25)

to enable the measurement of self-diffusion coefficients ofthe pore fluid molecules several centimeters inside the bore-hole wall. The obtained diffusion data are used to character-ize the pore structure and fluid species, which are difficult toperform by other logging methods. Thus, diffusometry usingthe 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 thislong-time limit, the random walkers fully experience the

high tortuosity of the porous media and the slope of hr2ireaches a constant value.22) The geometrical tortuosity ofthe porous rocks can, then, be calculated by using this slopein Eq. (4). Hence, it is possible to calculate the tortuosity by

Fig. 7 Schematics of a random walk of pore fluid molecules in afluid-saturated tortuous pipe of diameter d. (a) Example of a tra-jectory of a random walker (solid circle) diffusing in the porespace. At t � d2=ð6D0Þ where D0 is the self-diffusion coefficientof bulk fluid, the walker rarely collides with grains, so the diffu-sion is nearly equal to that in free space. The collision frequencyincreases with time, reducing the mean-square displacement inthe porous rock. The walker eventually negotiates many solidwalls and experiences the full geometrical tortuosity of the po-rous media at t � d2=ð6D0Þ. (b) Mean-square displacement ofthe random walk in (a). There is a transition from the unrestricteddiffusion regime to the restricted diffusion regime. The transitionoccurs at about t ¼ d2=ð6D0Þ when the root-mean-square dis-placement is nearly equal to the pore diameter, d.

1238 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 7: 3d random walk

performing the long-time random walk simulations using the3-D CT image data.

Natural rocks often possess an anisotropic pore struc-ture.28–30) If the pore is anisotropic, D is a tensor31) (not ascalar) and Eqs. (3) to (6) break down. Directional mean-square displacement, hx2i, hy2i, and hz2i, is needed to discussthe tortuosity of anisotropic porous rocks:

hxð�Þ2i ¼1

n

Xni¼1

ðxið�Þ � xið0ÞÞ2 ð7Þ

hyð�Þ2i ¼1

n

Xni¼1

ðyið�Þ � yið0ÞÞ2 ð8Þ

hzð�Þ2i ¼1

n

Xni¼1

ðzið�Þ � zið0ÞÞ2 ð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 freespace (i.e., porosity = 100 vol.%), hx2ifree, hy2ifree, andhz2ifree, are given by:

hx2ifree ¼ hy2ifree ¼ hz2ifree ¼1

3hr2ifree ¼

1

3a2� ð10Þ

The directional tortuosity can be calculated using Eqs. (7) to(10). For example, the tortuosity in the x-direction is thetime-derivative of Eq. (10) (i.e., a2=3) divided by that ofEq. (7).

Long-time data on the mean-square displacement are

needed to correctly compute the tortuosity defined byEq. (4). However, as time elapses, the random walkers even-tually go out of a 3-D CT image system of a finite size. Thisout-leaching 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 thisdifficulty. It should be noted, however, that a simplistic pe-riodic boundary condition (Fig. 8a) is useless because thepore connectivity breaks down at the boundary and the walk-ers cannot migrate beyond the boundary. A modified boun-dary condition using a mirror operation on the original 3-Dimage was employed in the present study to solve the discon-tinuity problem (Fig. 8b).

Some programming techniques were implemented inRwalk.nb to conserve a memory and to reduce the CPU cal-culation time. In the 3-D case, the mirror operation ofFig. 8b requires a memory allocation eight times larger thanthe method of Fig. 8a. As this could sometimes exceed theinstalled RAM limit of a user’s computer, we load onlythe original image set (the green frame in Fig. 8b) intoRAM and calculate the position in the red frame using themirror symmetry, reducing the memory use by 7/8. The cal-culation of the mean-square displacement at every time stepis one of the most time-consuming processes of Rwalk.nb.To save the CPU time, we implemented vectorization inthe process of adding hr2ð�Þi data for the latest ith walkerto hr2ð�Þi summed for the first to i� 1th walkers. This vec-

(a) (b)

Fig. 8 Boundary conditions for the random walk simulation for a 2-D example. The green square denotes the originalimage system, and the red square is a super system made by a mirror operation. (a) A straightforward periodic boundarycondition with parallel arrangement of the green square. Note that the undesirable discontinuity of the pore structureoccurs, through which pore fluid molecules cannot jump into an adjacent image system. (b) A modified periodic boun-dary condition using a super system (red) containing mirror copies. The parallel arrangement of the red square yields acontinuous and percolated pore network through which random walkers can travel the long distance essential for thecorrect estimation of the tortuosity value.

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1239

VOL. 44, NO. 9, SEPTEMBER 2007

Page 8: 3d random walk

torization drastically reduced the CPU time (e.g., from 34hours to 15 hours for the Niijima lava sample case describedbelow). When running Rwalk.nb, users should import a la-beled pore-cluster image data set and perform the latticewalk repeatedly to find the optimum simulation parameters(e.g., number of walkers and number of time steps) by trialand error. Importing a labeled 3-D CT image set as text,TIFF, or BMP files is another time-consuming step. Tosave time, we made a pre-processor, pre Rwalk csv.nb (orpre Rwalk image.nb), which converts the CSV text files(or the TIFF/BMP image files) into an internal binary formatfile (the file name: NT.mx). Rwalk.nb imports the NT.mx file(not the labeled raw CSV/TIFF/BMP files) as a 3-D perco-lated pore-cluster image data set. As NT.mx is optimized forfast input/output by Mathematica�, we confirmed that im-porting the NT.mx file is about six times faster than import-ing the labeled raw CSV/TIFF/BMP files.

III. Application to Rhyolitic Lava Sample Images

The programs Itrimming.nb, Clabel.nb, and Rwalk.nbwere applied to a CT image set of a rhyolitic lava sampleto demonstrate their performance. A personal computer(PC) with an Intel Core2� Duo T7600 CPU (2.33GHz)and 2GB RAM running Windows XP� was used for thedemonstration. A CT image set of rhyolitic lava from theMukaiyama volcano,32) Niijima Island, Japan was used inthe present study. This sample was chosen because (1) poresin rhyolitic lava are as large as several hundred micrometersin dimension (Fig. 9) and can be readily imaged by a con-ventional micro-focus X-ray CT apparatus, and (2) rhyoliticlava has a strong pore anisotropy21) suitable for examiningthe diffusion anisotropy using the Rwalk.nb program. Thetotal porosity of the lava sample was measured by an con-ventional laboratory method; it was 68 vol.%, calculatedby 1 minus (bulk density of the porous rock)/(true densityof the solid), where the bulk density of the porous rock

was 0.76 g/cm3 and the true density of the solid21) was2.39 g/cm3.

A cylindrical sample of the lava (7.5mm in diameter,8.1mm in length) was prepared and scanned by a cone-beammicro-focus X-ray CT scanner (Nittetsu Elex Co., Ltd.,Tokyo, Japan). The imaging conditions were as follows: ac-celeration voltage, 50 kV; tube current, 0.035mA; number ofprojections, 1,800; time required for 360� projection, 39min;field of view of the 2-D slice, 7:82 mm2; cubic voxel dimen-sions, 15:23 mm3 (i.e., a ¼ 15:2 mm); reconstruction filter,Shepp Logan; reconstructed 3-D image system, 512� 512�256 voxels.

First, the original 3-D image system consisting of512� 512� 256 voxels was trimmed using Itrimming.nbto extract a cubic ROI of 2563 voxels = 3:93 mm3. TheCPU time required was 9min for the PC used. An exampleof a trimmed 2-D square region is shown in Fig. 10. Becausea lava sample is highly porous and mechanically weak, thepore structure very near the surface of the cylindrical samplemay be destroyed during cutting. To avoid including such adestroyed pore structure within the ROI, a smaller square re-gion (not inscribed within the cylinder) compared to thatshown in Fig. 2 was chosen. The trimmed 3-D TIFF imagesare available at the previously mentioned URLs to enablereaders to reproduce the cluster-labeling and tortuosity anal-ysis described below.

Itrimming.nb exports a histogram of the 8-bit (i.e., 0 to255) voxel intensity of the trimmed 2563 voxels (Fig. 11).An analysis of the histogram is essential for the best choiceof the threshold for discriminating between solid and air-fill-ed pores. Figure 11 shows a bimodal distribution having a

Fig. 9 Photomicrograph of a thin section of Niijima lava (opennicol). Pores are filled with blue resin. The volcanic glass iswhite. The brown mineral at left is biotite. The thin sectionand cylindrical sample for CT were made from the same rocksample.

Fig. 10 Example of CT image trimming for the cylindrical sam-ple images of Niijima rhyolitic lava. Pores and ambient air aredark, and phenocrysts and groundmass are light in the CT image.The original image dimensions are 5122 voxels = 7:82 mm2.The trimmed ROI indicated by the open square is 2562

voxels = 3:92 mm2.

1240 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 9: 3d random walk

peak (intensity 39) of air-filled pore voxels with a low LACand a peak (intensity 205) of solids with a high LAC. Theboundary between solids and pores is blurred owing to thefinite spatial resolution of the CT system. This is the undesir-able partial-volume effect,42) which is responsible for thevoxels located between the two peaks, namely 39 and 205in Fig. 11. It is reasonable to assume that the probabilityof occupying a voxel at a solid-pore boundary is equal forboth solids and pores.15) This assumption leads to the choiceof the midpoint (i.e., intensity 122) of the peaks as thethreshold, implying that the voxels with an intensity equalto or smaller than 122 are pores. Based on this threshold val-ue, the number of pore voxels is 11,554,125 and, thus, thetotal porosity of the ROI is 11;554;125=2563 � 69 vol.%.The choice of the threshold value is critical to the resultsof the pore-connectivity analysis and tortuosity calculation.Thus, the validity of the choice should be cross-checkedby 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 asthe threshold is reasonable.

With a threshold of 122, Clabel.nb was applied to a cubicROI of 2563 voxels = 3:93 mm3, the output image file ofItrimming.nb. The results are shown graphically inFigs. 12–14 and are summarized in Table 2. The CPU timerequired was 29min for the PC used. Clabel.nb outputs thevolume and surface area of each pore cluster, and the outputis plotted in Fig. 12a. The volume of the largest or percolat-ed pore cluster is 11,507,114 voxels = 40.4mm3. The sur-face areas of the largest cluster calculated according to def-initions A and B in the caption of Fig. 5 are 683 and743mm2, respectively. Thus, ðS=VÞpore is 683/40.4

0

100000

200000

300000

400000

500000

0 50 100 150 200 250 300

mid

poin

t (12

2)

num

ber

of v

oxel

s

voxel intensity

pore solid

Fig. 11 Histogram of the 8-bit (i.e., 0 to 255) voxel intensity ofthe 3-D ROI of 2563 voxels = 3:93 mm3. The peaks of the poreand 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.%.

10–3

10–2

10–1

100

101

102

103

10–6 10–5 10–4 10–3 10–2 10–1 100 101 102

pore

clu

ster

sur

face

are

a (m

m2 )

pore cluster volume (mm3)

largest pore cluster

upper limitlower limit

(a)

(b)

Fig. 12 Statistics of the labeled pore clusters. (a) Cross-plot of thevolume, V , and surface area, S, of each pore cluster; 923 poreclusters were identified. The surface area was calculated accord-ing to definition A of the caption of Fig. 5. The theoretical upperand lower limits (Eqs. (11) and (12)) of the data points are shownby dotted lines. (b) 3-D pore structures for the theoretical upperand lower limits plotted in (a). A lattice-like fine pore networkcontact at a single face to the adjacent pore voxel is an exampleof the upper limit. An isolated blocky sphere yields the lowerlimit of the surface-to-volume ratio for a specified pore volume.

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1241

VOL. 44, NO. 9, SEPTEMBER 2007

Page 10: 3d random walk

mm�1 = 1:69� 104 m�1 or 743/40.4mm�1 = 1:84�104 m�1. The value of (the largest pore-cluster volume)/(total pore-cluster volume) is as high as 11,507,114/11,554,125 = 99.6%, implying that almost all of the poresin the lava sample are connected to form a single percolatedpore cluster responsible for the long-distance material trans-port in the rock by diffusion and the Darcy flow. It should benoted that the conventional 2-D photomicroscopy of a single

thin section (e.g., Fig. 9) cannot perform the 3-D pore con-nectivity analysis mentioned above. This is the advantageof the X-ray CT method over the photomicroscopy in the3-D 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 as922 (Table 2); this remarkable statistic is plotted in Fig. 12a.

(a)

(b)

Fig. 13 Cluster-labeling processing. (a) Example of a 2-D slice(8-bit gray scale) at z ¼ 200 before cluster labeling for theROI shown in Fig. 10; 2562 voxels = 3:92 mm2. A 3-D Cartesi-an coordinate system is indicated. (b) Labeled color image of (a)after the 3-D cluster labeling for the cubic system of 2563

voxels = 3:93 mm3. Yellow, the largest or percolated pore clus-ter; green, solid; purple, isolated pore clusters.

(a)

(b)

Fig. 14 Results of 3-D pore-cluster labeling. A commerciallyavailable 3-D viewer, T3D (ITT Visual Information Solutions,Colorado, USA), was used to visualize the 3-D image. The x-yplane is embedded within the 2-D CT slice, and z is the stackingdirection of the slices based on the right-handed coordinate sys-tem. (a) 2563 voxels = 3:93 mm3; coloring as in Fig. 13b andTable 2. (b) Shaded part (slab of 31� 2562 voxels =0:47� 3:92 mm3) extracted from (a). Solid and isolated porevoxels are made transparent in (b). Pores are elongated in thex-direction.

1242 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 11: 3d random walk

This log-log plot of the isolated pore cluster data follows aslope (exponent) of 0.76. This is slightly larger than 2=3 �0:67, the exponent of completely similar 3-D objects. It isuseful to note here the theoretical upper and lower limitsfor sufficiently large clusters in Fig. 12a. For large clustersconsisting of cubic voxels of dimension a, the upper limitis given by

S ¼4

aV as V ! 1 ð11Þ

where S and V are the surface area and volume of the porecluster, respectively. The 3-D shape of the pore cluster forthe upper limit is not unique; an example is shown inFig. 12b. This is a fine pipe network characterized by thecross-sectional area of each pipe being as small as a2. Onthe other hand, the 3-D 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, thesurface of a sphere is not smooth but blocky (Fig. 12b). Thisrough surface yields an inevitable overestimation of theðS=VÞpore value15) and the overestimation factor, 1.5, wasconsidered in Eq. (12). The data points for the lava samplefall within the theoretical upper (S / V1) and lower(S / V2=3) limits, suggesting that cluster labeling was per-formed in a reliable manner.

A detailed analysis of the Clabel.nb output revealed thatthere are two types of isolated pore clusters in Figs. 13b,14a, and Table 2. The first type is pore clusters completelyembedded within the 2563 image system. The number ofclusters of this type was 784 and the total volume was24,347 voxels. Figure 13b depicts these pores, which aresmall sub-spherical vesicles probably formed during degass-ing from a cooling magma. The second type is pore clustersthat reached the surface of the 2563 image system. The num-ber of clusters of this type was 138 and the total volume was22,664 voxels. Figure 14a includes examples of the isolatedpore clusters that are connected to the surface of the 2563

image system. This suggests that, if a larger ROI (e.g.,5123 voxels) was employed, some of the 138 clusters wouldpossibly be judged to be connected to the percolated clus-ter.12)

Although the program Kai3D.m15) cannot export the la-beled 3-D images, it can output the volume and surface areaof each pore cluster. Thus, Kai3D.m was applied to the same3-D data set of the Niijima sample to check the performance

of Clabel.nb. The results (the volume and surface area ofeach cluster) by Kai3D.m were completely identical to thoseby Clabel.nb of Fig. 12a, demonstrating that Clabel.nb wasprogrammed correctly.

Because of the large porosity and high pore connectivity(Fig. 14), the percolated pore occupies a significant portionof the ROI, implying a small tortuosity. Figure 14 alsoshows a pore anisotropy that indicates that the pores aresomewhat oblate (compressed in the y-direction), suggestinga relatively large tortuosity in the y-direction. These pointswere confirmed quantitatively by the random walk simula-tions described below.

Before running Rwalk.nb, pre-processing withpre Rwalk csv.nb was performed to import the labeled CTimages of Fig. 14a in a CSV format and to export an internalbinary format file, NT.mx. The CPU time required was 1minfor the PC used. Then, the main program, Rwalk.nb, was runby importing NT.mx to output the mean-square displace-ment (text files) and 3-D trajectories (on the PC display).The number of the walkers was 10,000 and the maximumtime step was 400,000 for the tortuosity estimation. Thewalkers should travel a sufficiently long distance to probethe tortuosity according to Eq. (4). This condition is satisfiedif the walkers travel a distance larger than the characteristicpore size. Because the pore size is typically 30 voxels(Fig. 13), the root-mean-square 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 muchlarger than 30 voxels. The CPU time required was 15 hoursfor the PC used. If the vectorization technique mentionedabove was not used, the time increased to 34 hours. An ex-ample of a long-distance random walk is shown in Fig. 15.The 3-D system size indicated by the wire frame in the figurewas expanded 3� 3� 3 times the original 2563 image sys-tem by the mirror operation described in Fig. 8b. It is evi-dent that the walkers leached out of the original systemand traveled a long distance much larger than the character-istic pore size of 30 voxels. Therefore, the simulation iscompletely under the restricted diffusion regime (Fig. 7)for which the tortuosity can be calculated using Eq. (4).

The mean-square displacement of 10,000 walkers isshown in Fig. 16. Equations (2), (4), and (10) become sim-ple if a is unity (dimensionless). Thus, a ¼ 1 was assumed inthe figure, yielding a dimensionless mean-square displace-ment. A random walk in the free space without solids wasalso performed and plotted. The fitted slopes are 0.334,0.334, 0.335, and 1.003 for hx2i, hy2i, hz2i, and hr2i, respec-tively. These agree well with theoretical predictions, namely,

Table 2 Results of cluster-labeling analysis of pore voxels in the 3-D 2563 system of Fig. 14a

Color of voxels Number of pore clusters Number of voxels Total surface area� (mm2)

Percolated pore Yellow 1 11,507,114 683Isolated pores Purple 922 47,011 15Solid Green — 5,223,091 —

Total 923 2563 698

�The definition A of Fig. 5 was employed.

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1243

VOL. 44, NO. 9, SEPTEMBER 2007

Page 12: 3d random walk

(a)

(b)

Fig. 15 Example of a 3-D trajectory of a single random walk trialthrough the percolated pore space in the Niijima lava samplewith the boundary condition of Fig. 8b. The total time step is400,000. The initial (� ¼ 0) and final (� ¼ 400;000) positionsof the walker are marked by open circles. (a) Projected trajectory.(b) Bird’s-eye-view trajectory.

0

50000

100000

150000

0 100000 200000 300000 400000

<x2> percolated pore

<y2> percolated pore

<z2> percolated pore

<x2> free space

<y2> free space

<z2> free space

dim

ensi

onle

ss m

ean-

squa

re d

ispl

acem

ent

τ(a)

0

100000

200000

300000

400000

0 100000 200000 300000 400000

<r2> percolated pore

<r2> free space

dim

ensi

onle

ss m

ean-

squa

re d

ispl

acem

ent

τ(b)

Fig. 16 Dimensionless mean-square displacement of randomwalks in the Niijima percolated pore cluster averaged over10,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, hx2i, hy2i,and hz2i calculated by Eqs. (7) to (9). The quantities, hx2i, hy2i,and hz2i in free space are indistinguishable, giving a commonslope value of �1=3. (b) Dimensionless mean-square displace-ment, hr2i, calculated by Eq. (1).

1244 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 13: 3d random walk

1/3 and 1 (see Eqs. (2) and (10)), suggesting that the simu-lation performed reliably. The fitted slopes for the randomwalk in the percolated pore cluster in the lava sample are

0.152, 0.114, 0.177, and 0.442 for hx2i, hy2i, hz2i, and hr2i,respectively. Therefore, the tortuosity averaged over all di-rections is 1=0:442 � 2:3. This value is significantly smallerthan that of the typical sedimentary rocks12,22,33) probablydue to the large porosity and high pore connectivity ofthe 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 z-directions, respectively. The results indi-cate that the pore structure is most tortuous in the y-direc-tion. This is consistent with the oblate pore structure ofFig. 14a. Similar diffusion anisotropy has been observedfor rhyolitic lava by the conventional laboratory diffusionexperiments,21) suggesting that the Rwalk.nb simulation per-formed reliably.

A Rwalk.nb simulation for a very short travel distance wasperformed to estimate the surface-to-volume ratio of the per-colated pore. The number of the walkers was 50,000 and themaximum time step was 5,000. The root-mean-square dis-placement should be smaller than the characteristic pore sizeof 30 voxels to calculate the surface-to-volume ratio (Fig. 7).The maximum time step, 5,000, was chosen to allow thewalkers to travel a distance as short as 30 voxels. Accordingto the algorithm of Rwalk.nb, the start position of the 50,000walkers was chosen randomly from among the percolatedpore clusters consisting of 11,507,114 voxels. Thus, it shouldbe noted that the calculated mean-square displacement andderived ðS=VÞpore are quantities averaged over the whole im-age system of 2563 voxels. This is essential for the quantita-tive comparison of the ðS=VÞpore value by Eq. (6) and that byClabel.nb (Table 2 and Fig. 12a) which was obtained by thepore-connectivity scan of the whole image system. TheNT.mx file used for the long-distance random walk ofFigs. 15 and 16 was used again for this short-distance ran-dom walk. The CPU time required was 55min for the PCused.

The obtained dimensionless mean-square displacement,assuming a ¼ 1, is shown in Fig. 17a; a convex mean-square displacement curve can be seen. This is evidencefor a transition from the unrestricted diffusion regime tothe restricted diffusion regime as described in Fig. 7. The di-mensionless mean-square displacement is mostly less than1,000 and, thus, the root-mean-square displacement is small-er than 30 voxels, satisfying the short-distance random walkcondition of Fig. 7. Figure 17a shows that hx2i � hy2i � hz2ifor � 1;000, ensuring that Eq. (6), which was developedfor the isotropic porous media, is applicable to the anisotrop-ic lava sample if � 1;000. Equation (6) was fitted to thenormalized hr2i data to obtain ðS=VÞpore ¼ 1:70� 104 m�1

(Fig. 17b). The modified periodic boundary condition withthe mirror operation (Fig. 8b) adopted for Rwalk.nb suggeststhat definition A in the caption of Fig. 5 should be used forthe calculation of ðS=VÞpore. According to the results ofClabel.nb (Table 2 and Fig. 12a), ðS=VÞpore for definitionA is 1:69� 104 m�1, nearly equal to 1:70� 104 m�1. Thisgood agreement supports the reliability of (1) the perform-ance of Clabel.nb and Rwalk.nb programs and also (2) themethodology of the surface-to-volume ratio estimation bydiffusometry and cluster labeling.

0

500

1000

1500

2000

2500

3000

0 1000 2000 3000 4000 5000

<x2>

<y2>

<z2>

<r2>

dim

ensi

onle

ss m

ean-

squa

re d

ispl

acem

ent

τ(a)

0.6

0.7

0.8

0.9

1

0 200 400 600 800 1000

<r2 >/

<r2 > fr

ee

τ

simulation data

Equation (6)

(b)

Fig. 17 Very early time stage of a random walk in the Niijimapercolated pore cluster. (a) Dimensionless mean-square displace-ment averaged over 50,000 walkers. Note that hx2i � hy2i � hz2ifor � 1000. (b) Mean-square displacement, hr2i, of (a) normal-ized by hr2ifree ¼ a2� (solid curve). A dotted curve, Eq. (6), wasfitted to the data points for � 1000 to obtain ðS=VÞpore ¼1:70� 104 m�1.

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1245

VOL. 44, NO. 9, SEPTEMBER 2007

Page 14: 3d random walk

IV. Conclusions

We have developed three original Mathematica� pro-grams for the analysis of the 3-D pore connectivity and tor-tuosity of anisotropic porous rocks. These programs weresuccessfully applied to the conventional micro-focus X-rayCT images of a rhyolitic lava sample having the anisotropicpore structure with 15.2 mm voxel dimension. The use ofmore advanced CT apparatus systems will allow a widerrange of porous samples to be analyzed. For example, a su-per high-resolution synchrotron-based microtomographicsystem with sub-micrometer voxel dimensions is being de-veloped,37) with which it will be possible to probe the porestructure of fine-grained bentonite38–41) by X-ray CT. Ourprograms run on the Mathematica� version 5.2 installed inthe various operating systems (Windows, Macintosh, Unix,and Linux). Three-dimensional pore images obtained by nu-clear magnetic resonance imaging34,35) and neutron CT36)

(not X-ray CT images) are also acceptable. Thus, our pro-grams will be useful for a microscopic approach using the3-D pore images for diverse studies on the transport ofgroundwater and contaminants through the natural and arti-ficial barriers at radioactive waste disposal sites.

Acknowledgements

The authors are grateful to Dr. T. Nakano for pre-process-ing the raw CT images used in this study and also wish tothank others who provided helpful comments during thepreparation of this paper. The financial support was providedby the Budget for Nuclear Research, Ministry of Education,Culture, Sports, Science and Technology of Japan withscreening and counseling provided by the Atomic EnergyCommission.

References

1) Japan Nuclear Cycle Development Institute, ‘‘Second ProgressReport on Research and Development for the Geological Dis-posal of HLW in Japan H12: Project to Establish the Scientificand Technical Basis for HLW Disposal in Japan, SupportingReport 2 Repository Design and Engineering Technology,’’JNC Technical Report, JNC TN1410 2000-003 (2000).

2) Japan Nuclear Cycle Development Institute, ‘‘Second ProgressReport on Research and Development for the Geological Dis-posal of HLW in Japan H12: Project to Establish the Scientificand Technical Basis for HLW Disposal in Japan, SupportingReport 3 Safety Assessment of the Geological Disposal Sys-tem,’’ JNC Technical Report, JNC TN1410 2000-004 (2000).

3) J. H. Schon, Physical Properties of Rocks: Fundamentals andPrinciples of Petrophysics, Pergamon, Amsterdam, 583(2004).

4) D. L. Turcotte, Fractals and Chaos in Geology and Geophy-sics, Cambridge Univ. Press, Cambridge, 231 (1993).

5) Y. Gueguen, V. Palciauskas, Introduction to the Physics ofRocks, Princeton University Press, Princeton, 294 (1994).

6) D. Wildenschild, J. W. Hopmans, C. M. P. Vaz, et al., ‘‘UsingX-ray computed tomography in hydrology: systems, resolu-tions, and limitations,’’ J. Hydrol., 267, 285 (2002).

7) R. A. Ketcham, G. J. Iturrino, ‘‘Nondestructive high-resolutionvisualization and measurement of anisotropic effective poros-

ity in complex lithologies using high-resolution X-ray comput-ed tomography,’’ J. Hydrol., 302, 92 (2005).

8) P. Spanne, J. F. Thovert, C. J. Jacquin, et al., ‘‘Synchrotroncomputed microtomography of porous media: Topology andtransports,’’ Phys. Rev. Lett., 73, 2001 (1994).

9) L. M. Schwartz, F. Auzerais, J. Dunsmuir, et al., ‘‘Transportand diffusion in three-dimensional composite media,’’ PhysicaA, 207, 28 (1994).

10) N. S. Martys, H. D. Chen, ‘‘Simulation of multicomponent flu-ids in complex three-dimensional geometries by the latticeBoltzmann method,’’ Phys. Rev. E, 53, 743 (1996).

11) F. M. Auzerais, J. Dunsmuir, B. B. Ferreol, et al., ‘‘Transportin sandstone: A study based on three dimensional microtomog-raphy,’’ Geophys. Res. Lett., 23, 705 (1996).

12) Y. Nakashima, T. Nakano, K. Nakamura, et al., ‘‘Three-di-mensional diffusion of non-sorbing species in porous sand-stone: Computer simulation based on X-ray microtomographyusing synchrotron radiation,’’ J. Contam. Hydrol., 74, 253(2004).

13) Y. Nakashima, T. Yamaguchi, ‘‘DMAP.m: A Mathematicaprogram for three-dimensional 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: Three-dimensionalrandom walk program for the calculation of the diffusivitiesin porous media,’’ Comp. Geosci., 28, 583 (2002).

15) Y. Nakashima, Y. Watanabe, ‘‘Estimate of transport propertiesof porous media by micro-focus X-ray computed tomographyand random walk simulation,’’ Water Resour. Res., 38, articlenumber 1272, DOI number 10.1029/2001WR000937, (2002).

16) Y. Nakashima, T. Kikuchi, ‘‘Estimation of the apertures of wa-ter-saturated fractures by nuclear magnetic resonance well log-ging,’’ Geophys. Prospect., 55, 235 (2007).

17) O. G. Duliu, ‘‘Computer axial tomography in geosciences: Anoverview,’’ Earth-Sci. Rev., 48, 265 (1999).

18) D. Stauffer, A. Aharony, Introduction to Percolation Theory,Revised 2nd Edition, Taylor & Francis, London, 192 (1994).

19) S. Ikeda, T. Nakano, Y. Nakashima, ‘‘Three-dimensional studyon the interconnection and shape of crystals in a graphic gran-ite by X-ray 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, ‘‘Diffusivity anisotropy in arhyolite and its relation to pore structure,’’ Eng. Geol., 80,328 (2005).

22) L. L. Latour, R. L. Kleinberg, P. P. Mitra, et al., ‘‘Pore-sizedistributions and tortuosity in heterogeneous porous media,’’J. Magn. Reson., A 112, 83 (1995).

23) P. P. Mitra, P. N. Sen, L. M. Schwartz, ‘‘Short-time behaviorof the diffusion coefficient as a geometrical probe of porousmedia,’’ Phys. Rev. B, 47, 8565 (1993).

24) L. L. Latour, P. P. Mitra, R. L. Kleinberg, et al., ‘‘Time-de-pendent diffusion coefficient of fluids in porous media as aprobe of surface-to-volume ratio,’’ J. Magn. Reson., A 101,342 (1993).

25) K.-J. Dunn, D. J. Bergman, G. A. Latorraca, Nuclear MagneticResonance Petrophysical and Logging Applications, Perga-mon, Amsterdam, 293 (2002).

26) Y. Nakashima, T. Yamaguchi, ‘‘Original free Mathematicaprograms for the calculation of transport properties of porousmedia,’’ In: X-ray CT for Geomaterials; Soils, Concrete,

1246 Y. NAKASHIMA and S. KAMIYA

JOURNAL OF NUCLEAR SCIENCE AND TECHNOLOGY

Page 15: 3d random walk

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. Pfleiderer, H. C. Halls, ‘‘Magnetic susceptibility anisotropyof rocks saturated with ferrofluid: A new method to study porefabric,’’ Phys. Earth Planet. Inter., 65, 158 (1990).

29) S. Siegesmund, H. Kern, A. Vollbrecht, ‘‘The effect of orient-ed microcracks on seismic velocities in an ultramylonite,’’Tectonophys., 186, 241 (1991).

30) H. Durrast, S. Siegesmund, ‘‘Correlation between rock fabricsand physical properties of carbonate reservoir rocks,’’ Int. J.Earth Sci., 88, 392 (1999).

31) S. Capuani, C. Rossi, M. Alesiani, et al., ‘‘Diffusion tensorimaging 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 sheetmap scale 1:50 000, Geological Survey of Japan [in Japanesewith English abstract] (1987).

33) S. Nakashima, ‘‘Diffusivity 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 microscopyof two-phase fluid systems in porous rock,’’ Magn. Reson.Imaging, 14, 869 (1996).

35) M. Yamaguchi, K. Kobori, K. Suzuki, et al., ‘‘Imaging ofwater distribution in thermally fractured granites by SPRITE,’’Magn. Reson. Imaging, 23, 325 (2005).

36) B. Winkler, K. Knorr, A. Kahle, et al., ‘‘Neutron imaging andneutron tomography as non-destructive tools to study bulk-rock samples,’’ Euro. J. Mineral., 14, 349 (2002).

37) H. Yasuda, I. Ohnaka, S. Fujimoto, et al., ‘‘Fabrication ofaligned pores in aluminum by electrochemical dissolution ofmonotectic alloys solidified under a magnetic field,’’ Scr.Mater., 54, 527 (2006).

38) T. Kozaki, S. Suzuki, N. Kozai, et al., ‘‘Observation of micro-structures of compacted bentonite by microfocus X-ray com-puterized tomography (micro-CT),’’ J. Nucl. Sci. Technol.,38, 697 (2001).

39) Y. Nakashima, ‘‘Diffusivity measurement of heavy ions inWyoming montmorillonite gels by X-ray computed tomogra-phy,’’ J. Contam. Hydrol., 61, 147 (2003).

40) S. Suzuki, H. Sato, T. Ishidera, et al., ‘‘Study on anisotropy ofeffective diffusion coefficient and activation energy for deuter-ated water in compacted sodium bentonite,’’ J. Contam. Hy-drol., 68, 23 (2004).

41) Y. Nakashima, ‘‘H2O self-diffusion coefficient of water-richMX-80 bentonite gels,’’ Clay Miner., 41, 659 (2006).

42) R. A. Ketcham, W. D. Carlson, ‘‘Acquisition, optimization andinterpretation of X-ray computed tomographic imagery: appli-cations to the geosciences,’’ Comp. Geosci., 27, 381 (2001).

Mathematica Programs for the Analysis of Three-Dimensional Pore Connectivity and Anisotropic Tortuosity 1247

VOL. 44, NO. 9, SEPTEMBER 2007