PARTICLE AND STREAMLINE NUMERICAL METHODS FOR CONSERVATIVE AND REACTIVE TRANSPORT SIMULATIONS IN POROUS MEDIA by PAULO ANDRES HERRERA RICCI M.Sc., University of Illinois at Urbana-Champaign, 2003 Ingeniero Civil, Universidad de Chile, 2001 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES (Geological Engineering) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) November 2009 cPaulo Andres Herrera Ricci, 2009 Abstract Reactive transport modeling has become an important tool to study and understand the transport and fate of solutes in the subsurface. However, the accurate simulation of reactive transport represents a formidable challenge because of the characteristics of flow, transport and chemical reactions that govern the migration of solutes in geological formations. In particular, solute transport in natural porous media is advection-controlled and disper- sion is higher in the direction of flow than in the transverse direction. Both characteristics create difficulties for traditional numerical schemes that result in numerical dispersion and/or spurious oscillations. While these errors can often be tolerated in conservative transport simulations, they can be amplified in presence of chemical reactions resulting in much larger errors or unstable solutions. In this thesis, new Lagrangian based methods to simulate conservative and reactive transport in porous media are investigated. First, the derivation of a new meshless approximation based on smoothed particle hydrodynamics (SPH) to simulate conserva- tive multidimensional solute transport, including advection and anisotropic dispersion, is presented. Second, a hybrid scheme that combines some of the advantages of streamline- based simulations and meshless methods and that allows simulating longitudinal and transverse dispersion without requiring a background grid is also derived. The numer- ical properties of both methods are analyzed analytical and numerically. Furthermore, both formulations are compared with existing numerical techniques in a set of two- and three-dimensional benchmark problems. It is demonstrated that the proposed schemes provide accurate and efficient solutions of physical transport processes in heterogeneous porous media and overcome most of the issues in existing numerical formulations. The new methods have the potential to remove or minimize numerical dispersion and grid orientation effects and, in the case ii of the hybrid streamline method, also eliminate spurious oscillations even in presence of large longitudinal to transverse dispersivity ratios. Therefore, the results presented in this thesis confirm that the Lagrangian formulations of solute transport investigated here are viable and compelling alternatives to simulate reactive transport versus more standard numerical techniques. iii Table of Contents Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Co-authorship Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Reactive Transport Modeling . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.2 Conceptual Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.3 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Numerical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.1 Particularities of Flow and Transport in Porous Media . . . . . 6 1.3.2 Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3.2.1 Mesh-based numerical methods . . . . . . . . . . . . . 10 1.3.2.2 Hybrid Eulerian-Lagrangian methods . . . . . . . . . . 12 1.3.2.3 Random walk particle tracking methods . . . . . . . . 12 1.3.3 Limitations of Current Numerical Methods . . . . . . . . . . . . 13 1.3.3.1 Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.3.3.2 Monotonicity . . . . . . . . . . . . . . . . . . . . . . . 15 1.3.3.3 Performance . . . . . . . . . . . . . . . . . . . . . . . . 16 1.4 Lagrangian Numerical Methods . . . . . . . . . . . . . . . . . . . . . . 17 1.4.1 Meshless Methods . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.4.2 Streamline-Based Simulations . . . . . . . . . . . . . . . . . . . 18 1.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 iv 1.6 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.7 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2 A Meshless Method to Simulate Solute Transport in Heterogeneous Porous Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.2 Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.2 Monte Carlo SPH method . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.2.1 Time Integration . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.2.2 Accuracy and Spatial Resolution . . . . . . . . . . . . . . . . . 39 2.2.3 Mass Conservation . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.3 Numerical evaluation of the MC-SPH method . . . . . . . . . . . . . . 41 2.3.1 One-Dimensional Dispersion . . . . . . . . . . . . . . . . . . . . 41 2.3.2 Two-Dimensional Dispersion . . . . . . . . . . . . . . . . . . . . 42 2.3.2.1 Initial particle and concentration distribution . . . . . 46 2.3.2.2 Performance . . . . . . . . . . . . . . . . . . . . . . . . 48 2.3.2.3 Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.3.3 Advection–Dispersion in Heterogeneous Porous Media . . . . . . 54 2.3.3.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 2.3.3.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 2.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3 Evaluation of Particle Approximations to Simulate Anisotropic Dis- persion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.2 Mathematical Formulation . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.3 Smoothed Particle Hydrodynamics (SPH) Approximation . . . . . . . . 75 3.3.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 3.3.2 SPH Approximation for Tensorial Dispersion . . . . . . . . . . . 76 3.3.3 Monotonicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 3.4 Particle Strength Exchange (PSE) Approximation . . . . . . . . . . . . 80 3.5 Numerical Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 3.5.1 Simulation Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3.5.2 Equispaced Particles . . . . . . . . . . . . . . . . . . . . . . . . 86 v 3.5.2.1 Effect of particle spacing . . . . . . . . . . . . . . . . . 86 3.5.2.2 Maximum concentration . . . . . . . . . . . . . . . . . 89 3.5.2.3 Negative concentrations . . . . . . . . . . . . . . . . . 89 3.5.2.4 Effect of ratio between smoothing length and particle spacing . . . . . . . . . . . . . . . . . . . . . . . . . . 92 3.5.2.5 Effect of anisotropy ratio . . . . . . . . . . . . . . . . . 93 3.5.2.6 Effect of kernel function . . . . . . . . . . . . . . . . . 93 3.5.2.7 Effect of velocity orientation . . . . . . . . . . . . . . . 96 3.5.3 Irregularly Spaced Particles . . . . . . . . . . . . . . . . . . . . 97 3.5.3.1 Isotropic case . . . . . . . . . . . . . . . . . . . . . . . 99 3.5.3.2 Anisotropic case . . . . . . . . . . . . . . . . . . . . . 104 3.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 3.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 4 A Multidimensional Streamline-Based Method to Simulate Reactive Solute Transport in Heterogeneous Porous Media . . . . . . . . . . . 111 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 4.1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 4.1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 4.2 Mathematical Formulation . . . . . . . . . . . . . . . . . . . . . . . . . 116 4.2.1 Governing Equation . . . . . . . . . . . . . . . . . . . . . . . . 116 4.2.2 Streamline Formulation . . . . . . . . . . . . . . . . . . . . . . . 117 4.2.3 Numerical Approximation . . . . . . . . . . . . . . . . . . . . . 118 4.2.3.1 Advection along streamlines . . . . . . . . . . . . . . . 119 4.2.3.2 Dispersion . . . . . . . . . . . . . . . . . . . . . . . . . 120 4.3 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.3.1 Streamline Tracing . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.3.2 Time Integration . . . . . . . . . . . . . . . . . . . . . . . . . . 124 4.3.3 Advection Solution . . . . . . . . . . . . . . . . . . . . . . . . . 124 4.3.4 MC-SPH Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 125 4.3.4.1 SPH kernel . . . . . . . . . . . . . . . . . . . . . . . . 125 4.3.4.2 Neighbor search . . . . . . . . . . . . . . . . . . . . . . 125 4.3.4.3 Time integration . . . . . . . . . . . . . . . . . . . . . 126 4.3.5 Longitudinal Dispersion . . . . . . . . . . . . . . . . . . . . . . 127 4.3.5.1 Interface coefficients . . . . . . . . . . . . . . . . . . . 127 4.3.5.2 Time integration . . . . . . . . . . . . . . . . . . . . . 127 4.4 Numerical Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 vi 4.4.1 Example 1: Continuous Solute Release in Uniform Flow . . . . . 130 4.4.2 Example 2: Quarter Five-Spot in Heterogeneous Medium . . . . 132 4.4.2.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 4.4.2.2 Simulated concentrations . . . . . . . . . . . . . . . . 134 4.4.2.3 Numerical oscillations . . . . . . . . . . . . . . . . . . 140 4.4.2.4 Performance comparison . . . . . . . . . . . . . . . . . 142 4.4.3 Example 3: Quarter Five-Spot in Heterogeneous Medium with Rate-Limited Sorption . . . . . . . . . . . . . . . . . . . . . . . 143 4.4.4 Example 4: Natural Biodegradation in Three-dimensional Hetero- geneous Porous Media . . . . . . . . . . . . . . . . . . . . . . . 146 4.4.4.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 4.4.4.2 Simulated concentrations . . . . . . . . . . . . . . . . 149 4.4.4.3 Breakthrough curves . . . . . . . . . . . . . . . . . . . 156 4.4.4.4 Performance . . . . . . . . . . . . . . . . . . . . . . . . 159 4.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 4.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 5.1 Limitations of Proposed Numerical Schemes . . . . . . . . . . . . . . . 173 5.2 General Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 5.3 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 5.4 Final Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 5.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Appendix A Derivation of SPH Approximation for Isotropic Dispersion 181 Appendix B Derivation of SPH Approximation for Second Order Deriva- tives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Appendix C Random Walk Particle Method . . . . . . . . . . . . . . . 188 Appendix D Streamline Tracing . . . . . . . . . . . . . . . . . . . . . . . 191 vii List of Tables 1.1 Estimated dispersivity values from field- and laboratory-scale experiments. 9 2.1 Comparison of MC-SPH and RWPT methods. . . . . . . . . . . . . . 44 2.2 Parameters used in RWPT simulations. . . . . . . . . . . . . . . . . . . 45 2.3 Parameters used in SPH simulations. . . . . . . . . . . . . . . . . . . . 45 2.4 Parameter and results of flow model. . . . . . . . . . . . . . . . . . . . 54 2.5 Parameter values used in transport model. . . . . . . . . . . . . . . . . 55 3.1 Parameters used in all simulations. . . . . . . . . . . . . . . . . . . . . 82 3.2 Parameters used to define different simulation scenarios to evaluate ap- proximations for anisotropic dispersion. . . . . . . . . . . . . . . . . . 85 3.3 Definition of different runs used to study convergence properties. . . . . 85 3.4 Normalized error for different SPH kernels and PSE cutoff functions. . 96 3.5 Error versus flow velocity direction. . . . . . . . . . . . . . . . . . . . . 97 4.1 Dispersivity and equivalent longitudinal (PeL) and transverse (PeT ) grid Péclet values used in Example 1. . . . . . . . . . . . . . . . . . . . . . 131 4.2 Parameters used in MOC simulations. . . . . . . . . . . . . . . . . . . . 133 4.3 Number of nodes or cells, time step size and number of time steps used in simulations of Example 2. . . . . . . . . . . . . . . . . . . . . . . . . . 134 4.4 Dispersivity and equivalent longitudinal (PeL) and transverse (PeT ) grid Péclet values used in Example 2. . . . . . . . . . . . . . . . . . . . . . 134 4.5 Normalized minimum simulated concentration values for Example 2. . . 142 4.6 Normalized maximum simulated concentration values for Example 2. . 142 4.7 Normalized CPU time required to simulate Example 2 for different sce- narios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 4.8 Parameters of the rate-limited sorption model used in Example 3. . . . 144 4.9 Definition of three scenarios simulated in Example 4. . . . . . . . . . . 147 4.10 Spatial and temporal discretizations used to simulate Example 4. . . . 149 viii 4.11 Normalized CPU time required to simulate Example 4 for the two scenar- ios than include biodegradation. . . . . . . . . . . . . . . . . . . . . . . 162 D.1 Comparison of the performance of Pollock’s and explicit adaptive algo- rithm to trace streamlines in heterogeneous quarter five-spot problem. . 204 D.2 Comparison of alternative seed distributions to trace streamlines in the heterogeneous quarter five-spot problem. . . . . . . . . . . . . . . . . 209 ix List of Figures 1.1 Groundwater pollution due to tailings infiltration. . . . . . . . . . . . 2 1.2 Vertical cross-section of a synthetically generated aquifer using the esti- mated statistics of the sandy aquifer at Canadian Forces Base, Borden, Ontario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Solute plume migration in vertical cross-section. . . . . . . . . . . . . 8 1.4 Effect of advection and local-scale dispersion on solute concentration. 11 1.5 Subgrid-scale segregation and cell averaged concentration values. . . . 14 2.1 SPH kernels and derivatives. . . . . . . . . . . . . . . . . . . . . . . . 34 2.2 Error versus smoothing length. . . . . . . . . . . . . . . . . . . . . . . 43 2.3 Initial distribution of particles and solute concentration in RWPT sim- ulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.4 Initial solute concentration distribution in MC-SPH simulations. . . . 47 2.5 Normalized CPU time versus number of particles in RWPT simulations. 49 2.6 Normalized CPU time versus total number of particles and average num- ber of particles per kernel support volume in MC-SOH simulations. . 50 2.7 Maximum concentration versus time in MC-SPH and RWPT simulations. 52 2.8 Normalized global error versus total number of particles and normalized CPU time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.9 Domain dimensions, square initial plume, and breakthrough observation points P1 and P2 along centerline. . . . . . . . . . . . . . . . . . . . . 55 2.10 Spatial concentration distribution for TVD, HMOC and SPH simula- tions at τ = Ut/IY = 62 for Pe =∞. . . . . . . . . . . . . . . . . . . 58 2.11 Concentration versus accumulated distance along centerline at dimen- sionless time τ = Ut/IY = 62. . . . . . . . . . . . . . . . . . . . . . . 59 2.12 Breakthrough curve at point P1 located 26IY downstream from initial plume center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 x 2.13 Breakthrough curve at point P2 located 42IY downstream from initial plume center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.14 Dimensionless maximum concentration versus dimensionless time. . . 63 2.15 Mean concentration versus dimensionless time. . . . . . . . . . . . . . 65 3.1 Sum of dispersion components as function of flow velocity direction. . 79 3.2 SPH kernels and PSE cutoff functions. . . . . . . . . . . . . . . . . . 84 3.3 Error E2 as function of particle or grid spacing for equispaced particles. 87 3.4 Normalized error E∞ as function of particle or grid spacing for equis- paced particles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 3.5 Difference between maximum concentration values of numerical and an- alytical solutions as function of time for equispaced particles. . . . . . 90 3.6 Concentration distribution for equispaced particles. . . . . . . . . . . 91 3.7 Difference between analytical and numerical solutions for equispaced particles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 3.8 Error E2 versus the ratio between smoothing length or core size and particle spacing, γ = h/∆x. . . . . . . . . . . . . . . . . . . . . . . . 94 3.9 Error as function of the anisotropy ratio αT/αL. . . . . . . . . . . . . 95 3.10 Particle distortion due to flow velocity. . . . . . . . . . . . . . . . . . 98 3.11 Particle locations considering random and quasi-random distributions. 99 3.12 E2 error versus average particle spacing using equispaced, random, and quasi-random particle distributions. . . . . . . . . . . . . . . . . . . . 100 3.13 Normalized E∞ error versus average particle spacing using equispaced, random, and quasi-random particle distributions. . . . . . . . . . . . 102 3.14 Difference between maximum concentration values of analytical and nu- merical solutions as function of time for random and quasi-random par- ticle distributions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 3.15 Error as function of average particle spacing for αT/αL = 0.01 using randomly and quasi-randomly distributed particles. . . . . . . . . . . 105 3.16 Concentration distribution after 300 time steps for αT/αL = 0.01 and quasi-randomly distributed particles. . . . . . . . . . . . . . . . . . . 106 4.1 Meshless MC-SPH method. . . . . . . . . . . . . . . . . . . . . . . . . 113 4.2 Hybrid streamline-SPH method. . . . . . . . . . . . . . . . . . . . . . 115 xi 4.3 Flow oriented coordinate system. . . . . . . . . . . . . . . . . . . . . 118 4.4 Overall solution approach implemented in streamline-based simulator. 129 4.5 Comparison of simulated concentrations for Example 1. . . . . . . . . 131 4.6 Spatial distribution of the natural logarithm of the hydraulic conductiv- ity and streamlines in Example 2. . . . . . . . . . . . . . . . . . . . . 132 4.7 Simulated concentration values after injection of 0.4 pore volume of con- taminated fluid for Example 2. . . . . . . . . . . . . . . . . . . . . . . 135 4.8 Breakthrough curves at observation point P1 in Example 4. . . . . . . 137 4.9 Breakthrough curves at observation point P2 in Example 4. . . . . . . 138 4.10 Comparison of simulated breakthrough curves at observation point P1 for Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 4.11 Comparison of simulated breakthrough curves at observation point P2 for Example 2, (a) streamline simulator and (b) MOC solver using fine grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 4.12 Numerical oscillations in simulated concentrations for Example 2. . . 141 4.13 Breakthrough at observation point P2 for different mass transfer (β) and partition (Kd) coefficients considered in Example 3 . . . . . . . . . . 145 4.14 Spatial distribution of natural logarithm of hydraulic conductivity and flow velocity magnitude used in Example 4 . . . . . . . . . . . . . . . 148 4.15 Simulated concentrations at nodes along streamlines after 10,000 days since the initial release of BTEX for the scenario that includes advective transport with biodegradation in Example 4. . . . . . . . . . . . . . . 151 4.16 Simulated concentrations at nodes along streamlines after 10,000 days since the initial release for the scenario that includes advection, disper- sion and biodegradation in Example 4. . . . . . . . . . . . . . . . . . 152 4.17 imulated concentration values for Example 4 at vertical plane defined by y=11.5 m. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 4.18 Simulated concentration values for Example 4 at horizontal plane defined by z=2.5 m. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 4.19 Comparison of simulated concentration values for Example 4 at horizon- tal plane defined by z=2.5 m. . . . . . . . . . . . . . . . . . . . . . . 155 4.20 Simulated concentration values for Example 4 along the profile parallel to y direction at coordinates x=35 m and z=2.5 m. . . . . . . . . . . 157 xii 4.21 Location of contaminant source and the two observation wells in Exam- ple 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 4.22 Simulated BTEX concentration versus time for Example 4 assuming advective transport only. . . . . . . . . . . . . . . . . . . . . . . . . . 160 4.23 Simulated BTEX concentration versus time for Example 4 assuming advective transport and biodegradation. . . . . . . . . . . . . . . . . . 161 4.24 Distribution of cells according to the flow velocity magnitude. . . . . 163 4.25 Distribution of (a) nodes along streamlines according to the flow veloc- ity magnitude and (b) number of streamlines based on the maximum velocity magnitude along individual streamlines. . . . . . . . . . . . . 164 4.26 Spatial distribution of nodes and number of nodes according to the num- ber of neighboring nodes that contribute to the SPH summation to ap- proximate dispersion. . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 D.1 Scehamatic of Pollock’s particle tracking method. . . . . . . . . . . . 193 D.2 Schematic of explicit particle tracking method. . . . . . . . . . . . . . 198 D.3 Comparison of Pollock’s and explicit integration methods for the homo- geneous quarter five-spot problem. . . . . . . . . . . . . . . . . . . . 200 D.4 Comparison of time of flight and arc length computed with Pollock’s and explicit integration methods for homogeneous quarter five-spot problem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 D.5 Spatial distribution of hydraulic conductivity used in heterogeneous quater five-spot problem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 D.6 Comparison of Pollock’s and explicit integration methods for the het- erogeneous quarter five-spot problem. . . . . . . . . . . . . . . . . . 202 D.7 Comparison of time of flight and arc length computed with Pollock’s and explicit integration methods for heterogeneous quarter five-spot problem. 203 D.8 Streamline distribution in heterogeneous quater five-spot problem. . . 207 D.9 Comparison of two alternative streamline distributions for the homoge- neous quater five-spot problem. . . . . . . . . . . . . . . . . . . . . . 207 D.10 Comparison of four alternative streamline distributions for the hetero- geneous quater five-spot problem. . . . . . . . . . . . . . . . . . . . . 208 D.11 Schematic of flow problem considering low permeability inclusion. . . 210 xiii D.12 Comparison of Pollock’s and time of flight streamline discretization ap- proaches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 D.13 Comparison of Pollock’s and arc length streamline discretization ap- proaches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 xiv Acknowledgments I especially want to thank my advisor, Prof. Roger Beckie, who gave me freedom and constant encouragement to pursue my research interests. He has been an excellent mentor not only on the technical aspects of this research, but also on the many other aspects of the academic world. I feel fortunate I have had the opportunity to collaborate with such great person. I also appreciate the interesting conversations I had with the others members of my thesis committee, Prof. Leslie Smith and Prof. Ulrich Mayer. Prof. Albert Valocchi and Dr. Marco Massabó also provided comments that improved the text and help to clarify some of the points presented in this thesis. I am grateful to all the people that directly or indirectly have funded my education and research through the years. My PhD education and research have been founded through a University of British Columbia Graduate Fellowship and a NSERC Discovery Grant awarded to Prof. R. Beckie. I am also grateful to have received the Thomas and Marguerite MacKay Memorial Scholarship and the Hugh Nasmith Graduate Scholarship while I was a graduate student at UBC. I am deeply indebted with thousands of programmers who have generously donated their work to create free software. This thesis would not have been possible without such great tools. Finally, I wish to thank my family who has been a constant source of support and encouragement during these long years. To Françoise, Clara and Matias, I will never forget all the sacrifices you have made to allow me to pursue my dreams. xv To Françoise, Clara and Matias xvi Co-authorship Statement This thesis has been prepared as a collection of manuscripts, either published, submitted or in preparation, that have been co-authored with individuals other than myself. In each case I am the first author and have conducted all the research work and manuscript preparation. The specific objectives of each chapter and research approach are based on my initiative in consultation with my thesis supervisor Prof. Roger Beckie. The research work, including derivation of numerical approximations, code development and numerical simulations, with the exception of the one-dimensional simulations presented in Chapter 2, have been entirely done by myself with support from the co-authors as outlined below. Dr. Marco Massabó from CIMA Research Foundation in Savona, Italy; provided insight- ful comments and collaboration on the interpretation of the smoothed particle hydrody- namics (SPH) method in the context of simulations of subsurface solute transport. In addition, Dr. Massabó provided the results of the one-dimensional SPH simulations in- cluded in Chapter 2. Prof. Beckie, Dr. Massabó, and Prof. Valocchi from the University of Illinois at Urbana-Champaign, USA, also assisted with corrections and suggestions to improve the editing of the chapters which they were involved with. xvii Chapter 1 Introduction 1.1 Motivation Groundwater pollution has become a serious problem during recent decades. The release and infiltration into aquifers of pesticides, organic compounds, contaminants of biolog- ical origin and nuclear waste, among others, pose a risk for the human health and the environment. In 1996, the U.S. Environmental Protection Agency (EPA) identified 217,000 contam- inated sites in the U.S. that required mitigation action. Another 300,000 sites were reported cleaned up or were found to no require mitigation. It was estimated that sev- eral thousands of those sites were polluted with highly radioactive nuclear waste and would require coordinated mitigation actions for several decades before been declared cleaned up. In addition, it was estimated that there were between 130,000 to 450,000 additional sites that could potentially require some mitigation action (EPA, 1996). In Canada, the Federal Contaminated Site Inventory (FCS, retrieved on August 10, 2009) lists 3,208 sites that have at least one substance in the groundwater that occurs at concentrations above natural levels and that pose an immediate or long-term hazard to human health or the environment. Those sites includes only the small proportion of cases for which the Government of Canada has accepted some or all financial responsibility. Figure 1.1 shows a common example of groundwater contamination due to tailings infil- tration from a tailings impoundment. Once the tailings plume reaches the water table it migrates carried by the regional groundwater flow and it can eventually impact the 1 Figure 1.1: Groundwater pollution due to tailings infiltration. Once the tailings plume reaches the water table it can migrate up to several kilometers downstream from the contaminant source carried by the regional ground- water flow. water quality of wells located up to several kilometers downstream from the contaminant source. This example demonstrates the potential large spatial scale of problems related to the pollution of natural aquifers. Because of the scale of the problem, it is essential to find the most effective and financially sound mitigation actions. Possible mitigation actions include: natural attenuation (ei- ther due to dilution or natural biodegradation), passive containment, and active cleanup measures such as pump and treat and enhanced bioremediation (EPA, 1996). The selec- tion of the most effective action requires a good understanding of the physical, chemical and biological processes that govern the migration and transformation of contaminants in the subsurface. At the same time, scientists and engineers who are involved in the remediation of contaminated sites are interested in finding answers to questions like: • How long will the contaminant plume take to reach a well or a river? • What will be the contaminant concentration at a given location and time? • Will dilution due to the advection and dispersion of the contaminant plume be enough to decrease the contaminant concentration to acceptable levels within a reasonable time frame? 2 • Will the contaminant of concern be retarded with respect to the groundwater flow? • Will biodegradation be an effective process to transform and remove the contami- nant from the groundwater? Reactive transport modeling has emerged during the last decades as an instrument to answer these practical questions and as a tool to integrate fundamental knowledge of the complex processes that control flow, transport and chemical reactions in porous media (Steefel et al., 2005). In this thesis, new methods for the simulation of conservative and reactive transport are investigated. The methods focus upon accurate and efficient solution of physical transport processes in heterogeneous porous media. This research addresses problems in existing formulations that lead to, for example, negative concentrations, which are particularly problematic because of non-linear chemical reaction rates that are common in reactive transport simulations. 1.2 Reactive Transport Modeling 1.2.1 Definition Reactive transport in natural porous media is a broad term that is used to refer to complex physical and chemical processes that occur at disparate spatial and temporal scales and that involve fluid flow, mass transport and chemical reactions in the subsurface (Steefel et al., 2005). The interaction between transport, and reactions is complex. On one hand, reactions such as mineral precipitation and dissolution can change the porosity and permeability of a porous medium, hence, affect the fluid flow and transport properties of the medium. On the other hand, mass transport plays a key role in enabling reactions because it provides the driving force to perturb a chemical system out of equilibrium by transport- ing and mixing reactants and, because it sets a characteristic time scale during which reactions can take place (Valocchi, 1985). The most important transport processes for enabling reactions are advection, molecular diffusion, and mechanical dispersion (Steefel and MacQuarrie, 1996; De Simoni et al., 2005; Steefel and Maher , 2009). 3 1.2.2 Conceptual Model The migration and transformation of contaminants in the subsurface is the result of fluid and transport processes that occur at length scales of a single or few pores and of chemical reactions that happen at even smaller scales (molecular scale). Although, pore-scale modeling has gained considerable attraction during recent years, their use is limited to very small scale problems where they have provided insightful understanding of basic mechanisms. However, pore-scale modeling is not appropriate for studying practical field-scale problems that occur at much larger scales (Steefel et al., 2005). Therefore, most current conservative and reactive transport models used to simulate field-scale problems are based on a continuum representation of porous media, such that the system properties are averaged over a representative elementary volume (REV) with length scale equal to many pore lengths (Bear , 1988; Steefel et al., 2005). Thus, the REV scale, often called Darcy’s scale or local-scale, defines the spatial scale or volume size where fluid velocity, transport properties, concentrations and reactions rates are computed. In what follows we will concentrate our discussion on the use of reactive transport model- ing in hydrogeology. Furthermore, we will assume isothermal saturated groundwater flow with constant density and negligible effect of reactions on flow and transport properties. 1.2.3 Mathematical Model The groundwater specific discharge, q, can be calculated using Darcy’s law, q = −K∇φ (1.1) where K [L/T] is the hydraulic conductivity tensor and φ [L] is the hydraulic head. The two main transport mechanisms at the REV scale are: advection, which involves the movement of the solute with the flow; and hydrodynamic or local-scale dispersion that includes molecular diffusion and mechanical dispersion due to variations of the flow velocity at the pore-scale (Bear , 1988). Thus, reactive solute transport at the local-scale is modeled by a system of partial differential equations, which is given as follows for the case of constant porosity (Bear , 1988; Steefel and MacQuarrie, 1996): 4 ∂Ck ∂t = ∇ · (D∇Ck)−∇ · (vCk) +Rk(c) k = 1, . . . ,m ∂Ck ∂t = Rk(c) k = m+ 1, . . .M (1.2) where Ck [M/L3] is the solute concentration of species or component k, D [L2/T] is the hydrodynamic dispersion tensor, v = q/η [L/T] is the pore water velocity, η is the porosity of the medium, Rk [M/L3/T] is the total reaction rate for species or component k, c = (C1, . . . , CM) is the concentration vector,m is the number of species or components in the aqueous (mobile) phase, and M is the total number of species or components. The most common expression to compute the coefficients of the dispersion tensor D for an isotropic porous medium considering a Cartesian coordinate system is (Bear , 1988) Dij = (αT q +Dm) δij + (αL − αT ) vivj q (1.3) where Dm [L2/T] is the molecular diffusivity, δij is Kronecker’s delta, q = |v| [L/T] is the magnitude of the pore water velocity, and αL and αT [L] are the longitudinal and transverse dispersivity of the medium, respectively. Alternative expressions for the dispersion tensor components include different transverse dispersivities for the horizontal and vertical directions (Burnett and Frind, 1987; Lichtner et al., 2002), however, those models are less commonly used. The reaction term in (1.2) may include homogeneous reactions that occur in a single phase or heterogeneous reactions that include constituents in more than one phase, e.g. sorption which includes the solid and aqueous phases (Rubin, 1983; Mayer et al., 2002). From a practical point of view, sorption and biodegradation are the two most relevant reactions in groundwater, because of their role in retarding the migration of heavy metals and in the transformation of hydrocarbons, respectively; which are the two most common substances in contaminated aquifers (EPA, 1996). 5 1.3 Numerical Solution The system of equations in (1.2) corresponds to a set of non-linear partial differential equations (PDE) and, in general, must be integrated numerically. There are two different numerical approaches to integrate the system of PDEs: a fully-implicit approximation or an operator splitting approach (Yeh and Tripathi, 1989; Steefel and MacQuarrie, 1996). The simplest one is based on an operator splitting formulation that allows decoupling of the transport and reaction terms. Then, equation (1.2) is split into two terms rep- resenting transport and chemical reactions. Usually, the transport component, which corresponds to a linear PDE, is solved first, then the concentrations computed as result of the transport step are used as initial conditions to compute the solution of the non- linear set of ordinary differential equations that represent chemical reactions. Variations of the operator splitting approach include schemes that iterate between the solutions of the transport and reaction terms or that switch the order of the evaluation (Steefel and MacQuarrie, 1996). In the discussion that follows we will assume that an operator splitting approach is used to evaluate (1.2) and we will focus our analysis on the numerical solution of the transport term. However, we must emphasize that the analysis presented below is also valid for fully implicit implementations. 1.3.1 Particularities of Flow and Transport in Porous Media The numerical integration of the advection-dispersion-reaction (ADR) equation, (1.2), presents some unique challenges. First, because of the geological origin of aquifers, hydraulic conductivity varies by sev- eral orders of magnitudes within relatively short distances. For example, Sudicky (1986) reports differences of more than thirty times between hydraulic conductivity values sepa- rated by few centimeters in a shallow sandy aquifer at Canadian Forces Base in Borden, Ontario, Canada. Similar variations were also observed at the Macrodispersion Experi- ment (MADE) site in Mississippi, USA, where local-scale hydraulic conductivity values varied by more than four orders of magnitude within an area of approximately 250 x 300 m (Boggs et al., 1992; Zheng and Gorelick, 2003). Large variations in hydraulic conductivity produce not only important variations in flow velocity magnitude, but also in the direction of the flow (Sudicky, 1986). For example, 6 Figure 1.2: Vertical cross-section of a synthetically generated aquifer using the esti- mated statistics of the sandy aquifer at Canadian Forces Base, Borden, Ontario (Mackay et al., 1986; Sudicky, 1986; Freyberg, 1986). Natural logarithm of the hydraulic conductivity (top) and simulated groundwater velocity (bottom). The cross-section is 32 m long and 8 m high. Large variations of hydraulic conductivity within short distances result in im- portant variation of the magnitude and direction (arrows) of the flow velocity. Figure 1.2 shows a vertical cross-section of a synthetically generated aquifer using the estimated statistics of the sandy aquifer at the Borden site (Mackay et al., 1986; Sudicky, 1986; Freyberg, 1986). The figure also shows simulated groundwater velocities, that demonstrate that variations of hydraulic conductivity within short distances result in important variations of the magnitude and direction of the flow velocity. Because of the heterogeneity of the flow velocity, adjacent fluid parcels may travel at very different velocities. Such variations in travel time result in stretching and spreading of the contaminant plume, which manifests as large variations of concentration within short distances even at the order of few centimeters (Mackay et al., 1986;Molz and Widdowson, 7 1988; Benson and Meerschaert, 2008). Figure 1.3 shows how variations in velocity can produce dramatic changes in the shape of a initially regular plume within short travel distances. Figure 1.3: Solute plume migration in vertical cross-section shown in Figure 1.2. An idealized initial rectangular solute plume (red rectangle on top figure) migrates carried by the flow velocity. Because of the heterogeneity of the flow field, the shape of the plume becomes very irregular after the center of mass of the plume has travelled approximately 10 m (bottom). Second, local-scale dispersion is anisotropic and it is much more important in the direction of the flow than in the transverse directions. Table 1.1 lists estimated dispersivity values based on data collected in field- and laboratory-scale experiments. While longitudinal dispersivity ranges between 3 · 10−2 and 5 · 10−1 m, typical transverse dispersivity is of the order of 10−3 m, which is equivalent to transverse dispersion coefficients of the order of molecular diffusion for typical pore water velocities (Cirpka et al., 2006). Note that experimental measurements of local-scale dispersion are difficult, thus most estimated dispersivity values are based on spatial moment analysis, which measures the spreading of the plume, or effective parameters that measure the combined effect of flow heterogeneity and local-scale dispersion (Jose et al., 2004). Therefore, most of the values presented in 8 Table 1.1 represent upper bounds for local-scale longitudinal and transverse dispersivities. αL (m) αT (m) Comments 3 · 10−2 − 5 · 10−1 5 · 10−4 − 1 · 10−3 Based on data collected during field-scale tracer test in a shallow unconfined sand and gravel aquifer on Cape Cod, Massachusetts, USA (Hess et al., 2002) 4 · 10−1 4 · 10−2 Based on spatial moment analysis of data collected during the large-scale experiment conducted at the Borden site in Ontario, Canada (Freyberg, 1986) – 1 · 10−6 − 2 · 10−4 Calculated from reactive plume lengths in laboratory-scale experiments with homogeneous materials (Cirpka et al., 2006) 4 · 10−1 2 · 10−3 Effective dispersivities obtained from analysis of breakthrough curves in a 14 m long sandbox filled with four different types of silica sand (Jose et al., 2004) Table 1.1: Estimated dispersivity values from field- and laboratory-scale experiments. The heterogeneity of the flow velocity field together with the small magnitude of local- scale dispersion coefficients in natural porous media, have important consequences for key transport processes such as spreading, dilution and mixing. Kitanidis (1994) discusses the difference between the spreading and dilution of a solute plume. Spreading is defined as the stretching of the plume and can be measured as the rate of change of the second central spatial moment. Dilution is the process by which the initial solute mass is distributed in an increasing volume. Mixing is the result of the combined action of the stretching and folding of material lines of the plume, and the mass exchange due to local-scale dispersion (Weeks and Sposito, 1998). While spreading is produced by the spatial velocity variability, dilution and mixing are due to the combined action of the heterogeneity of the flow field and most importantly local-scale dispersion. Because of the relatively small magnitude of the local-scale dispersion and in absence of sorption, mixing between a contaminant and other chemical species present in the 9 natural groundwater occurs in a narrow zone located along the irregular edges of the contaminant plume (Oya and Valocchi, 1998). Figure 1.4 shows the difference between spreading and mixing using results of simulations included in Section 2.3.3. The figures show simulated concentrations for two conservative transport scenarios with different Péclet number (Pe): advection-only (Pe =∞) and for advection and dispersion (Pe = 200). Under a purely-advective scenario the solute plume becomes irregular due to variations in velocity, however initial concentration values do not change and there is a sharp interface between fluid zones with and without solute. When local-dispersion is included, there is solute mass transfer in areas of high concentrations near the plume edges that results in a thin area, relative to the typical length of the local-scale heterogeneity, with concentrations lower than the initial value. In many field situations the zone with lower concentrations would correspond to a mixing area where the solute and the natural groundwater mix enabling chemical reactions. For example, natural and enhanced attenuation of organic contaminants occur in a narrow zone close to the plume boundaries where the contaminant (substrate) and the electron acceptor (e.g. oxygen) mix (Oya and Valocchi, 1998; Cirpka et al., 1999b; Ham et al., 2004). In the next section, we will argue that the characteristics of the flow and solute transport process described above must be considered in the selection of numerical methods to simulate conservative and reactive solute transport in groundwater. 1.3.2 Numerical Methods We start this section by reviewing some of the most common numerical schemes that are used to simulate conservative and reactive solute transport. 1.3.2.1 Mesh-based numerical methods This category includes finite difference, finite volume or finite element methods. In finite difference and finite volume schemes each grid cell defines a new control volume within which parameters and variables are considered constant (Steefel and MacQuarrie, 1996). Mesh-based methods are relatively easy to implement, have convergence, stability and accuracy properties that are well understood, and it is possible to develop formulations that are mass conservative. Because of those characteristics, mesh-based approximations 10 Figure 1.4: Effect of advection and local-scale dispersion on solute concentration. Fig- ure shows a small part of the simulated solute plume in Section 2.3.3 for Péclet number, Pe = ∞ (top) and Pe = 200 (bottom). Advection only affects the shape of a contaminant plume (top). If local-dispersion is in- cluded, mass transfer occurs in areas of high concentration gradients and a mixing zone develops around the plume edges (bottom). The mixing zone is critical to enable some chemical reactions such as biodegradation. 11 are used in most reactive transport packages (e.g. Pruess, 1991;White et al., 1995;Mayer et al., 2002; Mills et al., 2007). Low-order mesh-based schemes to approximate advection, e.g. upstream finite differ- ence, introduce large amount of artificial diffusion and mixing (Steefel and MacQuarrie, 1996). Therefore, alternative schemes based on high-order approximations that were first developed to simulate problems in computational fluid dynamics, have been adopted by reactive transport modelers. Examples of high-order schemes are flux-corrected transport (FCT) methods (Boris and Book, 1973; Zalesak, 1979), which combine high- and low- order schemes; and total variation diminishing (TVD) schemes (Harten and Lax , 1984; Yee et al., 1985; Cox and Nishikawa, 1991). 1.3.2.2 Hybrid Eulerian-Lagrangian methods Hybrid schemes are based on the same general concept, the use of particles to handle advection and a grid-based method to handle dispersion. Each time step is split into two sub-steps. First, changes in concentrations due to advection are computed by forward or backward particle tracking. Then, concentration values are interpolated onto a grid. Next, grid concentration values are used to solve for dispersion, and eventually reactions, using some traditional mesh-based solver. Multiple variations of this approach exist depending on the interpolation methods and tracking algorithm. Examples of these kinds of methods are: hybrid Eulerian-Lagrangian methods (Neuman, 1981, 1984), method of characteristics (MOC) and hybrid method of characteristics (HMOC) in the MT3DMS package (Zheng and Wang, 1999) and MOC3D (Konikow et al., 1996), and Eulerian- Lagrangian localized adjoint methods (ELLAM) (Celia et al., 1990; Russell and Celia, 2002). 1.3.2.3 Random walk particle tracking methods Random walk particle-tracking methods (RWPT) have long been used to simulate con- servative solute transport in porous media (Ahlstrom et al., 1977; Pickens and Grisak, 1981; Tompson and Gelhar , 1990; Tompson, 1993). In this type of model, solute mass is distributed among a set of particles that move carried by the flow velocity and by a random drift that models dispersive transport (Delay et al., 2005; Salamon et al., 2006). Solute concentrations are estimated by averaging the mass contained in the particles 12 found in some specified volume. Therefore, concentration values depend upon the total number of particles, size of the averaging volume, and spatial particle distribution. The popularity of RWPT methods is due to its natural capacity to accurately simulate advection and ease of implementation. Because of its advantages RWPT has become the de facto standard method in numerical studies of plume spreading and dilution (e.g. see Delay et al., 2005; Salamon et al., 2006, and references therein). However, RWPT methods are less attractive for the simulation of reactive transport because: (i) it is difficult to simulate general heterogeneous reactions that include the solid phase, (ii) a very large number of particles is required to obtain an accurate estimation of low concentration values that is crucial to approximate reactions that occur in the mixing zone along the plume edges, and (iii) simulations that include multiple species need a large number of particles to track individual species. 1.3.3 Limitations of Current Numerical Methods According to Steefel and MacQuarrie (1996) there are three main properties that a nu- merical method must satisfy to be used in reactive transport simulations: (i) accuracy in space and time, which includes minimizing numerical diffusion and mass conserva- tion errors, (ii) monotonicity, which means avoiding spurious oscillations (e.g., negative concentrations); and (iii) computational efficiency. Next, we evaluate current numerical methods based on those three criteria. 1.3.3.1 Accuracy Mesh-based numerical methods, including high resolution methods, have problems to ac- curately simulate multidimensional advection-dominated transport because of numerical dispersion that results in excessive artificial mixing, dilution, and overestimation of reac- tions rates (Steefel and MacQuarrie, 1996; Cirpka et al., 1999; Zheng and Wang, 1999). Numerical dispersion is more important when the grid is not aligned with the direction of the flow (Frind et al., 1987), which is always the case in non-uniform flows as found in heterogeneous porous media. On the other hand, hybrid schemes that require interpolating concentrations to a back- ground grid also introduce numerical dispersion even if they provide a very accurate solution for advection. In the case of RWPT methods, concentration values can only 13 A! B! A + B! Figure 1.5: Subgrid-scale segregation and cell averaged concentration values. Species A and B are physically segregated at the subgrid-scale (left). However, they would appear well-mixed at the cell scale (right). If A and B are two reactants in a chemical reaction, then numerical simulations based on cell averaged concentrations would overestimate the reaction rate. be obtained after averaging the mass of particles over some control volume, which also results in numerical mixing. The use of cell average concentration values can introduce large errors in the estimation of dilution and reaction rates. For example, Figure 1.5 shows two species, A and B, which are physically segregated, however, they would appear well-mixed in numerical simulations that use cell averaged concentration values. If A and B are reactants in a chemical reaction, then the simulated reaction rate would overestimate the real reaction rate (which is zero, in this case). The errors due to numerical dispersion and cell averaging are smaller for larger values of local-scale dispersion, because concentration values within the cell volume are smoothed out by dispersion (Steefel and MacQuarrie, 1996). However, as discussed earlier, local- scale dispersion in porous media, particularly in the transverse direction, is small and its effect to smooth out concentration fluctuations is limited. Therefore, sub-grid scale concentration fluctuations are important and the use of cell averaged concentration val- ues is an important source of error in conservative and reactive transport simulations (Frind and Germain, 1986; Frind et al., 1987; Molz and Widdowson, 1988; Benson and Meerschaert, 2008). In evaluating the accuracy of a numerical method for simulating reactive transport, it 14 is also important to keep in mind that any error in the solution of the transport com- ponent can be greatly amplified by non-linear reactions. Thus, methods that perform acceptably well to simulate conservative solute transport, can produce large errors when chemical reactions are included (Steefel and MacQuarrie, 1996). For example, Cirpka et al. (1999b) demonstrated that small amounts of numerical dispersion in simulations of biodegradation controlled by transverse mixing simulated using a high-order finite volume method, can result in larger errors in the estimation of reaction rates and contaminant mass removal. 1.3.3.2 Monotonicity Spurious oscillations in simulations of conservative solute transport arise due to the use of non-linear high-order methods to control numerical dispersion (Steefel and MacQuar- rie, 1996; Cirpka et al., 1999) and numerical approximations of the off-diagonal entries (“cross-terms”) in the local-dispersion tensor (Herrera and Valocchi, 2006). Multidimen- sional high-order mesh-based solvers for advection based on the FCT and TVD schemes, which are supposed to suppress numerical oscillations, often result in small oscillations (Steefel and MacQuarrie, 1996; Herrera and Valocchi, 2006). Numerical oscillations that arise from the solution of parabolic or elliptic PDEs that include mixed derivatives or “cross-terms” are a well known problem and have been the subject of many research efforts in recent years (e.g. Nordbotten and Aavatsmark, 2005; Le Potier , 2005b; Mlacnik and Durlofsky, 2006; Edwards and Zheng, 2008; Yuan and Sheng, 2008; Lipnikov et al., 2009). To this day, no single solution provides a scheme that can be used in general scenarios. Although, small oscillations can be usually tolerated in conservative transport simula- tions, they are unacceptable in reactive transport simulations because they can result in unstable solutions in presence of non-linear chemistry. For example, Steefel and Mac- Quarrie (1996) discusses the effect of small oscillations in a problem involving organic car- bon degradation via sulfate reduction coupled to two equilibrium dissolution-precipitation reactions. They simulate solute transport using a high-order FCT method that intro- duces spurious oscillations that do not produce problems in a tracer simulation, but that produce unstable results when chemical reactions are included. 15 1.3.3.3 Performance Numerical simulations of reactive transport in porous media are computationally de- manding. Although, the increasingly availability of high-performance computers has made feasible detailed simulations of reactive transport in two- and three-dimensional domains (e.g. PFLOTRAN , retrieved on August 12, 2009), it is still not possible to re- solve practical problems with enough detail to capture all the scales of heterogeneity that are relevant for reactive transport (Steefel et al., 2005). Performance is also important when a large number of scenarios must be simulated. For example, because of our inability to observe all the scales of physical and chemical heterogeneity present in natural porous media, reactive transport simulations include a high degree of uncertainty. A standard way to deal with uncertainty is based on a Monte Carlo approach that involves simulating many equally probable scenarios to determine probability distributions for possible outcomes (Steefel et al., 2005). Simulating a large number of realizations is also a requirement of some methods to estimate the effects of variations in the input parameters on the model results (sensitivity analysis) or of some automatic parameter calibration frameworks (Hill and Tiedeman, 2007). Nowadays, high performance requires to use numerical methods that can be implemented in algorithms that are amenable to parallelization. While RWPT methods can be imple- mented using an embarrassingly parallel algorithm, efficient implementations of mesh- based algorithms, although possible, are more difficult to obtain (Mills et al., 2007). On the other hand, RWPT have very low convergence and very large numbers of particles (of the order of billions (Suciu et al., 2006)) are required to obtain accurate results, which counterbalances its parallel advantages. Finally, high-order multidimensional mesh-based solvers for advection are usually im- plemented using explicit schemes (Steefel and MacQuarrie, 1996). Explicit solvers have stability limits on the time step size given by the Courant–Friedrichs–Lewy (CFL) condi- tion, ∆t ≤ ∆/ |v|, where∆ is the cell size. Therefore, the stability limit is more restrictive for finer grids and finer discretizations require smaller time steps, hence, computational effort. Since mesh-based multidimensional solvers introduce a global coupling between concentration values, the stability limit is global and given by the maximum velocity in the grid. Thus, it is not possible to take advantage of the irregular velocity distribution to use greater time steps in slower areas of the domain. 16 1.4 Lagrangian Numerical Methods 1.4.1 Meshless Methods Kernel interpolation methods simulate mass transport using a collection of particles that move according to the velocity field and carry and exchange solute mass with surrounding particles. Particle locations are used as quadrature points to evaluate integral interpola- tions of variables and their derivatives. Importantly, these schemes are able to incorporate diffusive effects and mixing without using a grid or mesh, so they are also called mesh- less methods. Some examples of this type of method are Vortex methods (Cottet and Koumoutsakos, 2000) and particle strength exchange (PSE) method (Degond and Mas- Gallic, 1989a; Zimmermann et al., 2001). Methods based on this approach give accurate and stable results if a remeshing technique is used to control errors that result from ir- regular spatial particle distributions produced by non-uniform flow fields. The remeshing step introduces numerical dispersion that can be controlled but not completely avoided by using suitable interpolation schemes (Cottet and Koumoutsakos, 2000; Chaniotis et al., 2002). Smoothed Particle Hydrodynamics (SPH) methods are another type of kernel-based in- terpolation scheme (Gingold and Monaghan, 1977; Lucy, 1977). Cleary and Monaghan (1999) presented a SPH scheme that allows one to solve the multidimensional advection- dispersion equation, assuming isotropic dispersion, using an integral interpolation of the dispersion operator that it is supposed to be less sensitive to particle disorder than tra- ditional kernel interpolation schemes. Since the method can handle dispersion without remapping the concentration field onto a grid, it is free of numerical dispersion and grid orientation effects. As discussed in Chapter 2, a key property of kernel interpolation methods is that they track concentration values, in contrast to RWPT approaches which fundamentally track particles with fixed masses. This feature allows one to evaluate reactions at individual particles (e.g. Chaniotis et al., 2003). Heterogeneous reactions that include the solid (immobile) phase can be handled by introducing additional fixed particles (Tartakovsky et al., 2007). 17 1.4.2 Streamline-Based Simulations Streamline-based methods have been successfully used to simulate oil migration (Thiele et al., 1996, 1997) and multidimensional solute transport (Crane and Blunt, 1999; Di Do- nato and Blunt, 2004; Obi and Blunt, 2004, 2006). These methods use a numerical grid that adapts to the flow field, which reduces numerical dispersion and grid orientation effects. Because of its adaptation to the flow and its ability to minimize numerical dis- persion, the method is well suited for simulations of advection-dominated transport as found in heterogeneous porous media (Di Donato et al., 2003). Moreover, the use of streamlines allows the transformation of a multidimensional transport equation to a set of individual one-dimensional transport problems. The numerical solution of the result- ing set of one-dimensional transport problems allows the use of more efficient numerical solvers, more relaxed stability constraints and it is amenable to parallelization (Crane and Blunt, 1999; Bandilla et al., 2009). Because of the efficiency of the method, it is pos- sible to simulate large-scale domains with fine spatial and temporal resolution (Di Donato et al., 2003; Obi and Blunt, 2004, 2006). In addition, chemical reactions, including ho- mogeneous and heterogeneous reactions can be easily handled (Crane and Blunt, 1999; Di Donato and Blunt, 2004). 1.5 Discussion The previous analysis demonstrated that no single traditional numerical method presents the three main features sought in reactive transport simulations. Moreover, one of the conditions, monotonicity, is not satisfied by any of the current methods if anisotropic dispersion is considered. Because of the limitations of current numerical schemes, reactive transport simulations must make some trade-offs to obtain practical results. For example, low-order approx- imations for advection are preferred over more accurate high-order approximations, be- cause they do not suffer numerical oscillations. Similarly, simulations that include local- dispersion assume isotropic dispersion or remove the cross-terms to avoid introducing non-physical artifacts, e.g. negative concentrations. In both cases, monotonicity comes at the cost of tolerating additional numerical errors. In our opinion, most of the problems that affect current numerical methods are caused by the use of a grid or mesh, either to compute approximations of concentrations derivatives 18 as in finite difference or finite element methods or, to compute cell averaged concentration values as in RWPT, MOC and other hybrid approaches. As discussed, the use of a single multidimensional grid introduces grid orientations effects due to the non-uniform flow direction, artificial mixing because of the computation of cell averaged concentrations, and global stability restrictions. Therefore, it seems that to overcome many of the prob- lems that plague current numerical schemes, one should develop numerical methods that do not require a rigid multidimensional grid. Numerical methods based on a Lagrangian description of solute transport satisfy that condition and are attractive alternatives to simulate reactive solute transport. Because of their ability to control numerical dispersion and grid orientation effects and their efficiency, meshless methods and streamline-based simulations are attractive alter- natives for the simulation of reactive transport in natural porous media. However, they also present some deficiencies that can be problematic for their use in reactive transport codes. The standard SPH approximation for diffusion (Cleary and Monaghan, 1999) can only be used to simulate isotropic dispersion. Therefore, the use of this type of methods in reactive transport modeling in porous media requires deriving new expressions to simulate anisotropic dispersion. Although, approximations for longitudinal dispersion along individual streamlines are straightforward, transverse mixing between streamlines is more difficult to simulate. Two approaches have been used to incorporate transverse dispersion in streamline-based simu- lations. In the first one, solute transport is solved using a flow-oriented grid and transverse dispersion is included as a flux component perpendicular to the streamlines (Frind and Germain, 1986; Frind et al., 1987; Cirpka et al., 1999). This approach has been suc- cessfully used in two-dimensional simulations (Frind et al., 1987; Cirpka et al., 1999b), but it has not been extended to three-dimensions. A second alternative consists in using a hybrid approach (Obi and Blunt, 2004). First, advection is solved along streamlines. Then, concentration values are mapped onto a grid where a mesh-based solver is used to solve for dispersion. Finally, concentration values are interpolated back from the grid to the streamlines. The interpolation from and to streamlines introduces some numerical error that is difficult to quantify (Obi and Blunt, 2004). Because the interpolation must be done at each time step, the cumulative effect can be important even if an accurate interpolation scheme is used. The limitations of the meshless SPH and streamline-based methods for the simulation 19 of multidimensional reactive transport in porous media provide the motivation for the research in this thesis. 1.6 Objectives The main objective of this thesis is to develop, implement, and evaluate new numerical schemes based on meshless methods and streamline-based simulations to simulate reactive transport. The main objective includes the following specific objectives: 1. To derive and implement a meshless approximation for conservative transport in heterogeneous porous media. This includes deriving expressions to approximate isotropic and anisotropic local-scale dispersion. 2. To devise schemes to incorporate local-scale dispersion (longitudinal and transverse) in multidimensional streamline-based simulations. 3. To evaluate the newly derived numerical schemes in terms of accuracy, monotonicity and performance. 4. To compare the new schemes with others current numerical methods such as: high- order finite volume, method of characteristics and random-walk particle tracking methods. 5. To evaluate the suitability of using the new meshless and streamline-based schemes in reactive transport simulations. 1.7 Organization This thesis is organized in four additional chapters and four appendices. Chapters 2, 3, and 4 correspond to manuscripts that have been published or will be submitted for publication. Chapter 2 presents the application of a meshless numerical method based on smoothed particle hydrodynamics (SPH) for the simulation of conservative transport in heteroge- neous geological formations assuming isotropic dispersion. The chapter includes ana- lytical and numerical results that demonstrate that the new proposed scheme is stable, 20 accurate, and conserves global mass. Appendix A presents details of the derivation of the SPH-based numerical approximation. In Chapter 3, we extend the SPH-based approximation implemented in Chapter 2 to simulate anisotropic dispersion. In addition, we compare the new approximation with another meshless method (particle strength exchange) and a mesh-based finite volume scheme to simulate the dispersion of a two-dimensional contaminant plume under different scenarios. We conclude that, although attractive to simulate conservative transport, the new SPH-based approximation is unsuitable for reactive transport simulations because of spurious oscillations that arise if the dispersion tensor is anisotropic. The new numerical approximation is based on a SPH approximation for mixed second order derivatives, which is derived in detail in Appendix B. Chapter 4 presents the derivation of a new numerical scheme to incorporate dispersion – including transverse dispersion – in streamline simulations. A key element of the method is that dispersion is approximated in a flow oriented grid using a combination of a one-dimensional finite difference scheme and a meshless approximation for isotropic dispersion. We demontrate through analytical and numerical results that the resulting approximation is always monotonic and, hence, suitable for reactive transport simula- tions. Some key issues that arise in streamline-based simulations such as: streamline tracing, streamline spatial distribution and streamline discretization, are discussed in Appendix D. Finally, Chapter 5 summarizes the main conclusions of the three preceding chapters and includes recommendations for future research directions. 21 1.8 References Cleaning Up the Nation’s Wastes Sites: Markets and Technology Trends, Tech. Rep. 542R96005A, U.S. Environmental Protection Agency, 1996. Federal Contaminated Sites Inventory, http://www.tbs-sct.gc.ca/fcsi-rscf/home- accueil.aspx, retrieved on August 10, 2009. Ahlstrom, S., H. Foote, R. Arnett, C. Cole, and R. Serne, Multicomponent mass transport model: theory and numerical implementation (discrete-parcel-random-walk version), Tech. rep., BNWL-2127, Battelle Pacific Northwest Labs., Richland, Wash.(USA), 1977. Bandilla, K., A. Rabideau, and I. Janković, A parallel mesh-free contaminant transport model based on the Analytic Element and Streamline Methods, Adv. Water Resour., 32 , 1143–1153, 2009. Bear, J., Dynamics of fluids in porous media, Dover, 1988. Beckie, R., Scale dependence and scale invariance in hydrology, chap. Analysis of scale effects in large-scale solute-transport models, pp. 314–334, Cambridge University Press, 1998. Benson, D., and M. Meerschaert, Simulation of chemical reaction via particle tracking: Diffusion-limited versus thermodynamic rate-limited regimes, Water Resour. Res., 44 , 12, 2008. Boggs, J., S. Young, L. Beard, L. Gelhar, K. Rehfeldt, and E. Adams, Field study of dispersion in a heterogeneous aquifer 1. Overview and site description, Water Resour. Res., 28 , 3281–3291, 1992. Boris, J., and D. Book, Flux-corrected transport. I. SHASTA, A fluid transport algorithm that works, J. Comput. Phys., 11 , 172–186, 1973. Burnett, R., and E. Frind, Simulation of contaminant transport in three dimensions: 2. Dimensionality effects, Water Resour. Res. WRERAQ, 23 , 695–705, 1987. Celia, M., T. Russell, I. Herrera, and R. Ewing, An Eulerian-Lagrangian localized adjoint method for the advection-diffusion equation, Water Resour., 13 , 187, 1990. 22 Chaniotis, A., D. Poulikakos, and P. Koumoutsakos, Remeshed smoothed particle hydro- dynamics for the simulation of viscous and heat conducting flows, J. Comput. Phys., 182 , 67–90, 2002. Chaniotis, A. K., C. E. Frouzakis, J. C. Lee, A. G. Tomboulides, and K. Poulikakos, D. AU Boulouchos, Remeshed smoothed particle hydrodynamics for the simulation of laminar chemically reactive flows, J. Comput. Phys., 191 , 1–17, 2003. Cirpka, O., E. Frind, and R. Helmig, Numerical methods for reactive transport on rect- angular and streamline-oriented grids., Adv. Water Res., 22 , 711–728, 1999a. Cirpka, O., E. Frind, and R. Helmig, Numerical simulation of biodegradation controlled by transverse mixing, J. Contam. Hydrol., 40 , 159–182, 1999b. Cirpka, O. A., A. Olsson, Q. S. Ju, M. A. Rahman, and P. Grathwohl, Determination of transverse dispersion coefficients from reactive plume lengths, Ground Water , 44 , 212–221, 2006. Cleary, P. W., and J. J. Monaghan, Conduction modelling using smoothed particle hy- drodynamics, J. Comput. Phys., 148 , 227–264, 1999. Cottet, G., and P. Koumoutsakos, Vortex methods: Theory and practice., Cambridge University Press, 2000. Cox, R., and T. Nishikawa, A new Total Variation Dimishing scheme for the solution of advective-dominant solute transport, Water Resour. Res., 27 , 2645–2654, 1991. Crane, M., and M. Blunt, Streamline-based simulation of solute transport,Water Resour. Res., 35 , 3061–3078, 1999. De Simoni, M., J. Carrera, X. Sánchez-Vila, and A. Guadagnini, A procedure for the solu- tion of multicomponent reactive transport problems,Water Resour. Res., 41 , W11,410, 2005. Degond, P., and S. Mas-Gallic, The weighted particle method for convection-diffusion equations. Part 1: The case of an isotropic viscosity, Math. Comput., 53 , 485–507, 1989a. Degond, P., and S. Mas-Gallic, The weighted particle method for convection-diffusion equations. II: The anisotropic case, Math. Comp, 53 , 485,508, 1989b. 23 Delay, F., P. Ackerer, and C. Danquigny, Simulating Solute Transport in Porous or Fractured Formations Using Random Walk Particle Tracking: A Review, Vadose Zone J., 4 , 360–379, 2005. Di Donato, G., and M. Blunt, Streamline-based dual-porosity simulation of reactive trans- port and flow in fractured reservoirs, Water Resour. Res., 40 , 2004. Di Donato, G., E. Obi, and M. Blunt, Anomalous transport in heterogeneous media demonstrated by streamline-based simulation, Geophys. Res. Lett., 30 , 1608, 2003. Edwards, M., and H. Zheng, A quasi-positive family of continuous Darcy-flux finite- volume schemes with full pressure support, J. Comput. Phys., 2008. Freyberg, D., A natural gradient experiment on solute transport in a sand aquifer: 2. Spa- tial moments and the advection and dispersion of nonreactive tracers, Water Resour. Res, 22 , 2031–2046, 1986. Frind, E., and D. Germain, Simulation of contaminant plumes with large dispersive con- trast: Evaluation of alternating direction galerkin models, Water Resour. Res. WR- ERAQ, 22 , 1986. Frind, E., E. Sudicky, and S. Schellenberg, Micro-scale modelling in the study of plume evolution in heterogeneous media, Stoch. Hydrol. Hydraul., 1 , 263–279, 1987. Gingold, R. A., and J. J. Monaghan, Smoothed particle hydrodynamics: Theory and application to non-spherical stars, Mon. Not. R. Astron. Soc., 181 , 375–389, 1977. Ham, P., R. Schottinga, H. Prommerb, and G. Davisc, Effects of hydrodynamic dispersion on plume lengths for instantaneous bimolecular reactions, Adv. Water Resour., 27 , 803–813, 2004. Harten, A., and P. Lax, On a class of high resolution total-variation-stable finite-difference schemes, SIAM J. Numer. Anal., pp. 1–23, 1984. Herrera, P., and A. Valocchi, Positive solution of two-dimensional solute transport in heterogeneous aquifers, Ground Water , 44 , 803–813, 2006. Hess, K., J. Davis, D. Kent, and J. Coston, Multispecies reactive tracer test in an aquifer with spatially variable chemical conditions, Cape Cod, Massachusetts: Dis- persive transport of bromide and nickel, Water Resour. Res., 38 , 1161–1177, 2002. 24 Hill, M., and C. Tiedeman, Effective groundwater model calibration: With analysis of data, sensitivities, predictions, and uncertainty, Wiley-Interscience, 2007. Jose, S. C., M. A. Rahman, and O. A. Cirpka, Large-scale sandbox experiment on lon- gitudinal effective dispersion in heterogeneous porous media, Water Resour. Res., 40 , W12,415, 2004. Kitanidis, P. K., The concept of the dilution index, Water Resour. Res., 30 , 2011–2026, 1994. Konikow, L., D. Goode, G. Hornberger, and G. Survey, A Three-dimensional Method-of- characteristics Solute-transport Model (MOC3D), US Geological Survey, 1996. Le Potier, C., Finite volume monotone scheme for highly anisotropic diffusion operators on unstructured triangular meshes, Comptes Rendus Mathématique, 341 , 787–792, 2005. Lichtner, P., S. Kelkar, and B. Robinson, New form of dispersion tensor for axisymmetric porous media with implementation in particle tracking., Water Resour. Res., 38 , 1146, 2002. Lipnikov, K., D. Svyatskiy, and Y. Vassilevski, Interpolation-free monotone finite volume method for diffusion equations on polygonal meshes, J. Comput. Phys., 228 , 703–716, 2009. Lucy, L., A numerical approach to the testing of the fission hypothesis, Astron. J., 82 , 1013–1024, 1977. Mackay, D., D. Freyberg, P. Roberts, and J. Cherry, Natural Gradient Experiment on Solute Transport in a Sand Aquifer: 1. Approach and Overview of Plume Movement, Water Resour. Res. WRERAQ, 22 , 1986. Mayer, K., E. Frind, and D. Blowes, Multicomponent reactive transport modeling in vari- ably saturated porous media using a generalized formulation for kinetically controlled reactions, Water Resour. Res., 38 , 1174, 2002. Mills, R., C. Lu, P. Lichtner, and G. Hammond, Simulating subsurface flow and transport on ultrascale computers using PFLOTRAN, in Journal of Physics: Conference Series, vol. 78, p. 012051, Institute of Physics Publishing, 2007. 25 Mlacnik, M., and L. Durlofsky, Unstructured grid optimization for improved monotonicity of discrete solutions of elliptic equations with highly anisotropic coefficients, J. Comput. Phys., 216 , 337–361, 2006. Molz, F., and M. Widdowson, Internal inconsistencies in dispersion-dominated models that incorporate chemical and microbial kinetics, Water Resour. Res., 24 , 1988. Neuman, S., A Eulerian-Lagrangian numerical scheme for the dispersion-convection equa- tion using conjugate space-time grids, J. Comput. Phys., 41 , 1981. Neuman, S., Adaptive Eulerian-Lagrangian finite element method for advection- dispersion, Int. J. Numer. Meth. Engng., 20 , 321–37, 1984. Nordbotten, J., and I. Aavatsmark, Monotonicity conditions for control volume methods on uniform parallelogram grids in homogeneous media, Computat. Geosci., 9 , 61–72, 2005. Obi, E., and M. Blunt, Streamline-based simulation of advective-dispersive solute trans- port, Adv. Water Resour., 27 , 913–924, 2004. Obi, E. I., and M. J. Blunt, Streamline-based simulation of carbon dioxide storage in a North Sea aquifer, Water Resour. Res., 42 , W03,414, 2006. Oya, S., and A. J. Valocchi, Transport and biodegradation of solutes in stratified aquifers under enhanced in situ bioremediation conditions, Water Resour. Res., 34 , 3323–3334, 1998. PFLOTRAN, Scaling - application parallel performance, http://ees.lanl.gov/source/orgs/ees/pflotran/simscaling.shtml, retrieved on August 12, 2009. Pickens, J., and G. Grisak, Scale-dependent dispersion in stratified granular aquifer., Water Resour. Res., 17 , 1191–1211, 1981. Pruess, K., TOUGH2: A general-purpose numerical simulator for multiphase fluid and heat flow, Tech. Rep. LBL-29400 , Lawrence Berkeley National Laboratory, 1991. Rubin, J., Transport of reacting solutes in porous media: Relation between mathematical nature of problem formulation and chemical nature of reactions, Water Resour. Res., 19 , 1983. 26 Russell, T., and M. Celia, An overview of research on Eulerian-Lagrangian localized adjoint methods (ELLAM), Adv. Water Resour., 25 , 1215–1231, 2002. Salamon, P., D. Fernàndez-Garcia, and J. Gómez-Hernández, A review and numerical assessment of the random walk particle tracking method., J. Contam. Hydrol., 87 , 277–305, 2006. Steefel, C., and K. MacQuarrie, Approaches to modeling of reactive transport in porous media, Reviews in Mineralogy and Geochemistry, 34 , 85–129, 1996. Steefel, C., and K. Maher, Fluid-rock interaction: A reactive transport approach, Tech. Rep. LBNL1798E , Lawrence Berkeley National Laboratory, 2009. Steefel, C., D. DePaolo, and P. Lichtner, Reactive transport modeling: An essential tool and a new research approach for the Earth sciences, Earth Planet. Sci. Lett., 240 , 539–558, 2005. Suciu, N., C. Vamos, J. Vanderborght, H. Hardelauf, and H. Vereecken, Numerical in- vestigations on ergodicity of solute transport in heterogeneous aquifers, Water Resour. Res, 42 , 1–17, 2006. Sudicky, E., A natural gradient experiment on solute transport in a sand aquifer: Spa- tial variability of hydraulic conductivity and its role in the dispersion process, Water Resour. Res., 22 , 2069–2082, 1986. Tartakovsky, A., P. Meakin, T. Scheibe, and B. Wood, A smoothed particle hydrody- namics model for reactive transport and mineral precipitation in porous and fractured porous media, Water Resour. Res., 43 , W05,437, 2007. Thiele, M., R. Batycky, and M. Blunt, Simulating flow in heteroneous systems using streamtube and streamlines, SPE Reservoir Engineering, pp. 5–12, 1996. Thiele, M., R. Batycky, and M. Blunt, A streamline-based 3D field-scale compositional reservoir simulator, Soc. Petrol. Eng. J., 1997. Tompson, A., Numerical simulation of chemical migration in physically and chemically heterogeneous porous media, Water Resour. Res., 29 , 3709–3726, 1993. Tompson, A., and L. Gelhar, Numerical simulation of solute transport in randomly het- erogeneous porous media, Water Resour. Res., 26 , 2541–2562, 1990. 27 Valocchi, A., Validity of the local equilibrium assumption for modeling sorbing solute transport through homogeneous soils, Water Resour. Res., 21 , 1985. Weeks, S., and G. Sposito, Mixing and stretching efficiency in steady and unsteady groundwater flows, Water Resour. Res., 34 , 3315–3322, 1998. White, M., M. Oostrom, and R. Lenhard, Modeling fluid flow and transport in variably saturated porous media with the STOMP simulator. 1. Nonvolatile three-phase model description, Adv. Water Resour., 18 , 353–364, 1995. Yee, H., R. Warming, and A. Harten, Implicit total variation diminishing (TVD) schemes for steady-state calculations, J. Comput. Phys, 57 , 327–360, 1985. Yeh, G., and V. Tripathi, A critical evaluation of recent developments in hydrogeochem- ical transport models of reactive multichemical components, Water Resour. Res., 25 , 93–108, 1989. Yuan, G., and Z. Sheng, Monotone finite volume schemes for diffusion equations on polygonal meshes, J. Comput. Phys., 2008. Zalesak, S., Fully multidimensional flux-corrected transport algorithms for fluids, J. Com- put. Phys., 31 , 335–362, 1979. Zheng, C., and S. M. Gorelick, Analysis of solute transport in flow fields influenced by preferential flowpaths at the decimeter scale, Ground Water , 41 , 142–155, 2003. Zheng, C., and P. Wang, MT3DMS: A Modular Three-Dimensional Multispecies Trans- port Model for Simulation of Advection, Dispersion, and Chemical Reactions of Con- taminants in Groundwater Systems; Documentation and User’s Guide, Contract Report SERDP-99-1, US Army Engineer Research and Development Center, Vicksburg, MS , 1999. Zimmermann, S., P. Koumoutsakos, and W. Kinzelbach, Simulation of pollutant trans- port using a particle method, J. Comput. Phys., 173 , 322–347, 2001. 28 Chapter 2 A Meshless Method to Simulate Solute Transport in Heterogeneous Porous Media1 2.1 Introduction 2.1.1 Background Contaminant transport in natural aquifers is a complex, multiscale process that is fre- quently studied using numerical methods. Conservative solute transport is typically modeled using the advection-dispersion equation (ADE). Despite the large number of available numerical methods that have been developed to solve it, the accurate numerical solution of the ADE still presents formidable challenges. In particular, current numeri- cal solutions of multidimensional advection-dominated transport in non-uniform velocity fields are affected by one or all of the following problems: numerical dispersion that in- troduces artificial mixing and dilution, grid orientation effects, and unphysical numerical oscillations (Herrera and Valocchi, 2006). To correctly capture the basic mechanisms that control conservative solute transport in natural aquifers an ideal numerical method should be able to: (i) accurately capture 1A version of this chapter has been published. P. Herrera, M. Massabo, and R. Beckie (2009) A meshless method to simulate solute transport in heterogeneous porous media. Adv. Water Resour., 32:413–429. 29 the effect of small-scale velocity fluctuations upon solute distribution, (ii) simulate the effect of small values of local-scale dispersion in advection-dominated transport, (iii) reproduce small-scale concentration fluctuations and (iv) allow the efficient simulation of problems at moderate to large scales. In what follows we only discuss numerical methods to simulate conservative solute transport but the same set of requirements should be satisfied by any successful numerical method used to simulate reactive transport. The objective of this paper is to develop and test a meshless method to simulate contam- inant transport in porous media. This work was primarily motivated by our experience in theoretical investigations of solute mixing and plume dilution in heterogeneous porous media. Those investigations require an efficient numerical method that is able to accu- rately simulate solute transport in multidimensional non-uniform velocity fields. We are also interested in developing a meshless method that can be used to simulate conservative and non-conservative solute transport with minimum modification. The main contributions of this paper are: (i) to derive a meshless approximation for the dispersion operator in heterogeneous porous media flow, (ii) to compare the meshless approximation with other numerical methods traditionally used to simulate conserva- tive solute transport in heterogeneous multidimensional velocity fields, (iii) to study the convergence properties of the meshless approximation of the dispersion operator for different spatial node distributions, and (iv) to demonstrate that the proposed mesh- less approximation can be used to solve the ADE in different scenarios ranging from advection-dominated to dispersion-dominated solute transport with accuracy better than or comparable to standard numerical methods. Although we address only conservative transport in this paper we highlight the advantages of the proposed scheme for simulating reactive transport. 2.1.2 Numerical Methods A detailed discussion of every numerical method used to solved the ADE is beyond the scope of this manuscript, however we briefly discuss some of them to motivate the development of our new meshless method. Grid or mesh-based methods such as finite difference, finite volume or finite element meth- ods are relatively easy to implement, their convergence, stability and accuracy properties are well understood, and it is possible to develop formulations that are mass conserva- tive. On the other hand, mesh-based methods have difficulty in accurately simulating 30 multidimensional advection-dominated problems because of numerical dispersion that in- troduces excessive artificial mixing and dilution of the contaminant plume. Therefore, grid-based methods are only advised for problems with low Péclet number (Zheng and Wang, 1999). Hybrid schemes were developed to address the limitations of grid-based methods. The following hybrid schemes are based on the same general concept – the use of streamlines or particles to handle advection and a grid-based method to handle dispersion: hybrid Eulerian-Lagrangian methods (Neuman, 1981, 1984), method of characteristics (MOC) and hybrid method of characteristics (HMOC) in the popular MT3DMS (Zheng and Wang, 1999) and MOC3D (Konikow et al., 1996), Eulerian-Lagrangian localized adjoint methods (ELLAM) (Celia et al., 1990; Russell and Celia, 2002), and three-dimensional hybrid streamline-grid approaches (Obi and Blunt, 2004). At each time step, these meth- ods solve the advection–dispersion equation in two steps. First, changes in concentrations due to advection are computed using some suitable scheme such as particle-tracking or by solving the transport equation along streamlines. Then, concentration values are in- terpolated onto a grid. Next, grid concentration values are used to solve for dispersion, and eventually reactions, using some traditional mesh-based solver. Multiple variations of this approach exist depending on the interpolation methods and tracking algorithm. However, all of them require mapping concentrations between cell centers and particle locations or streamline nodes. This remapping step introduces numerical dispersion that is difficult to quantify and control in multidimensional simulations. Moreover, the nu- merical dispersion due to the remapping step is more important in simulations with large grid Péclet number where the effect of dispersion is not enough to smooth the sub-grid scale concentration distribution. The limitations of grid-based and hybrid methods to simulate advection dominated prob- lems have motivated the development of Lagrangian and meshless methods including those based on a random-walk and those based on integral interpolations. Random-walk particle-tracking methods (RWPT) have long been used to simulate con- servative solute transport in porous media (Ahlstrom et al., 1977; Smith and Schwartz , 1980; Pickens and Grisak, 1981). In this type of model, solute mass is distributed among a set of particles that move carried by the flow velocity and by a random drift that mod- els dispersive transport (Delay et al., 2005; Salamon et al., 2006). Solute concentrations are estimated by averaging the mass contained in the particles found in some specified volume. Therefore, concentration values depend upon the total number of particles, size of the averaging volume, and spatial particle distribution. The numerical precision of 31 the computed concentration is limited by the finite number of particles used in a simula- tion and the calculated concentration usually exhibits numerical oscillations that can be amplified in presence of non-linear reactions (Tompson and Dougherty, 1992; Tompson, 1993). Therefore, the use of the method is limited to conservative transport or to reac- tive transport simulations with simple reactions that can be modeled by changing the state or phase of individual particles, e.g. sorption (Valocchi and Quinodoz , 1989). The popularity of RWPT is due to its natural capacity to accurately simulate advection, ease of implementation, and relatively moderate computational requirements. Because of its advantages RWPT has become the de facto standard method used in numerical studies of plume spreading and dilution. In contrast to RWPT methods that simulate dispersion in a fluid by a random movement of particles that carry solute mass, kernel interpolation methods simulate mass transport using a collection of particles that move according to the velocity field and carry and ex- change solute mass with surrounding particles. Particle locations are used as quadrature points to evaluate integral interpolations of variables and their derivatives. Importantly, these schemes are able to incorporate diffusive effects and mixing without using a grid or mesh, so they are also called meshless methods. Some examples of this type of method are vortex methods (Cottet and Koumoutsakos, 2000) and particle strength exchange (PSE) method (Degond and Mas-Gallic, 1989a). Zimmermann et al. (2001) present, to the best of our knowledge, the only application of this type of method to simulate solute transport in porous media at the continuum scale. Their results indicate that the method gives accurate and stable results for the flow configuration considered if a remeshing tech- nique is used to control errors that result from irregular spatial particle distributions. As in other methods, the remeshing step introduces numerical dispersion that can be con- trolled but not completely avoided by using a suitable interpolation scheme (Cottet and Koumoutsakos, 2000; Chaniotis et al., 2002). Smoothed particle hydrodynamics (SPH) methods are another type of kernel-based in- terpolation scheme (Gingold and Monaghan, 1977; Lucy, 1977). Cleary and Monaghan (1999) presented a SPH scheme that allows one to solve the multidimensional ADE us- ing an integral interpolation of the dispersion operator that is less sensitive to particle disorder than traditional kernel interpolation schemes. Since the method can handle dispersion without remapping the concentration field onto a grid, it is free of numerical dispersion and grid orientation effects. As we show later, a key property of SPH is that the method tracks concentration values, in contrast to RWPT approaches which funda- mentally track particles with fixed masses. This feature of SPH allows one to simulate 32 reactive transport directly with individual particles (e.g. Chaniotis et al., 2003). We next propose a method to simulate solute transport in porous media based on the SPH formalism. We show that this SPH-based method is advantageous because of its inherent ability to solve advection, its capacity to approximate dispersion in a meshless fashion, and its ability to reproduce smooth fine-scale concentration distributions appropriate for reactive transport simulations. After deriving the method in Section 2.2, we compare and contrast it to a conventional RWPT method and other traditional mesh-based methods in Section 2.3. 2.2 Monte Carlo SPH method In application of meshless methods such as SPH it is appropriate to reformulate the ADE in terms of a Lagrangian coordinate system as dr dt = v (r) (2.1) dC dt r = ∇ · (D∇C)|r (2.2) where C is the solute concentration, D is the local-scale dispersion tensor, v is the pore water velocity, and r is the position vector of a small fluid volume or material point. As we describe next, in SPH methods the concentration field is represented using a set of particles that carry concentration information and are distributed through the domain – even in areas where solute concentration is zero. Practically all meshless methods including SPH use a particle-tracking approach to integrate (2.1) in the same way as done in RWPT (Delay et al., 2005; Salamon et al., 2006). The key distinction between SPH and RWPT is how dispersion is approximated. In SPH methods, dispersion – the solution of equation (2.2) – is evaluated using a kernel interpolation approximation. The “smoothed” in SPH comes from the representation of a scalar or vector field by a smoothed integral interpolation. The smoothed interpolation AS(r) of a field A(r) is defined as the integral (Gingold and Monaghan, 1977) AS(r) = ˆ A(r)W (r− r, h) dr (2.3) 33 where W (r− r, h) is a kernel function with compact support around r and smoothing length h that satisfies some normalization properties (Gingold and Monaghan, 1977). Spline polynomials with finite support are usually used as kernel functions because of their practical advantages (Price, 2004). For those functions the compact support volume of the kernel depends upon h. Figure 2.1 shows values of the Gaussian and cubic-spline kernels and their derivatives as function of the smoothing length. −3 −2 −1 0 1 2 3 0.0 0.2 0.4 0.6 0.8 r/h W (r/ h) −3 −2 −1 0 1 2 3 −0.8 −0.6 −0.4 −0.2 0.0 r/h W ’(r /h) −3 −2 −1 0 1 2 3 −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 r/h W ’’( r/h ) −3 −2 −1 0 1 2 3 −2.0 −1.5 −1.0 −0.5 0.0 r/h F( r/h ) Figure 2.1: Kernel function W, first derivative W’, second derivative W’’ and sym- metric F function defined in Appendix A, for Gaussian (solid line) and cubic spline (dashed line) kernels. The numerical approximation of AS can be evaluated using a Monte Carlo integration scheme by sampling the integrand A(r)W (r) at a limited set of disordered points or particle locations. To evaluate the integral one must consider that the set of scattered points is not uniformly distributed, therefore their spatial distribution must be explicitly taken into account in the integral evaluation to get the following modified form of (2.3), As(r) = ˆ A(r) p(r)W (r− r ) p(r)dr (2.4) 34 where p(r) is the probability density of finding a particle in a given unit volume with units of one over volume [1/L3] (Gingold and Monaghan, 1982; Tartakovsky and Meakin, 2005). Thus, p(r)dr can be interpreted as a non-uniform density to sample the modified integrand A(r)W (r)/p(r) (Press et al., 1992, p. 316). The exact evaluation of p(r) for a set of scattered points in multiple dimensions is a very difficult task, but it can be estimated using a density estimation by kernels approach (Schaback and Wendland, 2006), which yields, p(r) = 1 Np Np j=1 W (r− rj) (2.5) Finally, the Monte Carlo approximation of (2.4) is AN(r) = 1 Np Np j A(rj)W (r− rj) p(rj) ±O 1 Np (2.6) where Np is the total number of points that effectively contribute to the integral. This last expression is a valid approximation of the integral for any set of scattered points. We note that in practice the error estimate in (2.6) is an upper bound and that the actual error also depends upon p(r), i.e. the spatial distribution of the points, and the local smoothness properties of A. For example, numerical studies have shown that the actual error is much smaller for points that are reasonably well distributed (Cleary and Monaghan, 1999; Monaghan, 2005). Traditional SPH simulations used to solve hydrodynamics equations consider that the set of locations rj represent the positions of a set of fluid particles with constant mass mj. In that case, the fluid mass density ρ(r) is proportional to the particle density p(r) and it can be estimated by using an expression similar to (2.5) where the mass of individual particles appears explicitly (Monaghan, 1992, 2005). We note that the formulation given by (2.5) and (2.6) is equivalent to the standard SPH formulation if the total mass in the system is one and it is uniformly distributed among particles. This is consistent with SPH simulations where, in general, the fluid mass assigned to each particle is considered as a constant scaling parameter that is set at the beginning of individual simulations to tune the spatial fluid density distribution (Dilts, 1999). 35 There are two SPH approaches to approximate transport equations involving second order derivatives. First, second order derivatives can be easily evaluated by differentiating (2.6). The resulting expression involves the second derivative of the kernel, so it is very sensitive to particle disorder (Cleary and Monaghan, 1999). In that case particle positions must be periodically reinitialized on a regular lattice to achieve acceptable accuracy (Chaniotis et al., 2002). A second approach is based on an integral approximation of the dispersive fluxes that depends only upon the first derivative of the kernel (Brookshaw, 1985; Cleary and Monaghan, 1999). Considering isotropic dispersion, i.e. D(r) = D(r)I, where I is the identity matrix, the approximation of (2.2) is dCi dt = 1 Np Np j=1 1 pj (Dj +Di) (Cj − Ci)F (rj − ri) (2.7) where Ci is the solute concentration at position ri and F (rj − ri) is a function of the separation vector and first derivative of the kernel that has spherical symmetry. Appendix A presents the derivation of (2.7). Equation (2.7) indicates that the magnitude of the contribution of solute from particle j to particle i is equal to the contribution of particle j to particle i, i.e. the mass flux is anti- symmetric fij = −fji, only if pi = pj . In general, for a set of irregularly spaced particles pi = pj , so (2.7) does not satisfy a basic property of the dispersion operator (Kuzmin and Turek, 2002). Thus, it is necessary to replace the denominator by a symmetric approximation of the form p̂ij = g(pi, pj), e.g. arithmetic or harmonic average. In general, this correction is relatively small because particles that effectively contribute to the summation are within few smoothing lengths due to the compact support property of the kernel. Similar corrections to recover symmetry are used in standard SPH simulations that consider variable smoothing lengths (Monaghan, 2005). Our MC-SPH method is based upon this formulation to approximate dispersive fluxes that results in dCi dt = 1 Np Np j=1 1 p̂ij (Dj +Di) (Cj − Ci)F (rj − ri) (2.8) We refer to this approximation as the Monte Carlo SPH (MC-SPH) formulation for dis- persion. Equation (2.8) satisfies two important physical constraints. First, dispersive fluxes are anti-symmetric. Second, mass transfer occurs from higher to lower concentra- tions because for typical kernels, F (rj − ri) < 0 as shown in Figure 2.1. 36 In standard SPH simulations there is another approach to recover the symmetry of the fluxes that consists in including the fluid density on the right hand side of (2.2). In this case, density is placed inside operators following the “second golden rule of SPH” (Monaghan, 1992). The resulting numerical approximation is dCi dt = Np j=1 mj ρiρj (ρjDj + ρiDi) (Cj − Ci)F (rj − ri) (2.9) where ρi is the numerical approximation of the fluid mass density at position ri. Equation (2.9) is the standard SPH approximation for dissipative or dispersive transport and it has been used to simulate heat conduction in compressible gases (Cleary and Monaghan, 1999; Español and Revenga, 2003; Jubelgas et al., 2004); to simulate viscous effects in low Reynolds number flows (Morris et al., 1997; Zhu et al., 1999); and to simulate solute dispersion at the pore scale (Zhu and Fox , 2002; Tartakovsky and Meakin, 2005). In what follows we refer to this approximation as weakly compressible SPH (WC-SPH) formulation for dispersion. Although this approach is reasonable in simulations that consider variable fluid density so that density must be explicitly incorporated inside the dispersion operator, its use in incompressible flow simulations with constant density is, at least, questionable. Moreover, as shown by equation (2.8), it is not necessary to use such a pragmatic approach to develop a numerical formulation that satisfies basic physical principles and conserves solute mass. We close this section by summarizing the main distinctive properties of the MC-SPH formulation. The approach considers that fluid particles represent a constant fluid volume larger than a representative elementary volume (REV) such that Darcy’s velocities can be defined and that particle trajectories can be computed by integrating (2.1). Solute mass is distributed among a set of particles that carry concentration values. Local-scale dispersion that occurs at scales much smaller than the REV, is modeled as a Fickian solute mass transfer process between particles. Numerically, local-dispersion is approximated by a local integral interpolation of the dispersion operator in (2.2). We note that the particle fluid volume does not explicitly appear in the numerical formulation and that, from a practical point of view, fluid particles can be regarded as numerical nodes. 2.2.1 Time Integration The time integration of the system of equations (2.1) and (2.2) requires the use of a sequential procedure. First, at the beginning of each time step node locations and con- 37 centrations are recorded. Then, new locations are calculated by integrating (2.1) using an explicit time-marching scheme (e.g. Runge–Kutta methods) or a particle-tracking al- gorithm (e.g. Pollock, 1988). After the new locations are computed, new concentrations are calculated by integrating (2.2). This term can be integrated using explicit or implicit schemes. For example, using a first-order approximation it can be approximated by Ct+∆ti − Cti ∆t = j αij C∗j − C∗i (2.10) where αij = 1 p̂j (Di +Dj)F (rj − ri) ≥ 0 (2.11) where C∗i = Cti or C∗i = Ct+∆ti for explicit and implicit time integration, respectively. Then, the first-order implicit approximation is given by 1 +∆t j αij Ct+∆ti − ∆t j αij Ct+∆tj = Cti (2.12) It is easy to demonstrate that this integration scheme is unconditionally stable and posi- tivity preserving. Although possible, implicit schemes are seldom used because of compu- tational overhead. Since nodes move with the flow, the connectivity list, i.e. the number of nodes within the kernel support volume of a given node changes at each time step. The memory requirements to store the associated matrix and the computational cost to generate it and computing its inverse can be quite large, depending upon the average number of nodes per smoothing length. That is why we used conditionally stable ex- plicit time integration schemes in the simulations presented in Section 2.3. We motivate the discussion about the stability of explicit schemes by writing the first-order explicit approximation of (2.10) Cti = 1−∆t j αij Cti + ∆t j αij Ctj (2.13) which is stable and positivity preserving if 1/αij ≥ ∆t. Empirical tests have shown that other explicit solutions are stable for time steps∆t such that (Cleary and Monaghan, 1999) 38 ∆t ≤ h 2 D (2.14) where is a coefficient that depends upon the kernel function. In our simulations we used a cubic-spline kernel and = 0.1 to get stable results using an explicit second-order Runge–Kutta scheme. From a physical point of view, equation (2.12) indicates that the time step must be smaller than a dispersion time scale given by the dispersion coefficient and the kernel support volume. 2.2.2 Accuracy and Spatial Resolution Errors in meshless approximations based on kernel interpolants come from two sources (Brackbill, 2005; Quinlan et al., 2006). The integral interpolation in (2.3) introduces a smoothing error that depends on the shape and smoothing length of the kernel. Addition- ally, there is a numerical integration error that depends upon the number and location of the nodes and the smoothness of the real function (Schaback and Wendland, 2006). There is a tradeoff between both sources of error because the accuracy of the smoothed quantity increases as the smoothing length decreases, while the numerical integration er- ror increases as the number of nodes per support volume decreases. Therefore, the only way to simultaneously reduce both sources of error is to decrease the smoothing length while increasing the total number of nodes to keep the same average number of nodes per support volume. In general, for a given function and node distribution there is a critical smoothing length hc such that for h > hc the smoothing error dominates and that for h < hc the integration error is more important. The determination of hc for irregularly spaced points is very difficult, if not impossible. The numerical integration error also depends upon the regularity of the node distribution. Meshless approximations such as SPH methods produce very accurate results in situa- tions where particles are regular or uniformly distributed (Monaghan, 2005). In those situations the error affecting the simulation is much smaller than the theoretical error es- timate of (2.6) which considers a random particle distribution (Monaghan, 2005). When particles are uniformly distributed the leading error term is due to the interpolation er- ror and is controlled by the kernel smoothing length that sets the spatial resolution. For example, numerical studies have shown that for a set of equispaced particles the error for (2.9) converges with h2 (Cleary and Monaghan, 1999). 39 The previous discussion indicates that the accuracy of the MC-SPH method to simulate local-dispersion will evolve during the simulation. At early times the node distribution is similar to the initial regular distribution, so the leading error term is due to the interpolation approximation. As nodes are redistributed in space by the non-uniform flow velocity, they become clustered in different zones, so the numerical integration error becomes much more important. Then, the accuracy of the method during the simulation must be controlled by an appropriate choice of the kernel smoothing length and the number of nodes per kernel support volume or initial average spacing. The choice of those parameters is not trivial, particularly in multidimensional simulations, and requires some trial and error. In the simulations presented below, we selected those parameters using the following steps: (i) setup an initial node configuration, (ii) simulate advection only, (iii) check node distribution and, particularly, number of nodes per kernel support volume, (iv) if node distribution was considered too sparse, increase the initial number of nodes, (v) repeat until an acceptable final node distribution is produced. Because particle tracking is very efficient, the determination of the optimum initial node configuration demanded little time and effort relative to the overall simulation time. 2.2.3 Mass Conservation In the proposed MC-SPH scheme solute mass is distributed in space as a finite set of concentration values at node positions, thus the total mass in the system equal to the integral of the concentration over the domain can be approximated as M = ˆ Ω C(r)dr ≈ CV +O 1 Np (2.15) where we have used a Monte Carlo integration approach and V is the volume of the domain Ω. As discussed above, the accuracy of the integral depends upon the total number of points Np and their spatial distribution. In most practical SPH simulations the number of particles is quite large and (2.15) is a good approximation. Therefore, we can study the evolution of the total solute mass in the system by writing dM dt ≈ V d C dt = V Np Np i=1 dCi dt (2.16) 40 Finally, substituting expression (2.10) used to compute the temporal derivative of the concentration, we get dM dt = V Np i j αij (Cj − Ci) = 0 (2.17) since αij = −αji, and thus solute mass is globally conserved. In the analyses that follow we use this expression to characterize mass balance. 2.3 Numerical evaluation of the MC-SPH method To test the capacity of the MC-SPH method to provide reasonably accurate solutions for dispersive transport we compare it with the analytical solutions of simple one- and two-dimensional dispersion problems and with other numerical solutions for simulating advective-dispersive transport in non-uniform velocity fields. 2.3.1 One-Dimensional Dispersion We consider a simple one-dimensional problem to illustrate the behavior of the error affecting our new MC-SPH approximation in (2.8) as function of the particle distribution and smoothing length. We simulate the dispersion of a one-dimensional Gaussian plume where the concentration as function of position and time is given by C(x, t) = C0s0 s e −(x−x0)2 2s2 (2.18) where s = s20 + 2Dt, C0 is the maximum initial concentration, s0 is a constant that controls the size of the initial plume, and x0 is the position of the plume center. Particles were initially distributed over a regular equispaced grid with spacing ∆x. To study the effect of the particle distribution, we generated a non-uniform particle distri- bution by adding a normally distributed perturbation with standard deviation σ. Then, we computed the numerical solution using a Gaussian kernel with cutoff at 4h, i.e. only particles within 4h contribute to the kernel summation. The error introduced by this approximation is small because of the rapid falloff of the Gaussian function. 41 Figure (2.2) shows the maximum normalized error defined as error = CNumerical − CAnalytical2 /N (2.19) where N = Np is the number of particles, versus h for two different ratios ∆x/h for solutions computed using our MC-SPH and the traditional WC-SPH, formulations. For uniform particle distribution (i.e., σ/∆x = 0) and ∆x/h = 0.66 the error increases as h2. As particles become disordered the error increases for any value of h. Particle disorder is less important for large smoothing lengths and errors for different σ are similar. Larger values of the ratio ∆x/h, which is equivalent to fewer particles per support volume, produces larger error even for the uniform particle distribution. For large particle disorder (σ/∆x = 1) the interpolation error is dominant and the error of the numerical solutions is almost independent of h. Figure (2.2) also shows that the use of the new MC-SPH approximation instead of the standard WC-SPH does not make a difference as both solutions produce results with similar accuracy. 2.3.2 Two-Dimensional Dispersion In this section we consider the simulation of the dispersion of a two-dimensional Gaus- sian plume using the RWPT and MC-SPH numerical methods. Despite the fact that both methods are based on a Lagrangian formulation of the solute transport problem and use a particle-tracking algorithm to integrate the advection equation, there are im- portant differences in their conceptual approaches, accuracy, numerical implementation, and computational performance that must be considered to evaluate their merits. Table 2.1 summarizes the main differences between both methods and Appendix C gives details about our implementation of the RWPT method. To make things simple we assume that the Gaussian plume is within a square two- dimensional domain and that the maximum concentration, C0, occurs at the center of the domain. In this case, the concentration as function of position and time is given by C(x, y, t) = C0s 2 0 s2 e −(x−x0)2 2s2 − (y−y0)2 2s2 (2.20) To calculate a reasonable value for the local-dispersion coefficient we assume a pore water velocity v = 10−7m/s and dispersivity α = 1 cm which results in a local-dispersion 42 10−3 10−2 10−1 10−7 10−6 10−5 10−4 10−3 10−2 10−1 h Er ro r MC σ/Δx = 1 WC σ/Δx = 1 MC σ/Δx = 0.3 WC σ/Δx = 0.3 MC σ/Δx = 0.1 WC σ/Δx = 0.1 σ/dx = 0Δx/h=1.0 10−3 10−2 10−1 10−7 10−6 10−5 10−4 10−3 10−2 10−1 h Er ro r MC σ/Δx = 1 WC σ/Δx = 1 MC σ/Δx = 0.3 WC σ/Δx = 0.3 MC σ/Δx = 0.1 WC σ/Δx = 0.1 σ/Δx = 0Δx/h=0.66 Figure 2.2: Error for one-dimensional simulations as a function of the smoothing length h for Monte Carlo (MC) and Weakly Compressible (WC) formula- tions defined by equations (2.8) and (2.9), respectively. Error magnitude is shown for different ratios of particle spacing over smoothing length ∆x/h and for different perturbations over particle spacing, σ/∆x. Uni- form particle spacing corresponds to σ/∆x = 0. 43 MC-SPH RWPT Particles carry solute concentration Particles carry solute mass It is possible to compute chemical reactions at individual particles Chemical reactions must be evaluated at some cell scale It is more complex to implement full dispersion tensor It is easy to implement full dispersion tensor Numerical precision to represent concentration values up to hardware representation Numerical precision to represent concentration values given by number of particles Simulates solute mass transfer between particles Simulates solute mass transfer at cell scale It demands more computational effort but it is possible to get very good accuracy with moderate use of memory It demands less computational effort but it requires more memory to get higher accuracy Table 2.1: Comparison of MC-SPH and RWPT methods. coefficient equal to D = v · α = 10−9m2/s. We consider that the plume is centered in a square domain of side L = 100m and that s0 = 5m, so that boundary effects are negligible. To integrate the solution in time we use a time step ∆t = 11.6 days and we consider a total simulation time T = 500∆t = 15.9 years. We performed a series of simulations to evaluate the relative performance and conver- gence properties of the RWPT and our MC-SPH methods. First, we solved the problem using a RWPT method with different combinations of averaging volumes and number of particles to represent the mass in the cell with the maximum concentration as summa- rized in Table 2.2. Then, we simulated the same situation using MC-SPH considering different combinations of number of particles and kernel smoothing length which defines the average number of particles per kernel support volume as summarized in Table 2.3. We note that the direct comparison of both methods is difficult because of the differences in the way they calculate concentrations that result in different spatial resolutions and accuracies for the same number of particles. For example, particles in the RWPT simu- lations are only located within the plume edges while in MC-SPH simulations particles, as explained below, must cover a larger area. In the MC-SPH simulations presented here particles are quasi-randomly distributed in all the domain. However, it would be possible to improve the spatial resolution by distributing the same number of particles in a smaller area. Nevertheless, we believe that the results presented next constitute a fair comparison of both methods. 44 Simulation # cells Nr Np RW1 50 x 50 10 329 RW2 50 x 50 100 3,957 RW3 50 x 50 1000 40,713 RW4 100 x 100 10 1,257 RW5 100 x 100 100 15,345 RW6 100 x 100 1000 157,972 RW7 200 x 200 10 4,993 RW8 200 x 200 100 60,965 RW9 200 x 200 1000 627,153 Table 2.2: Parameters used in RWPT simulations: number of cells used to calculate concentrations, number of particles used to represent the mass within the cell with maximum concentration Nr, and total number of particles Np. Simulation h Np Nk SPH1 0.5 10,000 3 SPH2 0.5 20,000 6 SPH3 0.5 40,000 13 SPH4 0.5 60,000 19 SPH5 0.5 80,000 25 SPH6 1.0 10,000 13 SPH7 1.0 20,000 25 SPH8 1.0 40,000 50 SPH9 1.0 60,000 75 SPH10 1.0 80,000 101 SPH11 2.0 10,000 50 SPH12 2.0 20,000 101 SPH13 2.0 40,000 201 SPH14 2.0 60,000 302 SPH15 2.0 80,000 402 Table 2.3: Parameters used in SPH simulations: smoothing length h, total number of particles Np, and average number of particles per kernel support volume Nk. 45 2.3.2.1 Initial particle and concentration distribution To apply the RWPT method to this problem we must first map the spatial concentration distribution to a regular Cartesian grid. Next, we must set the number of particles that represent a given mass to compute the equivalent particle distribution. In this example we use different numbers of particles to represent the mass contained in the cells with highest concentration value. Particles within each cell are initially distributed using a quasi-random distribution to generate a uniform spatial coverage. Figure 2.3 shows the corresponding particle distribution and the equivalent cell concentrations for some exam- ple configuration. We note that particles are only present in cells where concentration values are greater than some numerical threshold equal to the ratio between the mass of individual particles and the cell volume (see Appendix C for details). Because of the av- eraging procedure used to compute cell concentrations, the maximum cell concentration value is less than C0. Similar differences between cell values and actual concentrations occur in the rest of the domain and they are relatively more important near the plume edges where cells contain fewer particles. Figure 2.3: In RWPT simulations concentration values are approximated according to the spatial distribution of particles. The left figure show the initial particle distribution corresponding to a Gaussian plume with maximum concentration C0 at the domain center. The right figure shows concen- tration values computed according to the number of particles in each cell. The initialization of particle positions and concentration values in SPH simulations are independent. Particle positions are assigned such that the resulting particle distribution covers the region of interest. For example, given an initial Gaussian plume and the same number of particles as used in Figure 2.3, particles can be quasi-randomly distributed in a 46 rectangular volume or distributed in a uniform rectangular lattice within a circular region as shown in Figure 2.4. We observe that the maximum concentration value is within 0.1% of the actual maximum concentration value C0 in both cases. This shows that the MC- SPHmethod provides a better numerical resolution to represent concentration values than the RWPT using the same number of particles. In this simple example, particles are only created within a region of the numerical domain where concentrations are greater than a given threshold value plus a surrounding buffer zone. The buffer zone is necessary to provide additional space to allow dispersion to distribute the initial solute mass in a larger volume. In real simulations it is important to prevent the existence of isolated particles with non-negligible concentration at the edge of the particle cloud to avoid numerical errors. There are three possible alternatives to control this source of error: (i) generate a particle distribution that covers all the domain, (ii) use a dynamical scheme that inserts particles as needed, (iii) generate an initial particle distribution with a buffer zone large enough to guarantee an appropriate particle distribution during the simulation. The first alternative is very simple to implement but it can become prohibitively expensive in large-scale simulations or in simulations that require fine-spacing between particles. The second solution works well but it is more difficult to implement and introduces some computational overhead because it requires more sophisticated data structures to store and manage the particle set. The third alternative combines the advantages of the other two because it is very easy to implement and requires fewer particles than the first option. Figure 2.4: In MC-SPH simulations concentration values are directly assigned to each particle. Figures show two possible initial particle distributions and cor- responding concentration values equivalent to a Gaussian plume with maximum concentration C0 at the domain center. 47 2.3.2.2 Performance The overall number of floating operations and memory requirements of the RWPT method using a background grid to compute concentration scales linearly with the to- tal number of particles, i.e. it is O(N). However, the application of (C.3) to compute smoother concentration distributions requires O(N2) operations. On the other hand, the evaluation of the summation in (2.6) corresponds to an n-body problem which naive implementation scales as O(N2) (Greengard, 1994). However, because the compact sup- port of the kernel the actual work required to compute the summation can be reduced to O(NNk), where Nk corresponds to the average number of particles per kernel sup- port volume. The implementation of such algorithms requires an efficient method for searching near-neighbor particles. Such algorithms are based on data structures used to classify particles according to their spatial coordinates. For constant smoothing length implementations as presented in this paper, the background grid algorithm is the most efficient method (Viccione et al., 2008). For spatially varying smoothing lengths, more sophisticated data structures based on octrees or binary trees must be used (e.g. Barnes and Hut, 1986; Waltz et al., 2002). An explicit implementation of the proposed meshless method as discussed in Section 2.2.1 requires an amount of memory that scales with the number of particles (O(N)). Figure 2.5 shows the CPU time required to complete a single time step as function of the total number of particles in RWPT simulations. As expected the computational cost of the method grows linearly with the total number of particles. On the other hand, Figure 2.6 shows that in SPH simulations the CPU time depends in a non-linear fashion on the total number of particles and the kernel smoothing length. Larger smoothing lengths, equivalent to more particles per kernel support volume, result in longer simulation times for the same total number of particles. Figure 2.6 also shows that, as expected, the CPU time required to complete a single time step scales linearly with the product of the total number of particles and the average number of particles per kernel support, NPK = NpNk. The differences observed between the curves corresponding to different smoothing lengths for the same product NPK are due to differences in performance of the routine that evaluates the changes in concentration at each time step as result of different combinations of Np and Nk. 48 0 1 2 3 4 5 6 7 x 105 0 200 400 600 800 1000 1200 Np No rm ali ze d CP U Ti m e Figure 2.5: Normalized CPU time required to solve one time step using RWPT as function of the total number of particles Np. Computational cost of RWPT simulations is proportional to the total number of particles Np. 49 1 2 3 4 5 6 7 8 x 104 0 50 100 150 200 250 300 Np No rm ali ze d CP U Ti m e h = 0.5 h = 1.0 h = 2.0 0 0.5 1 1.5 2 2.5 3 3.5 x 107 0 50 100 150 200 250 300 Np Nk No rm ali ze d CP U Ti m e h = 0.5 h = 1.0 h = 2.0 Figure 2.6: Normalized CPU time required to solve a single time step as function of the total number of particles Np, kernel smoothing lenght h, and average number of particles per kernel support volume Nk. Computational cost of MC-SPH simulations is proportional to the product of Np and Nk. 50 2.3.2.3 Accuracy We used two criteria to compare the accuracy and convergence properties of RWPT and MC-SPH. Figure 2.7 compares the temporal evolution of the simulated maximum concentration with the theoretical result according to (2.20). The simulated RWPT results exhibit unphysical oscillations and large errors. Such unphysical oscillations would create serious problems if an operator splitting approach was used to simulate reactive transport simulations where these errors would be amplified by non-linear reactions. Local errors in RWPT simulations do not only depend upon the total number of particles but also on the number of particles at each cell and the cell volume. For example, simulation RW3 with Np = 40713 produces maximum concentration values that are closer to the true value than the results of RW6 and RW9 with Np=157972 and Np = 627153, respectively. Simulations with lower Nr as defined in Appendix C, not shown in the figure, produced results with even larger errors. Figure 2.7 also shows a comparison of the maximum concentration simulated with MC-SPH considering Np = 40, 000 and the analytical solution. All of the simulations give solutions that are free of unphysical oscillations, however, simulations with low average number of particles per kernel support volume such as SPH3 (Nk = 13) can result in considerable local errors. Local errors can be made negligible by choosing an appropriate combination of total number of particles and kernel smoothing length to obtain larger average number of particles that effectively contribute to the numerical integration, e.g. simulations SPH8 (Nk = 50) and SPH13 (Nk = 201). Results of other simulations with larger number of particles, not shown in the figure, produced smaller errors. Figure 2.8 shows the global error as function of the total number of particles in the simulation and CPU time per time step. It is clear that using these metrics numerical solutions computed using MC-SPH converge faster to the true solution than the RWPT solutions. Figure 2.8 also shows that MC-SPH solutions have different convergence rates depending upon the kernel smoothing length used. Moreover, curves corresponding to different smoothing lengths intersect indicating the transition between regions where the error is controlled by the average number of particles per kernel support volume Nk (small Np) and the region where the error depends upon the spatial resolution given by the kernel smoothing length (large Np). For simulations that require low CPU time, the convergence rate for MC-SPH simulations is faster than the one for RWPT simulations. However, the convergence rate of both methods becomes similar for simulations with larger number of particles that require longer CPU times to complete a single time step. 51 0 50 100 150 200 250 300 350 400 450 5000.6 0.7 0.8 0.9 1 Time Step C m ax /C 0 Analytical RW3 RW6 RW9 0 50 100 150 200 250 300 350 400 450 5000.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Time Step C m ax /C 0 Analytical SPH3 SPH8 SPH13 Figure 2.7: Maximum simulated concentration versus time step. RWPT simulations with resolution number Nr = 1000 and MC-SPH simulations with Np = 40000. Estimated concentrations in RWPT simulations present numerical oscillations due to representing the solute mass distribution as a finite set of particles. MC-SPH simulations compute concentrations that are free of numerical oscillations. 52 102 103 104 105 106 10−6 10−5 10−4 10−3 Np Er ro r RWPT SPH h = 0.5 SPH h = 1.0 SPH h = 2.0 100 101 102 103 104 105 10−6 10−5 10−4 10−3 Normalized CPU Time Er ro r RWPT SPH h= 0.5 SPH h = 1.0 SPH h = 2.0 Figure 2.8: Normalized global error versus total number of particles and normalized CPU time. Error computed as defined in (2.19) substituting N by the number of cells for RWPT and the total number of particles for MC-SPH simulations. The convergence rate, measured as function of the total number of particles Np or the CPU time required to complete a single time step, is faster for MC-SPH simulations than for RWPT simulations. However, the convergence rate of both methods become similar for simu- lations that use more particles and demands longer CPU times. 53 2.3.3 Advection–Dispersion in Heterogeneous Porous Media The objective of this section is to evaluate the performance of the MC-SPH approach to simulate solute transport in two-dimensional heterogeneous porous media. To verify our MC-SPH code we compared it with the ULTIMATE total variation diminishing (TVD) finite difference solver and the hybrid method of characteristics (HMOC) particle-mesh solver included in the popular MT3DMS package (Zheng and Wang, 1999). We focus our analysis on verifying if the numerical results satisfy some basic physical requirements such as: avoiding numerical dispersion, providing positive solution free of oscillations, and mass conservation. 2.3.3.1 Setup Before solving the solute transport problem we generated a velocity field as follows: (i) generate a moderately heterogeneous random hydraulic conductivity field, (ii) calculate a velocity field by solving the saturated flow problem using MODFLOW (Harbaugh, 2000) considering a constant hydraulic head gradient from left to right, and no-flow boundaries at top and bottom. Table 2.4 shows the parameters used to generate the random hydraulic conductivity field and to solve the flow problem. We used the resulting velocity field to simulate conservative transport of a square initial plume with constant concentration, C0. Table 2.5 shows the parameters used to solve the transport problem. Figure 2.9 shows a schematic of the simulation setup. In all the simulations discussed below we only considered constant isotropic dispersion. Description Symbol Value Variance of ln(K) σY 1.4 Correlation length of ln(k) IY 2.5 Domain dimension (Lx, Ly) (200IY , 50IY ) Grid size ∆ IY /5 Mean velocity in x U 0.81 Max. velocity in x umax 6.22 Table 2.4: Parameter and results of flow model. For the TVD simulations we used the same grid discretization that was used to solve the flow problem. For the HMOC simulations the allowed total maximum number of 54 Description Symbol Value Initial plume size (Lpx, Lpy) (20IY , 20IY ) Initial plume center (Xp, Yp) (36IY , 25IY ) Péclet number Pe = UIY /D [20, 200,∞] Dimensionless time step τ = U∆t/∆ 6.5 · 10−3 Mean CFL number CFLmean = U∆t/∆ 0.03 Max. CFL number CFLmax = umax∆t/∆ 0.25 Table 2.5: Parameter values used in transport model. Figure 2.9: Domain dimensions, square initial plume, and breakthrough observation points P1 and P2 along centerline. 55 particles was 6 · 105 and the number of particles per cell in cells where the relative concentration gradient (Zheng and Wang, 1999, p. 65) was higher than 1 · 10−5 was 15. The threshold value, DCHMOC, which controls if the forward or backward MOC method is used for an individual cell according to its relative concentration gradient was set equal to 1 · 10−4 (Zheng and Wang, 1999, p. 73). In the MC-SPH simulations the total number of particles was constant during the simulation and equal to 3.8 · 105 which was equivalent to an initial number of particles per grid cell equal to 8. Particles where initially distributed in a rectangular lattice within a rectangular region of size 68IY in the direction of the flow and 28IY in the transverse direction centered at the initial plume center. The kernel smoothing length was constant and equal to half the grid size used in the MT3DMS models, so the spatial resolution of the three methods was comparable. The results of both, TVD and HMOC, methods correspond to concentration values at the center of grid cells. We interpolated the MC-SPH results which correspond to con- centration values at scattered points onto a similar grid to compare them. We stress that this interpolation was needed only for comparison purposes and it is usually not necessary in SPH simulations. We used the following expression to compute interpolated values AI , AI (ri) = j AjŴ (|ri − rj|) j Ŵ (|ri − rj|) = j Ajψij (2.21) where ψij are Shepard functions (Shepard, 1968) and summations are over all particles. Although the interpolation in (2.21) is valid for any kernel function Ŵ , we used the same kernel used in MC-SPH simulations to get interpolated quantities with similar spatial resolution. 2.3.3.2 Results Figure 2.10 shows the spatial concentration distribution at the end of the simulation for the advection-only case. Solutions given by the three methods are very different. The TVD solver is not able to avoid numerical dispersion so the plume exhibits large dilu- tion and the initial plume mass is distributed within a much larger volume. There are only few areas where the solute concentration is similar to the initial concentration. The 56 HMOC produces less numerical dispersion and the plume edges are clearly distinguish- able. However, the effects of numerical dispersion are clear in zones located between fast or slower fingers and in front and behind the main plume. The existence of those arti- ficial low concentration zones has some important practical implications. For example, in presence of reactions controlled by mixing such as biodegradation those low concen- tration zones could potentially extend the reactive zone near the plume edge (Cirpka et al., 1999b). The concentration distribution generated by the MC-SPH code is free of numerical dispersion and the plume edges are very sharp as expected in absence of local-dispersion. Zones without contaminant located between fast and slow fingers are observable surrounding all the plume volume. It is interesting to notice some isolated high concentration spots in the front and back of the plume as result of connected high and low permeability regions. Figure 2.11 shows concentration values along the domain centerline at the end of the simulation, i.e., after the plume center has traveled 62 integral scales. The three methods produce very similar results for low Péclet numbers. As expected, the results produced by TVD and HMOC methods are identical considering that both methods share the same dispersion solver routine. It is more interesting to notice the good agreement between MC-SPH and the other two methods for low Péclet values. It is difficult to say if the small differences observed at the plume edges are due to differences between the meth- ods or the interpolation method used to map the MC-SPH results onto a grid. More important differences are observed for the more strongly advection-dominated scenarios. For Péclet number equal to 200, the two Lagrangian based methods, HMOC and MC- SPH, perform similarly while the TVD solution is smoothed by numerical dispersion. This comparison clearly shows that even high-order Eulerian mesh-based methods such as TVD cannot compete with particle-based methods for advection-dominated problems. For the advection-only case the three methods give solutions that are clearly distinguish- able. TVD results show little difference with respect to the situation for Pe = 200. On the other hand, HMOC and MC-SPH results are closer to the expected sharp profile with concentration values equal to the initial concentration or zero. The MC-SPH solu- tion seems to perform better close to the plume edges where the HMOC solution gives a smoother profile as consequence of the accumulated numerical dispersion due to the interpolation of concentration values from scattered points to the cell centers at each time step. Figures 2.12 and 2.13 show breakthrough curves for points P1 and P2 located along the domain centerline at 26IY and 42IY downstream from the initial plume center, respec- 57 Figure 2.10: Spatial concentration distribution at dimensionless time τ = Ut/IY = 62 for Pe = ∞. TVD solver (top), HMOC solver (middle), and SPH solution mapped onto rectangular grid (bottom). Only dimensionless values C/C0 > 0.001 are shown. 58 0 10 20 30 40 50 60 70 800 0.2 0.4 0.6 0.8 1 C / C 0 Pe = 20 0 10 20 30 40 50 60 70 800 0.2 0.4 0.6 0.8 1 C / C 0 Pe = 200 0 10 20 30 40 50 60 70 800 0.2 0.4 0.6 0.8 1 d / IY C / C 0 Pe = ∞ TVD HMOC SPH Figure 2.11: Concentration versus accumulated distance along centerline at dimen- sionless time τ = Ut/IY = 62. 59 tively. Breakthrough curves for low Péclet values equal to 20 given by the three methods are almost identical. This confirms that the MC-SPH method is able to simulate sit- uations where dispersion is important with accuracy that is comparable to well-tested mesh-based methods as used in MT3DMS. As observed in the longitudinal profile com- parison, the difference between HMOC and MC-SPH solutions and the TVD solution increases as the transport process becomes controlled by advection. For Péclet number equal to 200, HMOC and MC-SPH produces similar results while the corresponding TVD breakthrough curves have a completely different shape typical of much higher dispersion coefficients. Finally, for the purely-advective case the breakthrough curves corresponding to each method become very different. For the point located closer to the plume center, P1, HMOC and TVD predict a much earlier arrival time and longer tail. The earlier arrival time is due to the lateral mixing produced by the numerical dispersion, which transfers solute concentration from faster plume fingers that pass close to point P1. The longer tail is also due to lateral and longitudinal numerical mixing. The breakthrough curve corresponding to the MC-SPH solution is not affected by numerical dispersion, thus it exhibits a rectangular shape as expected. For point P2, the three breakthrough curves have similar arrival time indicating that a set of fast streamlines forming a fast advancing front passes through P2, so the lateral mixing does not have a significant ef- fect. However, lateral and longitudinal numerical dispersion produce much longer tails in the corresponding HMOC and TVD curves. The analysis of the breakthrough curves at both points indicates that neither the HMOC nor TVD schemes are able to correctly predict mixing and dilution in situations where advection is much more important than dispersion. The value of the maximum plume concentration is an important parameter because it is usually used as criteria for regulatory purposes. It has also been used in theoretical studies to characterize and measure mixing and dilution processes. Figure 2.14 shows the maximum plume concentration value as a function of time. It contains two curves that correspond to the MC-SPH solution. SPH-particles correspond to the maximum concentration value observed at any particle position while SPH-mesh corresponds to the maximum concentration value after interpolation onto a grid. For Péclet value equal to 20 the three methods predict the same maximum concentration confirming the previously observed behavior. For higher Péclet values the TVD solution predicts lower maximum values than the other two methods, thus it over-predicts the dilution of the plume. As discussed above it is difficult to directly compare the mass balance properties of mesh- based methods like TVD, Eulerian–Lagrangian methods such as HMOC, and meshless 60 0 10 20 30 40 50 600 0.2 0.4 0.6 0.8 1 C / C 0 Pe = 20 TVD HMOC SPH 0 10 20 30 40 50 600 0.2 0.4 0.6 0.8 1 C / C 0 Pe = 200 0 10 20 30 40 50 600 0.2 0.4 0.6 0.8 1 τ = U t / IY C / C 0 Pe = ∞ Figure 2.12: Breakthrough curve at point P1 located 26IY downstream from initial plume center. 61 0 10 20 30 40 50 600 0.2 0.4 0.6 0.8 1 C / C 0 Pe = 20 TVD HMOC SPH 0 10 20 30 40 50 60 0.2 0.4 0.6 0.8 1 C / C 0 Pe = 200 0 10 20 30 40 50 600 0.2 0.4 0.6 0.8 1 τ = U t / IY C / C 0 Pe = ∞ Figure 2.13: Breakthrough curve at point P2 located 42IY downstream from initial plume center. 62 0 10 20 30 40 50 600.8 0.85 0.9 0.95 1 C / C 0 Pe = 20 TVD HMOC SPH−Mesh SPH−Particles 0 10 20 30 40 50 600.8 0.85 0.9 0.95 1 C / C 0 Pe = 200 0 10 20 30 40 50 600.8 0.85 0.9 0.95 1 τ = U t / IY C / C 0 Pe = ∞ Figure 2.14: Dimensionless maximum concentration versus dimensionless time. Be- cause of numerical dispersion, the maximum concentration for simula- tions with large Pe is smaller in TVD than in HMOC and MC-SPH solutions. 63 methods such as MC-SPH. In general, the only comparison that can be made consists in looking at the total solute mass distributed in the domain volume. For grid-based meth- ods with equispaced grid and uniform cell concentration, Ci, as used in the simulations discussed here, the total mass in the domain is equal to M = ´ C dV = ∆V iCi, where ∆V is the cell volume. In that case the mean concentration defined as C̄ = M/V is equal to the arithmetic average of the cell concentrations, i.e. C̄ = ∆VV iCi = 1ncells iCi. Since the total domain volume is constant, the total solute mass is conserved only if the mean concentration C̄ is constant. Figure 2.15 shows the mean solute concentration ver- sus dimensionless time for the three Péclet number considered. In the three scenarios the mean concentration computed using the TVD and MC-SPH solution at particle positions is constant, indicating that the total mass in the domain is conserved. On the other hand, the mean concentration given by the HMOC method presents small fluctuations (<1%) which are more important for the advection-dominated case. Small mass differences due to the interpolation scheme used in HMOC are expected and this error is often cited as the main disadvantage of the method (Zheng and Wang, 1999). There is a tempo- ral change in the mean concentration computed using interpolated values given by the MC-SPH solution. The change increases with time and it is higher for higher dispersion coefficients. The temporal variation is probably due to the increasing interpolation error due to the more irregular particle distribution. On the other hand, higher dispersion co- efficients increase the dilution of the plume, so the total solute mass is distributed among a larger number of particles with lower concentration values which are more sensible to interpolation errors. 2.4 Conclusions We derived a new SPH formulation based on the Monte Carlo nature of the original SPH method to simulate solute transport in heterogeneous porous media. We demonstrated that the new MC-SPH method is able to accurately simulate scenarios of practical and theoretical interest where the combined action of flow heterogeneity and local-scale dis- persion affects the plume movement, mixing and dilution. The study of those situations using traditional numerical methods is very difficult if not impossible due to numerical dispersion and other numerical artifacts such as unphysical oscillations, that not only degrade the accuracy of the numerical solution but also modify the basic physical mech- anisms that control solute transport in porous media. 64 0 10 20 30 40 50 600.99 1 1.01 1.02 1.03 C / C 0 Pe = 20 0 10 20 30 40 50 600.99 1 1.01 1.02 1.03 C / C 0 Pe = 200 0 10 20 30 40 50 600.99 1 1.01 1.02 1.03 τ = U t / IY C / C 0 Pe = ∞ TVD HMOC SPH−Mesh SPH−Particles Figure 2.15: Mean concentration versus dimensionless time. While the mean concen- tration value of SPH-Mesh (concentrations interpolated onto grid) is not constant, the mean concentration at particle locations (SPH-Particles) is constant throughout the simulation which demonstrates that the MC- SPH formulation conserves total mass. 65 We demonstrated through numerical benchmarks that the numerical error of the MC- SPH method behaves in a complex way and it depends upon several factors such as smoothing length, particle spacing and solution smoothness. However, numerical results indicate that the overall accuracy of the method can be controlled with an adequate choice of those parameters. The overall performance of the proposed method compares favor- ably with existent numerical methods such as RWPT, higher-order Eulerian and hybrid Eulerian–Lagrangian schemes for the set of simulations discussed in this paper. Due to its Lagrangian nature the MC-SPH method performs very well for advection-dominated problems. However, in contrast to other Lagrangian schemes, it is also able to simulate scenarios where dispersion is important with accuracy comparable to Eulerian mesh- based methods. Moreover, for the large range of Péclet numbers considered the MC-SPH method provided solutions that are physically correct, e.g. sharp-fronts with negligible numerical dispersion for advection dominated problems, or correct amount of mixing and dilution in cases where dispersion is important. We have also demonstrated through the- ory and numerical simulations that for practical problems the MC-SPH method satisfies total mass conservation within reasonable accuracy. Encouraging results of ongoing research to extend the MC-SPH method to simulate anisotropic dispersion and chemical reactions considering more general boundary condi- tions will be reported on due course. 66 2.5 References Ahlstrom, S., H. Foote, R. Arnett, C. Cole, and R. Serne, Multicomponent mass transport model: theory and numerical implementation (discrete-parcel-random-walk version), Tech. rep., BNWL-2127, Battelle Pacific Northwest Labs., Richland, Wash.(USA), 1977. Bagtzoglou, A., A. Tompson, and D. Dougherty, Projection functions for particle-grid methods, Num. Meth. Part. Diff. Eq., 8 , 325–340, 1992. Barnes, J., and P. Hut, A hierarchical O (N log N) force-calculation algorithm, Nature, 324 , 446–449, 1986. Brackbill, J., Particle methods, Int. J. Numer. Meth. Fl., 47 , 693–705, 2005. Brookshaw, L., A method of calculating radiative heat diffusion in particle simulations, Astronomical Society of Australia, Proceedings (ISSN 0066-9997), 6 , 207–210, 1985. Celia, M., T. Russell, I. Herrera, and R. Ewing, An Eulerian-Lagrangian localized adjoint method for the advection-diffusion equation, Water Resour., 13 , 187, 1990. Chaniotis, A., D. Poulikakos, and P. Koumoutsakos, Remeshed smoothed particle hydro- dynamics for the simulation of viscous and heat conducting flows, J. Comput. Phys., 182 , 67–90, 2002. Chaniotis, A. K., C. E. Frouzakis, J. C. Lee, A. G. Tomboulides, and K. Poulikakos, D. AU Boulouchos, Remeshed smoothed particle hydrodynamics for the simulation of laminar chemically reactive flows, J. Comput. Phys., 191 , 1–17, 2003. Cirpka, O., E. Frind, and R. Helmig, Numerical methods for reactive transport on rect- angular and streamline-oriented grids., Adv. Water Res., 22 , 711–728, 1999a. Cirpka, O., E. Frind, and R. Helmig, Numerical simulation of biodegradation controlled by transverse mixing, J. Contam. Hydrol., 40 , 159–182, 1999b. Cleary, P. W., and J. J. Monaghan, Conduction modelling using smoothed particle hy- drodynamics, J. Comput. Phys., 148 , 227–264, 1999. Cottet, G., and P. Koumoutsakos, Vortex methods: Theory and practice., Cambridge University Press, 2000. 67 Degond, P., and S. Mas-Gallic, The weighted particle method for convection-diffusion equations. Part 1: The case of an isotropic viscosity, Math. Comput., 53 , 485–507, 1989. Delay, F., P. Ackerer, and C. Danquigny, Simulating Solute Transport in Porous or Fractured Formations Using Random Walk Particle Tracking: A Review, Vadose Zone J., 4 , 360–379, 2005. Dilts, G., Moving-least-squares-particle hydrodynamics I. Consistency and stability, Int. J. Numer. Meth. Engng., 44 , 1115–1155, 1999. Español, P., and M. Revenga, Smoothed dissipative particle dynamics, Phys. Rev. E , 67 , 026,705–12, 2003. Gardiner, C., Handbook of Stochastic Methods for Physics, Chemistry and the Natural Sciences, 1990. Gingold, R., and J. Monaghan, Kernel estimates as a basis for general particle methods in hydrodynamics, J. Comput. Phys., 46 , 429–453, 1982. Gingold, R. A., and J. J. Monaghan, Smoothed particle hydrodynamics: Theory and application to non-spherical stars, Mon. Not. R. Astron. Soc., 181 , 375–389, 1977. Greengard, L., Fast Algorithms for Classical Physics, Science, 265 , 909–914, 1994. Harbaugh, A., MODFLOW-2000, the US Geological Survey Modular Ground-water Model: User Guide to Modularization Concepts and the Ground-water Flow Process, US Geological Survey, 2000. Herrera, P., and A. Valocchi, Positive solution of two-dimensional solute transport in heterogeneous aquifers, Ground Water , 44 , 803–813, 2006. Jubelgas, M., V. Springel, and K. Dolag, Thermal conduction in cosmological SPH sim- ulations, Mon. Not. R. Astron. Soc., 351 , 423–435, 2004. Kitanidis, P. K., The concept of the dilution index, Water Resour. Res., 30 , 2011–2026, 1994. Konikow, L., D. Goode, G. Hornberger, and G. Survey, A Three-dimensional Method-of- characteristics Solute-transport Model (MOC3D), US Geological Survey, 1996. Kuzmin, D., and S. Turek, Flux correction tools for Finite Elements, J. Comput. Phys., 175 , 525–558, 2002. 68 LaBolle, E. M., G. E. Fogg, and A. F. B. Tompson, Random-walk simulation of transport in heterogeneous porous media: Local mass-conservation problem and implementation methods, Water Resour. Res., 32 , 583–594, 1996. Labolle, E. M., J. Quastel, G. E. Fogg, and J. Gravner, Diffusion processes in composite porous media and their numerical integration by random walks: Generalized stochastic differential equations with discontinuous coefficients, Water Resour. Res., 36 , 651, 2000. LeVeque, R., Finite Volume Methods for Conservation Laws, Cambridge University Press, Cambridge, UK, 2002. Lichtner, P., S. Kelkar, and B. Robinson, New form of dispersion tensor for axisymmetric porous media with implementation in particle tracking., Water Resour. Res., 38 , 1146, 2002. Lucy, L., A numerical approach to the testing of the fission hypothesis, Astron. J., 82 , 1013–1024, 1977. Monaghan, J., Smoothed particle hydrodynamics, Rep. Prog. Phys., 68 , 1703–1759, 2005. Monaghan, J. J., Smoothed particle hydrodynamics, Annu. Rev. Astron. Astrophys., 30 , 543–574, 1992. Morris, J., P. Fox, and Y. Zhu, Modeling Low Reynolds Number Incompressible Flows Using SPH, J. Comput. Phys., 136 , 214–226, 1997. Neuman, S., A Eulerian-Lagrangian numerical scheme for the dispersion-convection equa- tion using conjugate space-time grids, J. Comput. Phys., 41 , 1981. Neuman, S., Adaptive Eulerian-Lagrangian finite element method for advection- dispersion, Int. J. Numer. Meth. Engng., 20 , 321–37, 1984. Obi, E., and M. Blunt, Streamline-based simulation of advective-dispersive solute trans- port, Adv. Water Resour., 27 , 913–924, 2004. Oya, S., and A. J. Valocchi, Transport and biodegradation of solutes in stratified aquifers under enhanced in situ bioremediation conditions, Water Resour. Res., 34 , 3323–3334, 1998. Pickens, J., and G. Grisak, Scale-dependent dispersion in stratified granular aquifer., Water Resour. Res., 17 , 1191–1211, 1981. 69 Pollock, D., Semianalytical computation of path lines for Finite-Difference models, Ground Water , 26 , 743–750, 1988. Press, W., S. Teukolsky, W. Vetterling, and B. Flannery, Numerical recipes in C: The art of scientific computing, Cambridge University Press New York, NY, USA, 1992. Price, D. J., Magnetic Fields in Astrophysics, Phd thesis, Institute of Astronomy, Uni- versity of Cambridge, 2004. Quinlan, N. J., M. Basa, and M. Lastiwka, Truncation error in mesh-free particle meth- ods, Int. J. Numer. Meth. Engng., 66 , 2064–2085, 2006. Russell, T., and M. Celia, An overview of research on Eulerian-Lagrangian localized adjoint methods (ELLAM), Adv. Water Resour., 25 , 1215–1231, 2002. Salamon, P., D. Fernàndez-Garcia, and J. Gómez-Hernández, A review and numerical assessment of the random walk particle tracking method., J. Contam. Hydrol., 87 , 277–305, 2006. Schaback, R., and H. Wendland, Kernel techniques: From machine learning to meshless methods, Acta Numerica, pp. 1–97, 2006. Shepard, D., A two-dimensional interpolation function for irregularly-spaced data, Pro- ceedings of the 1968 23rd ACM national conference, pp. 517–524, 1968. Smith, L., and F. W. Schwartz, Mass transport. 1. A stochastic analysis of macroscopic dispersion, Water Resour. Res., 16 , 303–313, 1980. Tartakovsky, A., and P. Meakin, A smoothed particle hydrodynamics model for miscible flow in three-dimensional fractures and two-dimensional Rayleigh-Taylor instability, J. Comput. Phys., 207 , 610–624, 2005. Tompson, A., Numerical simulation of chemical migration in physically and chemically heterogeneous porous media, Water Resour. Res., 29 , 3709–3726, 1993. Tompson, A., and D. Dougherty, Particle-grid methods for reacting flows in porous media with applications to Fisher’s equation, Appl. Math. Modelling, 16 , 374–383, 1992. Valocchi, A., and A. Quinodoz, Application of the random walk method to simulate the transport of kinetically sorbing solutes. Groundwater Contamination, IAHS Publ, pp. 35–42, 1989. 70 Viccione, G., V. Bovolin, and E. Pugliese, Defining and optimizing algorithms for neigh- bouring particle identification in SPH fluid simulations, Int. J. Numer. Meth. Fl., 58 , 625–638, 2008. Waltz, J., G. L. Page, S. D. Milder, J. Wallin, and A. Antunes, A performance comparison of tree data structures for N-Body simulation, J. Comput. Phys., 178 , 1–14, 2002. Zheng, C., and S. M. Gorelick, Analysis of solute transport in flow fields influenced by preferential flowpaths at the decimeter scale, Ground Water , 41 , 142–155, 2003. Zheng, C., and P. Wang, MT3DMS: A Modular Three-Dimensional Multispecies Trans- port Model for Simulation of Advection, Dispersion, and Chemical Reactions of Con- taminants in Groundwater Systems; Documentation and User’s Guide, Contract Report SERDP-99-1, US Army Engineer Research and Development Center, Vicksburg, MS , 1999. Zhu, Y., and P. Fox, Smoothed Particle Hydrodynamics Model for Diffusion through Porous Media, Transport Porous Med., 43 , 441–471, 2001. Zhu, Y., and P. Fox, Simulation of pore-scale dispersion in periodic porous media using smoothed particle hydrodynamics, J. Comput. Phys., 182 , 622–645, 2002. Zhu, Y., P. Fox, and J. Morris, A pore-scale numerical model for flow through porous media, Int. J. Numer. Anal. Meth. Geomech., 23 , 881–904, 1999. Zimmermann, S., P. Koumoutsakos, and W. Kinzelbach, Simulation of pollutant trans- port using a particle method, J. Comput. Phys., 173 , 322–347, 2001. 71 Chapter 3 Evaluation of Particle Approximations to Simulate Anisotropic Dispersion1 3.1 Introduction Solute transport in natural porous media is commonly modeled using an advection- dispersion equation (ADE). In most real situations, the transport process is advection- controlled and the resulting parabolic partial differential equation exhibits more of a hyperbolic character. On the other hand, the natural heterogeneity of geological forma- tions results in rapid changes of the magnitude and direction of the flow velocity. Those features make the numerical solution of the resulting transport equation with traditional mesh based methods very challenging. The numerical solution of ADE that represents solute transport in porous media is further complicated by the fact that the dispersion coefficient is a second-order tensor with principal axes that are oriented parallel and perpendicular to the flow velocity (Bear , 1988), so that the spreading of a contaminant plume is anisotropic: faster in the flow direction than in the transverse direction. Particles methods offer advantages for the simulation of solute transport in natural porous media because of their natural ability to adapt to the flow velocity and to simulate solute advection without introducing numerical dispersion and artificial mixing. Thus, there 1A version of this chapter will be submitted for publication. P. Herrera, M. Massabó, and R. Beckie. Evaluation of Particle Approximations to Simulate Anisotropic Dispersion. 72 has been a long dated interest in the use of particle methods to simulate solute transport in the subsurface, e.g. (Kinzelbach, 1988) and references therein. The main challenge for the use of particle methods is to derive an accurate approximation for dispersion that can simulate solute mixing and dilution, while avoiding numerical oscillations that plague most traditional numerical approximations of parabolic or elliptic equations that include mixed derivatives or “cross-terms” (Crumpton et al., 1995; Le Potier , 2005b; Nordbotten and Aavatsmark, 2005; Mlacnik and Durlofsky, 2006; Yuan and Sheng, 2008; Edwards and Zheng, 2008; Lipnikov et al., 2009). Recent approaches to incorporate diffusion or viscous effects in particle simulations are based on a integral approximation of second order derivatives (Degond and Mas-Gallic, 1989a; Cleary and Monaghan, 1999; Eldredge et al., 2002). Particle locations are used as quadrature points to discretize the integral approximation. When used to simulate solute transport, these types of methods approximate the local dispersion operator using concentration values at a set of scattered particles or nodes (Zimmermann et al., 2001; Herrera et al., 2009b). The effects of dispersion are incorporated by modifying concen- tration values of individual particles as the result of mass exchange between neighboring particles. Therefore, important physical mechanisms such as dilution and solute mixing are easily incorporated. Zimmermann et al. (2001) investigated the use of the particle strength exchange (PSE) method (Degond and Mas-Gallic, 1989a,?) to simulate solute transport in homogeneous porous media considering anisotropic dispersion and uniform and non-uniform flow con- ditions. Their results showed that the PSE approximation provides accurate results for a set of benchmark problems if a remeshing procedure was used to control the irregular particle distribution due to the flow velocity. Herrera et al. (2009b) compared a smoothed particle hydrodynamics (SPH) approxi- mation to simulate conservative transport in heterogeneous porous media with a high- order finite volume and a hybrid method of characteristics (HMOC) solvers considering isotropic dispersion. Herrera et al. (2009b) used a SPH approximation for isotropic dis- persion, first introduced by Cleary and Monaghan (1999) to simulate thermal conduction, that only involves the first derivative of the kernel, so it is less sensitive to particle disorder than other SPH approximations for second derivatives that require remeshing (Chaniotis et al., 2002). The results presented in (Herrera et al., 2009b) clearly show the advan- tages of the SPH approximation for simulating advection-dominated solute transport in heterogeneous porous media. 73 The first objective of this paper is to derive a SPH expression to approximate anisotropic dispersion to extend our previous work presented in (Herrera et al., 2009b). The second objective is to evaluate the accuracy with which the two particle methods, SPH and PSE, and a standard finite volume formulation can simulate isotropic and anisotropic disper- sion under different conditions. In particular, we are interested in understanding the convergence properties of both particle methods, the factors that control their accuracy, and their relative performance in comparison with a well established mesh-based solver. Additionally, we discuss the monotonicity properties of both particle approximations for different degrees of anisotropy of the dispersion tensor. 3.2 Mathematical Formulation The Lagrangian formulation of conservative solute transport in porous media involves the following system of differential equations, dr dt = v(r, t) (3.1) dC(r, t) dt = ∇ · (D(r)∇C(r, t)) (3.2) where r is the position of a fluid particle, C(r, t) is the solute concentration [M/L3] and D(r) is the hydrodynamic dispersion coefficient [L2/T]. The first equation describes the movement of a fluid particle due to the flow velocity, while the second equation describes the change in concentration due to dispersion. Generally, the flow field is computed externally and it is an input parameter for the transport simulation. In isotropic porous media the components of the tensor D are given by (Bear , 1988) Dij = (αT |v|+Dm) δij + (αL − αT ) vivj|v| (3.3) where αL and αT are the longitudinal and transverse dispersivity [L], respectively; Dm is the molecular diffusivity [L2/T], and v is the pore water velocity [L/T]. In general, the longitudinal dispersivity is at least one order of magnitude larger than the transverse dispersivity, i.e. αT/αL 1. 74 The solution of (3.1) can be easily evaluated using a semi-analytical particle-tracking scheme (Pollock, 1988) or an explicit time integration scheme. In the rest of this manuscript we focus our discussion on the numerical solution of (3.2), which represents a much more challenging problem in the context of particle methods. 3.3 Smoothed Particle Hydrodynamics (SPH) Ap- proximation 3.3.1 Background In the standard SPH formulation the smoothed interpolation AS(r) of a variable A(r) is defined as the integral (Gingold and Monaghan, 1977; Lucy, 1977) AS(r) = ˆ A(r)W (r− r, h) dr (3.4) whereW (r− r, h) is a kernel function with smoothing length h that satisfies (Monaghan, 1992) ˆ W (r− r, h) dr = 1 (3.5) lim h→0 W (r− r, h) = δ(r− r) (3.6) Spline polynomials with compact support are usually used as kernel functions because of their practical advantages (Monaghan, 1992). In the standard SPH formulation the numerical approximation of the integral in (3.4) is evaluated as A(ra) = b 1 pb A(rb)W (|ra − rb|) (3.7) 75 where the numerical density pb is a measurement of the spatial particle distribution. In most cases, it is approximated as pa = b W (|ra − rb|) (3.8) When computing approximations for first and second order derivatives it is also useful to introduce the scalar function F (r) such that the gradient of a spherically symmetric kernel can be evaluated as (Cleary and Monaghan, 1999; Jubelgas et al., 2004) ∇W (r) = rF (r) (3.9) 3.3.2 SPH Approximation for Tensorial Dispersion To derive a SPH expression to approximate the dispersion term (3.2), we use the following identity i j ∂ ∂xi Dij ∂C ∂xj = 12 i j ∂2 ∂xi∂xj (DijC)− C ∂ 2Dij ∂xi∂xj +Dij ∂2C ∂xi∂xj (3.10) that is valid for any symmetric tensor D. This expression is the generalization of the identity used by Jubelgas et al. (2004) to derive a SPH approximation for thermal con- duction. Second derivatives of a scalar field A can be evaluated using (Español and Revenga, 2003; Monaghan, 2005) ∂2A ∂xi∂xj a = b 1 pb (Aa − Ab)F (ra − rb) Γ(r − r)i(r − r)j |r − r|2 − δij (3.11) where Γ = 4 in two dimensions and Γ = 5 in three dimensions. Finally, substituting (3.11) into (3.10), we arrive at our SPH approximation for equation (3.2), 76 dCa dt = 12 b 1 pab (Ca − Cb)F (|ra − rb|)D (ra, rb) (3.12) where D (ra, rb) = i j Daij +Dbij 4(rb − ra)i(rb − ra)j|rb − ra|2 − δij = i j DabijΘij (rb − ra) where Da is the dispersion tensor at position ra and we have replaced the density pb by a symmetric expression pab = f(pa, pb), e.g. the arithmetic average of pa and pb, to ensure a symmetric approximation (Herrera et al., 2009b). This expression reduces to the standard SPH approximation for diffusion (Tartakovsky and Meakin, 2005; Herrera et al., 2009b) or thermal conduction (Cleary and Monaghan, 1999; Jubelgas et al., 2004), if D = DI, where I is the identity matrix. In simulations that consider variable coefficients, the term Dabij = (Dbij + Daij) can be substituted by an effective coefficient of the form Dabij = 2DaijDbij/(Daij +Dbij) , which has given more robust results in thermal conduction simulations(Cleary and Monaghan, 1999; Jubelgas et al., 2004). The approximation (3.12) has two sources of error. First, the SPH integral interpolant (3.4) introduces an error that grows with the smoothing length (O(h2)). Second, the numerical discretization of the integral introduces an error that depends on the number and position of the particles that contribute to the summation in (3.7). This source of error is related to the ratio between the average number of particles per kernel smoothing length γ, which is equivalent to the ratio between the smoothing length and the average particle spacing ∆x, i.e. γ = h/∆x. In general, a larger number of particles per kernel support volume (larger γ), results in a better approximation of the integral. However, the use of large γ values while controlling h to minimize the interpolant error requires an increasingly small particle spacing and, hence, a large number of particles. Therefore, one must make a trade-off between γ and h to obtain reasonable error while controlling the number of particles and computational effort (Cleary and Monaghan, 1999). 3.3.3 Monotonicity It is well known that traditional numerical approximations of parabolic or elliptic equa- tions of the form (3.2) that consider the off-diagonal terms of the dispersion tensor do not 77 satisfy the monotonicity properties of the solution, e.g. see (Herrera and Valocchi, 2006) and references therein for details. The development of numerical approximations that overcome those numerical issues is still the object of intense research (Le Potier , 2005b; Mlacnik and Durlofsky, 2006; Nakshatrala and Valocchi, 2008; Yuan and Sheng, 2008; Lipnikov et al., 2009). Therefore, it is important to study the monotonicity properties of the SPH approximation derived above. First, we notice that (3.12) has the form dCi dt = j =i βij(Cj − Ci) = j β̂ijCj (3.13) with β̂ii = −j =i βij, thus j β̂ij = 0. Then, we can use the local extremum diminishing (LED) criteria (Jameson, 1995) to study the monotonicity of this type of numerical discretization. A numerical approxima- tion such (3.13) satisfies the LED criteria if βij ≥ 0, i = j (Kuzmin and Turek, 2002), which is a sufficient condition to obtain monotonic solutions as can be easily demon- strated by the following rationale. If the concentration at node i, Ci, is a minimum the temporal derivative of the concentration at that node is positive or zero. Therefore, a minimum concentration can only increase or stay constant. Similar arguments can be used to prove that a maximum value cannot increase. In the case of (3.12), we have that βab = −12 b 1 pab F (|ra − rb|)D(ra, rb) a = b (3.14) with F (r) ≤ 0 because of the kernel properties. Then, the LED criteria requires that D(ra, rb) ≥ 0. This condition cannot be demon- strated for the general case of an irregular node distribution or non-uniform flow, but it can be studied for the simple case of equispaced nodes in a square lattice in uniform flow field. To make the analysis simpler we use a polar coordinate system such that θ is the angle formed by the vector connecting two nodes located at ra and rb and the x axis. Then, we obtain that Θxx = 4 cos2 θ− 1, Θyy = 4 sin2 θ− 1, and Θxy = 4 sin θ cos θ. In a square lattice, θ = [0, π/4, π/2] or a multiple of those numbers. For θ = 0 or θ = π/2 there is only one term that is not zero and it is positive. If θ = nπ/4 with n 78 integer, we have that D(ra, rb) = Dabxx + Dabyy + 4Dabxy, which can be positive or negative because of the change in sign of Dxx, Dyy, and Dxy with the flow orientation according to (3.3). Figure 3.1 shows the value of D(ra, rb) as a function of the velocity direction for θ = nπ/4. The figure shows that D(ra, rb) 0 for all possible flow orientations. This implies that the SPH discretization with nodes distributed in a square lattice does not satisfy the LED criteria and that the numerical solution of (3.12) might exhibit negative concentrations depending upon the flow orientation. This is confirmed by the results of numerical simulations presented below. !! !"#$ " "#$ ! !#$ % %#$ & ' ( ) * * " !+% ! &+%! %! " , +" - *.*!#" " , +" - *.*"#! " , +" - *.*"#"! x y ! Figure 3.1: Coefficient D(ra, rb) = Dxx + Dyy + 4Dxy for |v| = 1 and such that r =rb − ra forms an angle of 45◦ with the x axis as function of the angle β formed by the flow velocity and the x axis. 79 3.4 Particle Strength Exchange (PSE) Approxima- tion The PSE approximation of (3.2) is also based on an integral expression to compute the dispersion operator (Degond and Mas-Gallic, 1989a). An approximation for anisotropic dispersion derived in (Degond and Mas-Gallic, 1989) and used in (Zimmermann et al., 2001) is dCa dt = (∆x) 2 ε6 b (Cb − Ca)K(rab, ε) i j Mij(ra, rb)(ra − rb)i(ra − rb)j (3.15) where ∆x is the representative inter-particle spacing, K(rab, ε) is a cutoff function that satisfies so-called moment conditions, ε is known as the core size which defines the size of the area of influence of each particle, and the components of the matrix M(ra, rb) are given by Mij(ra, rb) = 1 2 (mij(ra) +mij(rb)) (3.16) where m(r) = D(r)− 14tr(D(r))I (3.17) with tr(D) = iDii. Zimmermann et al. (2001) provide expressions for second, fourth and sixth order cutoff kernels and Eldredge et al. (2002) discuss the details of the kernel properties and provide expressions to compute kernels that are up to eighth order in one and two dimensions. The same analysis used in the previous section to study the monotonicity properties of the SPH approximation can be used to demonstrate that (3.15) does not guarantee the monotonicity of the solution when the full dispersion tensor is considered as discussed by Degond and Mas-Gallic (1989) and confirmed through numerical simulations by Zim- mermann et al. (2001). 80 Because of the similarities between the SPH and PSE methods it is possible to establish a direct parallel between the kernel and cutoff functions and between the smoothing length and core size in SPH and PSE, respectively. In the rest of this manuscript, we will use the terms kernel or cutoff function to refer to the function K and the terms core size or smoothing length to refer to ε. We will also use W to refer to the cutoff K and h instead of ε to refer to the core size whenever such change helps to simplify notation. 3.5 Numerical Tests We next evaluate the accuracy of our SPH anisotropic dispersion approximation and the PSE method from (Degond and Mas-Gallic, 1989) and (Zimmermann et al., 2001). We use the simulation of the instantaneous release of a solute mass ∆M in an unbounded domain with a temporally and spatially constant velocity as benchmark problem to study the accuracy and controls on error of the dispersion approximations for SPH and PSE. We also use a standard 9-points finite volume scheme (FV) in a Cartesian grid (Zheng and Bennet, 1995; Herrera and Valocchi, 2006) to define a base case to compare the relative performance of both particle methods. A similar problem has been previously used to study the convergence properties of the PSE (Zimmermann et al., 2001) and diffusion velocity methods (Beaudoin et al., 2003). Since we are interested in numerical approximations of dispersion, we simplify the prob- lem and neglect the contribution of advection. In this case, the transport process depends on the flow only through the relation of the dispersion tensor and the flow velocity given by (3.3). Because advection can be easily incorporated within a particle framework with- out introducing additional errors, the results of our analysis can be directly extrapolated to more realistic situations. The analytical solution for the solute concentration as function of position and time is given by, c(x, t) = C1 C4 exp −X2(2tDyy + w2)− Y 2(2tDxx + w2) + 4XY tDxy 8t2C2 + 4w2tC3 + 2w4 (3.18) where X = x − x0 and Y = y − y0, (x0, y0) is the position of the initial solute release, w is a measure of the size of the initial input, the constant C1 is related to the initial mass ∆M , and the other constants are C2 = DxxDyy − D2xy, C3 = Dxx + Dyy and 81 C4 = √ 4t2C2 + 2twC3 + w4. To simplify the presentation of the results, we choose C1 = C0w2 such that the maximum initial concentration is equal to C0. Table 3.1 shows a summary of the parameters used to setup the test problem. Parameter Symbol Value Unit Released mass ∆M 107 g Initial plume width w 44 m Maximum initial concentration C0 320 mg/L Length numerical domain L 2000 m Long. Dispersivity αL 10 m Time step ∆t 1 day Total time T 300 days Table 3.1: Parameters used in all simulations. The three solutions are computed using an explicit fourth-order Runge-Kutta solver to integrate in time. The use of an explicit solver imposes restrictions on the size of the time step to obtain stable solutions. The three methods have stability limits of the form ∆t ≤ CT ∆ 2 Dxx +Dyy (3.19) where ∆ is the grid size for the finite volume, core size for the PSE (Zimmermann et al., 2001), and smoothing length for the SPH approximations(Cleary and Monaghan, 1999), respectively. The constant CT is equal to 0.5 for the finite volume approximation, and it depends upon the kernel or cutoff functions for the SPH and PSE. Higher order cutoff functions result in slightly more restrictive stability conditions, for example Zimmermann et al. (2001) found that CT ≈ 2.5 and CT ≈ 1.2 for second and fourth order cutoff functions, respectively. Additionally, the stability limits of both particle methods depends upon the particle distribution. We found through numerical experiments that the SPH solution is stable if CT = 0.1 and use this value to compute a time step that satisfies the stability restrictions of three methods for the case of equispaced particles. The PSE and SPH approximations require that the area of influence or support of par- ticles overlap. Thus, one must use a core size for PSE or smoothing length for SPH that is larger than the average particle spacing. Additionally, the error of the solution 82 given by both methods depends upon the ratio of the smoothing length to the average particle spacing. In our simulations, we used different ratios to test the influence of that parameter on the error of the solution. On other hand, higher order kernels and cutoff functions have larger support volume as shown in Figure 3.2, which results in larger areas of influence and number of neighboring particles for a given smoothing length or core size. Efficient implementations of the PSE and SPH solvers require a fast algorithm to identify near neighbor particles. The SPH implementation is based on kernels that have compact support, so an individual particle interacts only with particles that are within the kernel support volume. In that case it is easy to use a background grid to classify particles in space. The cell size of that grid is related to the kernel smoothing length such that neighbor particles are always at most one cell apart (Welton, 1998). Kernels used in the PSE approximation are modified Gaussian functions which have infinite support. Therefore, in theory, all particles interact with each other. However, PSE kernels fall rapidly with distance and one can assume that they have an effective compact support that is few times the core size as shown in Figure 3.2. In our implementation, we have assumed that the effective compact support of the PSE kernels is equal to five times the kernel core size and we have applied the same strategy as in SPH to search for neighbor particles. 3.5.1 Simulation Cases To test the performance of the three numerical methods we define different scenarios based on the values of the parameters summarized in Table 3.2. The ranges of values of those parameters are similar to the ones used in previous studies or were selected based on reasonable physical assumptions. For example, we use αT/αL in the range [0.001, 1.0] with αL = 10m and β equal to [0◦, 45◦, 53◦], which are similar to the values reported in (Zimmermann et al., 2001; Beaudoin et al., 2003). We use value for h/∆x and ε/∆x in the range [1.0, 1.6], which is similar to values used in other numerical studies to study the convergence properties of the SPH approximation for thermal conduction (Cleary and Monaghan, 1999) and PSE for solute dispersion (Zimmermann et al., 2001). 83 Figure 3.2: Cubic, quartic, and quintic SPH kernels, W, with finite compact support (Price, 2004) and second-, fourth-, and sixth-order cutoff functions, K, used in PSE simulations (Zimmermann et al., 2001) as function of the ratio between distance and kernel core size or smoothing length, h. All kernels fall rapidly with distance and have an effective support equal to few smoothing lengths. 84 Parameter Explanation αT/αL Dispersivity ratio h/∆x Smoothing length or core size over average particle spacing β Angle formed by velocity and x axis SPH Kernel Three different SPH kernels: cubic, quartic and quintic PSE Cutoff Three different cutoff functions: 2nd, 4th and 6th order Table 3.2: Parameters used to define different simulation scenarios to evaluate ap- proximations for anisotropic dispersion. To study the convergence of the three methods with respect to the particle or grid spacing, we define a set of runs with different number of cells or particles as summarized in Table 3.3. To assign the position of particles and cells we assume a large square domain with side L. We assign the same number of particles and cells in each direction, Nc, for simulations that consider equispaced particles. For simulations that consider random or quasi-random particle distributions, the total number of particles, N , is calculated such that the average number of particles in each direction is equal to Nc. We compute two errors, E2 = j e 2 j/N and E∞ = max(|ei|), where ej is the difference between analytical and numerical solutions at node j, to measure the accuracy of the numerical solutions. We also look at the temporal evolution of the difference between the maximum concentration values of the numerical and analytical solutions. In the discussion that follows we report errors after 200 time steps unless explicitly indicated. Run Nc ∆x R1 40 50.0 R2 60 33.3 R3 80 25.0 R4 100 20.0 R5 120 16.7 R6 140 14.3 R7 160 12.5 Table 3.3: Definition of different runs used to study convergence properties. Each run is defined by the number of cells or average number of particles in each direction, Nc, which results in a grid or average particle spacing, ∆x. 85 3.5.2 Equispaced Particles We first consider the case of equispaced particles in a square lattice. This scenario is useful because it allows the direct comparison of the particle methods and the finite volume approximation. Besides, the accuracy of both particle methods is expected to be optimal for this configuration, thus the results of this section provide a best case estimate of the error of the SPH and PSE methods. Unless explicitly specified, all the results reported for equispaced particles were computed using a cubic spline SPH kernel and second order PSE cutoff functions. 3.5.2.1 Effect of particle spacing Figure 3.3 shows the error E2 versus the particle or grid spacing. For isotropic dispersion (αT/αL = 1.0), the convergence rate of the three methods is similar, but the mesh based FV approximation has in average an error that is one order of magnitude smaller than the SPH approximation and almost two orders of magnitude smaller than the PSE approximation for the range of particle or grid spacing considered. For αT/αL = 0.01 (anisotropic case) the analysis is more complicated. For all the cases the mesh-based FV solver is more accurate than both particle methods but the difference is smaller than for the isotropic case. The PSE and FV methods exhibit good convergence in all cases, while the SPH approximation is very sensitive to the value of the ratio h/∆x. The SPH solution converges much faster for larger number of particles per kernel support volume (larger h/∆x). Nevertheless, the convergence rate of the SPH solution for small ∆x is lower than for the other two methods. Figure 3.4 shows the error E∞ divided by the maximum initial concentration versus the particle or grid spacing. The situation is similar to the previously discussed for the error E2. The three methods have smaller errors for the isotropic case than for the anisotropic one. The approximation FV has consistently lower error than the two particle methods for all the situations analyzed, however the difference is smaller in the anisotropic case. For the isotropic situation the maximum absolute error is around 1% of C0 for the PSE approximation and less than 1% for the SPH and FV methods. For the anisotropic case the error is around 1% of the initial maximum concentration for the two particle methods and less than that for FV solution. For small ∆x the convergence rates of the PSE and FV approximations are comparable, while the SPH solution has a lower rate. 86 10 15 20 25 30 35 40 45 5010 −4 10−3 10−2 10−1 100 101 102 ∆x E 2 FV SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 αT/αL=1.0 10 15 20 25 30 35 40 45 5010 −2 10−1 100 101 102 ∆x E 2 FV SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 αT/αL=0.01 Figure 3.3: Error E2 as function of particle or grid spacing for equispaced particles. The three methods exhibit good convergence for the isotropic case in- dependently of the ratio h/∆x. For the anisotropic case, the PSE and FV solutions exhibit good convergence in all cases. However, the SPH approximation is very sensitive to the value of h/∆x. The convergence rate of the FV and PSE methods for small ∆x is higher than the SPH one for the anisotropic case. 87 10 15 20 25 30 35 40 45 5010 −3 10−2 10−1 100 ∆x E ∞ /C 0 FV SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 αT/αL=1.0 10 15 20 25 30 35 40 45 5010 −3 10−2 10−1 100 ∆x E ∞ /C 0 FV SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 αT/αL=0.01 Figure 3.4: Normalized error E∞ as function of particle or grid spacing for equispaced particles. The three methods exhibit good convergence for the isotropic case independently of the ratio h/∆x. For the anisotropic case, the PSE and FV solutions exhibit good convergence in all cases. However, the SPH approximation is versy sensitive to the value of h/∆x. The convergence rate of the FV and PSE methods for small ∆x is higher than the SPH one for the anisotropic case. 88 3.5.2.2 Maximum concentration Figure 3.5 shows the difference between the maximum concentration values of the ana- lytical and numerical solutions as function of the number of time steps. For the isotropic and anisotropic cases the difference increases at early time until reaching a maximum value. For later times, as the initial plume smooths out, the error decreases to an asymp- totic value. The SPH solution with h/∆x = 1.2 is the exception to this pattern since the error grows unboundedly with time. The difference between the numerical and analyti- cal solutions after 300 time steps is less than 1% for the FV and the best SPH run and around 1% for the PSE solution. 3.5.2.3 Negative concentrations Figure 3.6 shows a comparison of the analytical and numerical solutions after 300 days for run R7 and αT/αL = 0.01. The three numerical solutions are similar to the analyt- ical solution. However, the three numerical solutions exhibit negative concentrations in bands that tend to be aligned with the main direction of the flow. Figure 3.7 shows the spatial distribution of the difference between the analytical and numerical solutions. In general, the FV and SPH approximations overestimate the concentration values in the center of the plume in a region parallel to the flow direction and they underestimate the concentration in areas outside the plume center along a line that is perpendicular to the flow. The spatial distribution of the error of the PSE solution follows a different pattern. Concentration values are underestimated in the central region of the plume and they are overestimated in two separate regions that are located near the plume edge along the plume center line. Therefore, the spatial distribution of the error of the three methods depends upon the flow orientation. 89 0 50 100 150 200 250 300−0.01 0 0.01 0.02 0.03 0.04 0.05 Time Step (C m a x N − C m a x A )/C 0 αT/αL=1.0 FV SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 0 50 100 150 200 250 300−0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 Time Step (C m a x N − C m a x A )/C 0 αT/αL=0.01 FV SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 Figure 3.5: Difference between maximum concentration values of numerical and an- alytical solutions as function of time for equispaced particles and run R7. For the isotropic case the error of the three methods increases at early time. As the concentration field smooths out the error decreases at later times. For the anisotropic case the error of the SPH approxima- tion for h/∆x = 1.2 grows unboundedly. However, the SPH solution for h/∆x = 1.6 performs similar to the FV approximation. 90 Figure 3.6: Concentration distribution after 300 time steps for run R7, αT /αL = 0.01, and β = 45◦ . All three methods exhibit negative concentrations (dark bands). Minimum concentration values are −1.8 ·10−2 for FV, −6.9 ·10−4 for SPH, and −3.2 · 10−1 for PSE. 91 Figure 3.7: Difference between analytical and numerical solutions (Error = CN−CA) after 300 time steps for run R7, αT /αL = 0.01, and β = 45◦. The spatial pattern of the error of the three methods depends upon the flow velocity direction. 3.5.2.4 Effect of ratio between smoothing length and particle spacing As discussed above, the error of the SPH approximation for the integral in 3.4 depends upon the number of particles per support volume, which is related to the ratio between the smoothing length and the average particle spacing, γ = h/∆x. Previous numeri- cal studies have shown that the SPH approximation for scalar diffusion (isotropic case) provides accurate results even for small values of γ in the case of reasonably distributed particles(Cleary and Monaghan, 1999). On the other hand, the stability of the PSE approximation requires that particles overlap, i.e. the core size must be always larger than the representative particle spacing. However, the accuracy of the approximation decreases as the core size increases, thus it provides optimal solutions for small h such that h/∆x > 1. Figure 3.8 shows errors E2 and E∞ of the SPH and PSE solutions for run R6 as function of γ. We observe that as expected the error of the PSE solu- tion increases monotonically with γ for the isotropic and anisotropic cases. In contrast, the SPH solution exhibits a more interesting behavior. The error of the SPH solution for the anisotropic case decreases with γ, which indicates that the error of the integral 92 approximation controls the overall error in that case. 3.5.2.5 Effect of anisotropy ratio Figure 3.9 shows E2 and normalized E∞ versus the anisotropy ratio for run R7. The error of the SPH and FV approximations is larger for smaller αT/αL ratio, while the error of the PSE method is almost constant for the range of dispersivity ratios considered. The FV approximation has the smallest error in all the cases, while the PSE solution is more accurate than the SPH solution for all the situations that consider anisotropic dispersion (i.e. αT/αL = 1). We note that these results consider γ = 1.2 and that according our previous discussion, one would expect that the SPH solution would behave better if a larger γ is used. However, the results of our simulations indicate that the trend of increasing error for larger anisotropy ratios of the SPH and FV methods is independent of the other parameters considered in this study. 3.5.2.6 Effect of kernel function Table 3.4 presents a summary of the E2 and E∞ errors for run R5 for scenarios that consider different SPH kernels and PSE cutoff functions. For the isotropic case, the use higher-order SPH kernels does not have a clear impact on the accuracy of the solution, while the use of higher-order PSE cutoff functions results in smaller errors. In particular, the difference between the second and fourth order cutoff functions is quite important and it confirms that the error of the PSE approximation can be effectively improved using higher-order cutoff functions as discussed by Eldredge et al. (2002). For the anisotropic case, the use of higher-order SPH kernels improve the solution but the effect is less important than one observed using different cutoff functions in the PSE case. Moreover, the use of higher-order cutoff functions improve the PSE approximation and makes it more accurate than the FV method for the anisotropic case. 93 1 1.1 1.2 1.3 1.4 1.5 1.610 −4 10−3 10−2 10−1 100 101 h/∆x E 2 SPH αT/αL=1.0 SPH αT/αL=0.01 PSE αT/αL=1.0 PSE αT/αL=0.01 1 1.1 1.2 1.3 1.4 1.5 1.60 0.01 0.02 0.03 0.04 0.05 0.06 h / ∆ x E ∞ / C 0 SPH αT/αL=1.0 SPH αT/αL=0.01 PSE αT/αL=1.0 PSE αT/αL=0.01 Figure 3.8: Error E2 for run R6 versus the ratio between smoothing length or core size and particle spacing, γ = h/∆x. While the error of the PSE solution grows monotonically with γ for the isotropic and anisotropic cases, the error of the SPH solution for the anisotropic case decreases with it. 94 10−3 10−2 10−1 100 10−4 10−3 10−2 10−1 100 αT/αL E 2 10−3 10−2 10−1 100 10−3 10−2 10−1 αT / αL E ∞ / C 0 FV SPH PSE Figure 3.9: Error as function of the anisotropy ratio αT /αL for run R7 and h/∆x = 1.2. FV and SPH methods are less accurate for higher levels of anisotropy (lower αT /αL). The error of the PSE solution is almost constant for the range of anisotropy ratios tested. 95 SPH PSE αT/αL Kernel E2 E∞ Kernel E2 E∞ 1 Cubic 7.0 2.7 2nd order 103.4 11.1 1 Quartic 4.1 2.1 4th order 4.1 2.1 1 Quintic 7.6 2.9 6th order 2.6 1.5 0.01 Cubic 17.4 3.9 2nd order 5.2 2.5 0.01 Quartic 7.1 2.6 4th order 0.2 0.5 0.01 Quintic 4.7 2.2 6th order 0.1 0.3 Table 3.4: Normalized error for different SPH kernels and PSE cutoff functions. Er- ror of the SPH and PSE numerical solutions divided by the error of the FV approximation for run R5 and h/∆x = 1.2 considering different SPH kernels and PSE cutoff functions. One would expect that higher order polynomials used as SPH kernels have the advantage of smoother derivatives which, in combination with the increased size of support volume, could decrease the sensitivity of the kernel to the degree of particle disorder (Price, 2004). However, the results of our simulations show that the use of higher-order kernels does not provide a significant improvement of the numerical solution in the simple case of equispaced particles. 3.5.2.7 Effect of velocity orientation It is well known that the error of numerical methods based on grids or meshes used to solve (3.2) that include the off-diagonal terms of the dispersion tensor exhibit numerical artifacts that depend upon the flow orientation with respect to the grid axes (Herrera and Valocchi, 2006). Therefore, it is interesting to test if the error of the two particle methods changes for different flow orientations. Table 3.5 summarizes the results for run R6 assuming different flow orientations. As expected, all three methods are not sensitive to the flow direction for the isotropic case. However, for the anisotropic case the mesh based FV method exhibits differences of up to two orders of magnitude in the E2 error and one order of magnitude in the E∞ depending on the flow direction. The error of the SPH solution also depends upon the flow direction but it only shows small differences for different velocity directions. On the other hand, the error of the PSE solution is almost independent of the flow direction. 96 SPH PSE FV αT/αL β◦ E2 E∞ E2 E∞ E2 E∞ 1 45 0.0061 1.8051 0.0728 6.6221 0.0007 0.5964 1 0 0.0061 1.8051 0.0728 6.6221 0.0007 0.5964 1 53 0.0061 1.8051 0.0728 6.6221 0.0007 0.5964 0.01 45 0.5062 10.4855 0.0880 5.1519 0.0172 2.1333 0.01 0 0.6919 14.9257 0.0880 5.0957 0.0006 0.5552 0.01 53 0.4495 9.7445 0.0880 5.2464 0.0154 1.9997 Table 3.5: Error versus flow velocity direction for R5 and h/∆x = 1.2. The error of the numerical solutions is independent of the flow direction if isotropic dispersion is considered. However, the error of the FV and SPH solution depends on the flow velocity direction if anisotropic dispersion is simulated. 3.5.3 Irregularly Spaced Particles It is well known that the accuracy and stability of the PSE and SPH methods depends upon the spatial distribution of particles (Cleary and Monaghan, 1999; Zimmermann et al., 2001; Chaniotis et al., 2002). In general, at the beginning of a simulation particles are distributed in a uniform fashion, e.g. rectangular lattice. As particles move carried by the flow, high velocity gradients result in the distortion of the initial regular distribution as shown in Figure 3.10. In general, the continuity property of the flow prevents particles from moving randomly and the particle set maintains some regularity (Monaghan, 2005). However, some non-uniform flows can result in very irregular particle distributions. 97 Figure 3.10: Particle distortion due to flow velocity. High gradients in fluid velocity (arrows) result in distortion of the initial regular particle distribution (black circles). However, the continuity property of the flow prevents that particles become randomly distributed. To evaluate effect of the particle disorder on the accuracy and stability of the SPH and PSE solutions, we set up a set of simulations that evaluate the numerical solution using randomly and quasi-randomly distributed particles. An example of the difference between the distributions is shown in Figure 3.11. A random distribution results in large contrasts in the spatial density of particles in different areas of the domain. On the other hand, a quasi-random distribution results in an irregular but uniform spatial particle 98 Figure 3.11: Particle locations for run R1 considering random and quasi-random dis- tributions. The random distribution has large contrasts in particle den- sity, while the quasi-random distribution has an irregular but uniform spatial particle density. density. Based on our experience, particle distributions as result of real flow fields fall between these two extreme cases. Therefore, simulations that consider these two spatial distributions allow us to estimate upper and lower bounds for the performance of the PSE and SPH approximations for more realistic simulations. For the simulations that consider irregularly distributed particles, we used a cubic SPH kernel and a sixth order PSE cutoff function. 3.5.3.1 Isotropic case Figure 3.12 shows the error E2 versus the average particle spacing for the same scenario but different particle spatial distribution. As expected the error increases with the degree of disorder. As seen by the slope of the curves in Figure 3.12, the convergence rate of the two methods decreases as particles become more disordered. Both methods converge very slowly for the case of randomly distributed particles and the convergence rate is not monotonic. It is interesting to notice that while a larger ratio h/∆x results in larger error for the case of equispaced particles, it actually helps to control the error in the case of random and quasi-random particle distributions. Overall, the PSE method is less sensitive to the disorder of the nodes than the SPH approximation. 99 10 15 20 25 30 35 40 45 5010 −3 10−2 10−1 100 101 102 ∆x E 2 Equispaced h/∆x=1.2 Equispaced h/∆x=1.6 Random h/∆x=1.2 Random h/∆x=1.6 Quasi−Random h/∆x=1.2 Quasi−Random h/∆x=1.6 a 10 15 20 25 30 35 40 45 5010 −3 10−2 10−1 100 101 ∆x E 2 Equispaced h/∆x=1.2 Equispaced h/∆x=1.6 Random h/∆x=1.2 Random h/∆x=1.6 Quasi−Random h/∆x=1.2 Quasi−Random h/∆x=1.6 b Figure 3.12: E2 error of (a) SPH and (b) PSE numerical solutions versus average particle spacing for αT /αL = 1.0 using equispaced, random, and quasi- random particle distributions. The convergence rate of boths methods is lower for irregular particle distributions. In both cases, the error increases with the degree of particle disorder. 100 The previous observations are confirmed by Figure 3.13, which shows the normalized E∞ error as function of the average particle spacing. As a first approximation, we can say that for small particle spacing the error increases by one order of magnitude between the equispaced and quasi-random distribution and by another order of magnitude between the quasi-random and random distributions. Figure 3.14 shows the temporal evolution of the difference between the maximum concen- tration of the analytical and numerical solutions. The error of the PSE solution is much smaller than the error of the SPH approximation for the case of randomly distributed particles. The error of both methods is smaller for quasi-randomly distributed particles. This figure confirms that the use of larger ratios between smoothing length or core size and particle spacing result in smaller errors when particles are irregularly distributed. In particular, the error of the PSE method is almost constant and less than 1% of the initial concentration if a ratio h/∆x = 1.6 is used. This error is comparable to the maximum error of the PSE approximation for the case of equispaced particles with a second-order cutoff function (see Figure 3.5). 101 10 15 20 25 30 35 40 45 5010 −3 10−2 10−1 100 ∆x E ∞ /C 0 Equispaced h/∆x=1.2 Equispaced h/∆x=1.6 Random h/∆x=1.2 Random h/∆x=1.6 Quasi−Random h/∆x=1.2 Quasi−Random h/∆x=1.6 a 10 15 20 25 30 35 40 45 5010 −3 10−2 10−1 100 ∆x E ∞ /C 0 Equispaced h/∆x=1.2 Equispaced h/∆x=1.6 Random h/∆x=1.2 Random h/∆x=1.6 Quasi−Random h/∆x=1.2 Quasi−Random h/∆x=1.6 b Figure 3.13: Normalized E∞ error of (a) SPH and (b) PSE numerical approxima- tions versus average particle spacing for αT /αL = 1.0 using equispaced, random, and quasi-random particle distribution. The convergence rate of both methods is lower for irregular particle distributions. 102 0 50 100 150 200 250 300 −0.04 −0.02 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 Time Step (C m a x N − C m a x A )/C 0 a SPH h/∆x=1.2 SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 0 50 100 150 200 250 300−0.01 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Time Step (C m a x N − C m a x A )/C 0 b SPH h/∆x=1.2SPH h/∆x=1.6 PSE h/∆x=1.2 PSE h/∆x=1.6 Figure 3.14: Difference between maximum concentration values of analytical and nu- merical solutions as function of the number of time steps for run R7, αT /αL = 1.0, and (a) random and (b) quasi-random particle distribu- tions. 103 3.5.3.2 Anisotropic case Both particle approximations proved to be much more sensitive to particle disorder when simulating anisotropic dispersion than for the isotropic case. SPH simulations with ran- dom and quasi-random distributions and h/∆x = 1.2 became unstable after few time steps. For the other scenarios, the errors of both methods stay almost constant as the average particle spacing decreases, as shown in Figure 3.15. The use of larger smoothing lengths or core sizes results in lower errors, but it does not significantly improve the convergence rate of the numerical approximations. The minimum E∞ corresponds to the PSE solution for quasi-randomly distributed particles and h/∆x = 1.6 is approximately 7% of the initial maximum concentration C0. Figure 3.16 shows the concentration field for run R7 and quasi-randomly distributed particles at the end of the simulation. Both solutions exhibit negative concentrations (dark bands) that, as for equispaced particles, are located in regions almost parallel to the flow direction. While the maximum magnitude of the negative values in the PSE solution (−0.28) is very similar to the one observed for equispaced particles (−0.32), it is five orders of magnitude larger for the SPH solution, −16.86 for quasi-random and −6.9 · 10−4 for equispaced particles. 3.6 Conclusions We present the derivation of SPH approximation to simulate anisotropic dispersion. We also present an analytical analysis of the monotonicity properties of the new approxima- tion. In addition, we compare the new approximation to the particle strength exchange method and a standard 9-point finite volume scheme to simulate the dispersion of a contaminant plume in two-dimensions under different dispersivity ratios and flow orien- tations. Furthermore, we test the numerical properties of the three methods by evaluating the sensitivity of the solution to a variety of numerical parameters such as particle and grid spacing, kernel and cutoff functions, and ratio of smoothing length or core size to particle spacing. Based on the results of the numerical simulations presented above, we conclude the following: 1. Simulations that consider anisotropic dispersion are troublesome for all three meth- ods. The error of the numerical solution is larger and the convergence rate lower 104 10 15 20 25 30 35 40 45 5010 −2 10−1 100 101 102 ∆x E 2 SPH Random h/∆x=1.6 SPH Quasi−Random h/∆x=1.6 PSE Random h/∆x=1.2 PSE Quasi−Random h/∆x=1.2 PSE Random h/∆x=1.6 PSE Quasi−Random h/∆x=1.6 10 15 20 25 30 35 40 45 500 0.1 0.2 0.3 0.4 0.5 0.6 0.7 ∆x E ∞ /C 0 SPH Random h/∆x=1.6 SPH Quasi−Random h/∆x=1.6 PSE Random h/∆x=1.2 PSE Quasi−Random h/∆x=1.2 PSE Random h/∆x=1.6 PSE Quasi−Random h/∆x=1.6 Figure 3.15: Error as function of average particle spacing for αT /αL = 0.01 using randomly and quasi-randomly distributed particles. The use of larger ratio h/∆x decreases the error, but convergence rates of both methods are much lower than for equispaced particles or for the isotropic case. 105 Figure 3.16: Concentration distribution after 300 time steps for run R7, αT /αL = 0.01 and quasi-randomly distributed particles. Dark bands indicate ar- eas of negative concentrations. Minimum concentration values are -16.86 for SPH and -0.28 for PSE. than for the corresponding isotropic case. Furthermore, the numerical solutions computed with any of the three methods independent of the particle distribution exhibit artificial oscillations and negative concentrations. 2. For equispaced particles, the convergence rate of both particle methods is similar to that of the standard 9-point finite volume scheme. However, in contrast to the finite volume scheme, the convergence rate and the overall accuracy of the SPH and PSE methods does not only depend on the number of particles or average particle spacing used, but also on other additional parameters such as kernel function and smoothing length. 3. The spatial distribution of particles is the most important factor that controls the accuracy of the numerical solutions computed with the PSE or SPH approximations. The accuracy of the solution decreases as the degree of disorder of the particles increases. This effect is more important for simulations that include anisotropic dispersion than for simulations of isotropic dispersion. To a certain extent, the loss of accuracy of the numerical solution can be controlled by using larger ratios between smoothing length or core size to average particle spacing. Overall, the PSE method is less sensitive to particle disorder than the SPH method. 106 Previous studies (Zimmermann et al., 2001; Chaniotis et al., 2002) have demonstrated that the periodic remeshing of particles can help to control the loss of accuracy of particle formulations due to the particle disorder caused by the flow velocity. Our numerical results indicate that using a remeshing step is likely beneficial in simulations that consider anisotropic dispersion. However, the loss of accuracy of the particle methods for isotropic dispersion is less important, thus the benefits of remeshing could be counter balanced by the additional computational cost and artificial diffusion that it introduces. Moreover, the remeshing procedure would not prevent the occurrence of negative concentrations. Those numerical oscillations can be particularly troublesome if particle methods are used to simulate reactive transport. In that case, negative values can be amplified by non-linear chemical reactions. Therefore, although the PSE and SPH schemes may be compelling alternatives to simulate conservative solute transport in porous media, they may not be appropriate for reactive solute transport simulations. 107 3.7 References Bear, J., Dynamics of fluids in porous media, Dover, 1988. Beaudoin, A., S. Huberson, and E. Rivoalen, Simulation of anisotropic diffusion by means of a diffusion velocity method, J. Comput. Phys., 186 , 122–135, 2003. Chaniotis, A., D. Poulikakos, and P. Koumoutsakos, Remeshed smoothed particle hydro- dynamics for the simulation of viscous and heat conducting flows, J. Comput. Phys., 182 , 67–90, 2002. Cleary, P. W., and J. J. Monaghan, Conduction modelling using smoothed particle hy- drodynamics, J. Comput. Phys., 148 , 227–264, 1999. Crumpton, P., G. Shaw, and A. Ware, Discretisation and Multigrid Solution of Elliptic Equations with Mixed Derivative Terms and Strongly Discontinuous Coefficients, J. Comput. Phys., 116 , 343–358, 1995. Degond, P., and S. Mas-Gallic, The weighted particle method for convection-diffusion equations. Part 1: The case of an isotropic viscosity, Math. Comput., 53 , 485–507, 1989a. Degond, P., and S. Mas-Gallic, The weighted particle method for convection-diffusion equations. II: The anisotropic case, Math. Comp, 53 , 485,508, 1989b. Edwards, M., and H. Zheng, A quasi-positive family of continuous Darcy-flux finite- volume schemes with full pressure support, J. Comput. Phys., 2008. Eldredge, J. D., A. Leonard, and T. Colonius, A General Deterministic Treatment of Derivatives in Particle Methods, J. Comput. Phys., 180 , 686–709, 2002. Español, P., and M. Revenga, Smoothed dissipative particle dynamics, Phys. Rev. E , 67 , 026,705–12, 2003. Gingold, R. A., and J. J. Monaghan, Smoothed particle hydrodynamics: Theory and application to non-spherical stars, Mon. Not. R. Astron. Soc., 181 , 375–389, 1977. Herrera, P., and A. Valocchi, Positive solution of two-dimensional solute transport in heterogeneous aquifers, Ground Water , 44 , 803–813, 2006. Herrera, P., M. Massabo, and R. Beckie, A meshless method to simulate solute transport in heterogeneous porous media, Adv. Water Resour., 32 , 413–429, 2009. 108 Jameson, A., Positive schemes and shock modelling for compressible flows, Int. J. Numer. Methods Fluids, 20 , 1995. Jubelgas, M., V. Springel, and K. Dolag, Thermal conduction in cosmological SPH sim- ulations, Mon. Not. R. Astron. Soc., 351 , 423–435, 2004. Kinzelbach, W., The random walk method in pollutant transport simulation, in Ground- water flow and quality modelling, edited by E. Custodio, A. Gurgui, and J. P. Lobo, pp. 227–246, 1988. Kuzmin, D., and S. Turek, Flux correction tools for Finite Elements, J. Comput. Phys., 175 , 525–558, 2002. Le Potier, C., Finite volume monotone scheme for highly anisotropic diffusion operators on unstructured triangular meshes, Comptes Rendus Mathématique, 341 , 787–792, 2005b. Lipnikov, K., M. Shashkov, D. Svyatskiy, and Y. Vassilevski, Monotone finite volume schemes for diffusion equations on unstructured triangular and shape-regular polygonal meshes, J. Comput. Phys., 227 , 492–512, 2007. Lipnikov, K., D. Svyatskiy, and Y. Vassilevski, Interpolation-free monotone finite volume method for diffusion equations on polygonal meshes, J. Comput. Phys., 228 , 703–716, 2009. Lucy, L., A numerical approach to the testing of the fission hypothesis, Astron. J., 82 , 1013–1024, 1977. Mlacnik, M., and L. Durlofsky, Unstructured grid optimization for improved monotonicity of discrete solutions of elliptic equations with highly anisotropic coefficients, J. Comput. Phys., 216 , 337–361, 2006. Monaghan, J., Smoothed particle hydrodynamics, Rep. Prog. Phys., 68 , 1703–1759, 2005. Monaghan, J. J., Smoothed particle hydrodynamics, Annu. Rev. Astron. Astrophys., 30 , 543–574, 1992. Nakshatrala, K., and A. Valocchi, Non-negative mixed finite element formulations for a tensorial diffusion equation, Arxiv preprint arXiv:0810.0322 , 2008. Nordbotten, J., and I. Aavatsmark, Monotonicity conditions for control volume methods on uniform parallelogram grids in homogeneous media, Computat. Geosci., 9 , 61–72, 2005. 109 Pollock, D., Semianalytical computation of path lines for Finite-Difference models, Ground Water , 26 , 743–750, 1988. Price, D. J., Magnetic Fields in Astrophysics, PhD thesis, Institute of Astronomy, Uni- versity of Cambridge, 2004. Tartakovsky, A., and P. Meakin, A smoothed particle hydrodynamics model for miscible flow in three-dimensional fractures and two-dimensional Rayleigh-Taylor instability, J. Comput. Phys., 207 , 610–624, 2005. Tompson, A., Numerical simulation of chemical migration in physically and chemically heterogeneous porous media, Water Resour. Res., 29 , 3709–3726, 1993. Welton, W., Two-dimensional PDF/SPH simulations of compressible turbulent flows, J. Comput. Phys., 139 , 410–443, 1998. Yuan, G., and Z. Sheng, Monotone finite volume schemes for diffusion equations on polygonal meshes, J. Comput. Phys., 2008. Zheng, C., and G. Bennet, Applied Contaminant Transport Modelling: Theory and Prac- tice, Van Nostrand Reinhold, New York, 1995. Zimmermann, S., P. Koumoutsakos, and W. Kinzelbach, Simulation of pollutant trans- port using a particle method, J. Comput. Phys., 173 , 322–347, 2001. 110 Chapter 4 A Multidimensional Streamline-Based Method to Simulate Reactive Solute Transport in Heterogeneous Porous Media1 4.1 Introduction 4.1.1 Motivation Despite considerable efforts made during the last decades to advance the state of the art in numerical modeling of conservative and reactive solute transport in porous media, current numerical methods still have serious limitations to provide accurate and efficient simulations of situations of practical interest. The use of grid-based methods such as finite difference or finite elements to simulate conservative and reactive transport in porous media is problematic for several reasons. Solute transport in porous media is typically advection-dominated, thus grid-based methods are afflicted by numerical dispersion that can be mitigated but not avoided by using high-order numerical schemes. In addition, spurious oscillations arise because of the application of non-linear high-order methods 1A version of this chapter will be submitted for publication. P. Herrera, A. Valocchi, and R. Beckie. A Multidimensional Streamline-Based Method to Simulate Reactive Solute Transport in Heterogeneous Porous Media. 111 to solve advection (Steefel and MacQuarrie, 1996; Cirpka et al., 1999) and numerical approximations of off-diagonal entries in the dispersion tensor (Herrera and Valocchi, 2006; Lipnikov et al., 2007). Finally, explicit time integration schemes can result in very restrictive global stability criteria, especially in highly heterogeneous velocity fields (Thiele et al., 1997; Crane and Blunt, 1999). Particle methods based on random-walk schemes are an attractive alternative to simulate solute transport in porous media because of their natural ability to simulate advection- dominated transport, their simplicity, and their inherent advantages for scalable and efficient parallel implementations. However, those methods also have important disad- vantages. First, they have problems in tracking low concentrations and producing smooth concentration distributions (Tompson, 1993; Obi and Blunt, 2004; Herrera et al., 2009b). Second, they require a background grid to simulate the effects of local-scale dispersion on the mixing of different chemical compounds and to compute concentrations to es- timate reaction rates. The computation of averaged concentration values over the cell volumes can introduce artificial mixing that can compromise the original advantages of the method. Third, their performance can be degraded in situations that include multi- ple chemical species because of the large number of particles required to track multiple concentrations. Reactive solute transport simulations impose even more severe restrictions on the per- formance of numerical methods than do conservative solute transport simulations. First, numerical artifacts such as spurious oscillations and numerical dispersion can be ampli- fied in presence of non-linear reactions (Cirpka et al., 1999b). Second, in many situations of practical interest — e.g. biodegradation of contaminant plumes — chemical reactions mainly occur in areas of low solute concentrations that can be difficult to model accu- rately with methods that have been successfully applied to simulate conservative solute transport, e.g. random-walk methods (Tompson, 1993). Last, numerical methods ap- plied to simulate reactive transport must be computationally efficient to allow for the simulation of multiple species at fine spatial and temporal scales. Recently, Herrera et al. (2009b) presented a meshless approach based on smoothed parti- cle hydrodynamics (SPH) (Gingold and Monaghan, 1977; Lucy, 1977), hereafter referred to as the Monte-Carlo SPH (MC-SPH) method, to simulate conservative solute transport in heterogeneous porous media. MC-SPH is a Lagrangian method that uses a kernel-based interpolation scheme to represent dispersion (Cleary and Monaghan, 1999; Jubelgas et al., 2004). In MC-SPH simulations, individual particles move along instantaneous stream- lines carrying solute concentration and exchanging solute mass with nearby particles, as 112 shown in Figure 4.1. Since the method can handle dispersion without remapping the concentration field onto a grid, it is free of numerical dispersion and grid orientation effects. In addition, because particles carry concentration information and not mass, the method accurately resolves low concentration values and produces smooth concentration distributions. Figure 4.1: Meshless MC-SPH method. In MC-SPH simulations a given particle (black circle) moves along an instantaneous streamline (dashed line) while exchanging solute mass with particles that are within its “area of in- fluence” defined by the support volume of the kernel function (shaded circles). Although promising, MC-SPH also presents problems. Because it is based on an integral interpolation scheme, the accuracy of the solution depends on the spatial distribution of the particles, which can become a problem in presence of heterogeneous flow fields where particles accumulate in stagnant zones (Herrera et al., 2009a). The evaluation of the interpolation scheme requires identifying near neighbor particles at each time step, which introduces a computational overhead in comparison with other numerical schemes. Moreover, the method had been only used to simulate isotropic dispersion until the recent work of Herrera et al. (2009a) who introduced a method to handle the full dispersion tensor in three dimensions. They demonstrated that their approximation worked well for anisotropic dispersion, but can produce negative concentrations for the full tensor dispersion with off-diagonal terms. Therefore, this approximation is not suitable for reactive transport simulations and this motivates us to turn to a new approach based 113 upon streamline methods. Streamline methods have been successfully used to simulate oil migration (Thiele et al., 1996, 1997) and multidimensional solute transport (Crane and Blunt, 1999; Di Donato and Blunt, 2004; Obi and Blunt, 2004, 2006). These methods use a numerical grid that adapts to the flow field, which reduces numerical dispersion and grid orientation effects. The use of streamlines allows the transformation of a multidimensional trans- port equation to a set of individual one-dimensional transport problems. Because of its adaptation to the flow and its ability to minimize numerical dispersion, the method is well suited for simulations of advection-dominated transport as found in heterogeneous porous media (Di Donato et al., 2003). In addition, the numerical solution of the re- sulting one-dimensional transport problem also allows the use of more efficient numerical solvers and more relaxed stability constraints (Crane and Blunt, 1999). Because of the efficiency of the method, it is possible to simulate large-scale domains with fine spatial and temporal resolution (Di Donato et al., 2003; Obi and Blunt, 2004, 2006). Although longitudinal dispersion along individual streamlines can be easily incorporated, transverse mixing between streamlines is more difficult to simulate. Since many impor- tant reactions in situations of practical interest occur along the fringes of contaminant plumes and are controlled by transverse dispersion (Ham et al., 2004), it is crucial to incorporate transverse mixing in a streamline-based formulation to obtain a general sim- ulation framework that can be applied to a wide range of reactive transport problems. To best of our knowledge, two approaches have been used to incorporate transverse dispersion in streamline-based simulations. In the first, solute transport is solved using a flow-oriented grid and transverse dispersion is included as a flux component perpendicular to the streamlines (Cirpka et al., 1999). This approach has been successfully used in two- dimensional simulations (Cirpka et al., 1999b), but it has not been extended to three- dimensions. A second alternative employs a hybrid approach Obi and Blunt (2004). First, advection is solved along streamlines. Then, concentration values are mapped onto a grid where a mesh-based solver is used to solve for dispersion. Finally, concentration values are interpolated back from the grid to the streamlines. The interpolation from and to streamlines introduces some numerical error that is difficult to quantify (Obi and Blunt, 2004). Because the interpolation must be done at each time step, the cumulative effect can be important even if an accurate interpolation scheme is used. 114 Figure 4.2: Hybrid streamline-SPH method. The method combines ideas taken from streamlines simulations and MC-SPH. Solute advection and longitudinal dispersion are handled as in traditional streamline simulations. Nodes along streamlines are used as interpolations points to apply the same meshless approximation for local-scale dispersion as the one used in MC- SPH, so an individual node (black circle) exchanges solute mass with other nodes (grey circles) that are within the support volume of the kernel function (shaded region). 4.1.2 Objectives The main objective of this paper is to present a new hybrid numerical method that combines some of the most important advantages of streamline methods and MC-SPH. Streamlines are used to discretize the domain and to define the location of a set of nodes that is used to evaluate the numerical solution. Advection is solved in tradi- tional streamline-based simulations, i.e. as a composite of one-dimensional solutions. Anisotropic dispersion is accommodated as the sum of a three-dimensional isotropic dis- persion contribution handled using a meshless integral approximation, and longitudinal dispersion solved along each streamlines using a standard finite difference formulation. Figure 4.2 shows a schematic of the proposed hybrid method. The main advantages of the proposed method are: (i) like traditional streamlines meth- ods, it is well suited to simulate advection-dominated transport in heterogeneous porous media because of the elimination of artificial mixing due to numerical dispersion, (ii) it provides a robust mechanism to incorporate transverse dispersion between streamlines without requiring additional interpolation steps, and (iii) the use of a flow oriented grid to approximate dispersion results in a numerical scheme that is monotone and positivity preserving even for full dispersion tensors, thereby avoiding negative concentrations and 115 spurious oscillations that plague many other numerical methods. 4.2 Mathematical Formulation 4.2.1 Governing Equation At the local-scale reactive solute transport in porous media is modeled by a system of partial differential equations, which is given as follows for the case of constant porosity and an incompressible fluid (Bear , 1988): ∂Ck ∂t = ∇ · (D∇Ck)− v ·∇Ck +Rk(c) k = 1, . . . ,m ∂Ck ∂t = Rk(c) k = m+ 1, . . .M (4.1) where Ck [M/L3] is the solute concentration of species or component k, D [L2/T] is the hydrodynamic dispersion tensor, v [L/T] is the pore water velocity, Rk [M/L3/T] is the total reaction rate for species or component k, c = (C1, . . . , CM) is the concentration vector, m is the number of species or components in the aqueous (mobile) phase, and M is the total number of species or components. In what follows we will focus our attention on the numerical solution of the first group of equations that describe the migration of chemical species in the aqueous phase, which cor- respond to a set of advection-dispersion-reaction (ADR) equations. However, as demon- strated by others authors (Di Donato and Blunt, 2004) and in Section (4.4), the proposed streamline formulation can also handle situations that include immobile species in the solid phase. The most common expression to compute the components of the dispersion tensor D for an isotropic porous medium considering a Cartesian coordinate system is (Bear , 1988; Lichtner et al., 2002) Dij = (αT q +Dm) δij + (αL − αT ) vivj q (4.2) 116 where Dm [L2/T] is the molecular diffusivity, δij is Kronecker’s delta, q = |v| [L/T] is the magnitude of the pore water velocity, and αL and αT [L] are the longitudinal and transverse dispersivity of the medium, respectively. 4.2.2 Streamline Formulation Traditional streamline models neglect dispersion and rewrite the multidimensional trans- port equation (4.1) as a one-dimensional transport equation along streamlines using the following identity (Thiele et al., 1997; Crane and Blunt, 1999) v ·∇ ≡ |v| ∂ ∂s = ∂ ∂τ (4.3) where s is the arc length coordinate and τ is the time of flight (TOF), defined as the time required to reach a point located at a distance s along a streamline (Thiele et al., 1996; Crane and Blunt, 1999). Mathematically, τ = sˆ 0 1 |v| dξ (4.4) If we consider a local coordinate system with components x̂i that are parallel and perpen- dicular to the flow direction as shown in Figure 4.3, then the off-diagonal terms in (4.2) are equal to zero and the diagonal terms simplify to D11 = αL |v| and D22 = D33 = αT |v|. Therefore, the multidimensional ADR equations can be written using a flow-oriented coordinate system and the TOF to get ∂Ck ∂t = ∇ ·D∇Ck − ∂Ck ∂τ +Rk(c) k = 1, . . .m (4.5) or in terms of the arc length coordinate, s, to get ∂Ck ∂t = ∇ ·D∇Ck − |v|∂Ck ∂s +Rk(c) k = 1, . . .m (4.6) The formulations given by (4.5) and (4.6) are equivalent, but they each present distinct challenges for numerical methods. 117 x̂ 1 x̂ 2 s 0 ,! 0 s 0 + !s," 0 + !" Figure 4.3: Flow oriented coordinate system. The transport equation can be written considering using a coordinate system with coordinates x̂i that are parallel and perpendicular to the direction of the flow. Streamline simulations also define other two coordinates along individual streamlines, the time of flight τ and the arc length s. 4.2.3 Numerical Approximation The numerical solution of equations (4.5) or (4.6) requires numerical approximations for the advection, dispersion and reactions terms. The advection term can be approx- imated within a traditional streamline framework whereas the dispersion term can be evaluated using a combination of a one-dimensional finite difference approximation along streamlines for the longitudinal component and a kernel-based interpolation for the other components. Finally, the reaction component can be approximated using different solvers designed to integrate initial value problems (e.g. see Oran and Boris, 2000). In the following description of the proposed streamline-based formulation we assume that: (i) the flow velocity field is externally computed, thus it is an input parameter; and (ii) the flow field is steady-state. The second assumption allows us to simplify the discussion about the implementation of the method but it does not represent a real limitation, because transient flow fields can be easily handled by tracing new streamlines when flow conditions change and, then, interpolating concentrations from the old to the new streamline locations(Thiele et al., 1996; Thiele, 2005). In the discussion that follows we drop the sub-index k and assume a single species or component to simplify notation. 118 4.2.3.1 Advection along streamlines For simple problems that involve only advection and longitudinal dispersion, concentra- tion values along individual streamlines can be exactly computed using one-dimensional analytical solutions (Thiele et al., 1996). However, more general scenarios require the use of numerical approximation schemes. Standard streamline simulations generate a numerical grid in TOF space by tracking particles and recording the TOF when particles enter and exit from individual cells (e.g. Crane and Blunt, 1999; Obi and Blunt, 2004). Because of the heterogeneity of the porous medium and, hence, the flow velocity, the time required to cross individual cells may be very different and node separation in TOF space is very irregular. In general, the inte- gration of the advective term in (4.5) over the irregularly spaced nodes in TOF space requires some regularization of the one-dimensional grid to avoid excessive numerical dis- persion, to relax the stability restrictions of explicit solvers, and to simplify its numerical solution by keeping a uniform grid spacing (Crane and Blunt, 1999; Thiele, 2003). For example, Crane and Blunt (1999) refined the original TOF grid to get uniformly spaced nodes and used a regularization algorithm to conserve mass balance in the interpolated concentration values. Another approach is to only remove cells that are considered too small to significantly improve the spatial resolution of the method and may introduce un- necessary numerical constraints (Thiele, 2003). Thiele et al. (1997) used a second-order in space and an explicit first-order in time total variation diminishing (TVD) solver to compute the solution, while Crane and Blunt (1999) used a first-order finite difference method with upstream differences for space and an implicit (backward Euler) difference for time. A second option, which is the one we have implemented in our code, is to formulate the one-dimensional advection-dispersion equation along a streamline in terms of the arc length coordinate using (4.6). In that case the numerical solution can be computed using a grid defined by equispaced nodes along individual streamlines. The generation of such a grid involves several steps. First, one must numerically integrate the fluid particle trajectories recording particle positions instead of TOF. Next, one can approximate the total length of a streamline as the sum of the distances of the arcs that connect adjacent nodes. The approximation of the arc length segments by the arc connecting adjacent nodes is second-order accurate for nodes that are relatively close (Aris, 1989). Then, the total arc length is divided into a number of segments such that the length of each segment is close to a given target spacing ∆s, while the sum of the individual segments 119 is equal to the original streamline length and the starting and end points are the same as in the original streamline. The solution of the advective term in (4.6) is equivalent to solving the following PDE ∂C ∂t + q(s)∂C ∂s = 0 (4.7) which corresponds to an advection equation with variable coefficients also known as the color equation (LeVeque, 2002). The last equation can be recast as a conservation law with flux F = qC plus a source term due to the change in velocity, to obtain ∂C ∂t + ∂ ∂s (qC) = C ∂q ∂s (4.8) The last solution can be solved with any one-dimensional solver for hyperbolic equations, e.g. low- or high-resolution schemes and explicit or implicit time discretizations. The use of a uniformly spaced grid in s instead of one spaced in τ allows more control of the physical distribution of nodes and the possibility of refining the streamline grid by decreasing the node spacing independently of the resolution of the grid used to compute the flow velocity. 4.2.3.2 Dispersion The ratio between longitudinal and transverse dispersivities in porous media is equal to or greater than one. Then, one can make the change of variable αL = αT + αL with α̃L ≥ 0. Therefore, the dispersion tensor with principal directions that are parallel and perpendicular to the flow velocity, D, can be rewritten as D = DL + D 0 0 0 D 0 0 0 D (4.9) where DL = q αL and D = qαT +Dm. Then, the dispersion term in (4.6) can be rewritten as, 120 ∇ · D∇C = ∇ · D∇C+ ∂ ∂x̂1 DL ∂C ∂x̂1 (4.10) where x̂1 is the coordinate aligned with the flow direction (see Figure 4.3). Using a streamline discretization the derivative along x̂1 can be easily evaluated using a second-order finite difference approximation to obtain, ∂ ∂x̂1 DL ∂C ∂x̂1 = 1 si+1/2 − si−1/2 Di+1/2L si+1 − si (Ci+1 − Ci)− Di−1/2L si − si−1 (Ci − Ci−1) (4.11) To derive this expression we have assumed that the difference between the indices of consecutive nodes along a streamline is equal to one. Thus, (4.11) may be written as ∂ ∂x̂1 DL ∂C ∂x̂1 = γi+1Ci+1 + γi−1Ci−1 − γiCi (4.12) with γi ≥ 0. The first term on the right-hand-side of (4.10), which is equivalent to isotropic dispersion or a diffusion process, can be evaluated using a MC-SPH approximation to obtain (Cleary and Monaghan, 1999; Jubelgas et al., 2004; Herrera et al., 2009b), dCi dt = − j 1 p̂ij Di + Dj rij|rij|2∇W (rij) (Cj − Ci) (4.13) where rij = ri − rj is the separation vector between nodes i and j, Di is the modified dispersion coefficient at node i, W is a kernel function that satisfies some normalization conditions and that, in general, has compact support, and p̂ij is a symmetric approxima- tion of the node density at nodes i and j (for details see Cleary and Monaghan, 1999; Monaghan, 2005; Herrera et al., 2009b, and references therein). The node density at node i is evaluated as, pi = j W (rij) (4.14) 121 Then, we can rewrite (4.13) as dCi dt = j βij (Cj − Ci) (4.15) with βij ≥ 0 because for typical kernels ∇W ≤ 0. Therefore, the numerical approximation of (4.10) can be written dCi dt = γi+1Ci+1 + γi−1Ci−1 − γiCi + j βij (Cj − Ci) (4.16) To study the monotonicity properties of this approximation (4.16), we notice that it has the form dCi dt = j =i β̂ij(Cj − Ci) = j β̂ijCj (4.17) withj β̂ij = 0. The local extremum diminishing (LED) criteria (Jameson, 1995;Kuzmin and Turek, 2002) establishes that numerical approximations such as (4.17) that satisfy β̂ij ≥ 0, ∀i = j preserves the monotonicity of the solution, because the temporal deriva- tive of the concentration at a maximum can only be negative and similarly, the con- centration at a minimum can only increase(Kuzmin and Turek, 2002). Therefore, the discretization (4.16) preserves the positivity of the concentration distribution and pro- vides solutions that are free of spurious oscillations and negative concentrations. 4.3 Implementation Details 4.3.1 Streamline Tracing An important part of streamline-based simulations consists in tracing streamlines given a velocity field. Given the location of an initial seed, the geometry of the streamline that passes through that point is generated using a particle tracking method to integrate the fluid trajectory (in the forward or backward directions) until reaching an inlet or outlet 122 face or a sink or source cell. The arc length and TOF are recorded at discrete intervals along the fluid particle trajectory. Pollock’s semi-analytical method Pollock (1988) is a popular choice to track streamlines when the flow velocity is known in a Cartesian staggered grid, because of its high per- formance and accuracy due to its semi-analytical character. The method has also been extended to handle situations when the flow velocity is computed in an unstructured grid (Prevost et al., 2002). It is also possible to use explicit schemes to integrate streamline trajectories, e.g. Runge-Kutta schemes (Zheng and Wang, 1999) or adaptive algorithms e.g. (Bensabat et al., 2000). In our experience it is possible to obtain a similar accuracy with Pollock’s method or with an adaptive explicit scheme. Although, Pollock’s method is generally faster than explicit schemes, the performance differences are negligible when compared to the total time required for a simulation. On the contrary, explicit schemes are simpler to program and more numerically robust because they avoid floating point errors that can be problematic for semi-analytical methods. In our streamline solver we have implemented both Pollock’s algorithm and an explicit adaptive scheme, however we use the second one as our default particle tracking method. The spatial distribution of streamlines is another key issue in streamline-based simula- tions. Without an adequate choice of the initial seed particle locations and in the presence of heterogeneous flow fields or sources or sinks, the spatial streamline distribution can be very irregular with large areas of the domain that do not contain any streamlines. This can be particularly problematic in situations that require mapping concentrations onto a background grid (Obi and Blunt, 2004). It can also be problematic for the implementa- tion of our hybrid scheme, because the MC-SPH approximation for dispersion assumes that the area of influence of nodes in neighboring streamlines always overlap. Thus, it is important to assure a minimum density of streamlines in every region of the domain. A common solution of this problem is to use a background grid. After a set of initial streamlines has been traced, new streamlines are traced starting at each grid cell that does not contain one (Batycky et al., 1997; Crane and Blunt, 1999). This is the approach we have implemented in our streamline simulator. 123 4.3.2 Time Integration In principle, it is possible to use an explicit, implicit or a hybrid scheme to integrate (4.16). Moreover, depending on the numerical scheme used to approximate advection, the solution of the advection-dispersion-reaction equation can be solved fully-implicitly. A fully-implicit solution would result in more relaxed stability restrictions for the time step size. On the other hand, as discussed below, a fully-implicit implementation also has disadvantages such as larger memory requirements that make it less attractive. As a consequence, in our streamline simulator we use an operator-splitting (OS) approach to solve the advection and dispersion terms. The OS approach is also used in current streamline simulators to incorporate dispersion (Obi and Blunt, 2004), to decouple the saturation and pressure equations in streamline simulations of oil migration (Thiele et al., 1997), and in numerical packages to solve solute transport in porous media (e.g. Zheng and Wang, 1999). The OS approach provides ample flexibility in the selection of numerical algorithms to obtain high accuracy and reasonable performance. An OS approach also allows use of different time steps to solve the advective and dispersive terms. This can be an advantage to overcome some of the limitations of explicit solvers. Given a global time step ∆t, one can integrate the dispersion term using ∆tD ≤ ∆t such that many sub-steps may be necessary to complete a global step. A similar idea can be applied to integrate the advection term. This is the approach we apply in our streamline simulator: a single global step can involve many sub-steps to integrate the dispersive and advective terms. 4.3.3 Advection Solution We use a first-order explicit TVD finite difference approximation to solve (4.8) (LeVeque, 2002). Although formally first-order accurate, the high-resolution approximation per- forms better than low-order approximations such as upstream finite difference (LeVeque, 2002). The implementation of the one-dimensional TVD solver can be done assuming that the flow velocity is evaluated at the node positions or at the midpoint between them. In our implementation we evaluate the flow velocity at the node positions using a linear interpolation scheme for the velocity components (Pollock, 1988), however any velocity reconstruction scheme that provides a continuous velocity field that satisfies the original mass balance equation may be used. 124 We use different time steps along each streamline to satisfy the stability constraints of the explicit solver while minimizing numerical dispersion and computational requirements. We use ni time steps of size ∆ti to integrate (4.8) along streamline i during a global time step ∆t such that ∆t = ni∆ti, and the internal time step ∆ti is such that the maximum CFL number along streamline i is less than or equal to one, i.e. max(q∆ti/∆si) ≤ 1. Therefore, small time steps are necessary only along streamlines that cross fast flow re- gions, while large time steps can be applied to integrate along slow streamlines. This constitutes an important performance advantage of streamline simulations versus multi- dimensional mesh-based solvers. 4.3.4 MC-SPH Solution 4.3.4.1 SPH kernel In our streamline simulator we use a cubic-spline kernel (Monaghan, 1992), W (r, h) = σ hnd 1− 32 r h 2 + 34 r h 3 0 ≤ rh < 1 1 4 2− rh 3 1 ≤ rh < 2 0 rh ≥ 2 (4.18) where r is the magnitude of the separation vector, h is the so called smoothing length, σ is a normalization constant, and nd is the number of dimensions. Hence, the size of the kernel support volume is given by the selection of h. In our implementation we use a constant smoothing length for all the nodes. We select h based on the spatial distribution of streamlines and nodes such that the number of nodes per kernel support volume stays within a range that guarantees reasonable accuracy (Herrera et al., 2009b,a). 4.3.4.2 Neighbor search The number of nodes that effectively contribute to the summation in (4.13) depends upon the support volume of the kernel function. Thus, evaluation of the temporal derivative in (4.13) can be accelerated by discarding the nodes that are beyond the kernel support volume. In that case the evaluation of the dispersion term for all the nodes becomes a 125 problem of order O(NkN), where Nk is the average number of nodes per kernel volume and N is the total number of nodes (Herrera et al., 2009b). There are different methods to identify near neighbor nodes that use data structures to classify nodes according to their spatial location (Waltz et al., 2002; Viccione et al., 2008), e.g. linked lists (Welton, 1998) or hierarchical trees (Hernquist and Katz , 1989). In our streamline simulator we use a background grid together with linked lists to store a list of the nodes located at each cell. Then, the evaluation of (4.13) for a specific node only requires looping over nodes that are within adjacent cells (Welton, 1998). While in SPH particle simulations the node lists must be updated at each time step, in our hybrid methods the lists must be only updated each time that the streamlines are traced which happens much less often. 4.3.4.3 Time integration Numerical experiments show implicit schemes to solve (4.16) are unconditionally stable independent of the time step utilized. Although attractive because of its stability prop- erties, the implicit solution of (4.16) can become impractical when some nodes have a large number of neighbor nodes, e.g. three-dimensional problems or highly heterogeneous system. In those cases, the number of nodes that contribute to the summation in (4.17) and, hence, the number of non-zero coefficients β̂ij can be quite large. As consequence, the memory required to store the matrix of the implicit solution can become prohibitive even for a moderate number of nodes. A possible solution to this problem would be to use a variable smoothing length such that the number of neighbor nodes stays relatively constant (Monaghan, 2005). Based on the above considerations, we use a first-order explicit formulation to integrate the dispersion term. The stability restriction of the explicit solver requires a time step such that (Cleary and Monaghan, 1999; Herrera et al., 2009b) ∆t ≤ h 2 max D (4.19) where is constant factor. In the simulations presented in the next section we find that = 0.1 provides stable solutions. It is important to notice that the maximum time step given by (4.19) is inversely pro- portional to the magnitude of D, which, for typical porous media applications is small 126 compared to the scale of the numerical discretization given by h. Thus, in general, the condition imposed by (4.19) on the time step is less restrictive that the stability require- ments of explicit solvers for advection. 4.3.5 Longitudinal Dispersion 4.3.5.1 Interface coefficients The numerical approximation of the longitudinal dispersion terms requires the evaluation of the coefficients Di±1/2L in (4.11). Those coefficients can be directly evaluated if the flow velocity is known at the interface position i±1/2. Alternatively, Di±1/2L can be evaluated as the harmonic average of the coefficients at the nodes i and i± 1 as in a standard cell- centered finite difference approximation (Zheng and Bennet, 1995). Both approximations result in symmetric expressions to compute dispersive numerical fluxes and guarantee flux continuity across the interface. Because we evaluate the flow velocity at node positions, we have implemented the second alternative in our streamline simulator. 4.3.5.2 Time integration The use of an OS strategy allows decoupling of the temporal integration of the longitu- dinal and transverse dispersion components that appear in (4.16). If each component is integrated separately then the longitudinal term can be approximated using an explicit or implicit approximations. An explicit approximation for the one-dimensional dispersion equation is conditionally stable and must satisfy the following stability restriction ∆t ≤ 0.5 (∆si) 2 max DL (4.20) On the other hand, an implicit approximation has the advantage of being unconditionally stable. The resulting linear system is tri-diagonal and can be efficiently solved using a direct solver, e.g. one based on the Thomas algorithm (Wang and Anderson, 1982). However, such a splitting strategy would introduce an additional operator-splitting error. Alternatively, one can apply a single step to integrate (4.17), which combines the lon- gitudinal and transverse dispersion terms. This is the approach implemented in our streamline simulator which uses an explicit time marching scheme. 127 Figure 4.4 shows a diagram of the overall solution strategy implemented in our streamline- based simulator. 4.4 Numerical Examples In this section, we present four examples that we use to compare our implementation of the proposed streamline-based method and a finite difference package, MT3DMS (Zheng and Wang, 1999), which is a well-established solute transport simulator. The examples correspond to different hydraulic conditions and solute release mechanisms. We consider different dispersivity values to test the quality of our new streamline-based approximation for dispersion. In all the examples, the velocity field was computed with an external finite volume package, MODFLOW (Harbaugh and McDonald, 1996). MT3DMS is a well-tested and robust numerical package that provides several solvers to simulate solute advection (Zheng and Wang, 1999). We use the multidimensional TVD and method of characteristics (MOC) solvers to simulate the examples presented below. The multidimensional TVD solver is a natural candidate for a comparison with our one- dimensional TVD solver used to advect solute along streamlines. On the other hand, the MOC solver minimizes numerical dispersion when transport is advection-dominated at the cost of introducing additional mass balance errors and numerical oscillations (Zheng and Wang, 1999). Thus, the two solvers provide a range of solutions that are a good representation of the performance of the state of the art numerical solvers used to simulate solute transport in porous media. In the rest of this section, we focus our analysis on the ability of our streamline simulator to incorporate dispersion more than on the relative advantages of the MT3DMS or streamline solvers to simulate advection, since our principal objective is to introduce and validate our new formulation to incorporate dispersion in streamline-based simulations. The comparison of the performance of the solvers available in MT3DMS and our streamline- based simulator is difficult because of differences in their implementations and capabili- ties. For example, the solvers included in MT3DMS are implemented in the FORTRAN programming language using single precision, while our streamline simulator is imple- mented in Java using double precision. There are other implementation details that can also result in additional performance differences. Furthermore, the simulations presented in this section are for relatively small spatial domains and we expect that the observed differences in performance would be different and, probably, more important for larger 128 Initialize Simulation New Time Step Solve Advection Solve Dispersion Solve Reactions More time steps? End of Simulation For each species k in aqueous phase, solve ∂Ck ∂t + q(s) ∂Ck ∂s = 0 k = 1, . . . ,m along each streamline i using ∆ti ≤ min(∆si/q) and an explicit one-dimensional TVD solver. Advance solution along each streamline until complet- ing a global time step. For each species k in aqueous phase, solve ∂Ck ∂t −∇ · D∇Ck− ∂∂x̂1 DL∂Ck∂x̂1 = 0 k = 1, . . . ,m at each node using a hybrid MC-SPH finite difference scheme with an explicit in time approximation. Compute maximum time step,∆tD, to satisfy stability requirements. If∆tD < ∆t, loop over until completing a global time step. For each species k, solve ∂Ck ∂t = Rk(c) k = 1, . . . ,M at each node. yes T im e St ep , ∆ t no Figure 4.4: Overall solution approach implemented in streamline-based simulator. An operator splitting approach is used to decouple the solution of the advective, dispersive and reactive terms. 129 domains or finer grids. Finally, our streamline simulator and the solvers implemented in MT3DMS are for serial computer platforms, thus we do not take into account the obvious advantages of the streamline formulation to transform the solution of advection into multiple independent one-dimensional problems that are amenable to parallelization. Therefore, one should keep in mind that the performance comparisons reported below are limited to specific implementations of the methods and only a few problem sizes. 4.4.1 Example 1: Continuous Solute Release in Uniform Flow The first example corresponds to the continuous release of a contaminant in a uniform two-dimensional flow. The domain is square with each side equal to 1000 m. The finite difference grid has 100 x 100 cells, thus the cell spacing∆ is equal to 10 m. The streamline grid consists of 100 streamlines with nodes spaced every 10 m. Thus, the number of nodes in the streamline grid is equal to the number of cells in the finite difference grid. The flow velocity is constant and equal to 1 m/d and parallel to the x axis. The so- lute is continuously released with constant concentration equal to 1 mg/L from a small region in the center of the inlet boundary of the domain. We use a time step equal to 3.65 d and we simulate the solute migration for a total of 150 time steps. In the streamline simulations, we use a smoothing length equal to 12 m. For this simple quasi one-dimensional problem we use the MT3DMS multidimensional TVD solver; which, for this flow configuration, is equivalent to the one-dimensional TVD solver implemented in our the streamline simulator. Then, differences between both numerical solutions are only due to the approximation for dispersion. We define four different scenarios depending upon the longitudinal and transverse disper- sivity values as summarized in Table 4.1. The dispersivity values considered correspond to longitudinal (PeL = ∆/αL) and transverse (PeT = ∆/αT ) grid Péclet numbers between 1 to 10 and 2 to 100, respectively. Figure 4.5 shows contours of concentration values equal to 0.2 and 0.8 mg/L. The TVD and streamline solutions are identical independently of the longitudinal and transverse dispersivity values used in each scenario. This example demonstrates that the new streamline-based approximation for anisotropic dispersion performs well independently of the dispersivity values or anisotropy ratio. 130 Scenario αL αT PeL PeT 1A 10 1 1 10 1B 10 5 1 2 1C 1 0.1 10 100 1D 1 0.5 10 20 Table 4.1: Dispersivity and equivalent longitudinal (PeL) and transverse (PeT ) grid Péclet values used in Example 1. Figure 4.5: Comparison of simulated concentrations for Example 1. Contours for concentration values equal to 0.2 and 0.8 mg/L at the end of runs 1A (a), 1B (b), 1C (c) and 1D (d). Solid lines correspond to finite difference and squares to streamline solutions, respectively. 131 4.4.2 Example 2: Quarter Five-Spot in Heterogeneous Medium 4.4.2.1 Setup The second example corresponds to the well-known quarter five-spot well configuration. We consider a square domain with an injection well located on the lower left corner and an extraction well on the upper right corner. The four faces of the domain have no flow boundary conditions. The domain is a square of 64 x 64 m and is discretized using a uniform grid with 64 cells in each direction. We compute the flow velocity field assuming steady-state conditions and a heterogeneous hydraulic conductivity field. The spatial distribution of the natural logarithm of the hydraulic conductivity, Y = ln(K) with K in units of m/d, is generated assuming an exponential covariance model with mean value Ȳ = 1.0, variance σY = 1.0 and correlation length in both directions equal to five times the grid spacing. The injection and extraction rates at the wells is set equal to 10 m3/d. Streamlines are first generated from 100 equispaced points located over the diagonal line that connects the upper left and lower right corners. Additional streamlines are traced such that each cell of the grid used to compute the velocity field is crossed by at least one streamline resulting in a total of 146 streamlines. The generated hydraulic conductivity and streamlines are shown in Figure 4.6. Figure 4.6: Spatial distribution of the natural logarithm of the hydraulic conductivity and streamlines in Example 2. 132 To test the sensitivity of the TVD and MOC solutions with respect to the grid size, we refine the original grid to obtain a fine grid with 128 cells in each direction. We assign the hydraulic conductivity values computed in the coarse grid to the corresponding cells in the the fine grid, i.e. one value computed in the coarse grid is assigned to four cells in the fine grid. We then solve the flow and transport problems in the new grid. There are differences between the flow solutions computed in the coarse and fine grid as result of the different spatial discretizations, but they are rather small. For example, the mean velocity computed in the fine grid is less than 1% higher than the one computed in the coarse grid. However, the simulation results presented below demonstrate that such differences have a negligible impact on the solute transport solution. In the streamline simulations nodes are uniformly distributed along streamlines with an average spacing of 1 m. Additional parameters required to set up the MOC solver are listed in Table 4.2. Those parameters were chosen to minimize numerical oscillations observed in some preliminary simulations. Parameter Value Max. # of cells a particle can move in one time step 1 Relative cell concentration gradient (DCCELL) 0.00001 Number of particles in cells with relative gradient > DCCELL 32 Number of particles in cells with relative gradient < DCCELL 2 Number of particles in sources or sink cells 64 Tracking algorithm 4th-order Runge-Kutta Table 4.2: Parameters used in MOC simulations. For a detailed explanation see (Zheng and Wang, 1999). We assume that the contaminant is injected through the lower left well with concentra- tion equal to 1 mg/L and that the initial concentration is zero. The period simulated corresponds to 300 days and it is discretized using different time steps according to the stability restrictions of the explicit multidimensional TVD, MOC and streamline solvers as summarized in Table 4.3. The time step used in the streamline simulations was chosen such that the product of the mean flow velocity times the time step is equal to the average arc length spacing. 133 Method # Nodes or Cells Time Step # Time steps Streamlines 15,106 0.500 600 TVD Coarse 4,096 0.109 2820 TVD Fine 16,384 0.034 8520 MOC Coarse 49,116 0.193 1560 MOC Fine 203,439 0.054 5520 Table 4.3: Number of nodes or cells, time step size and number of time steps used in simulations of Example 2. Number of nodes reported for MOC corresponds to the maximum number of particles used during the simulation since this is the factor that controls the computational requirements, i.e. CPU time and memory. We use the three solvers to simulate four scenarios that represent different dispersivity values as summarized in Table 4.4. For the streamline simulations that include dispersion we use a smoothing length equal to 1.2 m. Scenario αL (m) αT (m) PeL PeT 2A 0.1 0 10 ∞ 2B 0.1 0.01 10 100 2C 0.1 0.1 10 10 2D 0 0 ∞ ∞ Table 4.4: Dispersivity and equivalent longitudinal (PeL) and transverse (PeT ) grid Péclet values used in Example 2. 4.4.2.2 Simulated concentrations Figure 4.7 shows simulated concentrations for scenarios 2A and 2C after the injection of 0.4 pore volumes of solute. MOC and TVD solutions were computed using the fine grid. Simulated concentration values using the streamline simulator were interpolated from nodes along streamlines to the cell centers of the fine grid for comparison purposes. In general, the numerical solutions computed with all three methods are similar. For scenario 2A the simulated concentrations indicate the presence of a slow flow region along the diagonal line that connects the two wells, which creates a sharp interface 134 between two fast moving fingers with concentration equal to the source concentration and a central region with concentration equal to zero. When transverse dispersion is included (run 2C) the slow central flow region is filled with concentrations that are about 50% of the source value. Transverse dispersion also produces a wider mixing zone at the edges of the advancing contaminant front where concentration values lie between the source and the background values. Figure 4.7: Simulated concentration values after injection of 0.4 pore volume of con- taminated fluid for Example 2. Interpolated streamline (first row), MOC (second row) and TVD (third row) solutions for scenarios 2A (left col- umn) and 2C (right column). The solutions computed with the three methods are similar for both scenarios. 135 We also recorded the simulated concentration versus time at two observation points. To avoid introducing additional numerical dispersion in the streamline results, we chose the locations of the observation points such that they coincide with two nodes in the streamline grid. The first observation point, P1, is located in the region of rapid flow changes near the plume center-line (see Figure 4.7) and the second one, P2, in a region where the advance of the plume is relatively homogeneous. Figures 4.8 and 4.9 show simulated breakthrough curves for the four scenarios considered at P1 and P2, respectively. While all three numerical methods simulate concentration values that are similar for point P2, there are important differences in the simulated curves for P1. At P1, the solution is very sensitive to numerical dispersion because of the presence of a slow flow region between two fast advancing plume fingers, which creates high concentration gradients. Simulated concentrations with the MOC and streamline-based solvers at point P1 for the purely-advective case (2D) agree well, with the exception of numerical oscillation in the MOC solution. On the other hand, numerical dispersion is clearly observable in both, coarse and fine, TVD curves. In general, both mesh-based solvers predict earlier breakthrough for all the simulated scenarios because of additional transverse dispersion due to computing cell average concentrations. For example, in absence of transverse dis- persion (2A) both mesh based solvers predict that the arrival of solute to the observation point P1 would occur around 80 days earlier than predicted by the streamline simulator. However, the difference between the streamline and mesh-based solvers becomes smaller as transverse dispersion increases and concentration values are smooth out at the grid scale, e.g. scenarios 2B and 2C. The solutions computed with the MOC and TVD solvers also become more similar as transverse dispersion increases and the advantages of the MOC solver to minimize numerical dispersion become less important. 136 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 A MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 B MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 C MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 D MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines Figure 4.8: Breakthrough curves at observation point P1 in Example 2. Point P1 is located in a region of rapid flow changes near the plume center-line. Each figure corresponds to one of the four scenarios simulated in Example 2: 2A, 2B, 2C and 2D. At P1 simulated concentrations are very sensitive to transverse dispersion. The numerical solutions computed with the streamline solver in absence of transverse dispersion (A and D) differ significantly from the ones computed with the two mesh-based solvers. Those differences become smaller as transverse dispersion increases (B and C). Figure 4.10 shows a comparison of the simulated breakthrough curves at P1 using the streamline and MOC (fine grid) solvers. The streamline solver predicts a breakthrough curve for run 2A, which considers only longitudinal dispersion, that is similar to the curve for the purely-advective case (2D), but has earlier breakthrough and reaches the peak concentration at later time. This is the expected behavior for that situation, which corresponds to a quasi one-dimensional transport problem. When transverse dispersion is included (run 2B), the streamline simulator predicts a change in the first part of the curve as consequence of the transfer of solute mass from fast streamlines to slower ones, 137 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 A MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 B MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 C MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 D MOC Coarse MOC Fine TVD Coarse TVD Fine Streamlines Figure 4.9: Breakthrough curves at observation point P2 in Example 2. Point P2 is located in a relatively homogeneous flow region where the advance of the solute front is relatively uniform. Each figure corresponds to one of the four scenarios simulated in Example 2: 2A, 2B, 2C and 2D. Simulated concentrations with the streamline simulator and the two mesh-based solvers are similar independent of the longitudinal and transverse disper- sivity values. 138 which results in an earlier breakthrough and change in slope with respect to the curves for runs 2A and 2D. In contrast, the breakthrough curves computed with the MOC solver, which performs well for the purely-advective case, do not show a clear distinction between the addition of longitudinal or transverse dispersion. When longitudinal dispersion is in- cluded the breakthrough curve shifts to the left of the curve for the purely-advective case, which is not consistent with the situation analyzed. Adding transverse dispersion results in an additional shift of the curve to the left, but there are no clearly distin- guishable changes in slope as observed in the curve obtained with the streamline-based solver. This example demonstrates some of the advantages of the streamline simulator to study situations of theoretical interest such as the effect of transverse dispersion in the transport of solutes in heterogeneous porous media. 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 a Run A Run B Run C Run D 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 b Run A Run B Run C Run D Figure 4.10: Comparison of simulated breakthrough curves at observation point P1 for Example 2, (a) streamline simulator and (b) MOC solver using fine grid. Figure 4.11 shows a comparison of the simulated breakthrough curves at P2 using the streamline and MOC (fine grid) solvers for the four transport scenarios analyzed. With the exception of the purely-advective case simulated with the MOC solver, the simu- lated breakthrough curves are similar independently of the solver and dispersivity values considered. 139 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 a Run A Run B Run C Run D 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 b Run A Run B Run C Run D Figure 4.11: Comparison of simulated breakthrough curves at observation point P2 for Example 2, (a) streamline simulator and (b) MOC solver using fine grid. 4.4.2.3 Numerical oscillations Figure 4.12 shows simulated concentrations after injection of 0.4 pore volumes of solute for runs 2A and 2B. Negative and greater than source concentration values are colored black, thus dark areas within the domain boundaries indicate zones where numerical oscillations occur. Numerical oscillations present in the solutions computed with the MOC and TVD solvers cover most of the simulation domain including areas that have not been reached by the solute front. Table 4.5 and 4.6 lists the normalized maximum and minimum simulated concentrations, respectively. Minimum concentration values simulated with both mesh-based solvers, TVD and MOC, are negative for scenarios that include anisotropic dispersion (A, B) due to the presence of the off-diagonal terms of the dispersion tensor. The TVD solver also produces small negative values for the advection-only case (D), but their magnitude is much smaller than for the runs that included anisotropic dispersion. In contrast, solutions computed with the streamline solver are always positive. Moreover, maximum concen- tration values computed with the TVD and MOC solvers are greater than the source concentration for some of the scenarios simulated because of spurious numerical oscilla- tions. The magnitude of the oscillations is greater for scenarios that consider anisotropic dispersion (A and B), probably because of the presence of negative concentrations val- ues that arise due to the presence of the cross-dispersion terms. The magnitude of the oscillations decreases when only advection (D) or isotropic dispersion are simulated (C). Solutions computed with the streamline solver are free of spurious oscillations in all cases. 140 Figure 4.12: Numerical oscillations in simulated concentrations for Example 2. Con- centration values after injection of 0.4 pore volume of contaminated fluid. Interpolated streamline (first row), MOC (second row) and TVD solutions (third row) for scenarios 2A (left column) and 2B (right col- umn). Negative and greater than source concentration values are shown as dark areas within the domain boundaries. Solutions computed with the MOC and TVD solver exhibit numerical oscillations that cover most of the domain. 141 Method\Run 2A 2B 2C 2D Streamlines 0 0 0 0 TVD Coarse -0.0285 -0.0171 0 <-0.0001 TVD Fine -0.0236 -0.0111 0 <-0.0001 MOC Coarse -0.0042 -0.0011 0 0 MOC Fine -0.0043 -0.0010 0 0 Table 4.5: Normalized minimum simulated concentration values for Example 2. Method\Run 2A 2B 2C 2D Streamlines 1.0000 1.0000 1.0000 1.0000 TVD Coarse 1.0272 1.0147 1.0037 1.0063 TVD Fine 1.0588 1.0276 1.0000 1.0034 MOC Coarse 1.0435 1.0112 1.0000 1.0000 MOC Fine 1.0561 1.0076 1.0000 1.0000 Table 4.6: Normalized maximum simulated concentration values for Example 2. 4.4.2.4 Performance comparison Table 4.7 summarizes the normalized CPU time required to simulate the four different scenarios analyzed in Example 2. The streamline solver is faster to solve advection. It is up three times faster than the TVD or MOC solvers for the coarse grid (64x64 cells) and more than thirty times faster for the fine grid (128x128 cells). However, the mesh-based solvers are faster if dispersion is included and the solution is computed using the coarse grid. Yet, the streamline solver is faster by a factor of about two, if the fine grid is used. This demonstrates that the streamline solver performs much better than mesh-based solvers to simulate two-dimensional problems. The difference in performance is more important when advection and longitudinal dispersion are simulated, which can be very valuable in many situations of practical interest. For example, simulating scenarios that consider only advection and longitudinal dispersion can be useful in the first stages of a model calibration, sensitivity analysis, evaluation of parameters uncertainty (Hill and Tiedeman, 2007) or in any situation where a large number of solute transport simulations is required. 142 Method\Run 2A 2B 2C 2D Streamlines 1.1 28.6 28.6 1.0 TVD Coarse 4.4 4.4 4.4 2.5 TVD Fine 55.1 55.1 48.1 29.0 MOC Coarse 5.5 5.5 5.5 3.4 MOC Fine 81.0 81.0 81.0 50.2 Table 4.7: Normalized CPU time required to simulate Example 2 for different scenar- ios. Streamline solver is faster than mesh-based solvers to solve advection independently of the grid size. It is also faster to solve advection-dispersion than mesh-based solvers using a fine grid. 4.4.3 Example 3: Quarter Five-Spot in Heterogeneous Medium with Rate-Limited Sorption As a third example we consider the transport of a dissolved solute in groundwater that re- acts with the porous medium and sorbs onto the solid grains. This example demonstrates the capacity of streamline-based simulations to easily incorporate heterogeneous chemical reactions that involve the aqueous and solid phases. Di Donato and Blunt (2004) studied a similar problem in the context of the migration of a reactive solute through fractured rocks. Sorption is usually modeled assuming local equilibrium, i.e. that solute sorption occurs almost instantaneously relative to the solute transport time scale. However, the local equilibrium assumption is not always valid (Valocchi, 1985) and it is necessary to modify the equilibrium model to incorporate rate-limited mass transfer effects. In those cases, sorption can be modeled as a first-order reversible kinetic reaction of the form (Haggerty and Gorelick, 1995) ∂S ∂t = β ρb C − S Kd (4.21) and ∂C ∂t = −β η C − S Kd (4.22) 143 where β is the first-order mass transfer rate between the dissolved and solid phases [1/T], Kd is the distribution coefficient for the solid phase [M/L3], ρb is the bulk density of the solid, η is the soil porosity, and S is the amount of mass in the solid phase [M/M]. As β decreases, mass transfer rates become smaller and sorption becomes negligible. On the other hand, as β increases the solution becomes similar to the one obtained assuming local equilibrium. A similar mathematical model can be used to model mass transfer between mobile and immobile flow regions (Haggerty and Gorelick, 1995). In our streamline-based simulator, we compute the solution of the system of differential equations given by (4.21) and (4.22) at each node of the streamline grid using a first- order implicit (backward Euler) discretization in time. To verify our implementation, we simulate the advective transport of a solute that undergoes rate limited sorption under four different scenarios summarized in Table 4.8. We set the soil density value equal to 1,500 kg/m3 and select Kd values such that the equivalent retardation factors, R = 1 + (ρb/η)Kd, are equal to 1.15 and 1.30. Run Kd (L/mg) β (1/d) 3A 1 · 10−7 1 · 10−1 3B 1 · 10−7 1 · 10−4 3C 2 · 10−7 1 · 10−1 3D 2 · 10−7 1 · 10−4 Table 4.8: Parameters of the rate-limited sorption model used in Example 3. We compare concentrations simulated with the our streamline simulator and MOC and TVD solvers using the coarse grid. Figure 4.13 shows the simulated breakthrough curves at point P2. Solutions computed with the streamline solver and the MOC solver behave similarly. While the curves for scenarios 3A and 3C are retarded, the curves for scenarios 3B and 3D do not show retardation because in those cases sorption is limited by the small β values used. As in the previous example simulations performed with the streamline solver were almost three times faster than the ones computed with the MOC solver. 144 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 a Kd=1x10 −7 β=10−1 Kd=1x10 −7 β=10−4 Kd=2x10 −7 β=10−1 Kd=2x10 −7 β=10−4 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 b Kd=1x10 −7 β=10−1 Kd=1x10 −7 β=10−4 Kd=2x10 −7 β=10−1 Kd=2x10 −7 β=10−4 Figure 4.13: Breakthrough at observation point P2 for different mass transfer (β) and partition (Kd) coefficients considered in Example 3. Concentrations simulated with (a) streamline-based and (b) MOC solvers. 145 4.4.4 Example 4: Natural Biodegradation in Three-dimensional Heterogeneous Porous Media In this example, we simulate the natural biodegradation of a mixture of volatile organic compounds such as benzene, toluene, ethylbenzene, and xylenes (BTEX) in an heteroge- neous aquifer with oxygen as electron acceptor. We simulate the aerobic reaction using an instantaneous explicit reaction model (Borden and Bedient, 1986; Rifai et al., 1987; Rifai and Bedient, 1990). The concentrations of oxygen ([O]) and hydrocarbon ([H]) at time t+1 given their values at time t are computed using (Clement et al., 1998) [H](t+ 1) = [H](t)− [O](t)/F if [H](t) > [O](t)/F0 if [H](t) ≤ [O](t)/F (4.23) and [O](t+ 1) = 0 if [H](t) > [O](t)/F[O](t)− F · [H](t) if [H](t) ≤ [O](t)/F (4.24) where F is the stoichiometric reaction ratio between oxygen and the hydrocarbon, in this case BTEX, and it is assumed equal to 3.0 (Rifai et al., 1987; Clement et al., 1998). 4.4.4.1 Setup The domain is three-dimensional and rectangular with dimensions of 50 m in the x direction, 21 m in the y direction and 5 m in the vertical direction (z) and it is discretized using a regular Cartesian grid such that the cell spacing in the three directions is equal to 1 m. The hydrocarbon source is a well located at coordinates x=8.5 m, y=10.5 m and z=2.5 m that releases 0.2 m3/d of water with a BTEX concentration equal to 2 mg/L. Oxygen is initially present in the natural groundwater and enters the domain with concentration equal to 5 mg/L. 146 The spatial distribution of the natural logarithm of the hydraulic conductivity, Y = ln(K), was generated assuming an exponential covariance model with mean value Ȳ = 1.0 with K in units of meter per day (m/d), variance σY = 1.5 and correlation length equal to four times the grid spacing in the x and y directions and two times in the vertical direction. We solve the flow equation assuming steady-state conditions and a constant head differ- ence of 0.4 m between the planes define by x = 0 and x = 50 and no flow conditions on the other faces. The spatial distributions of the generated hydraulic conductivity and computed flow velocity are shown in Figure 4.14. To evaluate the sensitivity of the solutions computed with the mesh-based solvers to the grid size, we refined the original coarse grid by a factor of two in each direction to obtain a fine grid with 100 cells in the longitudinal, 42 cells in the transverse and 10 cells in the vertical directions, respectively. We applied the same procedure as in the Example 2 to compute a flow solution that is similar to the one computed in the coarse grid. We consider three transport scenarios summarized in Table 4.9: one that includes only advection, a second one that considers advection and biodegradation, and a third one that also includes dispersion. Run αL αT Reaction 4A 0 0 Yes 4B 0.1 0.01 Yes 4C 0 0 No Table 4.9: Definition of three scenarios simulated in Example 4: advective transport with biodegradation (4A), advective-dispersive transport with biodegrada- tion (4B) and conservative advective transport (4C). The streamline grid includes 281 streamlines with average node spacing along streamlines equal to 1 m. We use a constant smoothing length equal to 1m to ensure that every node in the domain has at least a minimum of 10 neighboring nodes. To compute the MOC solution we use the same parameters listed in Table 4.2. We simulate this problem using our streamline simulator and the RT3D numerical model Clement (1997), which is a modified version of MT3DMS that adds the capability to 147 Figure 4.14: Spatial distribution of natural logarithm of hydraulic conductivity and flow velocity magnitude used in Example 4. Magnitude of hydraulic conductivity and flow velocity vary more than six and two orders of magnitude, respectively. 148 simulate chemical reactions. RT3D and our streamline solver utilize the same operator- splitting approach to incorporate chemical reactions. We simulate a total of 10,000 days which is longer than the time required for the plumes simulated with the two mesh-based solvers to reach steady-state conditions. We chose time step values to satisfy the stability or accuracy criteria required by each method. Table 4.10 summarizes the numerical discretizations and their associated time steps. Method # Nodes or Cells Time Step (d) # Time Steps Streamlines 13,539 2.0 5,000 TVD Coarse 5,250 3.2 3,300 TVD Fine 42,000 0.4 27,816 MOC Coarse 75,562 5.0 2,000 MOC Fine 565,464 0.6 16,000 Table 4.10: Spatial and temporal discretizations used to simulate Example 4. Because of the flow configuration there are two different regions separated by a surface that divides the flow between flow that enters the domain through the well and natural groundwater (Cirpka et al., 1999b). In absence of longitudinal and transverse mixing, the substrate (BTEX) and oxygen are physically segregated and occupy two different regions and biodegradation cannot take place. If longitudinal dispersion is included, biodegra- dation only occurs until all the oxygen initially present in the area located downgradient from the source is depleted or the plume exits the domain. Thus, in the long term biodegradation is only possible if transverse dispersion mixes the natural groundwater and the contaminated water (Cirpka et al., 1999b; Ham et al., 2004). It is expected that a steady-state plume will be established when the mass of substrate entering the domain is equal to the amount that is consumed through biodegradation. Since the reaction rate is controlled by transverse mixing between the two flow regions, the length of steady-state plumes depends only on the transverse dispersivity value (Ham et al., 2004). 4.4.4.2 Simulated concentrations Figure 4.15 shows simulated BTEX and oxygen concentrations at the nodes that define the streamline grid after 10,000 days since the initial release of BTEX for the scenario 149 that includes advection and biodegradation (4A). As expected, oxygen is depleted in the region located downgradient of the BTEX spill. Because of the absence of transverse dis- persion there is a sharp transition in BTEX and oxygen concentrations between two flow regions that correspond to BTEX-contaminated water flowing from the well and natural groundwater. BTEX concentration values along most of the streamlines are equal to the source concentration, which indicates that flow coming from the spill has completely re- placed the original groundwater. Yet, few slower streamlines present concentrations that are lower than the source concentration as a result of biodegradation due to numerical dispersion along streamlines. The presence of those lower concentration values indicates that flow originating at the contaminant source and moving along slow streamlines has not reached the outlet face before the end of the simulation. Figure 4.16 shows simulated concentration for the scenario that includes advection, dis- persion and biodegradation (4B). Oxygen is depleted in the region located downgradient of the BTEX spill. However, in contrast to the situation without dispersion shown in Figure 4.15, BTEX and oxygen concentrations change gradually between the two flow regions because of mixing due to transverse dispersion. In this case, natural degradation takes place in most of the plume volume and BTEX concentration values gradually de- crease along streamlines. At the outlet face they are between 25 to 50% lower than the source concentration. Figure 4.17 shows simulated concentrations in the vertical plane defined by the coordinate y=11.5 at the end of the simulation using the streamline-based solver and the MOC and TVD solvers using the fine grid. For comparison purposes the streamline solution was interpolated onto a grid that is similar to the one used in the MOC and TVD simulations. For the conservative advective case the streamline and MOC solutions are similar, however, the TVD solver produces lower concentrations after some distance from the source as result of numerical dispersion. When aerobic degradation is included, hydrocarbon concentrations simulated with the TVD and MOC solvers are much lower than for the conservative case after some distance from the source. The difference between the conservative and reactive case is due to numerical dispersion that mixes BTEX and oxygen even in absence of physical dispersion and results in the degradation of most of the released BTEX before it exits the domain. The streamline solution for the case that includes biodegradation is similar to the one for the conservative scenario, with the exception of minor differences near the top center of the domain. Those differences are due to slow streamlines that cross that region. The leading BTEX concentration along those streamlines is lower than in the conservative 150 Figure 4.15: Simulated concentrations at nodes along streamlines after 10,000 days since the initial release of BTEX for the scenario that includes advective transport with biodegradation in Example 4. Only 10,000 nodes are shown. Oxygen is depleted in the region located downgradient of the BTEX spill. Because of the absence of transverse dispersion there is a sharp transition in BTEX and oxygen concentrations between two flow regions that correspond to flow originating at the well and natural groundwater. 151 Figure 4.16: Simulated concentrations at nodes along streamlines after 10,000 days since the initial release for the scenario that includes advection, disper- sion and biodegradation in Example 4. Only 10,000 nodes are shown. Oxygen is depleted in the region located downgradient of the BTEX spill. However, in this case BTEX and oxygen concentrations change gradually between the two flow regions because of mixing due to trans- verse dispersion. 152 case because of longitudinal numerical dispersion that mixes oxygen and BTEX (see Figure 4.15). However, the artificial longitudinal mixing results in small errors when compared with the large errors observed in the simulated concentrations obtained with the two mesh-based solvers. When transverse dispersion is included, the streamline solver, as expected, predicts lower concentrations after some distance from the source as consequence of transverse mixing that provides oxygen to degrade BTEX that flows through the center of the plume. The TVD and MOC solvers also predict lower concentrations than for the advective case with biodegradation, but the effect on the plume shape is relatively minor. Figure 4.17: Simulated concentration values for Example 4 at vertical plane defined by y=11.5 m. Streamlines (top), MOC (middle), and TVD (bottom) for advective transport (left column), advective transport with biodegrada- tion (middle column) and advective-dispersive transport with biodegra- dation (right column). Streamline solution shows concentration values interpolated onto a grid of 100x42x10 cells. TVD and MOC solutions computed using the fine grid. Vertical scale is exaggerated by a factor of two. Figure 4.18 shows simulated concentrations after 10,000 days of BTEX injection in the horizontal plane that crosses the domain center defined by coordinate z=2.5 m. This figure confirms the results observed in Figure 4.17. The simulated plume with the MOC and TVD solvers for the case that included advection and biodegradation are shorter and thinner than for the conservative case. Including transverse dispersion has only an small effect in the overall shape and extension of the simulated plume. In contrast the streamline solver predicts similar plumes for the purely advective and the advective- reactive cases and a smaller plume when transverse dispersion is included. 153 Figure 4.18: Simulated concentration values for Example 4 at horizontal plane de- fined by z=2.5 m. Streamlines (top), MOC (middle), and TVD (bot- tom) for advective transport (left column), advective transport with biodegradation (middle column) and advective-dispersive transport with biodegradation (right column). The streamline solution shows concen- tration values interpolated onto a grid of 100x42x10 cells. TVD and MOC solutions were computed using fine grid. Figure 4.19 shows contours of concentration values equal to 1 mg/L equivalent to 50 % of the source concentration for the horizontal plane shown in Figure 4.18. For the conservative case the simulated concentrations with the streamline solver and the TVD and MOC solvers using the coarse and fine grids are similar. However, the simulated plumes with the mesh-based solvers using the coarse and fine grids are different when biodegradation is included. The coarse solution predicts a shorter plume, while the fine grid solutions predict a longer plume that looks more similar to the one simulated with the streamline-based solver. The observed convergence of the mesh-based solutions towards the streamline-based solution as the grid spacing decreases demonstrates that, for this problem, a streamline-based formulation may provide a high level of accuracy at a fraction of the memory requirements and, as discussed below, computational cost that would be required by a mesh-based solver. 154 Figure 4.19: Comparison of simulated concentration values for Example 4 at horizon- tal plane defined by z=2.5 m. Contours of BTEX concentration equal to 50% of the source concentration for advective transport (first row), advective transport with biodegradation (second row), and advective- dispersive transport with biodegradation (third row). Streamline solu- tion (black), TVD solution (red) and MOC solution (blue) computed in coarse (left column) and fine (right column) grids. Mesh-based solutions overestimate biodegradation as consequence of numerical transverse dis- persion. The error is larger if the solution is computed in the coarse grid. In absence of physical transverse dispersion, the mesh-based solvers pre- dict plumes that are similar to the ones computed including transverse dispersion. The effects of numerical dispersion on the simulated concentration values using the mesh- based solvers can be more easily understood by analyzing a transverse profile as shown in Figure 4.20. That figure shows normalized BTEX and oxygen concentration values along the profile parallel to the y direction at coordinates x=35 m and z=2.5 m simulated using the MOC and TVD solvers using the fine grid. The figure shows that in absence of transverse dispersion and reaction, there is an artificial mixing region where BTEX and oxygen are present. That mixing region is due to two factors. First, mesh-based solvers compute average concentration values over a volume (cell or element) that is not necessarily aligned with the direction of the flow, thus it is impossible to capture the flow divide that separates the two flow regions Cirpka et al. (1999b). Second, because of the 155 heterogeneity of the medium the flow velocity is non-uniform and solvers based on finite volume formulations, such as the multidimensional TVD solver included in MT3DMS, suffer grid orientation effects that introduce additional numerical dispersion. Both causes are related but are independent as demonstrated by a comparison of the profiles simulated with the MOC and TVD solvers. Because of its hybrid Eulerian-Lagrangian nature, the MOC solver is able to control the numerical dispersion due to variations in the flow velocity, however it cannot remove the effect of the concentration averaging over a cell volume. Therefore, the width of the simulated mixing region is equal to two or three times the dimension of a grid cell. On the other hand, the solution computed with the TVD solver is greatly affected by numerical dispersion caused by the non-uniform flow velocity, which results in a much larger area (approximately ten cells) where BTEX and oxygen overlap. If biodegradation is included, degradation of BTEX takes place within the artificial mix- ing region. Thus, the simulated plume is thinner than in the conservative case. Although, the profiles shown in Figure 4.20 are illustrative of the effect of numerical dispersion at a given control plane, the overall shape of the plume is the result of the cumulative effect of numerical dispersion and biodegradation that occur between the source and the control plane. For example, the MOC solution for the conservative case shows much less overlap of BTEX and oxygen than the TVD solution. However, the widths of the simulated plumes for the reactive scenarios are similar. This confirms that in presence of chemical reactions even small numerical errors observed in conservative transport simulations can be amplified to produce an overall solution that is very similar to the one computed with less accurate methods, e.g. TVD. Finally, we must mention that simulated concentrations with the MOC and TVD solvers include negative values and values greater than the source or natural groundwater con- centrations. The magnitude of those numerical oscillations is larger for the scenario that includes dispersion because of the presence of the cross-terms in the dispersion approxi- mation. 4.4.4.3 Breakthrough curves As an additional comparison between the streamline, TVD and MOC solvers, we also recorded the simulated concentrations versus time at two observation locations P1 and P2. We chose the location of those observations points such that they coincide with the position of nodes along streamlines and that are located close to the flow divide that 156 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 y(m) C/ C 0 a BTEX−A Oxygen−A BTEX−B Oxygen−B BTEX−C Oxygen−C 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 y(m) C/ C 0 b BTEX−A Oxygen−A BTEX−B Oxygen−B BTEX−C Oxygen−C Figure 4.20: Simulated concentration values for Example 4 along the profile parallel to y direction at coordinates x=35 m and z=2.5 m. Normalized BTEX and oxygen concentration values computed using (a) MOC and (b) TVD solvers in fine grid for advective transport with biodegradation (A), advective-dispersive transport with biodegradation (B), and advective transport (C). In absence of transverse mixing and reaction, there is an overlap (mixing region) of BTEX and oxygen (black lines) because of numerical dispersion. If biodegradation is included, BTEX and oxygen react within that numerical mixing region. 157 separates the flow originating at the spill and the natural groundwater flow. Figure 4.21 shows the location of the two observation points with respect to the contaminant source and simulated plume defined by the 1 mg/L BTEX contour. Point P1 is located at approximately 7 m downgradient of the BTEX source along the main direction of the flow while point P2 is located 10 m farther downgradient from P1. Figure 4.21: Location of contaminant source (red dot) and the two observation wells (black dots) in Example 4. Solid line corresponds to simulated 1 mg/L BTEX concentration in plane defined by coordinate z=2.5 m. Figure 4.22 shows simulated BTEX breakthrough curves at the two observation points for the scenario that includes only advection. Concentrations simulated with the streamline, MOC and TVD solvers in the coarse and fine grids are similar close to the location of the source, i.e. at P1. However, simulated concentrations farther from the source, at point P2, are different. Curves that correspond to the TVD and MOC solvers show earlier breakthrough. Furthermore, solutions computed with the TVD solver in the coarse and fine grid do not reach the source concentration at point P2, which indicates artificial dilution due to numerical mixing that is more important for the solutions computed using the coarse grid. Both solutions computed with the MOC solver show large numerical oscillations. On the other hand, the breakthrough curve corresponding to the streamline-based solver also shows some longitudinal numerical dispersion. To demonstrate that that error can be easily avoided, we also simulated this scenario using a streamline grid that has the same number of streamlines but has a smaller average node spacing equal to one fifth of the original one, i.e. 0.2 m. The breakthrough curve simulated using the refined streamline grid is very sharp and concentration values go from zero to the source concentration in a very short time, which is the expected behavior for this scenario that does not include 158 transverse or longitudinal dispersion. Nevertheless, as discussed above, errors due to longitudinal dispersion along streamlines are minor in comparison to the errors caused by the variable flow velocity orientation with respect to the main axes of the numerical grid associated to the MOC and TVD solvers. Figure 4.23 shows simulated BTEX breakthrough curves at the two observation points for the scenario that includes advection and biodegradation. As in the conservative case, simulated concentrations with the streamline, MOC and TVD solvers in the fine grid are similar close to the location of the BTEX release at P1. However, simulated concentrations with the TVD and MOC solvers at point P2 are much lower than the source concentration because of the combined action of numerical transverse mixing and biodegradation. Simulated concentrations are even smaller when computed in the coarse grid because of larger numerical errors. A comparison with Figure 4.22 shows that in this case differences between the simulated concentrations using the MOC and TVD solvers and the streamline-based solver are much more important that for the conservative case. This demonstrates how the addition of chemical reactions can amplify errors observed in conservative solute transport simulations. 4.4.4.4 Performance Table 4.11 summarizes the normalized CPU time required to simulate the two scenarios than include biodegradation. The streamline solver is faster than the mesh-based solvers to simulate advection and biodegradation independent of the grid size and number of time steps. However, it is much slower than the mesh-based solvers using the coarse grid and it is slightly slower than the TVD solver using the fine grid when dispersion is included. 159 0 0.1 0.2 0.3 0.4 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 P1 Coarse TVD Fine TVD Coarse MOC Fine MOC Streamlines ∆ s = 1.0 Streamlines ∆ s = 0.2 0 0.1 0.2 0.3 0.4 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 P2 Coarse TVD Fine TVD Coarse MOC Fine MOC Streamlines ∆ s = 1.0 Streamlines ∆ s = 0.2 Figure 4.22: Simulated BTEX concentration versus time for Example 4 assuming advective transport only. Concentrations simulated with the streamline, MOC and TVD solvers in the coarse and fine grids are similar close to the location of the BTEX release (P1). However, simulated concentrations farther from the source at point P2 are different because of the numerical dispersion that affects the solution computed with the TVD and MOC solvers. 160 0 0.1 0.2 0.3 0.4 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 P1 Coarse TVD Fine TVD Coarse MOC Fine MOC Streamlines 0 0.1 0.2 0.3 0.4 0 0.2 0.4 0.6 0.8 1 Pore Volume C/ C 0 P2 Coarse TVD Fine TVD Coarse MOC Fine MOC Streamlines Figure 4.23: Simulated BTEX concentration versus time for Example 4 assuming advective transport and biodegradation. Concentrations simulated with the streamline, MOC and TVD solvers in the fine grid are similar close to the location of the BTEX release (P1). However, simulated con- centrations with the TVD and MOC solvers farther from the source, at point P2, are much lower than the source concentration because of the combined action of numerical transverse mixing and biodegradation. Simulated concentrations are smaller when computed in the coarse grid because of the larger numerical errors. 161 Method\Run 4A 4B Streamlines 1.0 132.7 TVD Coarse 1.4 1.7 TVD Fine 90.4 117.1 MOC Coarse 5.0 5.7 MOC Fine 341.5 385.8 Table 4.11: Normalized CPU time required to simulate Example 4 for the two scenar- ios than include biodegradation. The streamline solver is faster than the mesh-based solvers to solve advection and biodegradation independent of the grid size. However, it is much slower than the mesh-based solvers using the coarse grid and it is slightly slower than the TVD solver using the fine grid when dispersion is included. It is somehow surprising that the streamline solver using more than 13,000 nodes and 5,000 time steps is faster than the TVD solver using a grid that has only 5,250 cells and 3,300 time steps (see Table 4.10) to simulate scenario 4A. This difference is due to the streamline-formulation to solve advection that allows the utilization of more efficient and simple data structures to solve multiple one-dimensional problems versus more complex and costly ones required by multidimensional solvers. That advantage of the streamline- based formulation makes it even more attractive for parallel implementations. The advantages of the streamline-based solver are even more important when compared to mesh-based solutions of similar level of accuracy, which require using a grid with fine discretization. At the same time that the computational cost and memory requirements increase because of the larger number of cells due to the finer discretization, the stability restrictions of the explicit mesh-based solvers require using smaller time steps. The net effect is a rapid increase in the simulation time with each level of grid refinement. For example, the explicit multidimensional TVD solver in MT3DMS requires that (Zheng and Wang, 1999), ∆t ≤ 1|vx| ∆x + |vy | ∆y + |vz | ∆z (4.25) The restriction on the time step is global and it is computed using the maximum velocity in the grid. The flow velocity distribution in heterogeneous porous media is skewed and most cells have velocities that are much lower than the maximum value as shown in Figure 162 4.24. Thus, the use of a single time step imposes an unnecessarily restrictive condition in most of the domain. However, because of the global coupling of the concentration values introduced by use of a multidimensional solver, it is impossible to use different time steps according to the local flow velocities. The distribution of flow velocities is even more asymmetric for more heterogeneous porous media, thus the global stability restriction is even costlier in those cases. 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0 100 200 300 400 500 600 700 800 900 Velocity Magnitude N um be r o f C el ls a 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0 2000 4000 6000 8000 10000 12000 Velocity Magnitude N um be r o f C el ls b Figure 4.24: Distribution of cells according to the flow velocity magnitude for the (a) coarse grid and (b) fine grid. Explicit mesh-based solvers such as the multidimensional TVD solver in MT3DMS must satisfy a global stability restriction, thus concentration values must be updated using a single time step for all the cells in the grid. The global time step is computed based on the maximum velocity at any of the cells in the grid. However, the flow velocity distribution in heterogeneous porous media is skewed and most cells have velocities that are much lower than the maximum value. The distribution of the flow velocity at the streamline nodes follows a distribution that is similar to the one of the magnitude of the flow velocity at the grid cells as shown in Figure 4.25. Yet, the explicit solution of advection must satisfy a local stability restriction that is given by the maximum velocity along individual streamlines, which has a much more uniform distribution. While short time steps must be used to advect concentration values along few fast streamlines, larger time steps can be used along many other slower streamlines. The possibility of using variable time steps according to the flow regions sampled by individual streamlines can result in important performance advantages and constitutes one of the main advantages of streamline-based simulations. 163 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Velocity Magnitude N um be r o f N od es a 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0 5 10 15 20 25 30 35 40 Max. Velocity Magnitude N um be r o f S tre am lin es b Figure 4.25: Distribution of (a) nodes along streamlines according to the flow velocity magnitude and (b) number of streamlines based on the maximum veloc- ity magnitude along individual streamlines. The distribution of the flow velocity at the streamline nodes follows a distribution that is similar to the one of the magnitude of the flow velocity at the grid cells shown in Figure 4.24. However, the explicit solution of advection along individual streamlines must satisfy a local stability restriction that is given by the maximum velocity along individual streamlines. While short time steps must be used to advect concentration values along few fast streamlines, larger time steps can be used along many other slower streamlines. The increase in the time required to complete the streamline-based simulations for sce- nario 4A and 4B is due to the approximation for the dispersion terms. Because of the irregularity of the flow, streamlines and nodes along them are irregularly distributed in space. Thus, the number of neighbor nodes that contribute to the SPH approximation for dispersion, if a constant smoothing length is used, varies in different regions of the domain and ranges from 10 in divergent flow regions or close to the boundaries to 138 in convergent flow regions or near the contaminant source as shown in Figure 4.26. While few nodes have less than 20 neighbors which is considered a reasonable number (Cleary and Monaghan, 1999), most nodes have many more neighbors resulting in a large compu- tational overhead. That computational disadvantage can be overcome by using a variable smoothing length that is automatically adjusted to get a relatively constant number of neighboring nodes (Monaghan, 2005). However, the use of an adaptive smoothing length would result in a more complicated implementation. 164 0 20 40 60 80 100 120 140 0 200 400 600 800 1000 1200 Number of Neighbors N um be r o f N od es Min. 10 Max. 138 Figure 4.26: Spatial distribution of nodes and number of nodes according to the num- ber of neighboring nodes that contribute to the SPH summation to ap- proximate dispersion. The selection of a constant smoothing length to guarantee a reasonable number of neighboring nodes for any node in the domain results in an irregular distribution of the number of nodes that contribute to the summation in (4.17). While few nodes have less than 20 neighbors which is considered a reasonable number Cleary and Monaghan (1999), most nodes have many more neighbors resulting in a large computational overhead. 165 Although, the SPH-based approximation for dispersion introduces a large computational overhead, the time required by the streamline-base solver to compute the solution of the overall transport equation that includes advection and dispersion is comparable to the one required by the fastest of the two mesh-based solvers (TVD) using a fine grid and it is much lower than the one required by the slowest one (MOC) . 4.5 Conclusions We derived and implemented a numerical scheme to incorporate dispersion, including transverse dispersion, in multidimensional streamline simulations. Because the new scheme does not require the mapping of concentration values onto a grid it does not introduce additional numerical dispersion. Because the new scheme is able to simulate transverse dispersion and completely avoid numerical dispersion, it is an attractive alternative to obtain accurate simulations of problems that involve chemical reactions that are controlled by transverse mixing such as bio-remediation or natural attenuation of contaminant plumes. Furthermore, we demonstrated theoretically and by numerical simulations that the pro- posed scheme guarantees solutions that are free of numerical oscillations even when the dispersion tensor is anisotropic. This is an important advantage of the new method over traditional numerical approximations that suffer numerical artifacts that lead to negative concentration values if the cross-terms of the dispersion tensor are included. Although, such numerical oscillations can be tolerated in conservative solute transport simulations, they may compromise the stability of the solution if non-linear reactions are included. For a set of two- and three-dimensional benchmark problems, the new streamline method was competitive in terms of performance with state of the art finite volume and a Eulerian- Lagrangian solvers, while avoiding the numerical artifacts that plague the solutions com- puted with those solvers. 166 4.6 References Aris, R., Vectors, Tensors and the Basic Equations of Fluid Mechanics, Dover Publica- tions, 1989. Barnes, J., and P. Hut, A hierarchical O (N log N) force-calculation algorithm, Nature, 324 , 446–449, 1986. Batycky, R., M. Blunt, and M. Thiele, A 3D field-scale streamline-based reservoir simu- lator, SPE Reservoir Engineering, 12 , 246–254, 1997. Bear, J., Dynamics of fluids in porous media, Dover, 1988. Bensabat, J., Q. Zhou, and J. Bear, An adaptive pathline-based particle tracking algo- rithm for the Eulerian–Lagrangian method, Adv. Water Res., 23 , 383–397, 2000. Borden, R., and P. Bedient, Transport of dissolved hydrocarbons influenced by oxygen- limited biodegradation 1. Theoretical development, Water Resour. Res., 22 , 1986. Cirpka, O., E. Frind, and R. Helmig, Numerical methods for reactive transport on rect- angular and streamline-oriented grids., Adv. Water Res., 22 , 711–728, 1999a. Cirpka, O., E. Frind, and R. Helmig, Numerical simulation of biodegradation controlled by transverse mixing, J. Contam. Hydrol., 40 , 159–182, 1999b. Cleary, P. W., and J. J. Monaghan, Conduction modelling using smoothed particle hy- drodynamics, J. Comput. Phys., 148 , 227–264, 1999. Clement, T., RT3D-A modular computer code for simulating reactive multi-species trans- port in 3-Dimensional groundwater aquifers, Battelle Pacific Northwest National Lab- oratory Research Report, Tech. rep., PNNL-SA-28967, 1997. Clement, T., Y. Sun, B. Hooker, and J. Petersen, Modeling multispecies reactive trans- port in ground water, Name: Ground Water Monitoring and Remediation, 18 , 1998. Cordes, C., and W. Kinzelbach, Continuous groundwater velocity fields and path lines in linear, bilinear, and trilinear finite elements., Water Resour. Res., 28 , 2903–2911, 1992. Crane, M., and M. Blunt, Streamline-based simulation of solute transport,Water Resour. Res., 35 , 3061–3078, 1999. 167 Di Donato, G., and M. Blunt, Streamline-based dual-porosity simulation of reactive trans- port and flow in fractured reservoirs, Water Resour. Res., 40 , 2004. Di Donato, G., E. Obi, and M. Blunt, Anomalous transport in heterogeneous media demonstrated by streamline-based simulation, Geophys. Res. Lett., 30 , 1608, 2003. Gingold, R. A., and J. J. Monaghan, Smoothed particle hydrodynamics: Theory and application to non-spherical stars, Mon. Not. R. Astron. Soc., 181 , 375–389, 1977. Haggerty, R., and S. Gorelick, Multiple-rate mass transfer for modeling diffusion and surface reactions in media with pore-scale heterogeneity,Water Resour. Res., 31 , 1995. Ham, P., R. Schottinga, H. Prommerb, and G. Davisc, Effects of hydrodynamic dispersion on plume lengths for instantaneous bimolecular reactions, Adv. Water Resour., 27 , 803–813, 2004. Harbaugh, A., and M. McDonald, User’s documentation for MODFLOW-96, an update to the US Geological Survey modular finite-difference ground-water flow model, Tech. rep., US Geological Survey, 1996. Hernquist, L., and N. Katz, TREESPH - A unification of SPH with the hierarchical tree method, Astrophys. J. Suppl. S., 70 , 419–446, 1989. Herrera, P., and A. Valocchi, Positive solution of two-dimensional solute transport in heterogeneous aquifers, Ground Water , 44 , 803–813, 2006. Herrera, P., M. Massabo, and R. Beckie, Evaluation of particle approximations to simu- late anisotropic dispersion, in preparation, 2009a. Herrera, P., M. Massabo, and R. Beckie, A meshless method to simulate solute transport in heterogeneous porous media, Adv. Water Resour., 32 , 413–429, 2009b. Hill, M., and C. Tiedeman, Effective groundwater model calibration: With analysis of data, sensitivities, predictions, and uncertainty, Wiley-Interscience, 2007. Jameson, A., Positive schemes and shock modelling for compressible flows, Int. J. Numer. Methods Fluids, 20 , 1995. Jubelgas, M., V. Springel, and K. Dolag, Thermal conduction in cosmological SPH sim- ulations, Mon. Not. R. Astron. Soc., 351 , 423–435, 2004. Kuzmin, D., and S. Turek, Flux correction tools for Finite Elements, J. Comput. Phys., 175 , 525–558, 2002. 168 LeVeque, R., Finite Volume Methods for Conservation Laws, Cambridge University Press, Cambridge, UK, 2002. Lichtner, P., S. Kelkar, and B. Robinson, New form of dispersion tensor for axisymmetric porous media with implementation in particle tracking., Water Resour. Res., 38 , 1146, 2002. Lipnikov, K., M. Shashkov, D. Svyatskiy, and Y. Vassilevski, Monotone finite volume schemes for diffusion equations on unstructured triangular and shape-regular polygonal meshes, J. Comput. Phys., 227 , 492–512, 2007. Lucy, L., A numerical approach to the testing of the fission hypothesis, Astron. J., 82 , 1013–1024, 1977. Matringe, S., Accurate streamline tracing and coverage, Master’s thesis, Stanford Uni- versity, 2004. Monaghan, J., Smoothed particle hydrodynamics, Rep. Prog. Phys., 68 , 1703–1759, 2005. Monaghan, J. J., Smoothed particle hydrodynamics, Annu. Rev. Astron. Astrophys., 30 , 543–574, 1992. Obi, E., and M. Blunt, Streamline-based simulation of advective-dispersive solute trans- port, Adv. Water Resour., 27 , 913–924, 2004. Obi, E. I., and M. J. Blunt, Streamline-based simulation of carbon dioxide storage in a North Sea aquifer, Water Resour. Res., 42 , W03,414, 2006. Oran, E., and J. Boris, Numerical simulation of reactive flow, Cambridge University Press, 2000. Pollock, D., Semianalytical computation of path lines for Finite-Difference models, Ground Water , 26 , 743–750, 1988. Prevost, M., M. Edwards, and M. Blunt, Streamline tracing on curvilinear structured and unstructured grids, Soc. Petrol. Eng. J., 7 , 139–148, 2002. Rifai, H., and P. Bedient, Comparison of biodegradation kinetics with an instantaneous reaction model for groundwater, Water Resour. Res., 26 , 637–645, 1990. 169 Rifai, H., P. Bedient, R. Borden, and J. Haasbeek, BIOPLUME II: Computer model of two-dimensional contaminant transport under the influence of oxygen limited biodegra- dation in ground water, Tech. rep., National Center for Ground Water Research, Rice University, 1987. Steefel, C., and K. MacQuarrie, Approaches to modeling of reactive transport in porous media, Reviews in Mineralogy and Geochemistry, 34 , 85–129, 1996. Thiele, M., Streamline simulation, in 7th International Forum on Reservoir Simulation, Forum on Reservoir Simulation, 2003. Thiele, M., Streamline simulation, in 8th International Forum on Reservoir Simulation, Forum on Reservoir Simulation, 2005. Thiele, M., R. Batycky, and M. Blunt, Simulating flow in heteroneous systems using streamtube and streamlines, SPE Reservoir Engineering, pp. 5–12, 1996. Thiele, M., R. Batycky, and M. Blunt, A streamline-based 3D field-scale compositional reservoir simulator, Soc. Petrol. Eng. J., 1997. Tompson, A., Numerical simulation of chemical migration in physically and chemically heterogeneous porous media, Water Resour. Res., 29 , 3709–3726, 1993. Valocchi, A., Validity of the local equilibrium assumption for modeling sorbing solute transport through homogeneous soils, Water Resour. Res., 21 , 1985. Viccione, G., V. Bovolin, and E. Pugliese, Defining and optimizing algorithms for neigh- bouring particle identification in SPH fluid simulations, Int. J. Numer. Meth. Fl., 58 , 625–638, 2008. Waltz, J., G. L. Page, S. D. Milder, J. Wallin, and A. Antunes, A performance comparison of tree data structures for N-Body simulation, J. Comput. Phys., 178 , 1–14, 2002. Wang, H., and M. Anderson, Introduction to groundwater modelling, Academic Press, 1982. Welton, W., Two-dimensional PDF/SPH simulations of compressible turbulent flows, J. Comput. Phys., 139 , 410–443, 1998. Zheng, C., and G. Bennet, Applied Contaminant Transport Modelling: Theory and Prac- tice, Van Nostrand Reinhold, New York, 1995. 170 Zheng, C., and P. Wang, MT3DMS: A Modular Three-Dimensional Multispecies Trans- port Model for Simulation of Advection, Dispersion, and Chemical Reactions of Con- taminants in Groundwater Systems; Documentation and User’s Guide, Contract Report SERDP-99-1, US Army Engineer Research and Development Center, Vicksburg, MS , 1999. 171 Chapter 5 Conclusions Previous chapters presented the derivations, implementation and evaluation of two new numerical methods for the simulation of conservative and reactive solute transport in natural porous media. Both approximations are based on a continuum description of reactive transport, thus parameters and variables are defined at the REV or local-scale. Chapter 2 presents the derivation and implementation of a meshless approximation for the advection-dispersion equation derived from smoothed particle hydrodynamics (SPH). Although, SPH formulations had been previously used to simulate solute transport at the pore (Zhu et al., 1999; Zhu and Fox , 2001, 2002; Tartakovsky et al., 2007) and laboratory (Tartakovsky et al., 2008) scales, Chapter 2 presents one of the first attempts reported in the literature to use meshless methods to simulate solute transport in porous media at the field-scale together with the work of Zimmermann et al. (2001), Li et al. (2003) and Praveen Kumar and Dodagoudar (2008). Chapter 3 presents the derivation of a new SPH approximation to simulate anisotropic dispersion, which extends the traditional SPH scheme for diffusion and thermal conduc- tion (Cleary and Monaghan, 1999; Zhu and Fox , 2001; Jubelgas et al., 2004) used in Chapter 2. Results of numerical simulations demonstrated that the accuracy of the new approximation depends upon multiple parameters such as: average particle spacing, ker- nel function, smoothing length, and, most importantly, degree of particle disorder. This feature is common to other kernel interpolation methods such as the particle strength exchange (PSE) method (Degond and Mas-Gallic, 1989; Zimmermann et al., 2001). An- other important conclusion of this chapter is that SPH and PSE methods provide more accurate approximations for isotropic dispersion than for anisotropic dispersion, which is also similar to the behavior of other standard numerical schemes. 172 Chapter 4 presents a hybrid scheme to simulate solute transport in a flow oriented grid: advection and longitudinal dispersion are solved along streamlines, while transverse dis- persion is handled using the meshless approximation presented in Chapters 2 and 3. The hybrid scheme overcomes two main limitations of previous streamline-based simulations. First, it allows simulating transverse dispersion without using a background grid and introducing numerical dispersion. Second, it can be used to simulate three-dimensional problems, which was not possible with previous methods that used orthogonal flow- oriented grids and were restricted to two-dimensional problems (e.g. Frind, 1982; Cirpka et al., 1999). Furthermore, the hybrid approach also represents one of the few and, in our opinion the simplest, monotonic approximation for anisotropic dispersion (see Mlac- nik and Durlofsky, 2006; Lipnikov et al., 2009, for examples of alternative monotonic schemes). Moreover, benchmarking results demonstrated that the streamline-based for- mulation minimizes numerical dispersion in the longitudinal direction and it completely avoids it in the transverse direction. Because of these features, the new hybrid scheme is suitable to accurately simulate conservative and reactive solute transport including reactions controlled by transverse mixing. Furthermore, the new hybrid formulation, as others streamline-based schemes (Di Donato and Blunt, 2004), also allows the simulation of general heterogeneous chemical reactions that involve species or components in the solid phase, which constitutes one of the main advantages of this type of method over particle based methods. 5.1 Limitations of Proposed Numerical Schemes Although, the two proposed numerical schemes represent attractive alternatives versus most traditional numerical methods, they also have their own limitations. First, as demonstrated in Chapter 3, the accuracy of meshless approximations for dis- persion, including SPH and PSE, depends upon the spatial distribution of particles or numerical nodes. Although, the distribution of particles can become very irregular in presence of non-uniform velocity fields, the numerical simulations presented in Chapter 2 demonstrated that it is still possible to obtain reasonable accurate results in simula- tions that consider large Péclet numbers. Under those conditions, even large errors in the approximation of dispersion are relatively minor in comparison to other numerical errors, e.g. due to solution of advection. Nevertheless, we believe that the effect of par- ticle disorder should always be considered and, if possible, estimated whenever meshless methods like the ones presented in Chapters 2 and 3 are used. 173 Second, meshless methods require searching for nearby nodes and evaluating pair inter- actions between neighboring nodes, which can result in computational overhead. This problem can be controlled by an adequate choice of the radius of interaction of the nu- merical nodes (e.g. smoothing length in SPH simulations). As demonstrated by the numerical simulations presented in Chapter 2, which include hundreds of thousands of nodes, this is an effective alternative for two-dimensional simulations. However, this can be a much more serious limitation in three-dimensional scenarios as demonstrated by the simulation of aerobic biodegradation presented in Chapter 4, because the number of neighboring nodes can increase dramatically going from two- to three-dimensional sce- narios. Moreover, this issue becomes more important when simulations consider very heterogeneous velocity fields and/or sources and sinks. In those cases, particles concen- trate in slow flow regions, while streamlines converge towards high flow velocity zones and sources or sinks. An obvious solution to this problem is to adapt the radius of in- fluence according to the local node density such that the number of neighboring nodes stays relatively constant, which is the standard approach in SPH simulations of fluids with large density variations (Monaghan, 2005). That modification would introduce ad- ditional complexity to the overall algorithm, but we believe that the performance gains would be enough to justify that cost. Moreover, an implementation of such algorithm would provide a method with a grid that automatically adapt to the flow field and that provides spatially varying resolution according to the flow characteristics. Last, all the simulations presented in the previous chapters considered steady-state flow conditions, however, many real problems involve transient flows. While, the extension of the SPH-based method to transient flows is direct and it does not require additional mod- ifications, the streamline-based approach would require additional changes. Streamline- based simulations of transient flows are standard in reservoir simulations (Thiele, 2005). Streamlines are updated each time than the flow field changes and concentrations are mapped from the old to the new streamlines. As other schemes that require interpola- tions, the mapping concentrations from the old to the new streamline locations introduces numerical dispersion. However, changes of the flow field occur over time periods that are relatively long in comparison to typical transport time steps, thus the mapping of con- centrations is only necessary few times during a simulation and the cumulative effect is relatively minor. 174 5.2 General Conclusions In addition to the specific conclusions discussed above, the results discussed in the pre- vious chapters also confirmed the following general results that are relevant for reactive transport modeling: 1. The simulation of aerobic biodegradation presented in Chapter 4 is a good example of situations were relatively small errors that can be tolerated in conservative so- lute transport simulations, can result in much larger errors if chemical reactions are included. Thus, as pointed out by Steefel and MacQuarrie (1996), traditional meth- ods that seem to work well for simulations of conservative transport are unsuitable for simulating reactive transport. 2. The difference between numerical solutions computed with different numerical meth- ods can be very large. This is particularly true for realistic problems that involve heterogeneous media and chemical reactions. Since, in general, it is not possible to derive analytical solutions for such problems it is difficult to decide a priori which numerical algorithm provides the best solution. This indicates the need for defin- ing a set of benchmark problems that can be used to verify the performance of numerical methods and their implementations. 3. Current numerical methods are inadequate to simulate reactive transport in highly heterogeneous porous media under common field conditions. Mesh-based methods suffer excessive numerical dispersion and spurious oscillations. Similarly, hybrids schemes like the method of characteristics (MOC) that use a background grid to compute concentrations also suffer numerical mixing and require using a very large number of particles to obtain smooth solutions. Finally, random walk particle tracking methods have problems to simulate low concentrations and also suffer numerical oscillations (overshooting). 4. The main advantages of the proposed Lagrangian schemes are due to the fact that they track concentrations defined at the REV or local-scale in contrast to traditional Eulerian or Eulerian-Lagrangian formulations that compute grid-scale concentra- tions. Although, usually overlooked, the equations that describe the evolution of concentrations at the grid and local-scale are different (Beckie, 1998). Most of the numerical errors that plague traditional numerical approximations are a manifes- tation of those differences. 175 5.3 Perspectives Although, the implementations of both new numerical schemes use an SPH-based ap- proximation for isotropic dispersion, any other meshless approximation for diffusion may also be used. SPH and PSE methods are only two of multiple meshless methods de- veloped during recent years. For example, Fries and Matthies (2004) and Schaback and Wendland (2006) present exhaustive reviews of many others meshless numerical meth- ods. We believe that others meshless methods may have advantages over SPH, e.g. higher convergence, which could make them better alternatives for new implementations of the proposed Lagrangian numerical schemes. The two proposed numerical methods are also attractive alternatives to study fundamen- tal issues related to mixing and reactions in heterogeneous porous media. For example, Tartakovsky et al. (2008) present a novel multiscale approach to model mixing in hetero- geneous porous media. They use a SPH scheme similar to the one presented in Chapter 2, to simulate solute transport. The novel characteristics of their approach is that the evolution of particle positions is given by an stochastic Langevin equation that model velocity fluctuations at the local-scale. The resulting model is simple and theoretically appealing because it provides a clear separation between the two main components of mixing in porous media: local-dispersion and spreading due to local-scale velocity vari- ations. On the other hand, the streamline-based method represents a unique tool to evaluate the potential effect of transverse dispersion and flow heterogeneity, e.g. conver- gent flow regions, on the enhancement of mixing and dilution rates in natural aquifers as hypothesized by Werth et al. (2006). The two numerical methods derived in this research allow using different spatial reso- lutions to simulate flow and reactive transport. This flexibility can be an important advantage in the implementation of multiscale or upscaling methods that require solv- ing transport and flow with different levels of spatial resolution as demonstrated by the nested gridding approach of Gautier et al. (1999) or the multiscale method of Tartakovsky et al. (2008). This constitutes a significant advantage over mesh-based methods that, in general, solve flow and transport using the same spatial discretization. 176 5.4 Final Remarks Although, a large portion of this thesis has been focused on discussing specific methods and implementation details, we think that its most important contribution would be to promote and demonstrate the advantages of Lagrangian approaches – be they SPH, streamline-based simulations or other – to simulate reactive transport in natural porous media. We hope that the results of this research would help to highlight those advantages and contribute to the adoption of Lagrangian schemes in current and future reactive transport codes. 177 5.5 References Beckie, R., Scale dependence and scale invariance in hydrology, chap. Analysis of scale effects in large-scale solute-transport models, pp. 314–334, Cambridge University Press, 1998. Benson, D., and M. Meerschaert, Simulation of chemical reaction via particle tracking: Diffusion-limited versus thermodynamic rate-limited regimes, Water Resour. Res., 44 , 12, 2008. Cirpka, O., E. Frind, and R. Helmig, Numerical methods for reactive transport on rect- angular and streamline-oriented grids., Adv. Water Res., 22 , 711–728, 1999. Cleary, P. W., and J. J. Monaghan, Conduction modelling using smoothed particle hy- drodynamics, J. Comput. Phys., 148 , 227–264, 1999. Cottet, G., and P. Koumoutsakos, Vortex methods: Theory and practice., Cambridge University Press, 2000. Degond, P., and S. Mas-Gallic, The weighted particle method for convection-diffusion equations. II: The anisotropic case, Math. Comp, 53 , 485,508, 1989. Di Donato, G., and M. Blunt, Streamline-based dual-porosity simulation of reactive trans- port and flow in fractured reservoirs, Water Resour. Res., 40 , 2004. Fries, T., and H. Matthies, Classification and overview of meshfree methods, Tech. rep., Institute of Scientific Computing, Technical University Braunschweig, 2004. Frind, E., The principal direction technique: a new approach to groundwater contam- inant transport modeling, in Proceedings, Fourth International Conference on Finite Elements in Water Resources, Tech. Univ. Hannover, Germany. Springer Verlag, New York, vol. 13, pp. 25–42, 1982. Frind, E., E. Sudicky, and S. Schellenberg, Micro-scale modelling in the study of plume evolution in heterogeneous media, Stoch. Hydrol. Hydraul., 1 , 263–279, 1987. Gautier, Y., M. Blunt, and M. Christie, Nested gridding and streamline-based simulation fast reservoir performance predicition, Computat. Geosci., pp. 295–320, 1999. Jubelgas, M., V. Springel, and K. Dolag, Thermal conduction in cosmological SPH sim- ulations, Mon. Not. R. Astron. Soc., 351 , 423–435, 2004. 178 Li, J., Y. Chen, and D. Pepper, Radial basis function method for 1-d and 2-d groundwater contaminant transport modeling, Comput. Mech., 32 , 10–15, 2003. Lipnikov, K., D. Svyatskiy, and Y. Vassilevski, Interpolation-free monotone finite volume method for diffusion equations on polygonal meshes, J. Comput. Phys., 228 , 703–716, 2009. Mlacnik, M., and L. Durlofsky, Unstructured grid optimization for improved monotonicity of discrete solutions of elliptic equations with highly anisotropic coefficients, J. Comput. Phys., 216 , 337–361, 2006. Monaghan, J., Smoothed particle hydrodynamics, Rep. Prog. Phys., 68 , 1703–1759, 2005. Praveen Kumar, R., and G. Dodagoudar, Two-dimensional modelling of contaminant transport through saturated porous media using the radial point interpolation method (RPIM), Hydrogeol. J., 16 , 1497–1505, 2008. Schaback, R., and H. Wendland, Kernel techniques: From machine learning to meshless methods, Acta Numerica, pp. 1–97, 2006. Steefel, C., and K. MacQuarrie, Approaches to modeling of reactive transport in porous media, Reviews in Mineralogy and Geochemistry, 34 , 85–129, 1996. Suciu, N., C. Vamos, J. Vanderborght, H. Hardelauf, and H. Vereecken, Numerical in- vestigations on ergodicity of solute transport in heterogeneous aquifers, Water Resour. Res, 42 , 1–17, 2006. Tartakovsky, A., P. Meakin, T. Scheibe, and B. Wood, A smoothed particle hydrody- namics model for reactive transport and mineral precipitation in porous and fractured porous media, Water Resour. Res., 43 , W05,437, 2007. Tartakovsky, A., D. Tartakovsky, and P. Meakin, Stochastic Langevin model for flow and transport in porous media, Phys. Rev. Lett., 101 , 44,502, 2008. Thiele, M., Streamline simulation, in 8th International Forum on Reservoir Simulation, 2005. Tompson, A., and D. Dougherty, Particle-grid methods for reacting flows in porous media with applications to Fisher’s equation, Appl. Math. Modelling, 16 , 374–383, 1992. Werth, C. J., O. A. Cirpka, and P. Grathwohl, Enhanced mixing and reaction through flow focusing in heterogeneous porous media, Water Resour. Res., 42 , W12,414, 2006. 179 Zhu, Y., and P. Fox, Smoothed Particle Hydrodynamics Model for Diffusion through Porous Media, Transport Porous Med., 43 , 441–471, 2001. Zhu, Y., and P. Fox, Simulation of pore-scale dispersion in periodic porous media using smoothed particle hydrodynamics, J. Comput. Phys., 182 , 622–645, 2002. Zhu, Y., P. Fox, and J. Morris, A pore-scale numerical model for flow through porous media, Int. J. Numer. Anal. Meth. Geomech., 23 , 881–904, 1999. Zimmermann, S., P. Koumoutsakos, and W. Kinzelbach, Simulation of pollutant trans- port using a particle method, J. Comput. Phys., 173 , 322–347, 2001. 180 Appendix A Derivation of SPH Approximation for Isotropic Dispersion To solve the PDE equation given by dA dt = 1 α ∇ · (βΦ∇A) (A.1) where A is an scalar variable, and α, β and Φ are scalar parameters; we can use the identity 1 α ∇ · (βΦ∇A) = 12α ∇2 (βΦA)− A∇2(βΦ) + βΦ∇2A (A.2) Thus, the solution of (A.1) requires only an expression to evaluate the Laplacian. Ap- plying a Taylor series expansion and some algebraic manipulation it is possible to show that the Laplacian of a scalar field S can be approximated by (Jubelgas et al., 2004) ∇2S r ≈ −2 ˆ [S(r)− S(r)] (r − r) |r − r|2 ·∇W (r − r) dr +O(h2) (A.3) If this last expression is integrated using a traditional SPH approach, then ∇2S ri = − 2 Np Np j=1 1 pj [S(rj)− S(ri)]F (rj − ri) (A.4) 181 where F (rj − ri) = (rj − ri)|rj − ri|2 ·∇W (rj − ri) (A.5) Finally, substituting (A.4) into (A.2), we get dA dt ri = 1 Np Np j=1 1 αipj (βiφi + βjφj) (Aj − Ai)F (rj − ri) (A.6) References Jubelgas, M., V. Springel, and K. Dolag, Thermal conduction in cosmological SPH sim- ulations, Mon. Not. R. Astron. Soc., 351 , 423–435, 2004. 182 Appendix B Derivation of SPH Approximation for Second Order Derivatives Español and Revenga (2003) andMonaghan (2005) provide expressions to compute second derivatives using a smoothed particle hydrodynamics (SPH) formulation. Here, we give a detailed derivation of those expressions. We start by recalling some of the properties of SPH kernels. The gradient of a spherically symmetric SPH kernel, W (r), can be expressed as ∇W (r) = −rF (r), where F (r) is a spherically symmetric scalar function and r and r are the separation vector and its magnitude, respectively. Additionally, the kernel satisfies the normalization condition´ W (r) dr = 1 and has compact support, i.e. W (r) = 0 ∀r > he, where he is a finite constant. The Taylor series approximation of a function A around x is, A(x) = A(x) + (x − x)T · ∇A|x + 1 2(x − x)T · ∇∇A|x · (x − x) +O(|x − x|3) (B.1) To simplify notation, we use r = x − x = (r1, r2, r3), such that A(x)− A(x) ≈ i ri ∂A ∂xi x + 12 i j rirj ∂2A ∂xi∂xj x (B.2) 183 Now, we multiply by Γαβ(r) = F (r)rαrβ/r2 and integrate to obtain, ˆ (A(x)− A(x))Γαβ(r) dx = i ∂A ∂xi ˆ F (r)rirαrβ r2 dx + 12 i j ∂2A ∂xi∂xj ˆ F (r)rirjrαrβ r2 dx (B.3) We note that dr = dx and use spherical coordinates to evaluate the integrals, to obtain, ˆ F (r)r1r1r2 r2 dr = ∞̂ 0 2πˆ 0 πˆ 0 F (r)r3 cos2(θ)sin(θ) sin3(φ) dφ dθ dr = 0 (B.4) because ´ 2π 0 cos2(θ)sin(θ) dθ = 0. Similarly, the other terms multiplying first derivatives vanish. Thus, ˆ (A(x)− A(x))Γαβ(r) dx = 12 α β ∂2A ∂xα∂xβ Λαβ (B.5) where only coefficients of the form Λαβ = ´ F (r)rαrαrβrβ/r2 dr are not zero. Therefore, 2 ˆ (A(x)− A(x))Γαα(r) dr = Λαα∂ 2A ∂x2α + β =α Λαβ ∂2A ∂x2β = (Λαα − Λαβ)∂ 2A ∂x2α + Λαβ∇2A (B.6) and 2 ˆ (A(x)− A(x))Γαβ(r) dr = Λαβ ∂ 2A ∂xα∂xβ + Λβα ∂2A ∂xβ∂xα = 2Λαβ ∂2A ∂xα∂xβ (B.7) The coefficients Λαβ can be easily evaluated, for example, 184 Λxx = ∞̂ 0 2πˆ 0 πˆ 0 F (r)r4 cos4(θ) sin5(φ) dφ dθ dr = 45π ∞̂ 0 F (r)r4 dr (B.8) and Λxy = ∞̂ 0 2πˆ 0 πˆ 0 F (r)r4 cos2(θ) sin2(θ) sin5(φ) dφ dθ dr = 415π ∞̂ 0 F (r)r4 dr (B.9) The coefficients related to the other directions have one of these two forms. To compute the integral in r, we recall that rF (r) = −∂W (r)/∂r, thus ∞̂ 0 F (r)r4 dr = − ∞̂ 0 r3 ∂W (r) ∂r dr = 3 ∞̂ 0 r2W (r) dr (B.10) after integration by parts. Finally, we use the normalization condition of the kernel ˆ W (r) dr = πˆ 0 2πˆ 0 ∞̂ 0 r2W (r) dr dθ dφ = 4π ∞̂ 0 r2W (r) dr = 1 (B.11) to obtain ∞̂ 0 F (r)r4 dr = 34π (B.12) Then, Λαα = 3 5 Λαβ = 1 5 (B.13) 185 We observe that Λαα − Λαβ = 2Λαβ, thus equations B.6 and B.7 can be combined to obtain, 2 ˆ (A(x)− A(x))Γαβ(x − x) dx = Λαβ∇2Aδαβ + 2Λαβ ∂ 2A ∂xα∂xβ (B.14) where δαβ is Kronecker delta. This last expression gives the following approximation for the Laplacian, ∇2A = 2 ˆ (A(x)− A(x))F (x − x) dx (B.15) which is identical to an expression previously derived to simulate thermal conduction (Cleary and Monaghan, 1999; Jubelgas et al., 2004). Finally, substituting B.15 into B.14 and rearranging terms, we obtain ∂2A ∂xα∂xβ x = ˆ (A(x)− A(x))F (x − x) 1 Λαβ rαrβ r2 − δαβ dx (B.16) Using an SPH approximation to evaluate the integral, ∂2A ∂xα∂xβ xa = b 1 pb (A(xb)− A(xa))F (|xb − xa|)Θαβ(xb − xa) (B.17) where Θαβ(x − x) = 1 Λαβ (x−x)α(x−x)β |x−x|2 − δαβ and pa = bW (xb − xa). Substituting 1/Λαβ = 5 in three dimensions and 1/Λαβ = 4 in two dimensions, we obtain the expres- sions given by Español and Revenga (2003) and Monaghan (2005), respectively. References Cleary, P. W., and J. J. Monaghan, Conduction modelling using smoothed particle hy- drodynamics, J. Comput. Phys., 148 , 227–264, 1999. Español, P., and M. Revenga, Smoothed dissipative particle dynamics, Phys. Rev. E , 67 , 026,705–12, 2003. 186 Jubelgas, M., V. Springel, and K. Dolag, Thermal conduction in cosmological SPH sim- ulations, Mon. Not. R. Astron. Soc., 351 , 423–435, 2004. Monaghan, J., Smoothed particle hydrodynamics, Rep. Prog. Phys., 68 , 1703–1759, 2005. 187 Appendix C Random Walk Particle Method Random-walk particle-tracking (RWPT) methods are based on the equivalence in the limit of a large number of particles between the ADE which describes continuum-scale mass conservation and the Fokker–Planck equation which describes the time evolution of the probability density function of the position of a solute particle. Most numerical implementations of the RWPT are based on the Îto integration of the equivalent Langevin equation (Gardiner , 1990) that written in matrix form corresponds to X(t+∆t) = X(t) +∆tA(t) +B(t)Z √ ∆t (C.1) where X(t) corresponds to the vector of particle position at time t and Z is a normally distributed random vector with zero mean and unit variance that represents the Brownian motion of the particles due to dispersion. The other two terms in (C.1) corresponds to a drift term given by A =v+∇ ·D (C.2) assuming constant porosity; and a displacement matrix, B, that depends on the disper- sion tensor. The relation of these terms with the ADE are discussed in detail in several references (e.g. Lichtner et al., 2002; Delay et al., 2005; Salamon et al., 2006). Several approaches have been proposed to interpolate the flow velocity required to eval- uate the coefficients appearing in (C.1) and (C.2). Particular attention has been paid to 188 methods that avoid local mass conservation problems due to discontinuities of the dis- persion tensor across sharp interfaces (LaBolle et al., 1996; Labolle et al., 2000; Salamon et al., 2006). In our implementation of the RWPT we use a hybrid approach to interpo- late velocity: a linear interpolation is used to evaluate the velocity vector that appears in the drift term, and a trilinear interpolation is used to interpolate the velocity vector used to evaluate the dispersion tensor. This interpolation scheme guarantees the spatial continuity of the advective velocity and the dispersion tensor (Salamon et al., 2006). To apply the RWPTmethod to practical situations it is necessary to map solute mass from and to concentration values because initial and boundary conditions and geochemical computations are usually expressed in concentration units. Given the total solute mass in the system M , the mass of each particle is computed as mp = M/Np. In general, the total number of particles is chosen to satisfy some numerical resolution, for example such that the mass of a given number of particles Nr is equal to some unit mass value M0, i.e. mpNr = M0. Given a set of particles, a continuum spatial concentration distribution can be approximated as (Bagtzoglou et al., 1992; Tompson, 1993) C(x) = ˆ Ω mpξ(x− x)dx ≈ Np j=1 mpξ(x− xj) (C.3) where ξ(x) is a projection function. In theory, this expression allows the computation of the concentration values at any location. In practice, most implementations use a box function with value 1/Vc for points within a cube of volume Vc around x and 0 otherwise(Tompson, 1993). In simple terms, the domain Ω is divided in a set of cubic cells with volume Vc, then concentration values are assigned to cell j by counting the number of particles within it, nj, so that the concentration value of the cell is computed as Cj = njmp/Vc. The value of Np affects the accuracy of the method in two ways. First, the equivalence between the Langevin equation and the continuum ADE is valid for Np → ∞. Second, concentration values can only be represented as an integer multiple of mp/Vc. Errors can be particularly important near the plume edges where the drop in the number of particles produces unphysical numerical oscillations in the computed concentrations that can be amplified in presence of non-linear chemical reactions if a splitting approach is used to solve reactive transport (Tompson and Dougherty, 1992; Tompson, 1993). 189 References Bagtzoglou, A., A. Tompson, and D. Dougherty, Projection functions for particle-grid methods, Num. Meth. Part. Diff. Eq., 8 , 325–340, 1992. Delay, F., P. Ackerer, and C. Danquigny, Simulating Solute Transport in Porous or Fractured Formations Using Random Walk Particle Tracking: A Review, Vadose Zone J., 4 , 360–379, 2005. Gardiner, C., Handbook of Stochastic Methods for Physics, Chemistry and the Natural Sciences, 1990. LaBolle, E. M., G. E. Fogg, and A. F. B. Tompson, Random-walk simulation of transport in heterogeneous porous media: Local mass-conservation problem and implementation methods, Water Resour. Res., 32 , 583–594, 1996. Labolle, E. M., J. Quastel, G. E. Fogg, and J. Gravner, Diffusion processes in composite porous media and their numerical integration by random walks: Generalized stochastic differential equations with discontinuous coefficients, Water Resour. Res., 36 , 651, 2000. Lichtner, P., S. Kelkar, and B. Robinson, New form of dispersion tensor for axisymmetric porous media with implementation in particle tracking., Water Resour. Res., 38 , 1146, 2002. Salamon, P., D. Fernàndez-Garcia, and J. Gómez-Hernández, A review and numerical assessment of the random walk particle tracking method., J. Contam. Hydrol., 87 , 277–305, 2006. Tompson, A., Numerical simulation of chemical migration in physically and chemically heterogeneous porous media, Water Resour. Res., 29 , 3709–3726, 1993. Tompson, A., and D. Dougherty, Particle-grid methods for reacting flows in porous media with applications to Fisher’s equation, Appl. Math. Modelling, 16 , 374–383, 1992. 190 Appendix D Streamline Tracing In streamline simulations the value of variables such as time of flight and arc length together with the node positions along streamlines define the computational grid. There- fore, the accuracy of the results depends upon the accuracy of the computed streamlines trajectory, arc length and time of flight. On the other hand, it may be necessary to trace a large number of streamlines to provide an adequate coverage of the domain in com- plex three-dimensional problems. Additionally, streamlines must be periodically updated whenever temporal changes of the flow field occur. Therefore, it is important to select tracing algorithms that allow an accurate and efficient computation of the streamlines. When tracing the streamlines used in a simulation it is sometimes useful to consider some of the characteristics of the flow field in order to optimize the location and minimize the number of streamlines necessary to obtain a given spatial resolution and accuracy. We discuss some of the issues associated with tracing and spatial distribution of stream- lines in the next sections. Streamline Tracing Algorithms Most current streamline simulators use a semi-analytical method to trace streamlines that was first introduced by Pollock (1988) to track fluid particles in groundwater simu- lations. This method is attractive because given a velocity field in a staggered Cartesian grid, it provides analytical expressions to compute particle trajectories without introduc- ing additional numerical errors. Moreover, the method is simple to understand and, in 191 theory, easy to implement. In practice, implementations of the algorithm are complex and sensitive to errors due to floating point arithmetic. Additionally, the extension of the method to unstructured grids, although possible using isoparametric coordinate trans- formations (Cordes and Kinzelbach, 1992; Prevost et al., 2002), is much more involved and difficult to implement than the original method. Fluid particle trajectories that define streamlines can also be integrated using explicit time integration schemes, e.g. Runge-Kutta. This type of algorithm is straightforward, very easy to implement, numerically robust, and can be used with velocity fields given in structured or unstructured grids without modifications. However, explicit integra- tion schemes introduce additional numerical errors that can be difficult to quantify and control. In this section, we compare Pollock’s method with an explicit adaptive first-order time integration scheme. We give a brief description of both methods and compare them in a set of benchmark problems. Finally, we comment on their relative advantages and disadvantages. Pollock’s Method Given the components of the flow velocity in a three-dimensional staggered Cartesian grid, Pollock’s algorithm assumes that the components of the velocity vector v = (u, v, w), can be approximated as a linear function of the velocity components at the cell faces, i.e. u(x, y, z) = Ax (x− x1) + u1 v(x, y, z) = Ay(y − y1) + v1 w(x, y, z) = Az(z − z1) + w1 (D.1) where u1 is the velocity component in the x direction at face 1 located at x1 as shown in Figure D.1, and the slope Ai is computed as ratio of the difference of the cell face velocities over the grid spacing, e.g. Ax = (u2 − u1) /∆x. Similar definitions apply for the other two directions. 192 B A C D !" #" u 1 u 2 v 2 v 1 (x 0 , y 0 , t 0 ) (x 1 , y 1 , t 1 ) x 1 x 2 y 1 y 2 Figure D.1: Pollock’s method assumes that the components of the velocity within a cell can be approximated as a linear function of the velocity components at the cell faces. The method provides analytical expressions to compute the new position D after an interval of time ∆t = t1 − t0 of a particle initially at point C. However, the method is usually used to compute the exit point B from a cell given an entry point A. The fluid velocity and particle position in each direction are related by, du dt = du dx dx dt = Axu (D.2) Integrating this last expression one obtains, ∆t = 1 Ax ln u(x0 +∆x, t0 +∆t) u(x0, t0) (D.3) Taking the exponential of each side and substituting u(x0 +∆x, t0 +∆t) from (D.1), ∆x = 1 Ax u(x0)eAx∆t − u1 (D.4) 193 Similar expressions are valid in the y and z directions. While equation (D.3) provides an expression to compute the travel time required by a fluid particle at position x0 to move a distance ∆x, (D.4) can be used to compute the new position after an interval of time ∆t. A common application of Pollock’s method is to compute the time a fluid particle at position xp will need to exit from the current cell. Assuming all velocities are positive, ∆tx = 1 Ax ln u2 u(xp) ∆ty = 1 Ay ln v2 v(yp) ∆tz = 1 Az ln w2 w(zp) (D.5) Then, the particle will exit after ∆texit = min(∆tx,∆ty,∆tz) (D.6) Thus, given an entry point to a cell it is possible to calculate the exact exit position in single step and without introducing additional numerical errors. A simple inspection of (D.4) and (D.3) reveals that implementations of the algorithm must take into account several possible issues: 1. If the flow velocity is constant within a cell, then A = 0, and expressions (D.3) and (D.4) become undefined. The situation is more complicated if floating point arithmetic is used because the ratio 1/A can also overflow for small differences of velocity. 2. The analytical expressions are not valid in cells with sources or sinks where the slope of the velocity changes sign within a single cell. 3. Equations (D.3) and (D.4) are valid within a single cell. Thus, to compute the new position of a particle after a time step ∆t, one must first check if the particle would exit the current cell before that time. If it exits, then the time step must be divided in smaller sub steps. 194 4. Additionally, the algorithm assumes that it is always possible to exactly determine the cell where an individual particle is located. Thus, particles located over or close to one of the cell edges or corners can be problematic. Algorithm D.1 summarizes the steps necessary to find the position of a fluid particle initially at position xp after an interval of time ∆t. Algorithm D.2 presents the steps used to obtain the remaining time to exit from the current cell. Finally, Algorithm D.3 presents the steps to update the position of a fluid particle. Algorithm D.1 Pollock’s particle tracking algorithm. 1: xp ← initial position 2: time ← 0 3: while time < ∆t and xp inside domain do 4: cell ← get cell that contains xp 5: if cell = sink or cell = source then 6: break 7: else 8: vp ← get velocity at xp 9: // for each direction 10: fi ← get exit face in direction i 11: ∆ti ← get time to exit through face fi 12: 13: ∆texit ← min(∆ti) 14: if ∆texit > ∆t then 15: xp ← update position using ∆t 16: break 17: else 18: xp ← update position using texit 19: // now xp is over one of the cell edges 20: move xp to next cell 21: time ← time + texit 22: end if 23: end if 24: end while 25: return xp Explicit Time Integration The temporal evolution of the trajectory of a fluid particle initially at x0 at time t0 is given by the solution of the following differential equation, 195 Algorithm D.2 Function to compute exit time from current cell in Pollock’s method. 1: x1, x2, xp ← coordinates of face 1, 2 and fluid particle 2: u1, u2, up ← velocities at face 1, 2 and fluid particle position 3: 4: A ← (x2 − x1)/(u2 − u1) 5: if exit through face 1 then 6: if constant velocity then 7: time ← (x1 − xp)/up 8: else 9: time ← A · ln(u1/up) 10: end if 11: else if exit through face 2 then 12: if constant velocity then 13: time ← (x2 − xp)/up 14: else 15: time ← A · ln(u2/up) 16: end if 17: end if 18: return time Algorithm D.3 Function to update position in Pollock’s method. 1: x1, x2, xp ← coordinates of face 1, 2 and fluid particle 2: u1, u2, up ← velocities at face 1, 2 and fluid particle position 3: 4: if exit throug face 1 or 2 then 5: // we have to move xp to new cell 6: // thus we add to or substract from x1 or x2 a small number 7: if exit through face 1 then 8: xp ← x1 − 9: else if exit through face 2 then 10: xp ← x2 + 11: end if 12: else 13: if constant velocity then 14: xp ← xp + up∆t; 15: else 16: A = (x2 − x1)/(u2 − u1) 17: xp ← x1 + A [up · exp (∆t/A)− u1] 18: end if 19: end if 20: return xp 196 dx dt = v(x, t) (D.7) with, x(t0) = x0 (D.8) The numerical solution of (D.7) can be easily computed using an explicit time integration scheme. For example, a first-order explicit approximation reads, x(t+∆t) = x0 + v(x0, t0)∆t (D.9) Although simple to implement, (D.9) is seldom used in practice because of its relatively large error, which is proportional to the time step. In practice, (D.7) is solved using a higher-order integration scheme, e.g. explicit second- and fourth-order Runge-Kutta, that have smaller errors for a given ∆t. Such schemes apply expressions similar to (D.9) to compute the particle position at intermediate steps. Then, the final position after ∆t is computed as a weighted combination of the the intermediate locations. The main drawback of explicit integrators is that it is difficult to determine a priori a value∆t such that the error remains below a given threshold. This problem is particularly important in velocity fields that exhibit large differences in velocity magnitude and/or direction within short distances as shown in Figure (D.2). 197 !" #" $" %" &" Figure D.2: Example of explicit time integration. A fluid particle starting at point A travels along the instantaneous streamline (solid line). After a time step ∆t, it is located at point B. If an explicit integration scheme is used to integrate the particle trajectory numerical errors can become important. For example, if a large time step ∆t is used, the particle moves in the direction of the instantaneous velocity at position A ending at point D. However, the error can be made smaller if two steps are used for the integration. First, the particle moves with the initial velocity to E, and then it moves to C along the direction of the velocity at point E. There are multiple possible solutions to control the error of explicit integration schemes. The first one is to use a very small constant time step such that the error in the worst case stays below a specific threshold. In general, this solution is not acceptable because it introduces unnecessary computational overhead in slow regions. A second alternative consists in using an adaptive step size integration algorithm, e.g. Dormand-Prince (Dormand and Prince, 1980); which uses two methods with different order at each time step. The difference between both solutions is used to estimate the numerical error and, if necessary, to adapt the size of the time step. A third alternative consists in recognizing that the accuracy of the explicit integration also depends on the spatial resolution of the reconstruction of the velocity field. The error of the velocity field reconstruction is related to the size of the numerical grid used to compute the velocity components. Thus, an efficient algorithm can limit the error of the integration by controlling how far a fluid particle can move in one time step relative to the grid size. Therefore, many sub-steps may be necessary in areas of high velocity, 198 while one or few sub-steps may be enough in slow zones. Therefore, it is possible to satisfy restrictions on accuracy and performance. We refer to this scheme as the first- order explicit adaptive particle tracking (FEAPT) method. Algorithm D.4 summarizes the steps of the explicit method. Algorithm D.4 First-order explicit adaptive particle tracking. 1: xp ← initial position 2: ∆ ← maximum distance a particle is allowed to move during one time step 3: time ← 0 4: while time < ∆t and xp inside domain do 5: cell ← get cell that contains xp 6: if cell = sink or cell = source then 7: break 8: else 9: vp ← get velocity at xp 10: t ← ∆/|vp| 11: xp ← xp + vp · t 12: time ← time + t 13: end if 14: end while 15: return xp Numerical Examples In this section, we compare Pollock’s and the FEAPT methods in a set of benchmark problems. Homogeneous quarter five-spot The first test problem corresponds to the well known quarter five-spot configuration in a homogeneous medium. An injection and extraction well are located in the lower left corner and upper right corner, respectively. The resulting streamline pattern is well known and it has become a common test problem for streamline simulations (e.g. Matringe, 2004). We consider a square domain of 25 m side and we use a 100 x 100 regular Cartesian grid to solve the flow problem. We trace streamlines from ten seeds placed along a diagonal straight line that passes through the center of the domain and that connects the upper left and lower right corners. 199 Figure D.3 shows streamlines traced with Pollock’s and the explicit adaptive scheme with tolerance equal to 5% and 50% of the cell size of the velocity field. The explicit scheme performs similarly that Pollock’s method to trace the interior streamlines. However, the FEAPT solution with larger tolerance has problems tracing the exterior streamlines at the lower right and upper left corners where the curvature of the trajectory is maximum. When using the larger tolerance particles travel too far and exit the domain. While the explicit solution with 50% tolerance required the same time that Pollock’s method, the FEAPT solution with 5% tolerance needed three times longer. Figure D.3: Streamlines traced with Pollock’s method (solid lines) and with explicit adaptive scheme (crosses). Spacing between crosses is equal to four times the cell size of velocity field. Numbers indicate streamline labels used in the text. Solutions for explicit time integration correspond to 5% (left) and 50% (right) tolerance. In both cases the position of the inte- rior streamlines is almost identical. However, the FEAPT solution with larger tolerance has problems tracing the exterior streamlines at corners where the streamline curvature is maximum. Heterogeneous quarter five-spot As a second test problem, we consider the same well configuration but a heterogeneous hydraulic conductivity field. We generate two hydraulic conductivity fields assuming a spatial distribution of Y = ln(K) given by an exponential covariance with variance σY = 5 and correlation length equal to four times the grid spacing (Figure D.5). 200 0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 Normalized Arc Length No rm ali ze d Ti m e of F lig ht streamline #2 Pollock Explicit 5% Explicit 50% 0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 Normalized Arc Length No rm ali ze d Ti m e of F lig ht streamline #5 Pollock Explicit 5% Explicit 50% Figure D.4: Normalized time of flight versus normalized arc length computed with Pollock’s and adaptive explicit time integration with tolerances equal to 5% and 50% of grid spacing. Streamlines traced with any of the three methods are similar. Figure D.5: Spatial distribution of hydraulic conductivity in fields K1 (left) and K2 (right). Note that hydraulic conductivity values vary by more than 14 and 18 orders of magnitude in field K1 and K2, respectively. In both cases, the magnitude of the resulting flow velocity varies up to five orders of magnitude. 201 Figure D.6: Streamlines traced with Pollock’s method (solid lines) and with explicit adaptive scheme (crosses) for fields K1 (left) and K2 (right). Spacing between crosses is equal to four times the cell size of the grid used to compute the velocity field. Streamlines were traced with explicit time integration scheme using a tolerance equal to 5% of the grid spacing. As in the homogeneous case, we trace streamlines from ten seeds placed along a diagonal straight line that passes through the center of the domain and that connects the upper left and lower right corners. The resulting streamlines are shown in Figure D.6. With the exception of few location along streamline 8 in field K1, streamlines traced with Pollock’s and FEAPT method are very similar. As shown in Figure D.7, the small differences in the streamline locations are also observed in curves that relate the time of flight and arc length along individual streamlines. For the strongly heterogeneous fields used in this example, it is necessary to use a very small tolerance (< 1% of grid spacing) in the explicit integration scheme to obtain a perfect match between the FEAPT and Pollock’s methods. However, the FEAPT solution with tolerance equal to 1% of the grid produces results that are also very close to the curves generated with Pollock’s method. Moreover, it is is clear that the FEAPT and Pollock’s solutions converge to the same curve as we decrease the maximum distance than a fluid particle is allowed to advance in an individual time step. 202 0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 Normalized Arc Length No rm ali ze d Ti m e of F lig ht streamline #6 Pollock Explicit 0.1% Explicit 1% Explicit 5% 0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 Normalized Arc Length No rm ali ze d Ti m e of F lig ht streamline #8 Pollock Explicit 0.1% Explicit 1% Explicit 5% 0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 Normalized Arc Length No rm ali ze d Ti m e of F lig ht streamline #4 Pollock Explicit 0.1% Explicit 1% Explicit 5% 0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 Normalized Arc Length No rm ali ze d Ti m e of F lig ht streamline #7 Pollock Explicit 0.1% Explicit 1% Explicit 5% Figure D.7: Normalized time of flight versus normalized arc length for streamlines in heterogeneous K1 (top) and K2 (down) hydraulic conductivity fields. The difference between the results of the adaptive explicit integration scheme and Pollock’s method become negligible as the tolerance for the explicit integration decreases to around 1% of the grid spacing. 203 Performance The main advantage of Pollock’s method consists in its ability to provide accurate results with minimum computational overhead. To assess the difference between the performance of the explicit integration scheme versus Pollock’s algorithm, we traced 600 streamlines in the heterogeneous quarter five-spot configuration discussed in the previous section. The resulting streamlines are shown in Figure D.8. When using the explicit integration algorithm, nodes are recorded only if the separation distance between the new and the previously recorded node is equal to or larger than an specified arc length spacing ∆s. In Pollock’s method only entry and exit points to/from cells are recorded. All the tests were run in laptop computer with an Intel Core 2 Duo 2GHz processor with 3MB of L2 cache and 2GB of RAM memory. The results of the comparison are summarized in Table D.1. The explicit streamline integration with tolerance equal to 1% of the grid spacing takes one order of magnitude longer than Pollock’s method, while reducing the tolerance to 0.1% resulted in an extra order of magnitude increase in the computational time. Al- though the performance difference between both methods is important, it is very likely that it would not be relevant in practical streamline simulations. In real simulations, the time required to trace streamlines would be much smaller than the time required to solve the flow and transport problems. In that case, even the slowest of the three methods, explicit integration with 0.1% tolerance, would require only a small fraction of the total simulation time. Method Time (sec) # Nodes ∆s Pollock 0.3 99,361 − Explicit 1% 5.9 221,437 ∆x/2 Explicit 1% 5.8 111,739 ∆x Explicit 0.1% 56.6 223,140 ∆x/2 Explicit 0.1% 57.9 112,206 ∆x Table D.1: Comparison of the performance of Pollock’s and explicit adaptive algo- rithm to trace streamlines shown in Figure D.8. When using the explicit integration algorithm, nodes are recorded only if the separation distance between the new and the previously recorded node is equal to or larger than the arc length spacing ∆s. In Pollock’s method only entry to and exit points from cells are recorded. 204 Comments on the Selection of a Streamline Tracing Algorithm Based on the examples presented above and our accumulated experience using Pollock’s and the explicit adaptive integration schemes, we have the following comments: 1. Both methods are able to provide the same level of accuracy if a small tolerance is used for FEAPT method. 2. However, as demonstrated with the heterogeneous quarter five-spot problem, Pol- lock’s method can be orders of magnitude faster than the explicit integration algo- rithm for the same level of accuracy. 3. On the other hand, tracing streamlines is a relatively inexpensive part of a simula- tion when compared to the solution of the flow and transport problems. Moreover, the cost of the tracing step can be easily reduced by parallelizing both algorithms, making the relative cost even smaller. Therefore, performance should not be con- sidered as the sole factor in choosing a streamline tracing algorithm. 4. Because of its semi-analytical formulation, the original Pollock’s method is re- stricted to flow fields computed in regular cell-centered Cartesian grids. Its ex- tension to unstructured grids, although possible, it involves much more complex expressions and additional steps. Additionally, the method assumes a linear re- construction of the velocity components, which is a low order approximation. On the other hand, the FEAPT method only requires a routine to evaluate the flow velocity at each location, thus it can be applied to any type of grid (structured or unstructured) and to any velocity approximation without modifications. In summary, Pollock’s method continue to be an attractive option because of its inherent accuracy and relative low computational overhead. However, the explicit integration schemes should be considered as a serious alternative to replace it in new streamline simulation packages because of its simplicity, flexibility, and numerical robustness. Streamline Distribution In streamline simulations the resolution of the numerical grid is given by the distribution and number of streamlines. Good spatial resolution requires that streamlines cover all 205 the domain with some minimum density of lines crossing every region of the domain. In general, streamlines are traced starting from an initial location (seed) and then tracking backward and forward until exiting the domain or hitting a sink or source cell. There- fore, it is possible, for simple flow fields, to optimize the streamline distribution with an adequate choice of the initial seeds. For example, Figure D.9 shows two possible dis- tributions of ten streamlines in the homogeneous quarter five-spot problem. It is clear that the streamlines traced from equispaced seeds over the diagonal line provide a more regular coverage of the domain than the ones traced from points located over a vertical line. The optimal selection of initial seeds becomes much more complicated in the case of heterogeneous velocity fields as shown in Figure D.10. The figure shows four possible distributions for hundred streamlines in the heterogeneous quarter five-spot problem considering field K1. We observe that independently of the distribution of the initial seeds, the distribution of streamlines is very irregular. Large areas of the domain contain few streamlines, while few small regions concentrate many of them. Streamlines occur less often in slow flow areas, while they concentrate in fast regions. Therefore, an attractive alternative to obtain a more uniform coverage is to launch some streamlines from the slowest cells in the domain. However, many of the slowest cells are located nearby, and seeding streamlines using such strategy produces a more irregular streamline distribution than the one obtained using randomly distributed seeds. In many streamline simulations, it is impossible to tolerate regions of the domain with- out a crossing streamline. For example, in solute transport simulations that use an operator-splitting approach and solve advection along streamlines and dispersion using a background grid (Crane and Blunt, 1999; Obi and Blunt, 2004), at least one streamline must cross each cell of the background grid in order to minimize interpolation errors. A common approach in those cases consists in using a background grid to control the streamline distribution. First, streamlines are traced from specified seeds marking cells of the grid that are crossed by at least one streamline. Second, new streamlines are traced from the rest of cells. In general, the number of streamlines is dependant on the initial seeds configuration and the order used to identify empty cells in the grid. As illus- tration, we use the quarter five-spot problem considering the field K1 and trace enough streamlines such as at least one streamline crosses every cell a 100 x 100 square grid. We use Pollock’s method and only record the entry and exit points in each cell. Table D.2 summarizes the total number of streamlines and nodes required to cover the grid using five different strategies for the distribution of initial seeds. We observe that independent 206 Figure D.8: Distribution of 600 streamlines traced to compare the performance of Pollock’s and the explicit adaptive integration scheme. Streamlines for fields K1 (left) and K2 (right). Figure D.9: Two possible distributions of ten streamlines in the homogeneous quarter five-spot problem. Red squares indicate the position of initial seeds. Using a sensible choice of the initial seeds, it is possible to obtain a more uniform coverage of the domain with the same number of streamlines. 207 Figure D.10: Four possible distributions for hundred streamlines in the heteroge- neous quarter five-spot problem considering field K1. Red squares indi- cate the position of initial seeds. Seed distributions correspond to: (i) equispaced points along diagonal line (top left), (ii) quasi-randomly dis- tributed points (top right), (iii) fifty equispaced points along diagonal and fifty quasi-randomly distributed points (down left), and (iv) fifty equispaced points along diagonal and the location of the fifty (0.5%) of the slowest cells. Independent of the distribution of the initial seeds, the distribution of streamlines is very irregular in highly heterogeneous velocity fields. 208 Initial seeds # Streamlines # Nodes 100 points over diagonal line 1036 169,831 100 quasi-random points 1034 169,253 50 points over diagonal and 50 quasi-random points 1016 166,274 400 quasi-random points 1064 174,313 without initial seeds (trace streamlines from each empty cell) 1035 169,128 Table D.2: Comparison of different strategies to trace streamlines such that at least one streamline crosses each cell of a 100 x 100 Cartesian grid. The total number of streamlines and nodes are very similar independently of the different seed locations. of the seed distribution the required number of streamlines and nodes are similar with small variations around average values of 1035 streamlines and 169,000 nodes. It is im- portant to highlight that the average number of nodes is much larger than the number of cells in the background grid (10,000), which is, in our experience, a common situation in streamline simulations. The large number of nodes required to provide an adequate coverage of the domain is the price one must pay to obtain good spatial resolution and better accuracy. On the other hand, that cost is smaller in simulations that consider less heterogeneous media. Streamline Discretization There are three possible choices to distribute nodes along streamlines: (i) uniform spacing in the time of flight coordinate, (ii) uniform spacing in the arc length coordinate, and (iii) only record positions of entry and exit points in each cell. The selection of the streamline discretization has important practical implications for the performance of the simulation, selection of numerical solvers for the transport step, and stability restrictions of the overall numerical method. For example, it is much easier to solve the advection step formulated in terms of the time of flight coordinate τ , if nodes along streamlines are separated by a uniform step ∆τ(Crane and Blunt, 1999). However, there are also other trade-offs that must be considered such as limitations in the total number of nodes and spatial node distribution. 209 We use a simple flow scenario to motivate our discussion about the merits of the differ- ent streamline discretization schemes. We consider flow in a homogeneous medium with hydraulic conductivity K0 that contains a high permeability inclusion with K1 = 10K0. We set boundary conditions such that the mean flow goes from left to right. We solve the flow problem using a regular Cartesian grid with 10 x 10 cells. Figure D.11 shows an schematic of the flow problem. We use the resulting velocity field to trace ten streamlines using the three different discretization approaches. First, we trace streamlines recording only the entry and exit points to/from individual cells. This is the most common dis- cretization used in streamlines simulation because, as explained above, it arises naturally from the use of Pollock’s method as the tracing algorithm. Second, we trace streamlines recording node positions that are equispaced in the time of flight coordinate with step ∆τ , i.e. a fluid particle at node i needs ∆τ time to move to the next node i+ 1. Third, we trace streamlines recording only the entry and exit points to/from individual cells as in the first discretization method, but we additionally apply a post-processing step to uniformly distribute nodes in the arc length coordinate such as neighbor nodes are separated by an arc length spacing ∆s. K 0 10K 0 H 0 H 1 FLOW! Figure D.11: Schematic of flow problem used to discuss alternatives streamline dis- cretization. We consider a homogeneous medium with hydraulic con- ductivity K0 that contains a high permeability inclusion with K1 = 10K0. Boundary conditions are set such that the mean flow goes from left to right. Figure D.12 shows the locations of nodes along streamlines traced using the first two discretization approaches. If only entry and exit points are recorded, then some of the 210 nodes located near the high permeability inclusion are separated by a very short distance because they enter and exit near one of the cell corners. Those small separations can introduce unacceptable stability constrains for explicit solvers used to simulate advection (Thiele, 2003). Therefore, some post-processing step must be applied to remove nodes with short separation (Crane and Blunt, 1999; Thiele, 2003). On the other hand, a discretization based on the time of flight with spacing ∆τ = ∆x/U , where ∆x is the grid spacing and U is the mean velocity; can result in a very irregular spatial node distribution. Nodes along streamlines cluster in slow flow zones, while they are separated by long distances in regions with fast flow velocity. Therefore, a prohibitively large number of nodes may be required in order to keep a minimum spatial node density in all the domain. Figure D.12: Comparison of streamline discretization approaches. Red dots indi- cate the position of nodes along streamlines. In traditional streamline methods, Pollock’s semi-analytical method is used to find nodes where streamlines enter or exit to/from individual cells (left). Alternatively, nodes can be distributed using a constant time of flight spacing (right). Figure D.13 presents a comparison of node locations if only entry and exit points are recorded and for a uniform arc length discretization with spacing ∆s = ∆x/2. The arc length based discretization provides a uniform coverage of the domain with a relatively small number of nodes in comparison with the time of flight based discretization. Ad- ditionally, the constant node spacing along individual streamlines relaxes the stability restrictions of explicit solvers in comparison to the situation where entry and exit points are recorded. Because of its advantages, we selected the arc length based discretization 211 as the default option in our streamline simulator. Figure D.13: In traditional streamline methods, Pollock’s semi-analytical method is used to find nodes where streamlines enter or exit to/from individual cells (left). That information can be used to distribute nodes using a constant arc length spacing along streamlines (right). Red dots indi- cate the position of nodes along streamlines. Note the short separation between some nodes in the left figure and the regular spatial node dis- tribution in the right one. References Aris, R., Vectors, Tensors and the Basic Equations of Fluid Mechanics, Dover Publica- tions, 1989. Cordes, C., and W. Kinzelbach, Continuous groundwater velocity fields and path lines in linear, bilinear, and trilinear finite elements., Water Resour. Res., 28 , 2903–2911, 1992. Crane, M., and M. Blunt, Streamline-based simulation of solute transport,Water Resour. Res., 35 , 3061–3078, 1999. Dormand, J., and P. Prince, A family of embedded Runge-Kutta formulae, J. Comput. Appl. Math., 6 , 19–26, 1980. Matringe, S., Accurate streamline tracing and coverage, Master’s thesis, Stanford Uni- versity, 2004. 212 Obi, E., and M. Blunt, Streamline-based simulation of advective-dispersive solute trans- port, Adv. Water Resour., 27 , 913–924, 2004. Pollock, D., Semianalytical computation of path lines for Finite-Difference models, Ground Water , 26 , 743–750, 1988. Prevost, M., M. Edwards, and M. Blunt, Streamline tracing on curvilinear structured and unstructured grids, Soc. Petrol. Eng. J., 7 , 139–148, 2002. Thiele, M., Streamline simulation, in 7th International Forum on Reservoir Simulation, 2003. Thiele, M., R. Batycky, and M. Blunt, Simulating flow in heteroneous systems using streamtube and streamlines, SPE Reservoir Engineering, pp. 5–12, 1996. 213
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Particle and streamline numerical methods for conservative...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Particle and streamline numerical methods for conservative and reactive transport simulations in porous… Herrera, Paulo Andres Ricci 2009
pdf
Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
Page Metadata
Item Metadata
Title | Particle and streamline numerical methods for conservative and reactive transport simulations in porous media |
Creator |
Herrera, Paulo Andres Ricci |
Publisher | University of British Columbia |
Date Issued | 2009 |
Description | Reactive transport modeling has become an important tool to study and understand the transport and fate of solutes in the subsurface. However, the accurate simulation of reactive transport represents a formidable challenge because of the characteristics of flow, transport and chemical reactions that govern the migration of solutes in geological formations. In particular, solute transport in natural porous media is advection-controlled and dispersion is higher in the direction of flow than in the transverse direction. Both characteristics create difficulties for traditional numerical schemes that result in numerical dispersion and/or spurious oscillations. While these errors can often be tolerated in conservative transport simulations, they can be amplified in presence of chemical reactions resulting in much larger errors or unstable solutions. In this thesis, new Lagrangian based methods to simulate conservative and reactive transport in porous media are investigated. First, the derivation of a new meshless approximation based on smoothed particle hydrodynamics (SPH) to simulate conservative multidimensional solute transport, including advection and anisotropic dispersion, is presented. Second, a hybrid scheme that combines some of the advantages of streamline-based simulations and meshless methods and that allows simulating longitudinal and transverse dispersion without requiring a background grid is also derived. The numerical properties of both methods are analyzed analytical and numerically. Furthermore, both formulations are compared with existing numerical techniques in a set of two- and three-dimensional benchmark problems. It is demonstrated that the proposed schemes provide accurate and efficient solutions of physical transport processes in heterogeneous porous media and overcome most of the issues in existing numerical formulations. The new methods have the potential to remove or minimize numerical dispersion and grid orientation effects and, in the case of the hybrid streamline method, also eliminate spurious oscillations even in presence of large longitudinal to transverse dispersivity ratios. Therefore, the results presented in this thesis confirm that the Lagrangian formulations of solute transport investigated here are viable and compelling alternatives to simulate reactive transport versus more standard numerical techniques. |
Extent | 10878280 bytes |
Genre |
Thesis/Dissertation |
Type |
Text |
FileFormat | application/pdf |
Language | eng |
Date Available | 2009-11-30 |
Provider | Vancouver : University of British Columbia Library |
Rights | Attribution-NonCommercial-NoDerivatives 4.0 International |
DOI | 10.14288/1.0053008 |
URI | http://hdl.handle.net/2429/15967 |
Degree |
Doctor of Philosophy - PhD |
Program |
Geological Engineering |
Affiliation |
Science, Faculty of Earth, Ocean and Atmospheric Sciences, Department of |
Degree Grantor | University of British Columbia |
GraduationDate | 2010-05 |
Campus |
UBCV |
Scholarly Level | Graduate |
Rights URI | http://creativecommons.org/licenses/by-nc-nd/4.0/ |
AggregatedSourceRepository | DSpace |
Download
- Media
- 24-ubc_2010_spring_herrera_paulo.pdf [ 10.37MB ]
- Metadata
- JSON: 24-1.0053008.json
- JSON-LD: 24-1.0053008-ld.json
- RDF/XML (Pretty): 24-1.0053008-rdf.xml
- RDF/JSON: 24-1.0053008-rdf.json
- Turtle: 24-1.0053008-turtle.txt
- N-Triples: 24-1.0053008-rdf-ntriples.txt
- Original Record: 24-1.0053008-source.json
- Full Text
- 24-1.0053008-fulltext.txt
- Citation
- 24-1.0053008.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
data-media="{[{embed.selectedMedia}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.24.1-0053008/manifest