Modeling mass transfer in fracture flows with the time domain-random walk method
Full text
This is a self-archived version of an original article. This version may differ from the original in pagination and typographic details. Author(s): Title: Year: Version: Copyright: Rights: Rights url: Please cite the original version: CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ Modeling mass transfer in fracture flows with the time domain-random walk method © The Authors 2019 Published version Kuva, Jukka; Voutilainen, Mikko; Mattila, Keijo Kuva, J., Voutilainen, M., & Mattila, K. (2019). Modeling mass transfer in fracture flows with the time domain-random walk method. Computational Geosciences, 23(5), 953-967. https://doi.org/10.1007/s10596-019-09852-5 2019
https://doi.org/10.1007/s10596-019-09852-5 ORIGINAL PAPER Modeling mass transfer in fracture flows with the time domain-random walk method J. Kuva1·M. Voutilainen2·K. Mattila3,4 Received: 2 May 2018 / Accepted: 21 June 2019 ©The Author(s) 2019 Abstract The time domain-random walk method was developed further for simulating mass transfer in fracture flows together with matrix diffusion in surrounding porous media. Specifically, a time domain-random walk scheme was developed for numerically approximating solutions of the advection-diffusion equation when the diffusion coefficient exhibits significant spatial variation or even discontinuities. The proposed scheme relies on second-order accurate, central-difference approximations of the advective and diffusive fluxes. The scheme was verified by comparing simulated results against analytical solutions in flow configurations involving a rectangular channel connected on one side with a porous matrix. Simulations with several flow rates, diffusion coefficients, and matrix porosities indicate good agreement between the numerical approximations and analytical solutions. Keywords Matrix diffusion ·Advection ·Porous media ·Solute transport ·Breakthrough curve ·Simulation 1 Introduction Intracellular motion of biomolecules, propagation of contaminants, plant nutrients in soils, and migration of radionuclides within a geosphere are some examples of phenomena involving particle transport due to advection and diffusion. The related modeling tasks vary in difficulty from nearly trivial to particularly challenging. When the transport occurs in simple domains and involves constant transport parameters, strictly analytical modeling is possible. However, only a handful of more complex cases allow purely analytical treatment; beyond these cases, computational modeling is necessary. J. Kuva jukka.kuv[email protected] M. Voutilainen ma.v[email protected] 1Geological Survey of Finland, Espoo, Finland 2Department of Chemistry, University of Helsinki, Helsinki, Finland 3Department of Physics, University of Jyv¨ askyl¨ a, Jyv¨ askyl¨ a, Finland 4Laboratory of Physics, Tampere University of Technology, Tampere, Finland Here, we focus on the computational modeling of mass transfer in fracture flows complemented with matrix diffusion [3,12,27]. The overall transport can be illustrated as follows: (1) solute (pulse) is released into the fracture where it is transported by advection and diffusion; (2) during propagation along the fracture, a (small) portion of the solute enters the porous media making it effectively a solute reservoir; (3) solute is (slowly) transported by diffusion within the porous media; and (4) solute returns gradually from the porous media back into the fracture, thus completing the cycle (a secondary release occurs). An arbitrary solute particle can undergo steps 2 to 4 multiple times. Thus, when compared with pure fracture flow, the matrix diffusion introduces a retardation effect on the solute transport. Specifically, the solute breakthrough curves now exhibit longer tails. The effect is even more pronounced with sorption onto mineral surfaces inside the porous media or at the fracture perimeters [41]. To provide a specific example, the safety of the final repository for spent nuclear fuel in Finland [33] has driven the development of modeling capabilities for the phenomena described above. Modeling mass transfer in fracture flows together with matrix diffusion is challenging because of the multiple temporal and spatial scales inherently present in the phenomena. Specifically, these include fast transport in fractures alongside slow transport inside the porous media, in this case rock. Alternatively, fractures with a relatively Computational Geosciences (2019) 23:953–967 / Published online: 9 July 2019
large diameter, possibly constituting a complex networktype flow system, are in contact with much smaller pores thus forming highly tortuous transport pathways through the rock. The challenge remains even with the common simplification where the flow field responsible for advection is assumed to be independent of the solute concentration and, moreover, fully developed prior to the initial release. Although modeling can be aided by simplified laboratory and in situ experiments [20,50,51], which on occasion can be treated analytically [17,18, 43,48], in reality the fractures or flow channels are complex and the surrounding rock is typically heterogeneous. While these more realistic systems call for computational modeling, such modeling also entails significant challenges. The multiple spatial scales involved generally inflict a large burden even for contemporary computational resources. The standard remedy is to treat the rock as a heterogeneous bulk material with spatially varying transport coefficients, for example, the effective diffusion coefficient or permeability; here, the ab initio approach of modeling rock at the pore scale is abandoned. The usually low rock porosity implies small values for the transport coefficients when compared with the corresponding values in the fracture. Such values may even be several orders of magnitude smaller. The values of the transport coefficients usually have a discontinuity at the interface between the fracture and the surrounding rock. Furthermore, within the rock, there may be significant spatial variation, or even discontinuities, in the transport coefficients due to distinct minerals with sharp interfaces and changes in rock composition or type. Highly heterogeneous transport coefficients with discontinuous can defeat computational methods; in these cases enforcing stable simulations, while accurately tracking the fast dynamics, require refined time resolution, which then implies extremely laborious time evolution for capturing the essential slow dynamics. In recent studies, several alternative means have been developed to overcome the computational challenges discussed above. McDermott et al. [25] proposed a hybrid analytical-numerical modeling method, where the transport in fractures is resolved by numerical means and the matrix diffusion is approximated analytically, thus avoiding the excessively lengthy simulations otherwise necessary. However, resorting to analytical treatment unavoidably introduces further assumptions and simplifications, which limit the scope of the approach. Toivanen et al. [45] adopted the classical random walk method for a purely computational modeling of transport, also with sorption [46]. Here, the solute transport is modeled by tracking tracer particles obeying stochastic dynamics. As the random walk method does not suffer from stability issues in the usual sense, there seems to be more freedom in choosing a convenient time resolution. However, to properly enforce the prescribed stochastic particle dynamics, a rather fine time resolution is still necessary and places a heavy strain on the computational resources. The time domain-random walk (TDRW) method was originally developed for diffusive mass transfer in heterogeneous media with locally known transport coefficients [6,7,24]. In the TDRW method, tracer particles obeying stochastic dynamics are tracked. Specifically, the particles jump between sites of a regular grid, or a lattice, and both the direction and duration of a jump are random variables. Moreover, a local probability is assigned for each jump direction in such a manner that, for example, a jump into a neighboring, low porosity site is less likely than a jump into a higher porosity site. The constant transition time characterizing the standard random walk method is effectively replaced with a variable transition time facilitating, in principle, computationally efficient simulations. One possible difficulty is that to gather sufficient statistics also from the low porosity regions, tracking a relatively larger number of tracer particles may be necessary. This is an aspect highly dependent on the system configuration. It is noteworthy that modern computational hardware relies increasingly on parallel processing; pushing the computational burden into the number of particles thus appears advantageous. The TDRW method has been used to study the effect of centimeter-scale structural heterogeneities on diffusion in various cases [36,37,40,49]. The TDRW method has also been used to model transport in fractured media [28,29] and has been shown to be a powerful tool for analyzing results of in situ and laboratory experiments, especially when initial or boundary conditions are complex [1,15,16,49]. Previously, Dentz et al. [9] modified the TDRW method to include sorption by using specific functions for trapping frequency and number of trapping events. Voutilainen et al. [52] developed this idea further so that the parameter typically measured for rate of sorption (distribution coefficient) can be utilized. Only very recently, the TDRW method was extended to also include advection [13,38]; a first-order accurate upwind (finite-difference) approximation of the advective massflux was proposed. Although this particular approximation provides unconditionally positive jump probabilities (cf. unconditional stability), it is known in the context of finite-difference and finite-volume methods that first-order upwind schemes introduce severe numerical diffusion, especially when simulating configurations involving large concentration gradients. Therefore, simulation of fracture flows together with, for example, tracer pulses would be problematic. As a related matter, the TDRW method can be viewed as a reincarnation of the lattice kinetic Monte Carlo (LKMC) method. There does not appear to be a definite point of Comput Geosci (2019) 23:953–967954
origin for LKMC, but early formulations can be found from Refs. [26]and[4]. Only recently has Flamm et al. [11] extended the LKMC method to include advection; their proposal is essentially the same as that proposed in Refs. [13,38]. Lee and Sinno [22] very recently revisited this scheme and proposed an improvement constructed starting from a microscopic premise. Here, the flux terms are computed using an approximation known as the exponential scheme in the finite-volume context. Based on the literature, the difference between the TDRW and LKMC methods, if any, is that the LKMC method advocates the microscopic perspective, both in development and application of the method, while TDRW similarly favors the macroscopic perspective. Regarding the currently considered transport modeling, similar problems in a larger scale have previously been studied using methods such as discrete fracture network (DFN) modeling [5,10,53], continuous time random walks [2,8,30], and multi-rate mass transfer modeling [14,44]. In general, the large-scale models rely on various mathematical functions with case-dependent parameters that depict the transport in the fractures and interaction of solutes in the fracture and porous matrix. In addition to the TDRW approach, systems with small-scale heterogeneities have also recently been studied with a micro-continuum approach [47] and micro-DFN modeling [42]. In small-scale systems, it is possible to model the interaction of solutes in the fracture and porous matrix explicitly and thus the effects arising from, for example, heterogeneity can be directly observed. Typically, it is challenging to up-scale the results of small-scale approaches to field scale. However, it is possible to validate the mathematical expressions of largescale methods by applying the results from small-scale approaches. A systematic derivation of TDRW schemes is presented, starting from the macroscopic mass-balance equations (a top-down derivation). The advection-diffusion model considered is first established in Section 2. Then, in Section 3, a corresponding, second-order accurate TDRW scheme is derived and proposed. This advance to state- of-the-art is relevant for two reasons. Firstly, the accuracy of the advective and diffusive flux approximations is now of the same order and, secondly, the adopted centraldifference approximation of the advective flux is not prone to numerical diffusion. These advantages are balanced with a disadvantage. Due to utilization of the central-difference approximation, a local condition for the grid P´ eclect number is introduced to ensure strictly positive jump probabilities. Specifically, a restriction on the simulation parameters is imposed (analogous to a stability condition). When this condition is fulfilled, the proposed TDRW scheme provides accurate solutions for advection-diffusion problems as demonstrated in Section 4, where comparisons between numerical and analytical solutions for several benchmark cases are presented. Furthermore, when the condition is fulfilled, the central-difference scheme produces more reliable results than the first-order accurate upwind scheme. Conclusions are presented at the end of this article. 2 Advection-diffusion model The focus in this work is on modeling mass transfer in fracture flows involving matrix-diffusion. To this end, a porous material saturated by a fluid (or solvent) which, in turn, carries tracer (or solute) particles, is considered. The general mass-balance equation serves as the starting point; the (volumetric) solute concentration field cevolves according to ∂tc+∇·jp=0, where jpis the mass-flux of the solute within the pore system. This total mass-flux is then decomposed into contributions due to advection and diffusion. The diffusive part is modeled using jp,d =−Dp∇cp, where cp=c/ is the concentration in the solvent and is the local porosity of the medium (between 0 and 1). In other words, Fick’s first law is applied in porous media and all the remaining complications related to the description of diffusive transport in a confined pore space are incorporated in the diffusion coefficient Dp[34]. Many models have been presented for Dp, perhaps the simplest being Dp=δD τ2D0, where D0is the intrinsic diffusion coefficient for the solute in a pure solvent, the tortuosity τ≥1 includes the effect of complex transport pathways in the pore system while the constrictivity δD<1 considers variation in pore crosssections along those pathways. Together, the tortuosity and constrictivity define a geometric factor, (δD/τ2)<1, which presents a decrease in diffusivity due to the complex pore geometry. However, appropriate models for Dpare still material dependent; that is, a general description for Dp remains to be found and Dpis thus used below without committing to a specific model. The advective part of the mass-flux is modeled using jp,a =vcp, where vrepresents the Darcy velocity expressed in terms of the solvent flow velocity v. Putting all of the above together, one arrives at [21,35] ∂tc=∇·De∇cp−vc,(1) where De=Dpis the effective diffusion coefficient. Note that here the diffusion coefficients are all treated as scalars Comput Geosci (2019) 23:953–967 955
simply for ease of notation; in the general formulation, diffusion coefficients are tensors. A dimensionless form of the model can be written by scaling the related variables using a reference concentration in the solvent c0, characteristic length L, characteristic velocity V, and the intrinsic diffusion coefficient D0: ∂∗ tc∗=∇∗·D∗ e∇∗c∗ p−Pe vc∗.(2) Dynamic similarity is governed by the P´ eclect number, Pe =Td/Ta, i.e., the ratio between characteristic time scale for diffusion, Td=L2/D0, and advection, Ta=L/V ; Eq. 2is obtained with the diffusive scaling t∗=t/Td. Typically in the fracture, where the flow takes place, Ta Td(Pe 1). At the same time in the matrix, where the flow is negligible, TdTa(Pe ∼0). In other words, a particular computational challenge related to Eq. 2,when considering fracture flows involving matrix-diffusion, is the accommodation of discrepancy in Pe between fracture and matrix. Secondly, in heterogeneous materials, the transport parameters, such as De, may vary significantly or may even be discontinuous. This is a fundamental problem for any computational method; the task of finding an acceptable balance between accuracy and lengthy computation times, while avoiding stability issues, can be difficult. 3 Time domain-random walk method Over the years, many approaches have been proposed for the computational modeling of advection-diffusion phenomena. Finite-difference and finite-volume methods can be characterized as the classical approaches. Several alternative methods based on statistical mechanics have also been proposed. For example, a basic random walk method tracks propagation of tracer particles that migrate by jumping at regular intervals: both the length and the direction of a jump are random, but the length depends on the local diffusion coefficient and on the prescribed, regular interval between jumps (aka a constant time step). Tracking the movement of a large collection of these particles reveals their statistical behavior which, when properly simulated, provides an approximate solution for a diffusion equation. That is, the random walk method simulates solute transport by relying on a large number of representative particles each carrying a portion of the solute mass. Advection can be incorporated by including a drift for the jumps. On the other hand, in the TDRW method, an interesting variant for the treatment of space and time variables is adopted; the particles now jump between sites of a regular grid, or a lattice, and the transition time for a jump is a random variable. That is, here the jump length is fixed by the grid spacing, and the random transition time depends instead on the local diffusion coefficients. A transition probability is assigned for each jump between neighboring lattice sites and these probabilities again depend on the local diffusion coefficients. Advection is considered by introducing a bias on the jump probabilities. Derivation of the basic random walk method can be achieved using a bottom-up procedure starting from the Langevin equation. This stochastic differential equation is then integrated in time using the Itˆ o-Taylor scheme that provides the usual evolution equation for the random walker [39]. A correspondence between the Fokker-Planck equation (with a modified drift velocity) is next established to finally connect the method with the advection-diffusion equation. At the same time, a top-down procedure can be used to derive the TDRW method. That is, starting from a given macroscopic balance equation, particular TDRW schemes can be constructed in a reverse-engineering fashion. 3.1 Preparation: semi-discrete finite-volume formulation Here, a TDRW scheme is derived from the advectiondiffusion equation in a systematic manner. To account for heterogeneity, or even discontinuity in the transport coefficients involved, it is convenient to start from an integral formulation of the advection-diffusion equation. Namely, following the finite-volume formalism, a volumeaveraged version of Eq. 1is first written: ∂tC=1 V∇·De∇cp−vcdV=1 V n·De∇cp−vcdA, (3) where Cis the volume-averaged concentration and the divergence or Gauss’s theorem is applied in the last step. This standard transformation of model equation from differential to integral form relies, ultimately, on the Reynolds transport theorem; the reference or control volumes are here assumed constant with respect to time (i.e., a Eulerian frame of reference is employed). The righthand side accounts for the mass-flux over the surface that encloses the reference volume and ndenotes the unit normal vector (pointing in the outward direction). Let us assume a complete representation of the spatial domain by a set of non-overlapping volume elements i. Accordingly, Eq. 3can be expressed in the form ∂tCi=1 Vi jij n·De∇cp−vcdA=−1 Vi j Aij JD ij +JA ij , where the summation is over the neighboring volume elements jsharing an interface ij with iwhile JD ij and JA ij denote surface-averaged mass-flux terms due to diffusion and advection, respectively (Aij is the Comput Geosci (2019) 23:953–967 956
area covered by ij ). To proceed from here, specific approximations for JD ij and JA ij must be adopted. Namely, this is the point of departure for distinct finite-volume schemes and, consequently, for distinct TDRW schemes. Here, only cubic grid (or lattice) representations of the spatial domain are considered. Let r denote the grid spacing which implies Vi≡r3and Aij ≡r2. In addition, all variables related to volumes and surfaces are associated with the centers of cubic cells and square faces, respectively. With these choices, a second-order approximation for the diffusive mass-flux is adopted, that is JD ij =−De,ij r Cj j−Ci i+O(r2), (4) where De,ij is an appropriately defined effective diffusion coefficient at the center of the face ij . For example, when the diffusion coefficient is discontinuous exactly at ij ,the harmonic mean De,ij =2De,iDe,j /(De,i +De,j )provides a second-order approximation. Note that JD ji =−JD ij which ensures mass conservation. A second-order, central approximation is also adopted for the advective mass-flux term: JA ij =n·vij Ci+Cj 2+O(r2). Clearly JA ji =−JA ij . It is well-known that the above secondorder, central-difference approximations here adopted for the diffusive and advective mass-flux terms lead to a stability condition. However, as is later discussed in Section 3.3 and then clearly demonstrated with experiments in Section 4, the emerging second-order accurate TDRW scheme is computationally efficient when considering numerical simulation of fracture flows involving matrixdiffusion despite the stability condition. In summary, the above mass-flux expressions lead to the differential equations dtCi=−BiCi+ j BjiCj,(5) where Bi= j Bij ,B ij =Dp,ij r2+n·vij 2r =D0 r2D∗ p,ij +Pe n·v∗ij 2, (6) together with Dp,ij := De,ij /i,andthegridP ´ eclect number, Pe:= Pe/N, is defined utilizing the spatial resolution parameter N=L/r. As an additional observation, note that with square and cubic lattices (at the center of cell i), jn·vij r =∇·vi+O(r2). Therefore, when considering incompressible fluid flows, where the divergence of the velocity field vanishes, expression for Bisimplifies into Bi=1 r2 j Dp,ij .(7) In any case, the semi-discrete differential equations, Eq. 5together with Eq. 6, provide the final step for the systematic derivation of a TDRW scheme. 3.2 Single-particle dynamics The ultimate goal is to obtain expressions that describe migration of a random walker, specifically the stochastic dynamics of a single particle. Accordingly, let us consider a configuration with the following point source: the solute mass is concentrated at the center of cell iand, moreover, Cj≡0. Then, the solution Ciof Eq. 5is thus given in terms of an exponential function. Namely, for such a configuration, (5) describes exponential decay in the local solute concentration. The exponential decay can be modeled as a Poisson process, where the interval between successive departure events is an independent identically distributed exponential random variable having a mean τi=1/Bi(the variance is τ2 i). Here, the intervals are identified as transition times during which a random walker advances from site ito a neighboring site j. Since the transition times are exponentially distributed, appropriate random numbers can be generated using the inverse transform sampling method: ti→j=−τiln u, (8) where uis a random number from the standard uniform distribution. Note that the transition times are sampled without any consideration to which of the neighbors the random walker will advance next. Based on Eq. 7,when considering incompressible fluid flows, the mean transition time, τi=1/Bi, does not depend on advective transport. The probability of a random walk transition to a particular neighbor is now considered. Note first that the right-hand side of Eq. 5denotes the net flux of mass over the faces of cell i. This net flux is the difference between the mass-fluxes out of and into the cell i. In more detail, Ji→j=rBij Cirepresents the flux of mass from the cell iinto the cell jper unit area and per unit time (the massflux in the reverse direction is similarly given by rBjiCj). From this perspective, it is quite natural to associate the probability of a random walk transition from the site ito a Comput Geosci (2019) 23:953–967 957
neighboring site jwith the corresponding relative mass-flux out of the cell i. Specifically, pi→j=Ji→j jJi→j=τiBij .(9) To summarize, the migration of a tracer particle in the derived TDRW scheme is described by Eqs. 6,8,and9.In detail, the transport of tracer particles can be modeled using the following algorithm. 1. Construct the transition probability matrix according to Eq. 9. Size of the matrix for a cubic grid is sx×sy×sz×sw(here, the number of jump directions per grid site, sw, is assumed constant across the grid). 2. Determine the total number of particles Ntot to be simulated. For each particle, follow the next steps. 3. Randomly select the initial location of a particle from the set of grid sites configured as allowed initial locations. 4. Determine the direction of a jump according to a random number and the transition probability matrix constructed at step 1. Here, sampling of a single random number from the standard uniform distribution is required to determine the jumping direction among the possible directions. 5. Determine the transition time ti→jfor the jump according to Eq. 8. Here, sampling of a single random number from the standard uniform distribution is required. 6. Check if the particle has reached the configured target area. If no, return to step 4. If yes, record the total time elapsed ttot =ti→j. 7. Check if the simulation has been performed for the required number of particles. If no, return to step 3. 3.3 Numerical properties Positive transition probabilities are guaranteed when Bij ≥ 0. Based on Eqs. 6and 9, this means that locally and in each direction, the condition Pe ≤ 2D∗ p,ij |n·v∗|ij (10) must be fulfilled. This condition emerges from the second-order, central-difference approximation adopted for the advective mass-flux term; it is well-known that a similar restriction in central-difference-based finitevolume schemes is required for guaranteeing stability of a simulation. If Eq. 10 is not respected, the behavior of the TDRW scheme is ill-defined and consequently nothing can be expected from the computed results. Thus, to further emphasize this critical aspect, in case (10) is violated, the behavior of the scheme is arbitrary or rather depends on the specific implementation choices; therefore, the computed solutions are not guaranteed to have any relation to the corresponding theoretical solutions of the original modeling equation. The condition in Eq. 10 excludes simulations of mass transfer in pure advection cases. However, as these cases do not belong to the current problem statement, this restriction is here dismissed. Furthermore, the condition is always fulfilled in pure diffusion regions (a typical scenario, for example, in the porous media surrounding the fracture). Therefore, here the condition matters in the fracture, or flow channels, and must be respected by tuning the simulation parameters appropriately. Often, the fracture presents a totally open flow domain (that is =1, implying D∗ p,ij = 1). If one further assumes that the flow field (in reduced units) is set up such that |n·v∗|ij ≤1 holds everywhere, the condition for guaranteeing positive transition probabilities is simply Pe ≤2. Recently, a simulation of advection-diffusion phenomena with the TDRW method was proposed based on an upwind finite-difference approximation of the advective mass-flux [13,31,38]; this was essentially the same approximation proposed by Flamm et al. [11] as an extension to the LKMC method. With the current notation, the corresponding upwind finite-volume approximation leads to Bij =Dp,ij r2+1 r maxn·vij ,0. Clearly, this expression would provide unconditionally positive probabilities. However, it is known that the first-order accurate upwind schemes introduce severe numerical diffusion especially when simulating configurations involving large concentration gradients. Therefore, simulation of mass transfer in fracture flows together with, for example, release of tracer pulses into complex flow channels would be problematic. In fact, this presents the main motivation for the second-order, central-difference-based TDRW scheme proposed here. Very recently and for the same reasons, Lee and Sinno [22] suggested an improved treatment of advective fluxes in the LKMC method. Specifically, they chose to employ an approximation, known as the exponential scheme in the finite-volume context, which suffers less from the numerical diffusion but is not guaranteed to provide second-order accuracy in general. It is also important to note that in the TDRW method, there is no independent control of the time resolution. Namely, there is no discrete time step degree of freedom contrary to many other computational methods. To clarify, let us consider the incompressible fluid flow case. The local mean transition time defined by Eq. 7implies τi∼r2/D0=Td/N2. That is, the mean transition time, an analogue to a discrete time step, is controlled by the intrinsic diffusion Comput Geosci (2019) 23:953–967 958
coefficient and the grid spacing, evidently representing a diffusive scaling of the time resolution. In the case of pure diffusion, the value of D0automatically adjusts the mean transition time but does not affect the transition probabilities. Hence, the number of particle jumps required to travel a given distance remains constant (assuming a given lattice, namely r is not altered). Accordingly, in this simplistic setup, simulations with different D0 are computationally equally demanding, thus reflecting the constant jump length determined by a fixed r. It is then instructive to compare the situation with the standard random walk method where maintaining a constant jump length requires explicitly tuning the discrete time step simulation parameter. When the diffusion coefficient exhibits significant spatial variation, this difference can be of considerable relevance. Furthermore, let us consider a problem scenario where Peis fixed, alongside Land geometrical features in general, but Vand D0remain free for tuning a computationally favorable simulation. Based on Eqs. 6and 9and since the ratio V/D 0is now fixed, the bias in local transition probabilities towards the flow direction can be controlled only via the grid spacing (the bias is directly proportional to r,or1/N). A smaller bias means that the propagation of a tracer particle is more erratic; it is thus likely that more particle jumps are needed to travel a given distance along a flow path. Therefore, to summarize the above, the computational resources needed to execute a simulation with the TDRW method are heavily dependent on the spatial resolution or grid spacing. Finally, just increasing the number of tracer particles per simulation cannot be used to achieve an arbitrary accuracy in computed solutions with a fixed grid spacing. That is, the limitations set by a given grid spacing cannot be avoided, and the particle count is primarily used for controlling fluctuations in the simulated results; projection and filtering techniques can also be used for suppressing fluctuations (see for example Ref. [39]and references therein). Fortunately, due to the statistical nature of the method, raising the particle count is a task ideally suited for parallel processing increasingly relied upon by modern computational resources. Moreover, the number of tracer particles can be increased on demand, that is, a proper particle count does not need to be known a priori to successfully execute a simulation. This feature facilitates a frugal usage of computational resources. This also further distinguishes the TDRW method from classical computational methods (such as the FD and FV methods), for which an analogous control option is not available. The power of the presented top-down derivation of TDRW schemes, in contrast to a bottom-up derivation (relying on a microscopic particle perspective), is that the whole numerical machinery already developed, for example, for the corresponding finite-volume schemes, are directly available for exploitation. For example, the current grid P´ eclect number limitation could perhaps be relieved by developing a TDRW scheme based on an appropriate total variation diminishing scheme, a topic left for further investigation. Moreover, when a TDRW scheme is derived based on a finite-volume formalism, particles can jump to any of the neighboring sites (i.e., to the centers of the neighboring cells). To keep the treatment accessible, we derived above a TDRW scheme for cubic grids where the particles always jump along the Cartesian coordinate directions. In general, however, each cell has a specific set of possible jump directions and this set depends on the neighboring cell configuration (i.e., on the spatial discretization of simulation domain with finite volumes). Thus, an analysis focusing on how the (cell-dependent) set of possible jump directions influence numerical properties of a TDRW scheme becomes a relevant research topic. As a related matter, utilizing isotropic approximations of differential operators [23,32] in the derivation of TDRW schemes is another possible future direction for development. Finally, Noetinger et al. [31] attempted to connect the TDRW method with the continuous time-random walk method. This connection, its theoretical foundations, and the possible prospects it introduces also deserve further investigation. 4 Numerical experiments The constructed TDRW scheme was validated below by comparing numerical results against analytical solutions. The proposed second-order accurate, central-difference scheme was also compared with the first-order accurate upwind scheme in one simple flow configuration. The benchmark systems considered involve a rectangular flow channel connected with a porous matrix on one side of the flow channel (in the simplest cases, porosity is zero). At the beginning of the simulations, the particles were released from a single plane in the flow channel and caught in another plane at the end of the channel. The channel was also extended backwards from the particle release plane to allow unrestricted, diffusive spreading of the solute pulse. Figure 1shows a schematic of the benchmark system used. In case of =0 (that is without the porous matrix), all simulations considered below are performed in a flow channel of length (Lx) 1000 mm, height (a) 20 mm, width (Lz) 100 mm, and using voxel size (r) of 1 mm. In the case of permeable porous matrix (that is >0), the simulation setups remain the same, except that the channel width is halved (Lz=50 mm) to save computer memory and the porous matrix height (Ly) is 100 mm. On a HP Z840 workstation (256 GB of memory, 2 INTEL Core i7-6900K Comput Geosci (2019) 23:953–967 959
Fig. 1 A schematic of the geometry used for verification simulations. The flow channel (advection velocity v, diffusion coefficient D0, length Lx, height a, width Lz) is shown in light blue and the porous matrix (porosity , effective diffusion coefficient De, height Ly)isin contact with one side of the flow channel. The particle release and target areas are shown in red and green, respectively (arrows mark direction of the flow) processors with 32 threads in total), our naive, unoptimized MATLAB implementation ran for 8.0×10−5and 3.2×10−3 s per particle in a rectangular channel without porous matrix and with flow velocities of 1×10−6m/sand5×10−8m/s, respectively. The porous matrix increased the calculation time by approximately 10%. 4.1 Flow in a rectangular channel The simplest simulations are first performed using a constant uniform flow velocity in a rectangular channel with impermeable walls on all sides. The aim is to verify that diffusion spreads the pulse correctly and that the mean breakthrough time is correct. In this case, the analytical solution for the breakthrough curve at the end of the flow channel is [18] C(τt)=1 μπτ3 t exp−1 4μ2τt+1 τt−2,(11) where τt=tQ/Vc,tis the time, Qis the flow rate in the channel, Vcis the flow channel volume, μ= √D0/Lxv,D0is the intrinsic diffusion coefficient in the solvent, Lxis the length of the flow channel, and vis the flow velocity in the channel. The simulations were performed using 5 ×106particles, and two values for the intrinsic diffusion coefficient, 2 ×10−9m2/s(∼water) and 2 ×10−8m2/s; the flow velocities used ranged from 5×10−8m/sto1×10−6m/s which is close to the upper limit defined by Eq. 10,whenD0=2×10−9m2/s. The resulting breakthrough curves, shown in Fig. 2,werein close accordance with the curves produced by the analytical solutions with the same parameters. The simulation results are presented as time-dependent particle fluxes through target area (fluxes normalized using the total number of particles). Continuing with the same flow configuration, the proposed second-order accurate, central-difference scheme was then compared with the first-order accurate upwind scheme. To this end, breakthrough curves with D0=2× 10−9m2/s, 5 ×106particles, and flow velocities from 5×10−6to 1 ×10−8m/s are shown in Fig. 3. Furthermore, the Euclidian norm (2) of the relative error was determined Fig. 2 Simulated results using the proposed TDRW scheme in a rectangular flow channel with impermeable walls, four values for the constant flow velocity (v), and two values for the intrinsic diffusion coefficient (D0). Solid lines present the corresponding analytical solutions, Eq. 11. The results are reported as particle flux through target area and are normalized using the total number of particles 106107108109 10−11 10−10 10−9 10−8 10−7 10−6 10−5 Time [s] Normalized particle flux (dN/dt)/N0 [1/s] v1 = 1⋅10−6 m/s, D0 = 2⋅10−9 m2/s v1 = 1⋅10−6 m/s, D0 = 2⋅10−8 m2/s v2 = 5⋅10−7 m/s, D0 = 2⋅10−9 m2/s v2 = 5⋅10−7 m/s, D0 = 2⋅10−8 m2/s v3 = 1⋅10−7 m/s, D0 = 2⋅10−9 m2/s v3 = 1⋅10−7 m/s, D0 = 2⋅10−8 m2/s v4 = 5⋅10−8 m/s, D0 = 2⋅10−9 m2/s v4 = 5⋅10−8 m/s, D0 = 2⋅10−8 m2/s Comput Geosci (2019) 23:953–967 960
51. Voutilainen, M., Kek¨ al¨ ainen, P., Poteri, A., Siitari-Kauppi, M., Helariutta, K., Andersson, P., Nilsson, K., Byeg˚ ard, J., Sk˚ alberg, M., Yli-Kaila, M., Koskinen, L.: Comparison of water phase diffusion experiments in laboratory and in situ conditions. J. Hydrol. 575, 716–729 (2019) 52. Voutilainen, M., Kek¨ al¨ ainen, P., Siitari-Kauppi, M., Sardini, P., Muuri, E., Timonen, J., Martin, A.: Modeling transport of cesium in Grimsel granodiorite with micrometer scale heterogeneities and dynamic update of Kd. Water. Resour. Res. 53(11), 9245–9265 (2017). https://doi.org/10.1002/2017WR020695 53. Yan, B., Mi, L., Chai, Z., Wang, Y., Killough, J.E.: An enhanced discrete fracture network model for multiphase flow in fractured reservoirs. J. Petrol. Sci. Eng. 161, 667–682 (2017). https://doi.org/10.1016/j.petrol.2017.12.016 Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Comput Geosci (2019) 23:953–967 967