Skip to main content
Log in

A Lagrangian particle model on GPU for contaminant transport in groundwater

  • Published:
Computational Particle Mechanics Aims and scope Submit manuscript

Abstract

To simulate contaminant transport in groundwater, this paper proposes a parallelized Lagrangian particle model using compute unified device architecture (CUDA) on graphics processing unit (GPU) based on smoothed particle hydrodynamics (SPH) method. The solved governing equation is the advection–diffusion equations (ADEs) with retardation factor for given typical flow fields. To solve the inherent particle inconsistency problem of traditional SPH method, the corrective smoothed particle method (CSPM) is applied. The speedup ratio of the parallelized SPH solver for ADEs is analyzed. The consistency and convergence of the proposed model are theoretically analyzed and numerically tested. The reduction of its computational cost and storage requirement is discussed. Numerical examples including one-dimensional (1D) and two-dimensional (2D) cases are simulated, and the results are compared with the analytical solutions and those obtained by the high-resolution monotonic upstream schemes for conservation laws (MUSCL) scheme. To further verify the practicality of the model, two engineering cases of contaminant transport through soil into groundwater are investigated. It is shown that the solutions of the developed model are in good agreement with measured data.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

References

  1. Alvarado-Rodriguez CE, Sigalotti LDG, Klapp J (2019) Anisotropic dispersion with a consistent smoothed particle hydrodynamics scheme. Adv Water Resour 131:103374. https://doi.org/10.1016/j.advwatres.2019.07.004

    Article  Google Scholar 

  2. Bear J (1972) Dynamics of fluids in porous media. Dover, New York

    MATH  Google Scholar 

  3. Jankowski JA, Zielke W (2001) The mesoscale sediment transport due to technical activities in the deep sea. Deep Sea Research II 48(17–18):3487–3521. https://doi.org/10.1016/s0967-0645(01)00054-6

    Article  Google Scholar 

  4. Socio LMD, Salusti E (1975) Turbulent anisotropic diffusion in fluids. ZAMM-j Appl Math Mech 55(10):595–598. https://doi.org/10.1002/zamm.19750551007

    Article  MATH  Google Scholar 

  5. Liu GR, Liu MB (2003) Smoothed particle hydrodynamics. a meshfree particle method. World Scientific, Singapore

    Book  MATH  Google Scholar 

  6. Monaghan JJ (2012) Smoothed particle hydrodynamics and its diverse applications. Annu Rev Fluid Mech 44(1):323–346. https://doi.org/10.1146/annurev-fluid-120710-101220

    Article  MathSciNet  MATH  Google Scholar 

  7. Gingold RA, Monaghan JJ (1977) Smoothed particle hydrodynamics: theory and applications to non-spherical stars. Mon Not R Astron Soc 181(3):375–389. https://doi.org/10.1093/mnras/181.3.375

    Article  MATH  Google Scholar 

  8. Lucy LB (1977) A numerical approach to testing of the fission hypothesis. Astron J 82(12):1013–1024. https://doi.org/10.1086/112164

    Article  Google Scholar 

  9. Xu XY, Jiang YL, Yu P (2021) SPH simulations of 3D dam-break flow against various forms of the obstacle: toward an optimal design. Ocean Eng 229:108978. https://doi.org/10.1016/j.oceaneng.2021.108978

    Article  Google Scholar 

  10. Monaghan JJ (1994) Simulating free surface flows with SPH. J Comput Phys 110(2):399–406. https://doi.org/10.1006/jcph.1994.1034

    Article  MATH  Google Scholar 

  11. Shao SD, Lo EYM (2003) Incompressible SPH method for simulating Newtonian and non-Newtonian flows with a free surface. Adv Water Resour 26(7):787–800. https://doi.org/10.1016/s0309-1708(03)00030-7

    Article  Google Scholar 

  12. Pastor M, Haddad B, Sorbino G, Cuomo S, Drempetic V (2009) A depth-integrated, coupled SPH model for flow-like landslides and related phenomena. Int J Numer Anal Meth Geomech 33(2):143–172. https://doi.org/10.1002/nag.705

    Article  MATH  Google Scholar 

  13. Shi Y, Li SW, Chen HB, He M, Shao SD (2018) Improved SPH simulation of spilled oil contained by flexible floating boom under wave-current coupling condition. J Fluids Struct 76:272–300. https://doi.org/10.1016/j.jfluidstructs.2017.09.014

    Article  Google Scholar 

  14. Liu WY, Hou QZ, Lian JJ, Zhang AM, Dang J (2020) Coastal pollutant transport modeling using smoothed particle hydrodynamics with diffusive flux. Adv Water Resour 146:103764. https://doi.org/10.1016/j.advwatres.2020.103764

    Article  Google Scholar 

  15. Rasoul M, Gholamabbas B, Mahnaz G (2018) Numerical modeling of sediment transport based on unsteady and steady flows by incompressible smoothed particle hydrodynamics method. J Hydrodyn 30(5):928–942. https://doi.org/10.1007/s42241-018-0111-9

    Article  Google Scholar 

  16. Herrera PA, Massabo M, Beckie RD (2009) A meshless method to simulate solute transport in heterogeneous porous media. Adv Water Resour 32(3):413–429. https://doi.org/10.1016/j.advwatres.2008.12.005

    Article  Google Scholar 

  17. Avesani D, Herrera PA, Chiogna G, Bellin A, Dumbser M (2015) Smooth Particle Hydrodynamics with nonlinear Moving-Least-Squares WENO reconstruction to model anisotropic dispersion in porous media. Adv Water Resour 80:43–59. https://doi.org/10.1016/j.advwatres.2015.03.007

    Article  Google Scholar 

  18. Tran-Duc T, Bertevas E, Phan-Thien N, Khoo BC (2016) Simulation of anisotropic diffusion processes in fluids with smoothed particle hydrodynamics. Int J Numer Method Fluids 82(11):730–747. https://doi.org/10.1002/fld.4238

    Article  MathSciNet  Google Scholar 

  19. Espanol P, Revenga M (2003) Smoothed dissipative particle dynamics. Phys Rev E 67(2):026705. https://doi.org/10.1103/PhysRevE.67.026705

    Article  Google Scholar 

  20. Morris JP (1996). Analysis of Smoothed Particle Hydrodynamics with Application. Monash University.

  21. Liu MB, Liu GR, Lam KY (2003) Constructing smoothing functions in smoothed particle hydrodynamics with applications. J Comput Appl Math 155(2):263–284. https://doi.org/10.1016/s0377-0427(02)00869-5

    Article  MathSciNet  MATH  Google Scholar 

  22. Liu MB, Liu GR (2006) Restoring particle consistency in smoothed particle hydrodynamics. Appl Numer Math 56(1):19–36. https://doi.org/10.1016/j.apnum.2005.02.012

    Article  MathSciNet  MATH  Google Scholar 

  23. Sigalotti LDG, Klapp J, Rendon O, Vargas CA, Pena-Polo F (2016) On the kernel and particle consistency in smoothed particle hydrodynamics. Appl Numer Math 108:242–255. https://doi.org/10.1016/j.apnum.2016.05.007

    Article  MathSciNet  MATH  Google Scholar 

  24. Zhu QR, Hernquist L, Li YX (2015) Numerical convergence in smoothed particle hydrodynamics. Astrophys J 800(1):6–18. https://doi.org/10.1088/0004-637X/800/1/6

    Article  Google Scholar 

  25. Liu WK, Jun S, Zhang YF (1995) Reproducing kernel particle methods. Int J Numer Meth Fluids 20(8–9):1081–1106. https://doi.org/10.1002/fld.1650200824

    Article  MathSciNet  MATH  Google Scholar 

  26. Chen JK, Beraun JE (2000) A generalized smoothed particle hydrodynamics method for nonlinear dynamic problems. Comput Methods Appl Mech Eng 190(1–2):225–239. https://doi.org/10.1016/s0045-7825(99)00422-3

    Article  MATH  Google Scholar 

  27. Dehnen W, Aly H (2012) Improving convergence in smoothed particle hydrodynamics without pairing instability. Mon Not R Astron Soc 425(2):1068–1082. https://doi.org/10.1111/j.1365-2966.2012.21439.x

    Article  Google Scholar 

  28. Herrera PA, Beckie RD (2013) An assessment of particle methods for approximating anisotropic dispersion. Int J Numer Meth Fluids 71(5):634–651. https://doi.org/10.1002/fld.3676

    Article  MathSciNet  MATH  Google Scholar 

  29. Hou Q, Kruisbrink ACH, Pearce F, Tijsseling AS, Yue T (2014) Smoothed particle hydrodynamics simulations of flow separation at bends. Comput Fluids 90:138–146. https://doi.org/10.1016/j.compfluid.2013.11.019

    Article  MATH  Google Scholar 

  30. Harten A (1983) High resolution schemes for hypersonic conservation laws. J Comput Phys 49(3):357–393. https://doi.org/10.1016/0021-9991(83)90136-5

    Article  MathSciNet  MATH  Google Scholar 

  31. Pu JH, Cheng NS, Tan SK, Shao SD (2012) Source term treatment of SWEs using surface gradient upwind method. J Hydraul Res 50(2):145–153. https://doi.org/10.1080/00221686.2011.649838

    Article  Google Scholar 

  32. Hou JM, Liang QH, Zhang HB, Hinkelmann R (2014) Multislope MUSCL method applied to solve shallow water equations. Comput Math Appl 68(12):2012–2027. https://doi.org/10.1016/j.camwa.2014.09.018

    Article  MathSciNet  MATH  Google Scholar 

  33. Hou QZ, Wang Z, Dang JW, Lu WH, Cai YJ, Wei JG (2017) Simulation of heat conduction in fluids on GPU with particle method. Comput Syst Sci Eng 32(6):481–489

    Google Scholar 

  34. Cai Y, Wei J, Hou Q, Gao R (2022) An optimized GPU implementation of weakly-compressible SPH using CUDA-based strategies. Algorithms Arch Parallel Process 13155:354–369

    Google Scholar 

  35. Quigley RM, Rowe RK (1986) Leachate migration through clay below a domestic waste landfill, Sarnia, Ontario, Canada: chemical interpretation and modelling philosophies. Hazardous Ind Solid Waste Test Disp 6:93–103

    Google Scholar 

  36. Kumar RP, Dodagoudar GR (2010) Two-dimensional meshfree modelling of contaminant transport through saturated porous media using RPIM. Environ Earth Sci 61(2):341–353. https://doi.org/10.1007/s12665-009-0346-4

    Article  Google Scholar 

  37. Quigley RM, Fernandez F, Yanful E, Helgason T, Margaritis A, Whitby JL (1987) Hydraulic conductivity of contaminated natural clay directly below a domestic landfill. Can Geotech J 24(3):377–383. https://doi.org/10.1139/t87-048

    Article  Google Scholar 

  38. King KS, Quigley RM, Frenandez F, Reades DW, Bacopoulos A (1993) Hydraulic conductivity and diffusion monitoring of the Keele Valley Landfill liner, Maple, Ontario. Can Geotech J 30(1):124–134. https://doi.org/10.1139/t93-011

    Article  Google Scholar 

Download references

Acknowledgements

This study was supported by the National Key Research and Development Program of China (No. 2020YFC1807905), National Natural Science Foundation of China (No. 52079090) and Basic Research Program of Qinghai Province (No. 2022-ZJ-704).

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Qingzhi Hou or Alireza Karemat.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A: Stability analysis

In this appendix, the von Neumann analysis is applied to the SPH method for 1D advection–diffusion problems with diffusion coefficient \(k\). Suppose that the particles are uniformly distributed. When smoothing length is \(1 < h/ \Delta x \le 1.5\), the discrete format can be written as:

$$ c_{j}^{n + 1} = c_{j}^{n} + \frac{k\Delta t}{{\Delta x^{2} }}\left( {a_{ - 2} c_{j - 2}^{n} + a_{ - 1} c_{j - 1}^{n} + a_{0} c_{j}^{n} + a_{1} c_{j + 1}^{n} + a_{2} c_{j + 2}^{n} } \right). $$
(37)

Due to anti-symmetry of the kernel gradient, we have \(a_{ - 2} = a_{2} ,a_{ - 1} = a_{1} ,a_{0} = - 2\left( {a_{2} + a_{1} } \right),a_{2} \ge 0,a_{1} \ge 0\). According to von Neumann assumption, we know \(c_{j}^{n} = e^{ij\hbar \xi } ,\;c_{j - 1}^{n} = e^{{i\left( {j - 1} \right)\hbar \xi }} ,\;c_{j}^{n + 1} = Ge^{ij\hbar \xi }\) (\(\hbar = \Delta x\), \(i\) is the imaginary number unit). Substituting them into Eq. (37) gives

$$\begin{aligned} &Ge^{ij\hbar \xi } = e^{ij\hbar \xi } + \frac{k\Delta t}{{\Delta x^{2} }}\\ & \quad \left( {a_{ - 2} e^{{i\left( {j - 2} \right)\hbar \xi }} + a_{ - 1} e^{{i\left( {j - 1} \right)\hbar \xi }} + a_{0} e^{ij\hbar \xi } + a_{1} e^{{i\left( {j + 1} \right)\hbar \xi }} + a_{2} e^{{i\left( {j + 2} \right)\hbar \xi }} } \right)\end{aligned} $$
(38)
$$ G = 1 + \frac{k\Delta t}{{\Delta x^{2} }}\left( {a_{ - 2} e^{ - 2i\hbar \xi } + a_{ - 1} e^{ - i\hbar \xi } + a_{0} + a_{1} e^{i\hbar \xi } + a_{2} e^{2i\hbar \xi } } \right) $$
(39)
$$ G = 1 + \frac{k\Delta t}{{\Delta x^{2} }}\left( {a_{2} \left( {e^{ - 2i\hbar \xi } + e^{2i\hbar \xi } - 2} \right) + a_{1} \left( {e^{ - i\hbar \xi } + e^{i\hbar \xi } - 2} \right)} \right) $$
(40)
$$ G = 1 + \frac{k\Delta t}{{\Delta x^{2} }}\left( {a_{2} \left[ {\left( {e^{ - i\hbar \xi } + e^{i\hbar \xi } } \right)^{2} - 4} \right] + 2a_{1} \left( {\cos \left( {\hbar \xi } \right) - 1} \right)} \right) $$
(41)
$$ G = 1 + \frac{k\Delta t}{{\Delta x^{2} }}\left( {4a_{2} \left[ {\left( {\cos \left( {\hbar \xi } \right)} \right)^{2} - 1} \right] + 2a_{1} \left( {\cos \left( {\hbar \xi } \right) - 1} \right)} \right) $$
(42)

where \(G\) is the amplification factor.

According to the stability criterion of von Neumann, if the discrete form is stable, the amplification factor must satisfy the condition of \(|G| \le 1\), and then Eq. (42) can be transformed into:

$$ - 2 \le \frac{k\Delta t}{{\Delta x^{2} }}\left( {4a_{2} \left[ {\left( {\cos \left( {\hbar \xi } \right)} \right)^{2} - 1} \right] + 2a_{1} \left( {\cos \left( {\hbar \xi } \right) - 1} \right)} \right) \le 0. $$
(43)

With the setting \(\tau = \frac{k\Delta t}{{\Delta x^{2} }}\), Eq. (43) becomes:

$$ \tau \le \frac{1}{{2a_{2} \left[ {1 - \left( {\cos \left( {\hbar \xi } \right)} \right)^{2} } \right] + a_{1} \left( {1 - \cos \left( {\hbar \xi } \right)} \right)}} $$
(44)

Set \(\eta = 2a_{2} \left[ {1 - \left( {\cos \left( {\hbar \xi } \right)} \right)^{2} } \right] + a_{1} \left( {1 - \cos \left( {\hbar \xi } \right)} \right),\;\left( {\eta \ge 0} \right)\), and then \(\tau\) takes the minimum value when \(\eta\) takes the maximum value. After simplification, \(\eta\) can be obtained as:

$$ \eta = \left( {a_{1} + a_{2} + \frac{{a_{1}^{2} }}{{8a_{2} }}} \right) - 2a_{2} \left[ {\cos \left( {\hbar \xi } \right) + \frac{{a_{1} }}{{4a_{2} }}} \right]^{2} . $$
(45)

If \(a_{2} = 0\) or \(\frac{{a_{1} }}{{4a_{2} }} > 1\), \(\eta\) takes the maximum value when \(\cos (\hbar \xi ) = - 1\) and \(\tau \le \frac{1}{{2a_{1} }}\). If \(\frac{{a_{1} }}{{4a_{2} }} \le 1\), \(\eta\) takes the maximum value when \(\cos (\hbar \xi ) = - \frac{{a_{1} }}{{4a_{2} }}\) and \(\tau \le \frac{1}{{a_{1} + 2a_{2} + \frac{{a_{1}^{2} }}{{8a_{2} }}}}\). For the applied cubic spline kernel function, when \(h = \Delta x\), we have \(a_{2} = 0\), and when \(\Delta x < h \le 1.5\Delta x\), we have \(\frac{{a_{1} }}{{4a_{2} }} > 1\) as shown in Fig. 13

Fig. 13
figure 13

Variation of a1 and 4a2 against h/dx in SPH

. Therefore, the stability condition is \(\Delta t \le \frac{{\Delta x^{2} }}{{2ka_{1} }}\). Note that when the particles are not evenly distributed, the stability condition will be determined by the minimum particle spacing.

Appendix B: Corrective smoothed particle method (CSPM)

As a correction to the traditional SPH, corrective smoothed particle method (CSPM) is based on Taylor series expansion. Taking 1D case into consideration, firstly, the field function \(f(x)\) is expanded by Taylor expansion at particle \(i\) as

$$ f\left( x \right) = f\left( {x_{i} } \right) + \left( {x - x_{i} } \right)f^{\prime}\left( {x_{i} } \right) + \frac{{\left( {x - x_{i} } \right)^{2} }}{2!}f^{\prime\prime}\left( {x_{i} } \right) + \cdots $$
(46)

Then, multiplying the kernel function, and integrating in the support domain of particle \(i\) yields

$$ \int_{\Omega } {f\left( x \right)W_{i} {\rm d}x} = \int_{\Omega } {f\left( {x_{i} } \right)W_{i} {\rm d}x} + \int_{\Omega } {\left( {x - x_{i} } \right)f^{\prime}\left( {x_{i} } \right)} W_{i} {\rm d}x + \int_{\Omega } {\frac{{\left( {x - x_{i} } \right)^{2} }}{2}f^{\prime\prime}\left( {x_{i} } \right)W_{i} {\rm d}x} + \cdots $$
(47)

If the derivative terms contained in Eq. (47) are ignored, the corrected kernel approximation of the field function \(f(x)\) at particle \(i\) can be obtained as

$$ f\left( {x_{i} } \right) = \frac{{\int_{\Omega } {f\left( x \right)W_{i} {\rm d}x} }}{{\int_{\Omega } {W_{i} {\rm d}x} }}. $$
(48)

Similarly, if we substitute \(\nabla W\left( {x_{i} } \right) = \partial W\left( {x_{i} } \right)/\partial x\) for \(W_{i}\) in Eq. (47) and ignore the second-order derivative, then we can obtain the corrected kernel approximation of the first derivative at particle \(i\) as

$$ f^{\prime}\left( {x_{i} } \right) = \frac{{\int_{\Omega } {\left( {f\left( x \right) - f\left( {x_{i} } \right)} \right)\nabla W\left( {x_{i} } \right){\rm d}x} }}{{\int_{\Omega } {\left( {x - x_{i} } \right)\nabla W\left( {x_{i} } \right){\rm d}x} }}. $$
(49)

The above ideas can also be extended to higher-order derivative approximations. It can be seen from the above equations that the difference between CSPM and SPH lies in the construction of kernel approximation. In Eqs. (48) and (49), the denominator is the description of regularization properties of smoothing function, while the numerator is the traditional SPH expression. According to the above CSPM results, the corrected particle approximations can be obtained as:

$$ f\left( {x_{i} } \right) = \frac{{\sum\limits_{j = 1}^{N} {\frac{{m_{j} }}{{\rho_{j} }}f_{j} W_{ij} } }}{{\sum\limits_{j = 1}^{N} {\frac{{m_{j} }}{{\rho_{j} }}W_{ij} } }} $$
(50)
$$ f_{x} \left( {x_{i} } \right) = \frac{{\sum\limits_{j = 1}^{N} {\frac{{m_{j} }}{{\rho_{j} }}\left( {f_{j} - f_{i} } \right)\nabla W_{ij} } }}{{\sum\limits_{j = 1}^{N} {\frac{{m_{j} }}{{\rho_{j} }}\left( {x_{j} - x_{i} } \right)\nabla W_{ij} } }}. $$
(51)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hou, Q., Miao, C., Chen, S. et al. A Lagrangian particle model on GPU for contaminant transport in groundwater. Comp. Part. Mech. 10, 587–601 (2023). https://doi.org/10.1007/s40571-022-00495-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s40571-022-00495-5

Keywords

Navigation