Open access peer-reviewed chapter

# Simulation of Axisymmetric Flows with Swirl in Vorticity- Stream Function Variables Using the Lattice Boltzmann Method

By Omar D. Lopez, Sergio Pedraza and Jose R. Toro

Submitted: March 16th 2016Reviewed: September 7th 2016Published: March 1st 2017

DOI: 10.5772/65650

## Abstract

In the present work, a Lattice Boltzmann formulation in vorticity-stream function variables is proposed for axisymmetric flows with swirl. For this purpose, several source terms are proposed and implemented. Although containing velocity gradients, these sources are in the Lattice Boltzmann framework and fulfill the Euler and Navier-Stokes equations in their conservative form. The main characteristics of the proposed method are: First, the momentum equation is solved using a unified Lattice Boltzmann solver; second, the proposed sources are consistent with the nonviscous and viscous momentum equations; and third, the implemented method is second-order accurate in space. Numerical tests on the Taylor-Couette flow with finite aspect ratio of 3.8 and the lid-driven cylindrical cavity flow were carried out showing good agreement with numerical and experimental results found in the literature, evidencing the ability of the implemented method to solve axisymmetric flows with swirl. In the case of the lid-driven cylindrical cavity flow, the implemented method is able to correctly reproduce some qualitative characteristics of this flow such as the vortex breakdown close to the cavity axis at different Reynolds numbers and cavity aspect ratio.

### Keywords

• Lattice Boltzmann method
• vorticity-stream function
• axisymmetric flow with swirl
• lid-driven cylindrical cavity
• source terms

## 1. Introduction

The Lattice Boltzmann method (LBM) was created in the late 1980s as a derivation of the Lattice Gas Automata (LGA). This method has shown to be an efficient solver not only for the Navier-Stokes (NS) equations but also for some other nonlinear partial differential equations [1]. In several cases, LBM has been used for the solution of axisymmetric flows, modeling the problem in two dimension (2D) [27] and three dimension (3D) [810].

Although it is well known that axisymmetric flows can be mathematically described as a 2D problem, considering the governing equations in a cylindrical coordinate form, there is an inherent discrepancy between the cylindrical behavior of the flow and the two dimensional spatial discretization (i.e., the type of lattice used). In order to overcome these discrepancies, Halliday et al. [11] included position and time-dependent sources in the Lattice Boltzmann evolution equation to achieve the proper evolution equations through the Chapman-Enskog methodology. Subsequent studies have successfully used this idea to improve the Lattice Boltzmann method in order to solve different axisymmetric flows with or without swirl. Huang et al. [12] proposed a hybrid Lattice Boltzmann finite-difference axisymmetric formulation where the planar velocities were solved through a pressure-velocity (p − v) LBM. The azimuthal component through a finite-difference scheme was solved by inserting source terms into the two-dimensional Lattice Boltzmann equation. In order to avoid the use of different frameworks and solving every momentum equation within the LBM approach, Guo et al. [13] proposed a simple and straightforward incorporation of source terms in a LB p − vformulation. This way, they were able to predict steady and unsteady axisymmetric flows starting from the general Lattice Boltzmann equation. Li et al. [4] proposed an improved axisymmetric Lattice Boltzmann scheme where a multiple relaxation time (MRT) collision model was used to insert source terms that contained no velocity gradients. The same approach was also explained and implemented by Zhou [5]. Regarding LBM formulations in vorticity-stream function, Chen et al. [14] developed an axisymmetric Lattice Boltzmann formulation without swirl considering vorticity and the stream-function as its primitive variables. Improvements were made coupling a thermal LBM [15] and finally proposing an axisymmetric formulation [16, 17].

In the present work, different source terms are proposed for the Lattice Boltzmann implementation of axisymmetric flows with swirl. Although containing velocity gradients, these sources are in the Lattice Boltzmann framework and fulfill the Euler and NS equations in their conservative form. This implementation is tested with some flows such as the lid-driven cylindrical cavity flow: a benchmark case for axisymmetric flow solvers, deeply studied both numerically [1820] and experimentally [21]. The main characteristic of the lid-driven cylindrical cavity flow is that for certain Reynolds number (Re) and cavity aspect ratio (Ar), it can undergo structural changes such as vortex breakdowns that are triggered by azimuthal vorticity stretching and its interaction with the azimuthal velocity [20, 22].

## 2. Axisymmetric Lattice Boltzmann implementation

### 2.1. Governing equations

Let vrzt=ure^r+uθe^θ+uze^zbe the velocity field of an axisymmetric, viscous flow with swirl with the corresponding vorticity (ω) defined as shown in Eq. (1)

ω=uθze^r+ωθrzte^θ+1rruθre^zE1

For such flows, the 3D Navier-Stokes equations are equivalent to the following simplified vorticity-stream function formulation

uθt+uuθ=2uruθr+ν2uθr2+2uθz2+1ruθruθr2E2
ωθt+uωθ=2uθruθz+ν2ωθr2+2ωθz2+1rωθrωθr2E3
ωθ=1r2ψz2r1rψrE4
ur=1rψzuz=1rψrE5

where u=uruz. The definition of the velocity in terms of the stream function ψfulfills the continuity equation u=0. Note that the convective terms of these governing equations are written in a conservative form in order to match the operators achieved by the numerical discretization based on LBM.

### 2.2. Numerical method

The discrete Lattice Boltzmann equation (LBE) is given by

fix+eiΔt,t+Δtfixt=ΩifixtE6

where fiis the particle distribution function along the ith direction, eiis a vector in the direction of the microscopic velocities and Ωi(fi(xt)) is the collision operator. Δxand Δtare space and time increments, and Δx/Δt = |ei| = cis the magnitude of the microscopic velocity. Employing a second-order Taylor expansion on the convective part (LHS of Eq. (6)) and using the BGK approximation of the collision operator Ωi(fi(xt)), Eq. (7) is achieved.

t+eifi+12t2+2tei+:eieifi=1τfifieqE7

where τis the dimensionless relaxation time of the distribution function fiand fieqis the equilibrium function distribution. Using the Chapman-Enskog expansion, the distribution function fiis expanded as

fi=fi0+εfi1+ε2fi2+E8

where εis a formal parameter in the expansion that allows to keep track of different orders of magnitude. It will be considered only as a labeland will be dropped out of the final results setting ε = 1 [23]. The time and space derivatives are also expanded in terms of εas shown in Eqs. (9) and (10).

t=εt1+ε2t2E9
x=εx1E10

According to Wolf-Gladrow [23], the reasons behind the different expansions in time and space lie in the fact that different macroscopic processes such as convection and diffusion can be distinguished by their time scales but act on similar spatial scales. Replacing Eq. (8) through Eq. (10) in Eq. (7), Eq. (11) is obtained

Difi0+εfi1+12Di2fi0+εfi1=1τfi0+εfi1fieqE11

where Di=εt1+ε2t2+εx1eiis the total derivative operator expanded through ε. Finally, source terms (hi) are included in the RHS of Eq. (11) in order to fulfill the momentum equations constraints where hi1and hi2are the expansion of hiin terms of ε.

Difi0+εfi1+12Di2fi0+εfi1=1τfi0+εfi1fieq+εhi1+ε2hi2E12

According to the expansion in Eq. (12), every time scale is grouped starting with the terms of order O(1)

fi0=fieqE13

followed by terms of order O(ε)

t1fi0+x1eifi0=1τfi1+hi1E14

and finally the terms of order O(ε2)

t2fi0+12t12fi0+t1x1eifi0+12x1x1:eiαeiβfi0+t1fi1+x1eifi1=1τfi2+hi2.E15

where (ei)αis the component of the velocity vector eion the α-coordinate direction.

### 2.3. Lattice

The D2Q5 lattice model (two dimensions and five directions) has shown to be adequate for advection-diffusion problems based on its easy implementation and its inherent orthogonality eiej=δji[1417, 24]. The D2Q5 model has discrete velocity directions given by Eq. (16)

ei=c×0i=0,cosi1π/2,sini1π/2i0.E16

Considering the evolution equations as the main purpose of our discretization, the equilibrium functions are defined for uθand ωθas

fieq=uθ51+ueics2E17
gieq=ωθ51+ueics2E18

where cs=|c|2/5is the speed of sound in the lattice. These equilibrium functions fulfill the lattice constraints: i=04fi=uθ, i=04fiei=uθuand i=04eieifi=cs2uθfor uθ. The same holds for ωθreplacing fiby gi.

### 2.4. Recovery of the governing equations

In order to recover the governing equations, zeroth and first moments are taken to Eqs. (14) and (15). Defining Hl=i=04hilfor l = 1, 2 and the fact that i=04fik=0for k ≥ 1 (see reference [24]) the zeroth moment of Eq. (14) produces Eq. (19), while the zeroth moment of Eq. (15) produces Eq. (20).

t1uθ+x1uuθ=H1E19
x1i=04fi1ei+122t2uθ+t1t1uθ+2t1x1uuθ+cs2x1x1uθ=H2E20

The first term on the LHS of Eq. (20) is rewritten with the first moment of Eq. (14)

i=04fi1ei=τi=04hi1eit1uuθcs2x1uθE21

which is replaced into Eq. (20) and produces

τx1i=04hi1eit1uuθcs2x1uθ+122t2uθ+t1t1uθ+2t1x1uuθ+cs2x1x1uθ=H2E22

The second time derivative over uθon the LHS of Eq. (22), i.e., t1t1uθ, is rewritten by taking ∂ton Eq. (19) as follows:

t1t1uθ=i=04t1hi1x1uuθE23

Replacing Eq. (23) into Eq. (22) leads to

τx1i=04hi1eit1uuθcs2x1uθ+122t2uθ+i=04t1hi1t1x1uuθ+2t1x1vuθ+cs2x1x1uθ=H2E24

Finally, the source terms are redefined in order to eliminate the time derivative of the source within the evolution equation [25].

hi=εhi1+ε2hi2+12t1hi1E25

Equation (25) combined with Eqs. (19) and (24) produces the momentum equation for uθ

tuθ+εx1uuθ+ε2τx1i=04hi1ei+12τt1x1uuθ+cs2x1x1uθ=εH1+ε2H2E26

The same procedure is applied to ωθreplacing fiby giobtaining an equation similar to Eq. (26) but in terms of ωθ.

tωθ+εx1uωθ+ε2τx1i=04hi1ei+12τt1x1uωθ+cs2x1x1ωθ=εH1+ε2H2E27

Comparing Eqs. (26) and (27) with Eqs. (2) and (3) it is observed that the terms t1x1uuθand t1x1uωθhave to be neglected in order to match both momentum equations. An order analysis is done for these terms assuming Uc, Lc, and tcas the characteristic velocity, length, and time scales, respectively. Considering Eq. (27) for azimuthal vorticity, the term t1x1uωθis the same order of Uc/tc2LCand the term cs2x1x1ωθis the same order of cs2/Lc2tc. Taking the ratio of the order of the latter terms, we obtain

Ot1x1uωθcs2x1x1ωθ=OUc/tc2Lccs2/Lc2tc=OUc2cs2=OM2E28

where M = Uc/csis the Mach number of the lattice. Eq. (28) shows that the term t1x1uωθis very small compared with cs2x1x1ωθand it can be neglected if M < < 1, according to the LBM dynamics. This procedure is also valid for the azimuthal velocity leading to neglect the term t1x1uuθ.

After the order analysis is performed, Eqs. (26) and (27) are rewritten as

tuθ+εx1uuθ+ε2τx1i=04hi1ei+12τcs2x1x1uθ=εH1+ε2H2E29
tωθ+εx1uωθ+ε2τx1i=04hi1ei+12τcs2x1x1ωθ=εH1+ε2H2E30

### 2.5. Source definition

As it was stated in the introduction, there exists a discrepancy between the lattice dimension and the dimensional nature of the flow. The discrepancy arises in the operators achieved through the multiscale analysis (Cartesian) and those that are natural to the momentum equations (cylindrical). As shown in the RHS of Eq. (31), there is an additional derivative that contains the swirl of the flow which is not captured by the operators achieved through the multiscale analysis.

DDtcar=t+urr+uzzt+urr+uzz+uθθ=DDtcylE31

In order to overcome this problem, the inclusion of a source terms is needed and therefore defined to match the governing equations, Eqs. (2, 3) with Eqs. (29, 30).

Consequently, the source terms for uθare defined as

hi1ti2uruθrandhi2tiτ12cs21ruθruθr2E32

and for ωθas

hi1ti2uθruθzandhi2tiτ12cs21rωθrωθr2E33

where i=04ti=1and τ=ν/cs2+1/2.

The source terms of O(ε) were defined, both for uθand ωθ, in order to reproduce the Euler equations in their conservative form. Then, the terms of O(ε2) were defined in order to reproduce the cylindrical terms of the Laplacian operator that appears in Eqs. (2) and (3). Finally, due to the symmetries of the lattice, the term x1i=04hi1eiis eliminated in Eqs. (29) and (30) since i=04hi1ei=0.

## 3. LBM algorithm

This section describes the algorithm used to solve every Lattice Boltzmann evolution equation within the same framework producing a LBM solver able to solve axisymmetric flows. The implementation of the algorithm is based on the key steps in LBM: streaming and collision that are given by Eq (6).

### 3.1. Poisson equation solver

In order to solve Eq. (4), which is a Poisson equation for ψ, the model proposed by Chai et al. [26] is employed. The evolution equation is given by

Lit+Δt,x+ΔxLitx=1τψLitxLieqtx+SΔtψ¯ic20.5τψ/2E34

where Lis the distribution function associated with ψand Saccounts for the source terms. τψis the dimensionless relaxation time that is set with accurate results to 1 [26]. ψ¯iis the weight coefficient for the source terms, and they must satisfy the constrain i=14ψ¯i=1. In the present study, the source term Sis defined in Eq. (35)

Srωθ+uzE35

and the equilibrium distribution is defined as in Eq. (36)

Lieqxt=ψxt,:i=014ψxt,:i=1,2,3,4E36

where ψxt=i=14Lixt. urand uzare calculated with Eq. (5), employing a central difference scheme in the lattice domain.

### 3.2. Algorithm

With every evolution equation discretized in the LBM framework, an algorithm of the method is finally proposed:

1. Numerical parameters definition:Re, Ω, R, Ar, N = (Grid size).

2. Initial and boundary conditions definition

3. Time loop until steady state is reached:

1. uθtLBM solveruθt+Δt

2. uθt+ΔtLBM solverωθt+Δt

3. ωθt+ΔtLBM solver→ ψt + Δtuntil:

DψDt=2ψ+ωθtendstoDψDt=02ψ=ωθE37

d. Computation of urand uz.

#### 3.2.1. LBM solver

As shown in the algorithm the time loop uses a unified Lattice-Boltzmann solver in which five steps are performed:

1. Equilibrium function calculation through Eqs. (17, 18, and 36).

2. Source term calculations through Eqs. (32, 33, and 35) using the information obtained at time t

3. Collision step for every particle function distribution.

Ωifixt=1τfifieqE38

4. Streaming step for every particle function distribution.

fix+eiΔt,t+Δt=Ωifixt+fixtE390

5. Variable recover through the summation of the distribution functions, i.e., i=04fi=uθ, i=04gi=ωθand i=14Li=ψ.

As stated in the algorithm, the time loop is performed until the steady state is reached which numerically is considered when

utut1000δtut<107E37

where the relative error of the velocity field is calculated between 1000 consecutive time steps.

## 4. Numerical results

In the present section, the proposed source terms are validated using some well-known benchmarks flows, including the circular Couette flow, the Taylor-Couette flow, and the swirling flow within the lid-driven cylindrical cavity. All cases were validated for a laminar regime. For each case, the boundary and initial conditions will be discussed.

### 4.1. Circular Couette flow

In this case, the flow between two infinitely long concentric cylinders is simulated. The inner cylinder rotates at constant speed Ω, while the outer is stationary (see Figure 1). The analytic solution of this flow is used to prove that the proposed method is second order. The boundary conditions for the fluid variables are as follows:

r=Rin:uruθuz=0,ΩRin,0,ωθ=2ψ,ψ=0,r=Rout:ur=uθ=uz=0,ωθ=2ψ,ψ=0.E38

where the Laplacian of ψon the boundaries is calculated using a second-order Taylor approximation employing the inner nodes values. Symmetry is imposed on the top and bottom boundaries.

Figure 2 compares the analytic solution with the numerical results for a laminar flow with Re < 10, inner cylinder’s radius Rin = 0.5mand angular velocity Ωin = 0.2rad/s, and outer cylinder’s radius Rout = 1mand angular velocity Ωout = 0. With these parameters, the analytic solution for this flow is given by Eq. (39)

uθ=Ar+BrE39

where

A=ΩinRin2ΩoutRout2Rin2Rout2=0.0667and=Rin2Rout2ΩinΩoutRout2Rin2=0.0667.E400

Results were obtained with a lattice resolution of Δx = (Rout − Rin)/(N − 1), i.e., N = 50. It is clear that the numerical results are in good agreement with the analytical solution. The relative global error, defined by Eq. (40), is presented in Figure 3 for different mesh sizes.

E=||uauLBM||2E40

In Eq. (40) uLBMis the azimuthal velocity predicted by the present method. The slope of the fitting in Figure 3 is 2.04, which shows that the proposed method is second-order accurate in space.

### 4.2. Taylor-Couette flow with finite aspect ratio

A Taylor-Couette flow consists of a viscous fluid confined between two concentric rotating cylinders of length H = Ar(Rout − Rin) with aspect ratio Ar = 3.8. The Reynolds number is defined as Re = RinΩinA/ν, where Ωinis the angular velocity of the inner cylinder and Ais the gap of the annulus. In this case, the boundary conditions for z, due to the finite length, have to be specified, besides the boundary conditions for rused in the Circular Couette flow, as

z=0:ψ=uz=0,ωθ=2ψ,z=H:ψ=uz=0,ωθ=2ψ.E41

Three different Rewere simulated and analyzed; Re = 85, 100 and 150. The maximum stream-function values in the r − zplane are listed in Table 1 and compared to those presented by Huang et al. [12]. There is a good agreement between the present formulation and the hybrid scheme demonstrating the versatility of the proposed numerical method.

Reψmaxψmax[12]
854.32 × 10− 24.810 × 10− 2
5.252 × 10− 25.501 × 10− 2
6.38 × 10− 26.427 × 10− 2

### Table 1.

Maximum stream-function comparison for the (rz) with the proposed results in [12].

In order to validate the qualitative characteristic of the flow in terms of axisymmetric toroidal vortices, Figure 4 shows the contours of stream-function and vorticity for Re = 150 and Ar = 3.8. Similar flow patterns consistent with those reported by Huang et al. [12] are observed.

### 4.3. Lid-driven cylindrical cavity flow

Cylindrical cavity steady flow have been studied both numerically [9, 18] and experimentally [21]. One of the interesting features of this flow is that vortex breakdowns takes place within the cavity producing recirculating zones located in the cavity axis. In 1984, Escudier [21] was able to summarize the flow regimes in the Escudier diagramvarying the Reynolds number Re = R2Ω/νand the aspect ratio Ar = H/Rof the cavity. The flow problem consists of a cylinder with top and bottom walls, where the top wall rotates at a constant angular velocity (see Figure 5). Four cases were chosen from the Escudier diagram: Case 1 (Ar = 1.5, Re = 990), Case 2 (Ar = 1.5, Re = 1290), Case 3 (Ar = 2.5, Re = 1010), and Case 4 (Ar = 2.5, Re = 2200) in order to demonstrate the quantitative and qualitative accuracy of the present formulation.

The parameters in the simulation were set to R = 1 and Ω = 0.1, which makes the characteristic velocity Uc = ΩR = 0.1 ensuring that M=Uc/cs2=0.25<<1. The boundary conditions for the primitive variables are defined as

r=0:ur=uθ=0anduzr=0,ωθ=0,ψ=0r=R:ur=uθ=uz=0,ωθ=2ψ,ψ=0z=0:ur=uθ=uz=0,ωθ=2ψ,ψ=0z=H:ur=uz=0,uθ=Ωr,ωθ=2ψ,ψ=0E42

In order to establish mesh independence in the solution, different grid sizes were used on the r − zdomain. Case 1 was simulated using the following meshes: 30 × 45, 50 × 75, 70 × 105, 100 × 150, 150 × 225, 200 × 300, and the results are shown in Figure 6. It is observed that the solution is independent if the grid size used is larger or equal to 150 × 225. Based on this fact, it is believed that a lattice size of Δx = R/150 = 0.0067 will produce accurate solutions and will be used to simulate the other cases.

Re = 990Re = 1290Re = 1010
Referenceuz,max/u0xmax/Huz,max/u0xmax/Huz,max/u0xmax/H
Present0.09010.20980.07270.16960.11090.498
Expt.[27]0.0970.210.0680.140.1030.46
Zhou [5]0.09920.2070.07060.1470.1050.448
DLBM [9]0.0930.220.0720.160.1020.52
DNS [9]0.0990.190.06650.1250.1060.44
Li [4]0.09870.2130.07160.147

### Table 2.

Comparisons of maximum axial velocities.

In order to verify the precision of the present method, the maximum axial velocity is compared with experimental data [27] and to numerical results proposed previously [35, 9] in steady state. Three of these numerical results were taken under consideration: Zhou [5] in which a LBM in p-v is employed, Bhaumik et al. [9] results in which a 3DLBM using MRT is employed, and the improved model results proposed by Li et al. [4]. Also a DNS solution is considered [9].

The maximum axial velocities for Cases 1, 2, and 3 are shown in Table 2, comparing the solution of the present model with previous reported results. The relative error is calculated as (upresent − uexp)/uexp. Case 1 presents a relative error of 7.1%, Case 2 of 6.9%, and Case 3 of 7.6%. Finally, in order to establish the present formulation proficiency of solving complex flows we present in Figures 79 stream function contours for three different cases. Figures 8 and 9 clearly show the formation of recirculating bubbles close to the axis of symmetry, known as vortex breakdowns.

The streamlines shown in previous figures are in agreements with those presented in mentioned references.

## 5. Conclusion

In the present work, a LBM in vorticity-stream function variables for axisymmetric flow with swirl is presented and implemented. By considering the convective term of the evolution equations in their conservative form, proper sources are carefully proposed being able to reproduce both nonviscous and viscous momentum equations. Through a multiscale analysis, performed in Cartesian coordinates, it was found that a discrepancy between the operators and the governing equations was achieved. This difference is overcome by the definition and inclusion of source terms in the proposed LB formulation. The Chapman-Enskog analysis was used to achieve conservative operators that arise naturally in the implemented LBM. As a result a unified LBM algorithm was built in which every evolution equations is solved with the same algorithm. The numerical method proved to be second-order accurate in space. Finally, the method was able to reproduce complex flows, such as the Taylor-Couette flow where toroidal vortices were observed and good agreement was found with qualitative results proposed in the literature. Furthermore, the proficiency of the method to solve the lid-driven cylindrical cavity flow quantitatively showed an error below 8% when compared with experimental data. Qualitatively, the method solved the flow through many flow regimes observing one and two vortex breakdown located in the cavity axis.

chapter PDF
Citations in RIS format
Citations in bibtex format

## More

© 2017 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## How to cite and reference

### Cite this chapter Copy to clipboard

Omar D. Lopez, Sergio Pedraza and Jose R. Toro (March 1st 2017). Simulation of Axisymmetric Flows with Swirl in Vorticity- Stream Function Variables Using the Lattice Boltzmann Method, Vortex Structures in Fluid Dynamic Problems, Hector Perez-de-Tejada, IntechOpen, DOI: 10.5772/65650. Available from:

### Related Content

Next chapter

#### Thickness and Thermal Conductivities of the Walls and Fluid Layer Effects on the Onset of Thermal Convection in a Horizontal Fluid Layer Heated from Below

By Ildebrando Pérez‐Reyes, René Osvaldo Vargas‐Aguilar, Eduardo Valente Gómez‐Benítez and Iván Salmerón‐Ochoa