# Enhancing Computational Precision for Lattice Boltzmann Schemes in Porous Media Flows

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Method

**u**are obtained from the distribution function

**f**(

**x**, t)

**g**is a body-force, and

**e**

_{i}is the ith of the 19 velocity vectors at each node (Figure 1) which are defined as

**f**

^{Eq}(ρ,

**u**) and forcing term

**F**are then computed from the density and velocity of the node where the components are [21]

_{i}is the weight coefficient for the corresponding velocity vector, given by w

_{0}= 1/3, w

_{1−7}= 1/18, w

_{8−18}= 1/36 and

**I**is the identity matrix.

**f**′(

**x**, t) is computed using the MRT operator

**M**is the orthogonal matrix which transforms the distribution function into moment space and

**M**

^{−1}is its inverse.

**S**is the diagonal matrix of relaxation rates for each moment. Full details of the MRT model can be found in [13]. Finally, the post-collisional distribution is streamed to the neighbouring nodes

^{−7}the largest value in the negation. For a node with a small velocity, and distribution close to the zero-velocity (equilibrium) distribution

**f**

^{0}(ρ

_{0}= 1,

**u**

_{0}=

**0**), defined in D3Q19 by

^{−2}) ⋅ 10

^{−7}= 10

^{−9}can be resolved at all, and the calculation is verifiably unstable when velocities are less than 10

^{−7}since only a few decimal places accuracy is maintained.

**f**(

**x**, t), we define a perturbation d

**f**from the zero-velocity distribution in the following way, as was suggested by Skordos [5]

**f**

^{0}(ρ

_{0},

**u**

_{0}) with ρ

_{0}= 1 and

**u**

_{0}=

**0**, and a perturbation d

**f**. The appropriateness of this transformation rests on the lattice Boltzmann algorithm being memory-bandwidth-limited. This means that it would be preferable to compute the full distribution function locally by adding together ${\mathit{f}}_{dbl}^{0}$ and d

**f**

_{flt}using double precision arithmetic (and where the subscripts dbl and flt express the variable’s data type), storing d

**f**as a single-precision (float) data type in the main memory. However, even this is unnecessary if we transform the macroscopic quantities

**f**is

**0**, so these differences are not bound by the order of magnitude of the calculation values, and are computed to full 7 d.p. accuracy. Note that the expression for the local density is still bound by the order 10

^{0}.

**f**

^{Eq}−

**f**which arises in the collision term should be considered as well to maximise the accuracy of the calculation. Writing this in terms of the deviation distribution d

**f**, and using the subscripts dbl and flt to indicate the precision (double and single respectively) to which the variables might be stored or calculated, we obtain

^{−1}, but the difference often considerably smaller.

**f**

^{Eq}=

**f**

^{Eq}(ρ,

**u**) −

**f**

^{0}(ρ

_{0},

**u**

_{0}) such that

_{0}will be small relative to the density values of order 10

^{0}. However, this calculation can be made more accurate if we identify the following

## 3. Results

^{6}time-steps. The error is shown in Figure 3 for the distribution and perturbation methods using respectively float (single-precision) data types and double (precision) data types. The body force used was g = 10

^{−6}in dimensionless lattice units (Lu) and the viscosity $\mu =\frac{1}{6}$ For this system, the perturbation methods are consistently 2 to 3 orders of magnitude more accurate than the distribution method of the same data type, though the perturbation method with float precision cannot match the accuracy of the double-precision distribution method in this calculation.

^{–11}.

^{3}lattice units in size, but reflected about the x = 0 plane to give continuous loop boundary conditions so that a body-force may be used [10]. The structure of the pore-space is highly heterogeneous and of low permeability. The body-force used was again g

_{x}= 10

^{−6}and the viscosity $\mu =\frac{1}{6}$.

## 4. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- He, X.; Luo, L.-S. Theory of the lattice Boltzmann method: From the Boltzmann equation to the lattice Boltzmann equation. Phys. Rev. E
**1997**, 56, 6811. [Google Scholar] [CrossRef] - Sukop, M.C.; Thorne, D.T., Jr. Lattice Boltzmann Modeling: An Introduction for Geoscientists and Engineers; Springer Publishing Company: Berlin, Germany, 2007. [Google Scholar]
- Kang, Q.; Lichtner, P.C.; Viswanathan, H.S.; Abdel-Fattah, A.I. Pore Scale Modeling of Reactive Transport Involved in Geologic CO
_{2}Sequestration. Transp. Porous Media**2009**, 82, 197–213. [Google Scholar] [CrossRef] - Bösch, F.; Chikatamarla, S.S.; Karlin, I.V. Entropic Multi-Relaxation Models for Turbulent Flows. Phys. Rev. E
**2015**, 92, 043309. [Google Scholar] [CrossRef] [PubMed] - Skordos, P. Initial and boundary conditions for the lattice Boltzmann method. Phys. Rev. E
**1993**, 48, 4823. [Google Scholar] [CrossRef] - FlowKit Ltd. Palabos CFD; FlowKit Ltd.: Lausanne, Switzerland, 2011. [Google Scholar]
- Krause, M.J. OpenLB. 2014. Available online: http://optilb.com/openlb/ (accessed on 14 February 2016).
- Dellar, P.J. Incompressible limits of lattice Boltzmann equations using multiple relaxation times. J. Comput. Phys.
**2003**, 190, 351–370. [Google Scholar] [CrossRef] - Crawshaw, J.P.; Boek, E.S. Multi-scale imaging and simulation of structure, flow and reactive transport for CO
_{2}storage and EOR in carbonate reservoirs. Rev. Mineral. Geochem.**2013**, 77, 431–458. [Google Scholar] [CrossRef] - Yang, J.; Crawshaw, J.; Boek, E.S. Quantitative determination of molecular propagator distributions for solute transport in homogeneous and heterogeneous porous media using lattice Boltzmann simulations. Water Resour. Res.
**2013**, 49, 8531–8538. [Google Scholar] [CrossRef] - Blunt, M.J.; Bijeljic, B.; Dong, H.; Gharbi, O.; Iglauer, S.; Mostaghimi, P.; Paluszny, A.; Pentland, C. Pore-scale imaging and modelling. Adv. Water Resour.
**2013**, 51, 197–216. [Google Scholar] [CrossRef] - He, X.; Zou, Q.; Luo, L.; Dembo, M. Analytic solutions of simple flows and analysis of nonslip boundary conditions for the lattice Boltzmann BGK model. J. Stat. Phys.
**1997**, 87, 115–136. [Google Scholar] [CrossRef] - D’Humières, D. Multiple-relaxation-time lattice Boltzmann models in three dimensions. Philos. Trans. A Math. Phys. Eng. Sci.
**2002**, 360, 437–451. [Google Scholar] [CrossRef] [PubMed] - Lallemand, P.; Luo, L.-S. Theory of the lattice Boltzmann method: Dispersion, dissipation, isotropy, Galilean invariance, and stability. Phys. Rev. E
**2000**, 61, 6546. [Google Scholar] [CrossRef] - Pan, C.; Luo, L.-S.; Miller, C.T. An evaluation of lattice Boltzmann schemes for porous medium flow simulation. Comput. Fluids
**2006**, 35, 898–909. [Google Scholar] [CrossRef] - Ginzburg, I.; d’Humières, D. Multireflection boundary conditions for lattice Boltzmann models. Phys. Rev. E
**2003**, 68, 066614. [Google Scholar] [CrossRef] [PubMed] - Bouzidi, M.H.; Firdaouss, M.; Lallemand, P. Momentum transfer of a Boltzmann-lattice fluid with boundaries. Phys. Fluids
**2001**, 13, 3452–3459. [Google Scholar] [CrossRef] - Shah, S.; Gray, F.; Crawshaw, J.P.; Boek, E.S. Micro-computed tomography pore-scale study of flow in porous media: Effect of voxel resolution. Adv. Water Resour.
**2015**, in press. [Google Scholar] [CrossRef] - Guo, Z.; Zheng, C.; Shi, B. Discrete lattice effects on the forcing term in the lattice Boltzmann method. Phys. Rev. E
**2002**, 65, 046308. [Google Scholar] [CrossRef] [PubMed] - Kuzmin, A.; Guo, Z.; Mohamad, A. Simultaneous incorporation of mass and force terms in the multi-relaxation-time framework for lattice Boltzmann schemes. Philos. Trans. A Math. Phys. Eng. Sci.
**2011**, 369, 2219–2227. [Google Scholar] [CrossRef] [PubMed] - Guo, Z.; Zheng, C. Analysis of lattice Boltzmann equation for microscale gas flows: Relaxation times, boundary conditions and the Knudsen layer. Int. J. Comput. Fluid Dyn.
**2008**, 22, 465–473. [Google Scholar] [CrossRef] - Jones, B.; Feng, Y. Effect of image scaling and segmentation in digital rock characterisation. Comput. Part. Mech.
**2015**. [Google Scholar] [CrossRef]

**Figure 3.**The relative error of the flow between plates for different calculation schemes and precisions for a body-force of 10

^{–6}.

**Figure 4.**The average relative error of the flow profile between plates for different calculation schemes against mean flow velocity.

**Figure 6.**The velocity distribution computed in the pore space image of the Portland carbonate sample.

**Figure 7.**The average velocity throughout the Portland carbonate sample over the simulation. Points are sampled every 1000 time-steps.

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons by Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Gray, F.; Boek, E.
Enhancing Computational Precision for Lattice Boltzmann Schemes in Porous Media Flows. *Computation* **2016**, *4*, 11.
https://doi.org/10.3390/computation4010011

**AMA Style**

Gray F, Boek E.
Enhancing Computational Precision for Lattice Boltzmann Schemes in Porous Media Flows. *Computation*. 2016; 4(1):11.
https://doi.org/10.3390/computation4010011

**Chicago/Turabian Style**

Gray, Farrel, and Edo Boek.
2016. "Enhancing Computational Precision for Lattice Boltzmann Schemes in Porous Media Flows" *Computation* 4, no. 1: 11.
https://doi.org/10.3390/computation4010011