Hostname: page-component-78c5997874-fbnjt Total loading time: 0 Render date: 2024-11-18T01:15:40.507Z Has data issue: false hasContentIssue false

Developing Extensible Lattice-Boltzmann Simulators for General-Purpose Graphics-Processing Units

Published online by Cambridge University Press:  03 June 2015

Stuart D. C. Walsh*
Affiliation:
Lawrence Livermore National Laboratory, Livermore, California, USA., †
Martin O. Saar*
Affiliation:
Department of Earth Sciences, University of Minnesota, Minneapolis, Minnesota, USA
*
Corresponding author.Email:walsh24@llnl.gov
Get access

Abstract

Lattice-Boltzmann methods are versatile numerical modeling techniques capable of reproducing a wide variety of fluid-mechanical behavior. These methods are well suited to parallel implementation, particularly on the single-instruction multiple data (SIMD) parallel processing environments found in computer graphics processing units (GPUs).

Although recent programming tools dramatically improve the ease with which GPUbased applications can be written, the programming environment still lacks the flexibility available to more traditional CPU programs. In particular, it may be difficult to develop modular and extensible programs that require variable on-device functionality with current GPU architectures.

This paper describes a process of automatic code generation that overcomes these difficulties for lattice-Boltzmann simulations. It details the development of GPU-based modules for an extensible lattice-Boltzmann simulation package – LBHydra. The performance of the automatically generated code is compared to equivalent purposewritten codes for both single-phase,multiphase, andmulticomponent flows. The flexibility of the new method is demonstrated by simulating a rising, dissolving droplet moving through a porous medium with user generated lattice-Boltzmann models and subroutines.

Type
Research Article
Copyright
Copyright © Global Science Press Limited 2013

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

[1]Chen, S., Doolen, G., Lattice Boltzmann method for fluid flows, Annu. Rev. Fluid Mech 30 (1) (1998) 329364.Google Scholar
[2]Succi, S., The Lattice Boltzmann Equation for Fluid Dynamics and Beyond, Oxford Univ. Press, Oxford, 2001.Google Scholar
[3]Aidun, C. K., Clausen, J. R., Lattice-Boltzmann method for complex flows, Annual Review of Fluid Mechanics 42 (1) (2010) 439472.Google Scholar
[4]Sukop, M., Thorne, D., Lattice Boltzmann Modeling: An introduction for geoscientists and engineers, Springer, Heidelberg, Berlin, New York, 2006.CrossRefGoogle Scholar
[5]Tölke, J., Krafczyk, M., Teraflop computing on a desktop PC with GPUs for 3D CFD, International Journal of Computational Fluid Dynamics 22 (2008) 443456.Google Scholar
[6]Tölke, J., Implementation of a Lattice Boltzmann kernel using the Compute Unified Device Architecture developed by nVIDIA, Computing and Visualisation in Science (2008) 11 pages.Google Scholar
[7]Bailey, P., Myre, J., Walsh, S. D. C., Saar, M. O., Lilja, D. J., Accelerating lattice Boltzmann fluid flow simulations using graphics processors, International Conference on Parallel Processing: Vienna, Austria (ICPP 2009).Google Scholar
[8]Walsh, S. D. C., Saar, M. O., Bailey, P., Lilja, D. J., Accelerating Geoscience and Engineering System Simulations on Graphics Hardware, Computers and Geosciences 35 (12) (2009) 23532364.Google Scholar
[9]Li, W., Wei, X., Kaufman, A., Implementing lattice Boltzmann computation on graphics hardware. The Visual Computer 2003; 19:444456.Google Scholar
[10]Owens, J. D., Luebke, D., Govindaraju, N., Harris, M., Kruger, J., Lefohn, A. E., Purcell, T. J.A survey of general-purpose computation on graphics hardware. Computer Graphics Forum 2007; 26(1):p80113.Google Scholar
[11]Buck, I., Foley, T., Horn, D., Sugerman, J., Fatahalian, K., Houston, M., Hanrahan, P., Brook for GPUs: stream computing on graphics hardware. SIGGRAPH ’04: ACM SIGGRAPH 2004 Papers, ACM: New York, NY, USA, 2004; 777786.Google Scholar
[12] AMD. ATI CTM Guide: Technical Reference Manual. AMD, 1.01 edn. 2006.Google Scholar
[13] NVIDIA CUDA C Programming Guide 3.3.1, nVIDIA, (2010).Google Scholar
[14]Khronos OpenCL Working Group. The OpenCL specification version 1.0. Technical Report 2009.Google Scholar
[15]Bell, N., Hoberok, J., Thrust: A Productivity-Oriented Library for CUDA, in GPU Computing Gems, Jade Edition, Edited by Wen-mei W. Hwu, 2011: pp. 359371.Google Scholar
[16]Myre, J., Walsh, S. D. C., Lilja, D., Saar, M. O., Performance analysis of single-phase, multi-phase, and multicomponent lattice-Boltzmann fluid flow simulations on GPU clusters, Con-currency Computat.: Pract. Exper., 23 (4) (2011) 332350.Google Scholar
[17]Walsh, S. D. C., Saar, M. O., Macroscale lattice-Boltzmann methods for low-Peclet-number solute and heat transport in heterogeneous porous media., Water Resour. Res. 46 (2010) W07517.Google Scholar
[18]Davis, M. A., Walsh, S. D. C., Saar, M. O., Statistically reconstructing continuous isotropic and anisotropic two-phase media while preserving macroscopic material properties, Phys. Rev. E 83 (2011)026706.Google Scholar
[19]Walsh, S. D. C., Saar, M. O., Interpolated lattice boltzmann boundary conditions for surface reaction kinetics, Phys. Rev. E 82 (6) (2010) 066703.Google Scholar
[20]Walsh, S. D. C., Burwinkle, H., Saar, M. O., A new partial-bounceback lattice-Boltzmann method for fluid flow through heterogeneous media, Computers and Geoscience 35 (6) (2009) 11861193.Google Scholar
[21]Boltzmann, L., Weitere Studien liber das Warmegleichgewicht unter Gasmolekulen [Further studies on the heat equilibrium of gas molecules], Wiener Berichte 66 (1872) 275370.Google Scholar
[22]Qian, Y. H., D’Humières, D., Lallemand, P., Lattice BGK models for Navier-Stokes equation, Europhys. Lett. 17 (6) (1992) 479484.Google Scholar
[23]Barker, K. J., Davis, K., Hoisie, A., Kerbyson, D. J., Lang, M., Pakin, S., Sancho, J. C., Entering the petaflop era: the architecture and performance of roadrunner. Proceedings of the 2008 ACM/IEEE conference on Supercomputing, IEEE Press: Piscataway, NJ, USA, 2008; 111.Google Scholar
[24]Shan, X., Chen, H., Lattice Boltzmann model for simulating flows with multiple phases and components, Phys. Rev. E 47 (3) (1993) 18151819.Google Scholar
[25]He, X., Doolen, G. D., Thermodynamic foundations of kinetic theory and lattice Boltzmann models for multiphase flows, Journal of Statistical Physics 107 (1) (2002) 309328.CrossRefGoogle Scholar
[26]Ryoo, S., Rodrigues, C. I., Stone, S. S., Sara S. Baghsorkhi, S.-Z. U., Stratton, J. A., W. mei, W. Hwu, Program optimization space pruning for a multithreaded GPU, in: Proceedings of the 2008 ACM/IEEE conference on Supercomputing, IEEE Press, Piscataway, NJ, USA, 2008, pp. 111.Google Scholar
[27]Jang, B., Do, S., Pien, H., Kaeli, D., Architecture-aware optimization targeting multithreaded stream computing, in: GPGPU-2: Proceedings of 2nd Workshop on General Purpose Processing on Graphics Processing Units, ACM, New York, NY, USA, 2009, pp. 6270.Google Scholar
[28]Zhang, E. Z., Jiang, Y., Guo, Z., Shen, X., Streamlining gpu applications on the fly: thread divergence elimination through runtime thread-data remapping, in: Proceedings of the 24th ACM International Conference on Supercomputing, ICS ’10, ACM, New York, NY, USA, 2010, pp.115126.Google Scholar
[29]Wu, L., Tsutahara, M., Kim, L., Ha, M., Three-dimensional lattice boltzmann simulations of droplet formation in a cross-junction microchannel, Int. J. Multiphas. Flow 34 (9) (2008) 852864.Google Scholar
[30]Scardovelli, R., Zaleski, S., Direct numerical simulation of free-surface and interfacial flow, Annu. Rev. Fluid Mech 31 (1) (1999) 567603.Google Scholar
[31]Wagner, A. J., The Origin of Spurious Velocities in Lattice Boltzmann, Int. J. Modern Phys. B 17 (2003) 193196.Google Scholar