On-site boundary conditions are often desired for lattice Boltzmann simulations of fluid flow in complex geometries such as porous media or microfluidic devices. The possibility to specify the exact position of the boundary, independent of other simulation parameters, simplifies the analysis of the system. For practical applications it should allow to freely specify the direction of the flux, and it should be straight forward to implement in three dimensions. Furthermore, especially for parallelized solvers it is of great advantage if the boundary condition can be applied locally, involving only information available on the current lattice site. We meet this need by describing in detail how to transfer the approach suggested by Zou and He to a D3Q19 lattice. The boundary condition acts locally, is independent of the details of the relaxation process during collision and contains no artificial slip. In particular, the case of an on-site no-slip boundary condition is naturally included. We test the boundary condition in several setups and confirm that it is capable to accurately model the velocity field up to second order and does not contain any numerical slip.
We present Sailfish, an open source fluid simulation package implementing the lattice Boltzmann method (LBM) on modern Graphics Processing Units (GPUs) using CUDA/OpenCL. We take a novel approach to GPU code implementation and use run-time code generation techniques and a high level programming language (Python) to achieve state of the art performance, while allowing easy experimentation with different LBM models and tuning for various types of hardware. We discuss the general design principles of the code, scaling to multiple GPUs in a distributed environment, as well as the GPU implementatio…
A sparse octree based parallel implementation of the lattice Boltzmann method for non-uniform meshes is presented in this paper. To couple grids of different resolutions, a second order accurate compact interpolation is employed and further extended into three dimensions. This compact interpolation requires only four source elements from the adjacent level for both two- and three dimensions. Thus, it reduces the computational and communication overhead in parallel executions. Moreover, the implementation of a weight based domain decomposition algorithm and level-wise elements arrangement are e…
We investigate the performance of the HemeLB lattice-Boltzmann simulator for cerebrovascular blood flow, aimed at providing timely and clinically relevant assistance to neurosurgeons. HemeLB is optimised for sparse geometries, supports interactive use, and scales well to 32,768 cores for problems with ~81 million lattice sites. We obtain a maximum performance of 29.5 billion site updates per second, with only an 11% slowdown for highly sparse problems (5% fluid fraction). We present steering and visualisation performance measurements and provide a model which allows users to predict the perfor…
We analyze the Lattice Boltzmann method for the simulation of fluctuating hydrodynamics by Adhikari et al. [Europhys. Lett. 71, 473 (2005)] and find that it shows excellent agreement with theory even for small wavelengths as long as a stationary system is considered. This is in contrast to other finite difference and older lattice Boltzmann implementations that show convergence only in the limit of large wavelengths. In particular cross correlators vanish to less than 0.5%. For larger mean velocities, however, Galilean invariance violations manifest themselves through errors of a magnitude sim…
We propose a single-step simplified lattice Boltzmann algorithm capable of performing magnetohydrodynamic (MHD) flow simulations in pipes for very small values of magnetic Reynolds numbers $R_m$. In some previous works, most lattice Boltzmann simulations are performed with values of $R_m$ close to the Reynolds numbers for flows in simplified rectangular geometries. One of the reasons is the limitation of some traditional lattice Boltzmann algorithms in dealing with situations involving very small magnetic diffusion time scales associated with most industrial applications in MHD, which require …
In the frame of the Boltzmann equation, wall-bounded flows of rarefied gases require the implementation of boundary conditions at the kinetic level. Such boundary conditions induce a discontinuity in the distribution function with respect to the component of the momentum which is normal to the boundary. Expanding the distribution function with respect to half-range polynomials allows this discontinuity to be captured. The implementation of this concept has been reported in the literature only for force-free flows. In the case of general forces which can have non-zero components in the directio…
The pseudopotential multiphase lattice Boltzmann (LB) model is a very popular model in the LB community for simulating multiphase flows. When the multiphase modeling involves a solid boundary, a numerical scheme is required to simulate the contact angle at the solid boundary. In this work, we aim at investigating the implementation of contact angles in the pseudopotential LB simulations with curved boundaries. In the pseudopotential LB model, the contact angle is usually realized by employing a solid-fluid interaction or specifying a constant virtual wall density. However, it is shown that the…
Immersed boundary-lattice Boltzmann method (IB-LBM) has been widely used for simulation of particle-laden flows recently. However, it was limited to small-scale simulations with no more than O(103) particles. Here, we expand IB-LBM for massive particle-laden flows with more than O(104) particles by two sequential works. First is the Part I: serial computing on a single CPU core and following the Part II: parallel computing on many CPU cores. In this Part I paper, a highly efficient and localized implementation of IB-LBM is proposed for serial computing. We optimize in three main aspects: swap …
The lattice Boltzmann method has become a standard technique for simulating a wide range of fluid flows. However, the intrinsic coupling of momentum and space discretization restricts the traditional lattice Boltzmann method to regular lattices. Alternative off-lattice Boltzmann schemes exist for both single- and multiphase flows that decouple the velocity discretization from the underlying spatial grid. The current study extends the applicability of these off-lattice methods by introducing a finite element formulation that enables simulating contact line dynamics for partially wetting fluids.…
The lattice Boltzmann method has become a standard for efficiently solving problems in fluid dynamics. While unstructured grids allow for a more efficient geometrical representation of complex boundaries, the lattice Boltzmann methods is often implemented using regular grids. Here we analyze two implementations of the lattice Boltzmann method on unstructured grids, the standard forward Euler method and the operator splitting method. We derive the evolution of the macroscopic variables by means of the Chapman-Enskog expansion, and we prove that it yields the Navier-Stokes equation and is first …
The implementation of the kinetic diffuse boundary condition with the characteristic streaming-collision mechanism is studied for the high-order lattice Boltzmann (LB) models. The obtained formulation is also tested and validated numerically for three high-order LB models for both isothermal and thermal Couette flows. The streaming-collision mechanism ensures that high-order LB models can retain particle feature while go beyond the Navier-Stokes hydrodynamics.
In this paper, the energy non-conservation problem of the hybrid thermal LB phase change model is emphasized. To solve this problem, an infinite volume discrete scheme is introduced to deal with the diffusion term in the energy equation. After verified this model with energy conservation law in the simulation of the one-dimensional heat conduction across the liquid-vapor interface and the liquid film evaporation on the heating wall, the improved hybrid thermal LB model is then applied in the simulation of bubble nucleation and boiling heat transfer. With an innovative nucleation site treatment…
We investigate the coupled dynamics of quantized vortices and normal fluid in superfluid $^4$He at finite temperatures using a numerical approach based on the vortex filament model (VFM) and lattice Boltzmann method (LBM). The LBM allows us to simulate a fluid flow with only local operations, i .e., rather than solving the Navier--Stokes (NS) equations directly; a fluid flow is considered a convection of mesoscopic particles between sites on a lattice grid. Although the two-fluid nature of He II makes its flow complex, the particle-like treatment of the normal fluid in the LBM significantly re…
The spurious currents observed in multiphase flow simulations with pseudo-potential lattice Boltzmann (LB) models are usually understood to be the result of the lack of isotropy of the model-generated interaction force between phases. Remedies have been proposed to utilize larger stencils to compute the interaction force with higher orders of isotropy. In this short communication, we point out the incompleteness in the current understanding and propose a new consistent implementation to more effectively suppress the spurious currents. We also demonstrate theoretically that certain low-level sp…
Lattice-Boltzmann (LB) simulations are a common tool to numerically estimate the permeability of porous media. For valuable results, the porous structure has to be well resolved resulting in a large computational effort as well as high memory demands. In order to estimate the permeability of realistic samples, it is of importance to not only implement very efficient codes, but also to choose the most appropriate simulation setup to achieve accurate results. With the focus on accuracy and computational effort, we present a comparison between different methods to apply an effective pressure grad…
In this paper, we present TLBfind, a GPU code for simulating the hydrodynamics of droplets along with a dynamic temperature field. TLBfind hinges on a two-dimensional multi-component lattice Boltzmann (LB) model simulating a concentrated emulsion with finite-size droplets evolving in a thermal convective state, just above the transition from conduction to convection. The droplet concentration of the emulsion system is tenable, and at the core of the code lies the possibility to measure a large number of physical observables characterising the flow and droplets. Furthermore, TLBfind includes a …
The implementation of boundary conditions is among the most challenging parts of modeling fluid flow through channels and complex media. Here, we show that the existing methods to deal with liquid-wall interactions using multicomponent Lattice Boltzmann are accurate when the wall is aligned with the main axes of the lattice but fail otherwise. To solve this problem, we extend a strategy previously developed for multiphase models. As an example, we study the coalescence of two droplets on a curved surface in two dimensions. The strategy proposed here is of special relevance for binary flows in …
Over the last two decades, lattice Boltzmann methods have become an increasingly popular tool to compute the flow in complex geometries such as porous media. In addition to single phase simulations allowing, for example, a precise quantification of the permeability of a porous sample, a number of extensions to the lattice Boltzmann method are available which allow to study multiphase and multicomponent flows on a pore scale level. In this article we give an extensive overview on a number of these diffuse interface models and discuss their advantages and disadvantages. Furthermore, we shortly r…
We present a new derivation of the momentum exchange method to compute the flow force and torque on a submerged body in lattice Boltzmann methods. Our derivation does not depend on a particular implementation of the boundary conditions at the body surface and relies on general principles. We recover some well known expressions, in some cases with slight corrections, to treat the cases of static and moving bodies. We also present some numerical tests that support the correctness of the formulas derived.
A high-performance implementation of a multiphase lattice Boltzmann method based on the conservative Allen-Cahn model supporting high-density ratios and high Reynolds numbers is presented. Metaprogramming techniques are used to generate optimized code for CPUs and GPUs automatically. The coupled model is specified in a high-level symbolic description and optimized through automatic transformations. The memory footprint of the resulting algorithm is reduced through the fusion of compute kernels. A roofline analysis demonstrates the excellent efficiency of the generated code on a single GPU. The…
Many numerical studies of blood flow impose a rigid wall assumption due to the simplicity of its implementation compared to a full coupling to a solid mechanics model. In this paper, we present a localised method for incorporating the effects of elastic walls into blood flow simulations using the lattice Boltzmann method. We demonstrate that our approach is able to more accurately capture the flow behaviour expected in an elastic walled vessel than a rigid wall model and achieves this without a loss of computational performance. We also demonstrate that our approach can capture trends in wall …
Droplets on hydrophobic surfaces are ubiquitous in microfluidic applications and there exists a number of commonly used multicomponent and multiphase lattice Boltzmann schemes to study such systems. In this paper we focus on a popular implementation of a multicomponent model as introduced by Shan and Chen. Here, interactions between different components are implemented as repulsive forces whose strength is determined by model parameters. In this paper we present simulations of a droplet on a hydrophobic surface. We investigate the dependence of the contact angle on the simulation parameters an…
Well designed lattice-Boltzmann codes exploit the essentially embarrassingly parallel features of the algorithm and so can be run with considerable efficiency on modern supercomputers. Such scalable codes permit us to simulate the behaviour of increasingly large quantities of complex condensed matter systems. In the present paper, we present some preliminary results on the large scale three-dimensional lattice-Boltzmann simulation of binary immiscible fluid flows through a porous medium derived from digitised x-ray microtomographic data of Bentheimer sandstone, and from the study of the same f…
Simulating mobile liquid-gas interfaces with the free-surface lattice Boltzmann method (FSLBM) requires frequent re-initialization of fluid flow information in computational cells that convert from gas to liquid. The corresponding algorithm, here referred to as the refilling scheme, is crucial for the successful application of the FSLBM in terms of accuracy and numerical stability. This study compares five refilling schemes that extract information from the surrounding liquid and interface cells by averaging, extrapolating, or assuming one of the three different equilibrium states. Six numeric…
Numerical codes using the Lattice Boltzmann Methods (LBM) for simulating one- or two-phase flows are widely compiled and run on graphical process units. However, those computational units necessitate to re-write the program by using a low-level language which is suited to those architectures (e.g. CUDA for GPU NVIDIA or OpenCL). In this paper we focus our effort on the performance portability of LBM i.e. the possibility of writing LB algorithms with a high-level of abstraction while remaining efficient on a wide range of architectures such as multicores x86, GPU NVIDIA, ARM, and so on. For suc…
Adaptive near-contact repulsion in conservative Allen-Cahn phase-field lattice Boltzmann multiphase model
Roma Tre University(罗马第三大学);Pontifícia Universidade Católica do Paraná(巴拉那天主教大学);Istituto per le Applicazioni del Calcolo, Consiglio Nazionale delle Ricerche(意大利国家研究委员会计算应用研究所);Center for Life Nano- & Neuro-Science, Fondazione Istituto Italiano di Tecnologia(意大利理工大学基金会生命纳米与神经科学中心);PoreLab, Department of Physics, Norwegian University of Science and Technology(挪威科技大学物理系孔隙实验室)
The present work investigates the application of Artificial Neural Networks (ANNs) to estimate the Reynolds ($Re$) number for flows around a cylinder. The data required to train the ANN was generated with our own implementation of a Lattice Boltzmann Method (LBM) code performing simulations of a 2-dimensional flow around a cylinder. As results of the simulations, we obtain the velocity field ($\vec{v}$) and the vorticity ($\vec{\nabla}\times\vec{v}$) of the fluid for 120 different values of $Re$ measured at different distances from the obstacle and use them to teach the ANN to predict the $Re$…
The lattice Boltzmann method has been successfully applied for the simulation of flow through porous media in the creeping regime. Its technical properties, namely discretization, straightforward implementation and parallelization, are responsible for its popularity. However, flow through porous media is not restricted to near zero Reynolds numbers since inertial effects play a role in numerous natural and industrial processes. In this paper we investigate the capability of the lattice Boltzmann method to correctly describe flow in porous media at moderate Reynolds numbers. The selection of th…
Lattice Boltzmann method models offer a novel framework for the simulation of high Reynolds number dilute gravity currents. The numerical algorithm is well suited to acceleration via implementation on massively parallel computer architectures. Here we present two lattice Boltzmann method models of lock-exchange dilute gravity currents, in which the largest turbulent length scales are directly resolved. The three-dimensional simulations are accelerated by exporting computations to a graphics processing unit and are validated against experiments and high-resolution simulations for Reynolds numbe…
We determine properties of the lattice Boltzmann method for semiclassical fluids, which is based on the Boltzmann equation and the equilibrium distribution function is given either by the Bose-Einstein or the Fermi-Dirac ones. New D-dimensional polynomials, that generalize the Hermite ones, are introduced and we find that the weight that renders the polynomials orthonormal has to be approximately equal, or equal, to the equilibrium distribution function itself for an efficient numerical implementation of the lattice Boltzmann method. In light of the new polynomials we discuss the convergence o…
High-resolution porous structures of catalyst layer (CL) with multicomponent in proton exchange membrane fuel cells are reconstructed using a reconstruction method called quartet structure generation set. Characterization analyses of nanoscale structures are implemented including pore size distribution, specific area and phase connectivity. Pore-scale simulation methods based on the lattice Boltzmann method are developed and used to predict the macroscopic transport properties including effective diffusivity and proton conductivity. Nonuniform distributions of ionomer in CL generates more tort…
We explore possible applications of the Lattice-Boltzmann Method for the simulation of geophysical flows. This fluid solver, while successful in other fields, is still rarely used for geotechnical applications. We show how the standard method can be modified to represent free-surface realization of mudflows, debris flows, and in general any plastic flow, through the implementation of a Bingham constitutive model. The chapter is completed by an example of a full-scale simulation of a plastic fluid flowing down an inclined channel and depositing on a flat surface. An application is given, where …
We review the lattice-Boltzmann (LB) method coupled with the immersed boundary (IB) method for the description of combined flow of particulate suspensions with immersed elastic objects. We describe the implementation of the combined LB-IB method into the open-source package ESPResSo. We present easy-to-use structures used to model a closed object in a simulation package, the definition of its elastic properties, and the interaction between the fluid and the immersed object. We also present the test cases with short examples of the code explaining the functionality of the new package.
We extend a recently proposed ternary free energy lattice Boltzmann model with high density contrast, by incorporating wetting boundaries at solid walls. The approaches are based on forcing and geometric schemes, with implementations optimised for ternary (and more generally higher order multicomponent) models. Advantages and disadvantages of each method are addressed by performing both static and dynamic tests, including the capillary filling dynamics of a liquid displacing the gas phase, and the self-propelled motion of a train of drops. Furthermore, we measure dynamic angles and show that t…
This work introduces a numerical approach and implementation for the direct coupling of arbitrary complex ordinary differential equation- (ODE-)governed zero-dimensional (0D) boundary conditions to three-dimensional (3D) lattice Boltzmann-based fluid-structure systems for hemodynamics studies. In particular, a most complex configuration is treated by considering a dynamic left ventricle- (LV-)elastance heart model which is governed by (and applied as) a nonlinear, non-stationary hybrid ODE-Dirichlet system. Other ODE-based boundary conditions, such as lumped parameter Windkessel models for tru…
The characteristics of the hydro-thermal flow which occurs when a cold fluid is injected into a hot fractured bedrock depend on the morphology of the fracture. We consider a sharp triangular asperity, invariant in one direction, perturbing an otherwise flat fracture. We investigate its influence on the macroscopic hydraulic transmissivity and heat transfer efficiency, at fixed low Reynolds number. In this study, numerical simulations are done with a coupled lattice Boltzmann method that solves both the complete Navier-Stokes and advection-diffusion equations in three dimensions. The results ar…