Skip to main content
Log in

A modular lattice boltzmann solver for GPU computing processors

  • Published:
SeMA Journal Aims and scope Submit manuscript

Abstract

During the past two decades, the lattice Boltzmann method (LBM) has been increasingly acknowledged as a valuable alternative to classical numerical techniques (e.g. finite elements, finite volumes, etc.) in fluid dynamics. A distinguishing feature of LBM is undoubtedly its highly parallelizable data structure. In this work we present a general parallel LBM framework for graphic processing units (GPUs) characterized by a high degree of modularity and memory efficiency, still preserving very good computational performance. After recalling the essential programming principles of the CUDA C language for GPUs, the details of the implementation will be provided. The data structure here presented takes into account the intrinsic properties of the Gauss-Hermite quadrature rules (on which the LBM is based) to guarantee a unique and flexible framework for two- and three-dimensional problems. In addition, a careful implementation of a memory efficient formulation of the LBM algorithm has allowed to limit the high memory consumption that typically affects this computational method. Numerical examples in two and three dimensions illustrate the reliability and the performance of the code.

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.

Similar content being viewed by others

References

  1. C.K. Aidun and J.R. Clausen. Lattice-Boltzmann method for complex flows. Annu. Rev. Fluid Mech., 42:439–472, 2010.

    Article  MathSciNet  Google Scholar 

  2. S Ansumali. Minimal kinetic modeling of hydrodynamics. PhD thesis, ETH Zürich, 2004.

  3. P. Bailey, J. Myre, S.D.C. Walsh, D.J. Lilja, and M.O. Saar. Accelerating lattice Boltzmann fluid flow simulations using graphics processors. In 2009 International Conference on Parallel Processing, pages 550–557. IEEE, 2009.

    Chapter  Google Scholar 

  4. M. Bernaschi, M. Fatica, S. Melchionna, S. Succi, and E. Kaxiras. A flexible high-performance lattice Boltzmann GPU code for the simulations of fluid flows in complex geometries. Concurrency Computat.: Pract. Exper., 22(1):1–14, 2010.

    Article  Google Scholar 

  5. A. Caiazzo. Analysis of lattice Boltzmann initialization routines. Journal of statistical physics, 121(1):37–48, 2005.

    Article  MathSciNet  MATH  Google Scholar 

  6. C. Cercignani. Mathematical methods in kinetic theory. Plenum Press New York, 1969.

  7. P. Chen. The lattice Boltzmann method for fluid dynamics: theory and applications. Master’s thesis, EPFL, 2011.

  8. S. Chen and G.D. Doolen. Lattice Boltzmann method for fluid flows. Ann. Rev. Fluid Mech., 30:329–364, 1998.

    Article  MathSciNet  Google Scholar 

  9. B. Chopard and M. Droz. Cellular automata modeling of physical systems. Cambridge University Press Cambridge, UK, 1998.

    Book  MATH  Google Scholar 

  10. NVIDIA CUDA. Programming Guide, Version 4.0, 2011.

  11. D. d’Humières, I. Ginzburg, M. Krafczyk, P. Lallemand, and L.S. Luo. Multiple-relaxation-time lattice Boltzmann models in three-dimensions. Trans. R. Soc. Lond. A, 360(1792):437–451, 2002.

    Article  MATH  Google Scholar 

  12. C. Feichtinger, J. Habich, H. K´’ostler, G. Hager, U. Rüde, and G. Wellein. A flexible patch-based lattice boltzmann parallelization approach for heterogeneous gpu-cpu clusters. Parallel Computing, 37(9):536–549, 2011.

    Article  MathSciNet  Google Scholar 

  13. U. Ghia, K.N. Ghia, and C.T. Shin. High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. J. Comput. Phys., 48(3):387–411, 1982.

    Article  MATH  Google Scholar 

  14. J. Habich, T. Zeiser, G. Hager, and G. Wellein. Performance analysis and optimization strategies for a d3q19 lattice boltzmann kernel on nvidia gpus using cuda. Advances in Engineering Software, 42(5):266–272, 2011.

    Article  MATH  Google Scholar 

  15. F.J. Higuera and J. Jimenez. Boltzmann approach to lattice gas simulations. EPL (Europhysics Letters), 9:663–668, 1989.

    Article  Google Scholar 

  16. J. Hoberock and N. Bell. Thrust: A parallel template library, 2010. Version 1.3.0.

  17. P.H. Kao and R.J. Yang. An investigation into curved and moving boundary treatments in the lattice Boltzmann method. J. Comput. Phys., 227(11):5671–5690, 2008.

    Article  MathSciNet  MATH  Google Scholar 

  18. F. Kuznik, C. Obrecht, G. Rusaouen, and J.J. Roux. LBM based flow simulation using GPU computing processor. Comput. Math. Appl., 59(7):2380–2392, 2010.

    Article  MATH  Google Scholar 

  19. J. Lätt. How to implement your DdQq dynamics with only q variables per node (instead of 2q). Technical report, Tufts University, June 2007.

  20. J. Lätt. Hydrodynamic limit of lattice Boltzmann equations. PhD thesis, Geneva University, 2007.

  21. J. Lätt and B. Chopard. Lattice Boltzmann method with regularized non-equilibrium distribution functions. Math. Comp. Sim., 72:165–168, 2006.

    Article  Google Scholar 

  22. J. Lätt, B. Chopard, O. Malaspinas, M. Deville, and A. Michler. Straight velocity boundaries in the lattice Boltzmann method. Phys. Rev. E, 77:056703, 2008.

    Article  Google Scholar 

  23. O. Malaspinas. Lattice Boltzmann method for the simulation of viscoelastic fluid flows. PhD thesis, EPFL, 2009.

  24. K. Mattila, J. Hyväluoma, T. Rossi, M. Aspnäs, and J. Westerholm. An efficient swap algorithm for the lattice Boltzmann method. Comput. Phys. Commun., 176(3):200–210, 2007.

    Article  MATH  Google Scholar 

  25. K. Mattila, J. Hyväluoma, J. Timonen, and T. Rossi. Comparison of implementations of the lattice-Boltzmann method. Comput. Math. Appl., 55(7):1514–1524, 2008.

    Article  MathSciNet  MATH  Google Scholar 

  26. G.R. McNamara and G. Zanetti. Use of the Boltzmann equation to simulate lattice-gas automata. Phys. Rev. Lett., 61(20):2332–2335, Nov 1988.

    Article  Google Scholar 

  27. R. Mei, L.-S. Luo, P. Lallemand, and D. d’Humières. Consistent initial conditions for lattice Boltzmann simulations. Comp. Fluids, 35:855–862, 2006.

    Article  MATH  Google Scholar 

  28. R.R. Nourgaliev, T.N. Dinh, T.G. Theofanous, and D. Joseph. The lattice Boltzmann equation method: theoretical interpretation, numerics and implications. Int. J. Multiphase Flow, 29(1):117–169, 2003.

    Article  MATH  Google Scholar 

  29. C. Obrecht, F. Kuznik, B. Tourancheau, and J.J. Roux. A new approach to the lattice Boltzmann method for graphics processing units. Comput. Math. Appl., 2010.

    Google Scholar 

  30. C. Obrecht, F. Kuznik, B. Tourancheau, and J.J. Roux. The thelma project: A thermal lattice boltzmann solver for the gpu. Computers and Fluids, 54(0):118–126, 2012.

    Article  MathSciNet  Google Scholar 

  31. openCL. http://www.khronos.org/opencl/.

  32. B. Palmer and J. Nieplocha. Efficient algorithms for ghost cell updates on two classes of mpp architectures. In S.G. Akl and T. Gonzalez, editors, PDCS International Conference on Parallel and Distributed Computing Systems, pages 197–202. ACTA Press, Anaheim, CA, United States(US), 2002.

    Google Scholar 

  33. Y.H. Qian, D. d–Humieres, and P. Lallemand. Lattice BGK models for Navier-Stokes equation. EPL (Europhysics Letters), 17:479, 1992.

    Article  MATH  Google Scholar 

  34. S. Ryoo, C.I. Rodrigues, S.S. Baghsorkhi, S.S. Stone, David B. Kirk, and W.W. Hwu. Optimization principles and application performance evaluation of a multithreaded GPU using CUDA. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, PPoPP’ 08, pages 73–82, New York, NY, USA, 2008. ACM.

    Chapter  Google Scholar 

  35. M. Schulz, M. Krafczyk, J. Tölke, and E. Rank. Parallelization strategies and efficiency of CFD computations in complex geometries using lattice Boltzmann methods on high-performance computers. In High performance scientific and engineering computing: proceedings of the 3rd International FORTWIHR Conference on HPSEC, Erlangen, March 12–14, 2001, page 115. Springer Verlag, 2002.

    Google Scholar 

  36. X. Shan, X.-F. Yuan, and H. Chen. Kinetic theory representation of hydrodynamics: a way beyond the Navier-Stokes equation. J. Fluid Mech., 550:413–441, 2006.

    Article  MathSciNet  MATH  Google Scholar 

  37. S. Succi. The lattice Boltzmann equation for fluid dynamics and beyond. Oxford University Press, USA, 2001.

    MATH  Google Scholar 

  38. J. Tölke. Implementation of a Lattice Boltzmann kernel using the Compute Unified Device Architecture developed by nVIDIA. Comput. Visual. Sci., 13(1):29–39, 2010.

    Article  Google Scholar 

  39. J. Tölke and M. Krafczyk. TeraFLOP computing on a desktop PC with GPUs for 3D CFD. Int. J. Comput. Fluid. Dynam., 22(7):443–456, 2008.

    Article  MATH  Google Scholar 

  40. G. Wellein, T. Zeiser, G. Hager, and S. Donath. On the single processor performance of simple lattice Boltzmann kernels. Computers & Fluids, 35(8–9):910–919, 2006.

    Article  MATH  Google Scholar 

  41. D.A. Wolf-Gladrow. Lattice-gas cellular automata and lattice Boltzmann models: an introduction, volume 1725 of Lecture Notes in Mathematics. Springer, 2000.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to A. Quarteroni.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Astorino, M., Sagredo, J.B. & Quarteroni, A. A modular lattice boltzmann solver for GPU computing processors. SeMA 59, 53–78 (2012). https://doi.org/10.1007/BF03322610

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03322610

Keywords

Navigation