TauFactor: An open-source application for calculating tortuosity factors from tomographic data

TauFactor is a MatLab application for eﬃciently calculating the tortuosity factor, as well as volume fractions, surface areas and triple phase boundary densities, from image based microstructural data. The tortuosity factor quantiﬁes the apparent decrease in diﬀusive transport resulting from convo-lutions of the ﬂow paths through porous media. TauFactor was originally developed to improve the understanding of electrode microstructures for batteries and fuel cells; however, the tortuosity factor has been of interest to a wide range of disciplines for over a century, including geoscience, biology and optics. It is still common practice to use correlations, such as that developed by Bruggeman, to approximate the tortuosity factor, but in recent years the increasing availability of 3D imaging techniques has spurred interest in calculating this quantity more directly. This tool provides a fast and accurate computational platform applicable to the big datasets ( > 10 8 voxels) typical of modern tomography, without requiring high computational power.


Introduction
The effect of geometry on transport in heterogeneous media has been the 3 focus of a great deal of academic research for well over a century, across a 4 wide range of academic disciplines; from the flow of water through porous where ε is the volume fraction of the conductive phase; D is the intrin- why path length type analysis alone, such as in [12,13], can only be related to 38 the tortuosity factor in simple capillary geometries and so cannot be reliably 39 used to quantify transport in complex pore networks [14]. 40 Over the past decade, high resolution 3D tomographic imaging has be-41 come widely available, which has created the opportunity for the tortu-42 osity factor to be quantified directly from microstructure using simulation 43 [15,16,17,18,19 Figure 1: Illustration of the workflow (l-r) from tomography derived greyscale data, through to a segmented 2-phase volume and finally the result of a diffusion simulation performed using TauFactor, highlighting regions of high flux density in red.
This segmented data can then either be employed directly in a simulation 55 or used to generate surface and volume meshes. Figure 1  The tortuosity factor can be obtained from simulation by comparison of 66 the steady-state diffusive flow through a pore network, F p , to that through 67 a fully dense control volume of the same size, diffusivity and potential differ- Where D is the diffusivity of the conductive phase; C is the local concen-70 tration of the diffusing species; and A cv and L cv are the cross-sectional area 71 and length of the control volume respectively. Taking the ratio of these two 72 expressions and rearranging yields a definition equivalent to that in eq. 1.
where n is the outward pointing unit normal to Ω.

89
It is important to note that for diffusive scenarios, a statistical continuum, 90 as well as a physical continuum, can be modelled. This means that the gov-91 erning expression would hold even for a single diffusing particle. This can be 92 best understood from the "random walker" derivation of the diffusion equa-93 tion, where the progress of individual particles is followed, each independent 94 of the others, as detailed in [17]. In order to efficiently enforce the Dirichlet boundaries at the surface of the 105 boundary voxels, as specified in sys. 4, the ghost node concept is employed.

106
For example, to find the concentration at node e of the simple 2D geometry 107 shown in fig. 2, we first set the node's value to be the mean of its conductive 108 face-adjacent neighbours.
Then, in order to impose the boundary at the interface between e andŷ, 110 the following must also be true.
Substituting eq. 6 into eq. 5 and rearranging yields, Crucially, the ghost node,ŷ does not appear in this final expression,  .

133
The following pseudocode shows the structure of the program that is 134 called when the Tortuosity button is pressed in the GUI.

196
The fourth method is similar to the third, except that the study starts from 197 the base of the volume rather than the top.

198
The report shown in fig. 6   It is worth noting that using the faces and edges of the cuboid voxels to 216 approximate the true surface area and TPB density of a real microstructure 217 is likely to be a source of significant error. However, whether this approach will under-or overestimate the truth will depend on the nature of the sample 219 being imaged and the resolution of the imaging technique. Fig. 7 shows three 220 noteworthy scenarios in which spheres are represented by cubic voxels, under 221 the assumption of "perfect tomography" (i.e. voxels containing ≥ 0.5 of a 222 phase are modelled as a voxel entirely made from that phase).

223
The first scenario shows the limiting case where a single spherical particle  Figure 7: Illustration of the potential estimation errors caused by cuboid voxel representations. In each case, "perfect tomography" is assumed, such that voxels containing ≥ 0.5 of a phase are modelled as a voxel entirely made from that phase.
The final key feature of TauFactor is that it allows for the user to specify where C i is the concentration after iteration i and once again subscripts 250 represent the location of a node, relative to that being evaluated.  The study found that calculated tortuosity factors varied not just between 262 different theoretical frameworks (such as distance mapping as a proxy for 263 diffusion), but also between nominally identical diffusive simulations.

272
The key impact that TauFactor