On the relation between lattice variables and physical quantities in lattice Boltzmann simulations Michael Junk Dirk Kehrwald th July 6 Kaiserslautern, Germany
CONTENTS Contents Initial situation Problem scale Lattice scale Asymptotic analysis scale 5 Using the asymptotic analysis 5 6 Comparison to the previous approach 7 7 A specific example 7
Initial situation Initial situation In a domain [, T ] Ω with Ω R d, d =,, the incompressible Navier-Stokes equations take the form with α u α =, t (ρu α ) + β (ρu α u β ) + α P = µ β β u α + ρa α () t : time in s ρ : density in kg m u α : components of the velocity vector in m s P : dynamic pressure in Pa = kg s m µ : hydrodynamic viscosity in Pa s = kg sm a α : components of the acceleration vector due to a volume force in m s t : time derivative α : space derivative in direction α. Dividing the momentum equation in () by the constant density ρ, we obtain with α u α =, t u α + β (u α u β ) + α p = ν β β u α + a α () p = P ρ ν = µ ρ : kinematic pressure in m s : kinematic viscosity in m s. Problem scale While SI units are important to communicate the size of physical constants, their use to characterize specific problems is limited. For that purpose, it is preferable
Lattice scale to choose intrinsic or problem related units. Specifically, we use a characteristic length L P [m], a characteristic time T P [s], a typical velocity U P [m/s] and characteristic acceleration A P [m/s ] and pressure P P [m /s ] to scale the Navier-Stokes equations (). The relevant, non-dimensional quantities are defined by and therefore α = x α L P, ū α = u α U P, t = t T P, = p P P, Inserting those relations into (), we obtain ( U P ) tū T P α + (U P ) L P ā α = a α A P, (a) t = T P t, α = L P α. (b) α ū α =, β (ū α ū β ) + P P L P α U P ν (L P ) β β ū α = A P ā α. If we connect time, length and velocity scale according to U P = L P /T P and choose P P = (U P ) as typical pressure, we obtain α ū α =, tū α + β (ū α ū β ) + α Re β β ū α = Fr āα where Reynolds and Froude number are defined by ( Re = LP U P U P ), Fr = ν L P A P. Lattice scale We consider a lattice Boltzmann algorithm of the form f i (t + δ t, x + δ t c i ) = f i (t, x) + J i (f(t, x)). Choosing the typical length L LB = δ x, the typical time T LB = δ t and the typical velocity U LB = c = δx/δt, we obtain the scaled quantities ˆx α = x α δ x, ĉ i = c i c, ˆt = t δ t,
Asymptotic analysis scale which lead to the lattice Boltzmann equation in usual form ˆf i (ˆt +, ˆx + ĉ i ) = ˆf i (ˆt, ˆx) + J i (ˆf(ˆt, ˆx)), where ˆρ = i ˆf i, ˆp = c s (ˆρ ), ˆρû = i ĉ i f i. If the same scaling is used for the Navier-Stokes equation, we recover the form with ˆ α û α =, ˆ ˆtûα + ˆ β (û α û β ) + ˆ α ˆp Re ˆ LB β ˆ β û α = Fr Re LB = cδ x ν, Fr LB = c δ x A P. LB āα Asymptotic analysis scale Using asymptotic analysis the relation between the lattice Boltzmann algorithm and the Navier-Stokes equation can be clarified. To simplify the computation, a scaling which is characteristic for both the flow problem and the algorithm is used. Specifically, the length scale is L A = L P, the velocity scale is U A = cδ x /L P with related time scale T A = L A /U A. This choice leads to a relation between scaled space and time steps x = δ x /L A and t = δ t /T A t = δ t T A = δ xu A cl A = δ xc c(l A ) = x. If the Navier-Stokes equations are non-dimensionalized with respect to the asymptotic analysis scale, they have the form α ũ α =, tũα + β (ũ α ũ β ) + α p Re A β β ũ α = Fr A āα () where Reynolds and Froude number are defined by Re A = LA U A, Fr A = ν ( U A ) L A A P.
Using the asymptotic analysis We remark that due to the definition of U A, we have Re A = Re LB, Fr A = Fr LB x The relation to the parameters in the problem scale is given by Re A = Re x ( ) x Ma, Fr A = Fr, Ma = U P Ma c Results of the asymptotic analysis (for example in []) can now easily be translated to the other relevant scales. 5 Using the asymptotic analysis In [] it is reported that for t = n t and x = j x, the algorithm f i (n +, j + ĉ i ) = f i (n, j) + J i ( f(n, j)) + x c s f i ĉi G(n, j) is consistent to the Navier-Stokes problem α ũ α =, tũα + β (ũ α ũ β ) + α p = provided the collision operator is of the form J i (f) = A(f eq (f) f) ( ψ ) κc s β β ũ α + G α (5) where the collision matrix A has eigenvectors Λ αβ i = c iα c iβ d c iγc iγ δ αβ with common eigenvalue λ = κc s/ψ. The flow variables (ũ, p) are connected to f via ρ = i f i, p x = c s ( ρ ), ũ x = i ĉ i fi. Due to L A = L P and Re A = Re x/ma we have U A = U P x/ma, and therefore α = x α L P = x α L A = x α = j x, t = U P L P t = Ma x ū α = u α U P = x Ma = U A p (U P ) = x Ma L A t = Ma x t = Ma x n t, u α U A = x Ma ũα, p (U A ) = x Ma p (6a) (6b) (6c) (6d) 5
Using the asymptotic analysis In order to match the required viscosity parameter /Re A in (), we need Re A = ψ ( κc s = κc s λ ) = ν. Using the relation between Re A and Re, we come to the conclusion ν = Re LB = Ma Re x Comparing (5) and (), we see that G α has to be equal to ā α /Fr A to make sure that the lattice Boltzmann algorithm approximates the correct problem. The force term in the algorithm thus needs to be of the form Fr A x c s fi c i ã = Fr c LB s f i c i ã = Fr Ma xc s f i c i ã. Note that the function ã differs from ā in () only in the time argument which is scaled with respect to T A instead of T P. In summary, the lattice Boltzmann algorithm f i (n +, j + ĉ i ) = f i (n, j) + J i ( f(n, j)) + Ma F r x c fi ĉi ā s (7a) is consistent to the Navier-Stokes problem α ũ α =, tũα + β (ũ α ũ β ) + α p = Ma x Re β β ũ α + Ma ā α x Fr. Keeping in mind that Ma = O( x) is required for consistency to the incompressible Navier-Stokes equations [] we choose an appropriate ϕ > such that Ma = ϕ x, so we can rewrite equations (7) in the form (7b) f i (n +, j + ĉ i ) = f i (n, j) + J i ( f(n, j)) + ϕ F r x c fi ĉi ā s (8a) respectively α ũ α =, and (6) reduces to tũα + β (ũ α ũ β ) + α p = ϕ Re β β ũ α + ϕ Fr āα, α = x α = j x, t = ϕ t = nϕ t, ū α = ũ ϕ, = p ϕ. (8b) 6
Comparison to the previous approach 6 Comparison to the previous approach Previously, a direct approach to express stationary Navier-Stokes equations () in lattice units was used at Fraunhofer ITWM. This approach was based on the simulation parameters ν and ǎ α as well as the characteristic quantities L LB = δx, U old = ν νδx, This approach leads to the scaled Navier-Stokes problem T old = νδx ν. ˇ α ǔ α =, ˇ ťǔ α + ˇ β (ǔ α ǔ β ) + ˇ α ˇp = ν ˇ β ˇ β ǔ α + ǎ α with ˇx α = x L LB, ť = t T old, ǔ α = u α U old, ˇp = p (U old ), ǎ α = δx (U old ) a α and the lattice Boltzmann algorithm ˇf i (ť + δt, ˇx + ĉ i δx) = ˇf (ť, )) i (ť, ˇx) + J i (ˇf ˇx + f ĉ i ǎ i c. s Comparing this model to equations (8), we find that the old model corresponds to the special case ϕ = U P L P U old δx, LP = L LB = δx in (8) and, therefore, to the lattice scale model discussed in Section. 7 A specific example We consider a flow in an infinite vertical channel filled with turpentine under the action of constant gravity. The width of the channel is mm, the initial velocity is zero, the hydrodynamic viscosity is µ = 9 µpa s, the density is ρ =.86 g/cm and the acceleration is (, g) where g = 9.8 m/s. 7
A specific example.5..5..5..5..5.5.5 x Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /6 As problem scales, we take L P = mm and A P = g. The velocity and time scales are then derived (for example) from the acceleration and length scale T P = L P /A P. s and U P = L P /T P = A P L P.99 m/s. As Reynolds and Froude number, we find Re = ρlp U P µ 57.7, Fr =. Since the force term is constant in space and time, we have ā = ã = (, ). The solution of the scaled Navier-Stokes problem has the form where v ( t, ) = Re Fr with limit value n= ū ( t, ) = (, v ( t, )), ( t, ) =. ( ( exp Fr ) ) Re tλ n λ sin (λ n), λ n = (n + )π n lim v( t, ) = Re ( ). t Fr In order to run a lattice Boltzmann simulation, we choose a discretization parameter x = δ x /L P and a suitable value for Ma = U P /c which should not be too far from x to ensure proper convergence to the Navier-Stokes equations. Setting Ma = ϕ x, the relaxation time parameter ν has to be set to ν = ϕ/re and the lattice Boltzmann algorithm reads ˆf i (n +, j + c i ) = ˆf i (n, j) + J i (ˆf(n, j)) ϕ x c s f i c iy A comparison of numerical and exact solutions (in the problem scale) for t {.,.,.6,.8,.,.}, ϕ {.5, 8.}, and x {/6, /} is given in Figures to. 8
A specific example.....5 6 x x Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /6...6.8 6 x.5.5 x Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.6, ϕ =.5, and x = /6...6.8 x 5 5 x Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.8, ϕ =.5, and x = /6 9
A specific example..6.8 x.5.5 x Figure 5 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /6 x 9 8. x.5..5 Figure 6 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /6.5..5..5.9.8.7.6.5.5.5 Figure 7 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /6
A specific example.....5.6.5.. x 6 Figure 8 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /6...6.8.6... 6 x 6 5 Figure 9 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.6, ϕ = 8., and x = /6...6.8..5..5..5.5 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.8, ϕ = 8., and x = /6
A specific example...6.8..6....8 x 6 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /6.5 5 x.5.6 x 5...8 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /6.5..5. x 6 x 8 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /
A specific example.....5.5.5 x x Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /...6.8.5 x 5 x 5 Figure 5 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.6, ϕ =.5, and x = /...6 pbar.5 x.5 x.8 Figure 6 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.8, ϕ =.5, and x = /
A specific example...6.8 6 x x 5 5 Figure 7 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /.5 x.5 x.5 Figure 8 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ =.5, and x = /.5..5..5..5..5. 5 5 x 6 5 Figure 9 Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /
A specific example.....5 6 x 5.8 x 5...6 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /...6.8 x 8 6 5.6 x 5 5.8 6 6. 6. 6.6 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.6, ϕ = 8., and x = /.5. x..8 6 x 5 8 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =.8, ϕ = 8., and x = / 5
References...6.8.5 x.5 9 x 5 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = /...9.8 x 6 x 5 5 Figure Numerical velocity and analytical velocity (left), relative error ū u num as numerical pressure (right) for t =., ϕ = 8., and x = / References [] M. JUNK, A. KLAR, L.-S. LUO, Asymptotic analysis of the lattice Boltzmann equation, J. Comput. Phys. (5), pp. 676-7. 5 [] M. B. REIDER, J. D. STERLING, Accuracy of discrete-velocity BGK models for the simulation of the incompressible Navier-Stokes equations, Computers & Fluids (995), pp. 59-67. 6 6