Next Article in Journal
Optimal Design of Bacterial Carpets for Fluid Pumping
Previous Article in Journal
Review of Suspended Sediment Transport Mathematical Modelling Studies
Previous Article in Special Issue
Extraction of Tangential Momentum and Normal Energy Accommodation Coefficients by Comparing Variational Solutions of the Boltzmann Equation with Experiments on Thermal Creep Gas Flow in Microchannels
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Analysis of Carleman Linearization of Lattice Boltzmann

1
Tandon School of Engineering, New York University, Brooklyn, New York, NY 11201, USA
2
Fondazione Istituto Italiano di Tecnologia, Center for Life Nano-Neuroscience at la Sapienza, Viale Regina Elena 291, 00161 Roma, Italy
3
Physics Department, Harvard University, Oxford Street, 17, Cambridge, MA 02138, USA
*
Author to whom correspondence should be addressed.
Fluids 2022, 7(1), 24; https://doi.org/10.3390/fluids7010024
Submission received: 25 November 2021 / Revised: 23 December 2021 / Accepted: 30 December 2021 / Published: 5 January 2022
(This article belongs to the Special Issue Rarefied Gas Dynamics)

Abstract

:
We explore the Carleman linearization of the collision term of the lattice Boltzmann formulation, as a first step towards formulating a quantum lattice Boltzmann algorithm. Specifically, we deal with the case of a single, incompressible fluid with the Bhatnagar Gross and Krook equilibrium function. Under this assumption, the error in the velocities is proportional to the square of the Mach number. Then, we showcase the Carleman linearization technique for the system under study. We compute an upper bound to the number of variables as a function of the order of the Carleman linearization. We study both collision and streaming steps of the lattice Boltzmann formulation under Carleman linearization. We analytically show why linearizing the collision step sacrifices the exactness of streaming in lattice Boltzmann, while also contributing to the blow up in the number of Carleman variables in the classical algorithm. The error arising from Carleman linearization has been shown analytically and numerically to improve exponentially with the Carleman linearization order. This bodes well for the development of a corresponding quantum computing algorithm based on the lattice Boltzmann equation.

1. Introduction

Computational Fluid Dynamics (CFD) has accompanied computers as an application since their infancy, starting with von Neumann’s program to simulate the weather on the ENIAC machine around the 1950s. Even earlier, in 1922, Richardson described “human” computers computing the weather by hand, estimating that 64,000 of them, each calculating at a speed of 0.01 Flops/s, would be sufficient to predict the weather in real time [1]. Leaving aside human calculators, electronic ones have made a spectacular trek so far, from the few hundred Flops of ENIAC to the exaflop peak performance of the Sunway Oceanlite supercomputer [2]. This has spanned sixteen orders of magnitude in 70 years, close to a sustained Moore’s law rate, doubling every 1.5 years! Amazingly, CFD has been consistently on the forefront of the journey, and it continues to be to the present day. However, when it comes to quantum computing, CFD is yet to capture the limelight it deserves. In this paper, we present a brief survey of current ongoing research work in this direction and a preparatory technique, known as Carleman linearization, aimed at the development of a quantum computing algorithm for the lattice Boltzmann method for fluid flows.

1.1. Early Attempts for Quantum Simulation of Fluids

The earliest attempts at quantum simulation of fluids have been based on the lattice gas or lattice Boltzmann algorithms. The first quantum lattice Boltzmann scheme dates back to the 1990s [3,4]. Around the turn of the millenium, Yepez demonstrated fluid dynamic simulations on a special-purpose quantum computer based on nuclear magnetic resonance (NMR) [5], using the quantum lattice gas algorithm [6,7]. Leading the trail, Yepez has also investigated Burger’s equation [8,9], and entropic lattice Boltzmann models [10]. The latter has found its use in simulation of quantum fluid dynamics and other quantum systems [6]. We have recently seen a divergence towards citing Navier-Stokes as a future direction for papers discussing solving nonlinear differential equations on quantum computers, away from the early physically-motivated algorithms for fluid simulation, as the quantum lattice gas one mentioned above [5,7,8,9]. However, the attempts to revive the physically-motivated algorithms beyond quantum systems [11], by [12,13,14,15] and others, are promising. The work of [13] stands out as it presents itself as a method not of quantum computation per se, but of quantum simulation. The latter leverages the correspondence between the Dirac and lattice Boltzmann equations. We, thus, find a compelling reason [16] to explore lattice Boltzmann as the basis for quantum simulation of fluids, starting with its linearization, explored classically in this paper.

1.2. Carleman Linearization

Carleman linearization appears to cast linearization of a function through Taylor series expansion into matrix form, suitable for use in defining state estimator of a non-linear system of known dynamics as part of the Koopman operator approach, in what is known as Carleman-Koopman operator. The basic idea of Carleman linearization is to introduce powers of the original variable as a variables in the system. The recurrence through which the new equations in the system is defined leads to an infinite dimensional system. The latter is prone to admitting solutions different than those of the original system [17]. The linearization is achieved at the cost of infinite-dimensions. Upon truncation of the resulting infinite-dimensional upper-triangular matrix [18], the accuracy of the approximation also suffers, deteriorating with time, making the truncated system most suitable for asymptotically stable stationary solutions [19]. The error bound for a Carleman-linearized polynomial ODE reduced to quadratic form has been shown, through a power series approach [18], to depend on the initial condition as well as exponentially on time. They recommend discretizing the solution in time, and evaluating other basis functions. Their work has readily been extended by [20] for a quantum algorithm. Apart from discussing the complexity and error bounds of a quantum Carleman algorithm, [20] presented the results for a classical Carleman linearization of Burger’s equation.

2. Lattice Boltzmann

Between the Navier-Stokes equations which model the flow at a continuum level, and molecular dynamics which treat the microscale, LB stands out, representing the fluid as an ensemble of particles at the mesoscale. It stems from the minimal discretization of the Boltzmann kinetic equation. The lattice Boltzmann formulation is readily extensible for a range of physics, from the quantum to the relativistic, giving the method a versatility about which books could be written [21].
d f d t = f t + v · f = Ω
The Boltzmann Equation (1) describes the probability density f of the fluid in the position-momentum space, driven by advection due to continuum particle velocity v and collision Ω across space spanned by x , and time t. To arrive at the lattice Boltzmann formulation, the probability density f from the Boltzmann equation Equation (1) is discretized into Q density distributions, each describing the fraction of fictitious particles: moving in a given D-dimensional lattice, with v restricted to speeds c i , c i = c i e i , defined in the directions of the lattice vectors e i s.
The discretized lattice Botlzmann equation takes the form
1 Δ t ( f i ( x + c i Δ t , t + Δ t ) f i ( x , t ) ) = 1 τ ( f i ( x , t ) f i e q ( x , t ) )
for the simple case of a single-phase fluid, which components are permeable to each other such that they can be considered well-mixed and homogeneous [22]. The discrete probability density is the fundamental variable of the lattice Boltzmann approach. It describes the probability of finding a fictitious fluid particle at a given point defined by the position vector x , at a given instant of time t, with a particular speed [23]. Implicit, in the discretization of the Boltzmann equation, is the discretization of the phase-space, involving discrete position and velocity values. The lattice Boltzmann proceeds by updating the discrete probability densities at each cell in two steps: collision and advection/streaming shown in Figure 1. This is the collision step:
f i ( x , t + Δ t ) = f i ( x , t ) Δ t τ ( f i ( x , t ) f i e q ( x , t ) )
The streaming step is:
f i ( x , t + Δ t ) f i ( x + c i Δ t , t + Δ t )
Collision is practically a relaxation towards equilibrium, a nonlinear operation dependent on terms local to each cell. On the other hand, streaming involves the transfer of the discrete densities to nearby cells, a nonlocal linear operation. The equilibrium distribution f i e q is written as a function of c i = c the lattice speeds, the fluid density ρ , the lattice vectors e i , and the flow velocity u .
ρ = Σ i = 1 Q f i
flow velocity u :
u = c ρ Σ i = 1 Q f i e i
weights w which sum to unity. A common model for the equilibrium function is:
f i e q ( x , t ) = w i ρ ( 1 + ( 3 c e i · u + 9 2 c 2 ( e i · u ) 2 3 2 c 2 u · u ) )
Replacing the expression for the equilibrium expression for the incompressible case, we have:
( f i ( x + c i Δ t , t + Δ t ) = ( 1 Δ t τ ) f i ( x , t ) ) + Δ t w i τ ( 1 + 3 e i · f j e j + 9 2 ( e i · f j e j ) 2 3 2 f j f k e j · e k )
We note that the lattice vectors e i , do not correspond to unit vectors, and are generally not orthonormal. In a single dimension, the left and right vectors have nonzero inner product of 1 . In higher dimensions, we can identify such a pair for each direction, in addition to nonzero inner products with and between diagonal lattice vectors shown in Figure 2. For example, in D1Q3, we have:
e i = 1 i = 1 0 i = 2 1 i = 3
thereby:
Ω = d t τ 1 2 ( f 1 + f 3 ( f 1 f 3 ) 2 1 3 ) ( f 2 + ( f 1 f 3 ) 2 2 3 ) 1 2 ( f 1 + f 3 ( f 1 f 3 ) 2 1 3 )
Continuing with the consideration of the D1Q3 case, by introducing the vectors of first-order and second-order products of the discrete densities appearing in the lattice Boltzmann formulation, denoted f ( 1 ) and f ( 2 ) respectively:
f ( 1 ) = f 1 f 2 f 3 T f ( 2 ) = f 1 2 f 3 2 f 3 f 1 T
we may write Ω as a second-order “polynomial” with matrix-valued coefficients, similar to the form introduced by [18].
Ω = F 1 f ( 1 ) + F 2 f ( 2 ) + F 0
where F 1 and F 2 , for the D1Q3 are:
F 1 = Δ t τ 1 2 0 1 2 0 1 0 1 2 0 1 2
and:
F 2 = Δ t τ 1 2 1 2 1 1 1 2 1 2 1 2 1
The constant vector F 0 appearing could be absorbed with a fixed variable, say f 4 = 1 to account for constants. It could easily be defined with a zero derivative adding an empty row to the bottom of F 1 and F 2 . The constants appearing in any polynomial entry of the vector could be, thus, defined as 1 or 1 2 multiplied by some coefficient. Therefore, they should not affect the norm of F 1 or F 2 considered below.
F 0 = Δ t τ 1 6 2 3 1 6
The fact that the rows and columns of F 1 sum up to unity, whereas those F 2 sum to zero is at heart of the favourable error bounds obtained in Section 3.4, and that in presence of uniform initial conditions or absence of streaming, the method becomes exact. It is well-known that Equation (8) is inconsistent with the incompressible assumption, ρ = 1 , and density fluctuations around unity are expected to arise during evolution [24]. Neglecting these fluctuations amounts to an error in the velocity components | | u | | proportional to the square of the Mach number O ( M a 2 ) . This is due to the fact that this standard lattice Boltzmann formulation recovers the compressible Navier-Stokes upon expansion. More sophisticated formulations have been developed for incompressible and nearly incompressible flows [25]. The particles with random motion, are restricted to the lattice nodes with microscopic velocities c i defined over lattice directions, allowing us to model the collision of particles and their streaming in seperate, uncoupled steps. The latter forces the nonlinearity of fluid flow, captured in the collision term, to be local, whereas the non-local streaming terms remain linear. Moreover, streaming is exact.

Nonlinearity Ratio

We define the nonlinearity ratio R as a measure of how much Equation (8) deviates from a complete linear behavior. It is defined as
R = | | f ( t = 0 ) | | | | F 2 | | | Real ( λ M A X ( F 1 ) ) | ,
where F 1 is the matrix of linear coefficients of Equation (8) and F 2 is the matrix of the second order terms. Here we have considered the supremum norm of a matrix | | A | | or a vector | | x | | as
| | A | | = max i j | A i j | , | | x | | = max i | x i |
and λ M A X ( F 1 ) as the largest eigenvalue in modulo of F 1 . Note that for a linear system | | F 2 | | = 0 such that one has no nonlinearity. This makes R “qualitatively” similar to the Reynolds number which is a ratio of nonlinear convective forces to linear viscous forces. When we rescale a matrix by a constant, its eigenvalues get rescaled as well as the norm. As such, we see that the Δ t τ factor cancels out from the nonlinearity ratio. This is not surprising given that R is practically a measure of the relative weight of nonlinear terms to linear terms. However, this independence of R on a critical parameter, τ , should be taken with cautiously, as the it role is more nuanced in the lattice Boltzmann formulation.
We may proceed by calculating it for the case of Δ t τ = 1 , and it remains valid otherwise.
In the case of D1Q3, the two different norms taken for F 1 and F 2 both give unity, such that:
R D 1 Q 3 = | | f ( t = 0 ) | | 1
where it is less than or equal to 1 by definition of a probability distribution, and where the equality holds in the unlikely case that the distribution is initialized such that a single discrete density is unity. The fact that lattice Boltzmann’s variables are formulated as probability densities is indeed advantageous. While a similar feat could be achieved by rescaling variables for a well-posed problem, as suggested by [20], their relative values and numerical accuracy used limit the effectiveness of such an approach. Moreover, R e ( λ M A X ) = 1 < 0 , this means that both conditions set by [20] for arbitrary time-convergence are met. Another advantage of the lattice Boltzmann method is that it is by definition discretized, such that the error arising from discretizing the equation, the forward Euler for time derivative for example as discussed in [20], is irrelevant.

3. Carleman Linearization for Lattice Boltzmann

The basic tenant of Carleman linearization is a change of variables done such that the variables of the original nonlinear system, f ( t ) , are replaced by a larger set of variables V ( t ) . The original variables form a subset of the larger set of Carleman variables. The additional variables are monomials up to order O c of the original f i .
Denoting the vector of Carlemann variables of kth order as V ( k ) , and P ( k ) a vector of some polynomial functions of kth order in Carlemann variables, using the numbering scheme shown in Figure 3, we may write:
V ( 1 ) = f 1 f 2 f 3 T , t V ( 1 ) = P ( 2 ) ( V ( 1 ) , V ( 2 ) ) V ( 2 ) = f 1 2 f 1 f 2 f 2 2 f 2 f 3 f 3 2 f 3 f 1 T , t V ( 2 ) = P ( 3 ) ( V ( 1 ) , V ( 2 ) , V ( 3 ) )
For lattice Boltzmann with the BGK equilibrium function, we see that the time evolution of each set of monomial of discrete density variables of given order could be written as a function of variables of same order, all preceding orders, and an order above. In Equation (19), we see that those of first order monomials are written in terms of first and second order monomials, and those of second order monomials are written in terms of first, second and third order monomials.
V ( 1 ) = f 1 f 2 f 3 T , t V ( 1 ) = P ( 2 ) ( V ( 1 ) , V ( 2 ) ) V ( 2 ) = f 1 2 f 1 f 2 f 2 2 f 2 f 3 f 3 2 f 3 f 1 T , t V ( 2 ) = P ( 3 ) ( V ( 1 ) , V ( 2 ) , V ( 3 ) )
Carleman embedding involves, then, choosing an order of linearization and neglecting higher-order terms from the driving functions of ODEs. This is what we refer to as truncation, and it is demonstrated in Equation (20) to second order, where third-order terms otherwise required for the time evolution of second order terms are dropped.
V = V ( 1 ) V ( 2 ) = f 1 f 2 f 3 f 1 2 f 1 f 2 f 2 2 f 2 f 3 f 3 2 f 3 f 1 = V 1 V 2 V 3 V 4 V 5 V 6 V 7 V 8 V 9
The Carlemann variables V are then introduced to replace the remaining monomials, as shown in Equation (21).
An example of additional variables of second order is shown in Table 1 for a D1Q3 lattice, taking into account the model in Equation (8).
The dynamics of the extended system are then derived from the original system of a single phase, homogeneous, fluid, with terms beyond a chosen order O c dropped.
f i ( t ) t = Ω i ( f ( t ) )
which is linearized into the total derivative of the Carleman variables vector V ( t ) equating a constant coefficient matrix, the Carleman linearization matrix C, multiplying the Carleman variables vector:
V ( t ) t = C V ( t )
where the Carleman linearization matrix C is obtained by deriving the following system of equations:
V n t = Σ i = 1 Q V n ( t ) f i Ω i ( f ( t ) )
and identifying the variables V i on the right hand side of Equation (24).

3.1. Number of Variables

An upper bound for the number of Carleman variables for a desired order O c , when considering N original lattice variables, is
N = ( O c + ( Q + 1 ) 1 ) ! ( O c ) ! ( ( Q + 1 ) 1 ) ! = O c + Q Q + 1
This is an upper bound to the number of Carleman variables used in the linearized system because in practice some terms of order O c do not appear in the linearized equations. For example, from Table 1 f 2 2 , the second order term for the rest particles density, does not appear in the D1Q3 formulation. In general, the exact number of variables is given after specifying a lattice structure and an equilibrium function.

3.2. Carleman Linearization of Collision Step

The collision operator Equation (3) can be expressed as a function of the Carleman variables, V i s. To do that, we go back to Equation (1), and consider collision sans streaming. The total derivative of the discrete densities is described by the nonlinear collision operator on the right-hand side.
This assumes that the obtained solution for the discrete density distribution at each site is streamed exactly, and the nonlinear terms recalculated to evolve the system. While this allows us to isolate the error from the linearization of the collision step, it is undesirable in practice. On another note, the linearization of the collision step allows one to explore other discretization scheme to arrive at the LB formulation from the Boltzmann equation Equation (1). In particular, we conjecture that an implicit scheme for the time discretization would improve the error bounds at the cost of the sparsity of the resulting matrix.

3.3. Carleman Linearization of Streaming Step

Instead, we need to consider Equation (1). Another limitation of considering only a traditional one-dimensional model, such as Burger’s is that the problem of streaming the coupled terms of the Carleman linearization is avoided [20]. The forward and backward directions of the velocity are accounted for in one velocity variable with its negative and positive values, and derivatives of the velocity are discretized in terms of that one variable as well.
We have thus far considered linearization of the collision step solely. However, for a self-contained quantum fluid simulation algorithm, Carleman streaming must be considered, which leads us to a modified Boltzmann equation for the Carleman variables:
d V ( x , t ) d t = V ( x , t ) t + c i · Σ i = 1 Q V ( x , t ) x i = C V
If the partial derivatives are left undiscretized, we have to include additional variables to account for the new terms appearing, contributing to the blowup of variables, and subjecting a description of streaming to truncation. On the other hand, following the same discretization scheme typical of LB, in similarity to the derivation of Equation (2), we arrive at the a modified LB equation where the coefficients of the partial derivatives of the original variables f now show dependence on the variables themselves after replacing the expressions of the Carleman variables V and computing their partial derivatives. Equation (27) shows an example:
V n ( x , t ) f j ( x , t ) f j ( x , t ) t + c i · ( V n ( x , t ) f j ( x , t ) f j ( x , t ) x i ) = C n V
For D1Q3 second order linearization, with n = 4 , we have V 4 = f 1 f 2 :
f 2 ( x , t ) ( f 1 ( x + Δ x 1 , t ) f 1 ( x , t ) ) + f 1 ( x , t ) ( f 2 ( x + Δ x 2 , t ) f 2 ( x , t ) ) = 0 f 2 ( x , t ) f 1 ( x + Δ x 1 , t ) f 2 ( x , t ) f 1 ( x , t ) + f 1 ( x , t ) f 2 ( x + Δ x 2 , t ) f 1 ( x , t ) f 2 ( x , t ) = 0 f 2 ( x , t ) f 1 ( x + Δ x 1 , t ) 2 V 4 ( x , t ) + f 1 ( x , t ) f 2 ( x + Δ x 2 , t ) = 0
where we see new terms unaccounted for in the Carleman variables appear combining both nonlocality, and nonlinearity.
Another way to explain the above is that the discrete densities of the particles are weighted by their contribution to the Carleman variables, the new variables of the system V , when streamed. When discretizing the equation describing the evolution of the Carleman variables, a coupling between terms at different locations appears due to the different partial derivatives appearing in the term. Therefore, classical Carleman linearization of the lattice Boltzmann formulation exchanges the local nonlinearity of the collision step, with nonlocal linearity of the streaming step to which the linearized collision term is coupled. We note that additional V variables must introduced for the nonlocal coupled terms, i.e., f 1 ( x 1 + Δ x 1 , t ) f 2 ( x 2 , t ) to keep the system linear. This is indeed used for the Burger’s equation in previous literature [20]. However, this further exacerbates the blowup in variable count for the classical Carleman scheme.
This leads to the fact that streaming is also described by an infinite differential system that must also be truncated. That is, the exactness of streaming, a major advantage of the lattice Boltzmann method, is lost. On a classical computer, to study the collision step, it is possible to recalculate the nonlinear terms to achieve exact streaming. Remarkably, while Carleman linearization slashes out the exact streaming advantage of lattice Boltzmann, we are able to retrieve it by going into the quantum paradigm Itani et al. [26].

3.4. Error Bound

In Equation (8), we see that LB fits into a generalized quadratic ODE considered by [18,20], and it is a multi-population extension of the logistic equation suggested by [20] for treatment.
For a given system of differential equations in terms of a set of variables represented by a vector f , of which LB is an example, we denote the solution of the exact system as f , and that of the Carleman linearized system as f C . We use the same definition of the error ε from [18,20], in terms of the max supremum over time of the vector difference of exact and approximate solution normalized by their respective supremum norms:
ε ( t ) = f ( t ) f ( t ) f C ( t ) f C ( t )
As we integrate the system of equations, we define the maximum error made as
ε max = max t T ε ( t )
When using Carleman linearization and the Euler time discretization as in Equation (2), they require [20] the minimum number of Carleman variables N will be a function of ε max as be:
N = l o g 2 ( R ) l o g 2 ( 2 ( 1 + 1 ε max ) )
and the largest time-step Δ t :
Δ t = 1 N F 1 = ( l o g 2 ( R ) l o g 2 ( 2 ( 1 + 1 ε ) ) ) F 1 ) 1
given that all the eigenvalues of F 1 are negative real, and R < 1 .
The above formulas are derived for a single variable quadratic ODE system, f R 1 , for which Q = 1 and N = O c + 1 . Furthermore, in [20], it is shown that the dependence of N and Δ t with the error ε max is of the form Equations (31) and (32) even when R > 1 for the Burgers equation. Note that for the LB problem the bounds of Equations (2), (31) and (32) are not valid as the quadratic system is always multivariate- Q > 1 -and R > 1 for typical choices of the equilibrium function, as for a single-phase fluid in Equation (8).
Now we prove that the leading order in the error improves exponentially with the Carleman order, for 1,2 and 3D systems.
Let ( r ) denote a Carleman variable V i of rth order, V i ( r ) , such that C i j ( r ) ( k ) describes the matrix coefficient describing the contribution of V j ( k ) to V i ( r ) . We have:
V i ( 1 ) ( x , t ) = V i ( 1 ) ( x , t Δ t ) + Σ j C i j ( 1 ) ( 1 ) V j ( 1 ) ( x , t Δ t ) + Σ k C i k ( 1 ) ( 2 ) V k ( 2 ) ( x , t Δ t )
and:
V i ( 2 ) ( x , t ) = V i ( 2 ) ( x , t Δ t ) + Σ j C i j ( 2 ) ( 1 ) V j ( 1 ) ( x + Δ x j , t Δ t ) + Σ k C i k ( 2 ) ( 2 ) V k ( 2 ) ( x + Δ x k , t Δ t ) + Σ l C i l ( 2 ) ( 3 ) V l ( 3 ) ( x + Δ x l , t Δ t ) = E i ( 3 ) ( x , t Δ t ) + V i ( 2 ) ( x , t Δ t )
such that when streaming is considered:
V i ( 1 ) ( x , t ) = V i ( 1 ) ( x , t Δ t ) + Σ j C i j ( 1 ) ( 1 ) V j ( 1 ) ( x + Δ x j , t Δ t ) + Σ k C i k ( 1 ) ( 2 ) V k ( 2 ) ( x + Δ x k , t Δ t )
Replacing Equation (34) into Equation (35), we have:
V i ( 1 ) ( x , t ) = V i ( 1 ) ( x , t Δ t ) + Σ j C i j ( 1 ) ( 1 ) V j ( 1 ) ( x + Δ x j , t Δ t ) + Σ k C i k ( 1 ) ( 2 ) ( E k ( 3 ) ( x + Δ x k , t 2 Δ t ) + V k ( 2 ) ( x + Δ x k , t 2 Δ t ) )
For the collision-only setup considered for the classically linearized collision term, Δ x i = 0, such that one is able to verify:
Σ j C i j ( 1 ) ( 2 ) E j ( 2 ) ( x , t ) = 0
for D1Q3, D2Q9 and D3Q27, “full” lattices, for which the expressions become linear in Carleman variables up to second order. Equation (35) then reduces to:
V i ( 1 ) ( x , t ) = V i ( 1 ) ( x , t Δ t ) + Σ j C i j ( 1 ) ( 1 ) V j ( 1 ) ( x + Δ x j , t Δ t ) + Σ k C i k ( 1 ) ( 2 ) ( V k ( 2 ) ( x + Δ x k , t 2 Δ t ) )
Dropping the E term, and with further replacements similar to above, one can see that the first order terms depend only on the initial conditions of the second order terms in the whole domain, not only neighbouring cells, and no third order terms are needed. This is to say that turning off streaming resolves the nonlinearity of the problem, as expected.
With streaming, a simple Taylor expansion of Equation (35) shows that Carleman linearization of order yields a solution with error of the order:
ε m a x = O ( Δ t Δ x O c ) .
If we initialize the flow to be uniform, the inclusion of streaming does not introduce errors as above, as Equation (37) still holds for the initial conditions at the cells are identical, and so is the collision step, such that E ( x , t ) = E ( x + Δ x 1 , t ) = = E ( x + Δ x Q , t ) . At the boundaries, this still holds if they were periodic, but the latter amounts to the trivial case where the kinetic energy of the flow relaxes to zero. The argument for identical evolution for a uniform initial field under periodic boundaries is visualized in Figure 4. Periodic boundaries refer to a fully periodic domain, in all its dimensions, i.e., triply periodic in 3 D , which is typically useful for fundamental studies of homogeneous turbulence.
If (one of) boundaries are not periodic, the error is first generated in the collision step at the boundary, and propagated to the interior of the domain. As illustrated in Figure 5, with each time cycle, the error grows, and it propagates further inside, such that we may speak of a numerical error boundary layer. For example, in a pipe with periodic flow, where the error is first generated at the walls of the pipe, rather than the periodic inlet and outlet.

4. Numerical Results

4.1. Logistic Equation

To demonstrate the utility of Carleman linearization, we consider the logistic equation, as suggested by [20].
d f d t = K f ( 1 f ) f [ 0 , 1 ]
We note that the K factor appears for both first and second order terms, and, thus, cancels out in the calculation of R which remains dependent on the initial conditions solely. In the results, we take K = 1 . We still see an abrupt cut-off in the utility of the linearization for the resulting analytical solution. This is explained by the fact that even though R 1 , the coefficient of the first-order term is definite positive, unity, thereby fulfilling neither R e ( λ 1 ) < 0 [20] nor μ ( F 1 ) < 0 [18], the conditions set to gurantee error convergence. According to [18,20], this explains the blow-up in the error shown in the analytical solution. Namely, we restate upper-bounds for time T using the power-series method of [18]:
T = 1 F 1 ln ( 1 + F 1 f ( t = 0 ) F 2 ) = ln ( 1 + 1 f ( t = 0 ) )
which predicts the time of validity for the linearization as shown in Table 2, and with which the results agree, as the analytical solutions presented in Figure 6.
However, for the numerical solution computed through time-discretization of the equation, we note the error shows slower evolution, giving a longer effective time-period to work with, as could be seen with the numerical solutions extending well-beyond their analytical counterparts before blowing up in Figure 6. Namely, we note that | | F 2 | | = | R e ( λ M A X ( F 1 ) ) | = K such that their ratio is independent of K, but when the equation is discretized f ( T + Δ t ) becomes dependent on f ( t ) and the original driving function scaled by Δ t , Δ K ( f ( 1 f ) ) . Thus, the choice of K and Δ t weigh on the contribution of nonlinear terms in the discretized equation, such that we expect more accurate solutions for smaller Δ t and/or K. This is in line with the findings for the validity of the linearization of the Burger’s equation with R 40 , and an invitation for more applied, rather than analytical, work in the field. In terms of lattice Boltzmann, which is defined as a discretized problem, this reveals a shortcoming of using the analytical bounds presented for a general quadratic equation. However, given that Carlemann linearization is exact for a collision-only scheme, and the exacerbation of the blowup of variables when streaming is considerd, as discussed in Section 3.3, this is not investigated on a classical computer, and the results presented for a D1Q3 lattice are limited to a collision-only scheme.

4.2. D1Q3

We now concern ourselves with the results of linearizing the collision term of a D1Q3 lattice Boltzmann formulation. As mentioned in methodology section, exact streaming of the linearized system is only possible on a classical computer with the explicit computation of the nonlinear terms, which defies the purpose of a linearization scheme. Therefore, we restrict ourselves to the collision step only. The test case involves two steps, the first is initializing the discrete densities of a single cell, and the second is performing successive collisions.
f ( 1 ) ( t + Δ t ) = ( I + F 1 ) f ( 1 ) + F 2 f ( 2 ) + F 0
where τ plays a role since we have the contribution of the identity matrix arising from the discretization which does not scale by Δ t τ whereas F 2 , as well as F 1 and F 0 do for that matter.
The discrete densities are initialized to differ from the weights of the model 1 6 2 3 1 6 T by the velocity, chosen to be u = 0.1 . In the results shown in Figure 7, the difference has been distributed amongst the left and right discrete densities, such that their difference is u, 1 6 u 2 2 3 1 6 + u 2 T . We note that this symmetric initialization yields the constant first-order solution shown in blue, but it is not necessary, choosing 1 6 2 3 1 6 + u T , for example, has also yielded exact solution from second order during our runs. Apart from the initial velocity, we also experiment with different timestep-relaxation time ratios, varying them between 0.1 and 2, and we see that the exactness holds. The choice of 2 as a maximum ratio is due to the limitations of the lattice Boltzmann scheme under considerations, as would be discussed below. In the absence of streaming, we see in Figure 7 that the solution is exact for all orders of linearization starting from the second.
In terms of computing the Carleman linearization matrices, a different approach is used for the lattice Boltzmann scheme than for the logistic equation. In the presence of a single variable, we know apriori the variables that would appear in the linearization, and their derivatives are easily defined either recursively, in relation to one another, or explictly. However, in the case of the lattice Boltzmann formulation, we have found it more efficient to symbolically express the derivatives of each order, starting with the first, identify the variables that do appear in the expression, and then compute the derivatives of the new ones amongst them. As such, we avoid calculating the derivatives of all monomials, some of which never appear in the formulations, such that we have been able to compute the linearization up to 25th order within a handful of minutes on a regular Intel i7-8750H laptop. Apart from the details of the implementation, setting up the Carlemann linearization matrices allows for parallel in time computation, such that one is able to exploit algorithms to calculate powers of matrices, to precompute the matrix for each timestep, irrespective of the initial data.
Moreover, as could be inferred from Figure 8, with increasing linearization order, the Carleman matrix increases in sparsity and approaches a diagonal matrix, becoming more desirable in terms of numerical stability, and even quantum matrix-inversion algorithms.
Dynamic similarity holds for the lattice Boltzmann model of flow under consideration, such that the Reynold’s number is equal in lattice and physical units. In lattice units, we may write it as:
R e = L U ν
For the single cell considered, without streaming, there is no characteristic length scale. We may instead define it using the characteristic velocity U and the relaxation constant time τ . The problem setup is that of a flow of decaying velocity, such that we may use the initial velocity u as the characteristic velocity U. Moreover, the kinematic viscosity is defined in lattice units as:
ν = c S 2 ( τ 1 2 )
It becomes immediately obvious that τ > 1 2 is a limitation of the model, or in lattice units, Δ t τ < 2 . Even in the vicinity of 2, the model is considered unstable. However, we note that the Carleman linearized system still tracks the original system exactly beyond the range of stability of the lattice Boltzmann model. If we define the Reynolds number for the grid [27]:
R e g = U Δ x c S 2 ( τ 1 2 ) = U c S 2 ( τ 1 2 )
and consider the low-Mach number requirement for the incompressibility assumption, typically M a < 0.3 , we may arrive at the fact that the grid Reynolds number should be of order O ( 10 ) , which in fact, for a given τ , is another way of saying that Δ x should be chosen in physical units as small enough to capture the long-range structure that arises [27]. As for τ , the recommendation is that it is slightly larger than unity. Put together, they indicate that the lattice Boltzmann scheme under consideration is fit for R e O ( 10 100 ) . We take the chance here to reiterate the findings that Carleman linearization still exactly tracks the unstable lattice Boltzmann system. Therefore, the limitations on Reynolds number arise from the inherent limitations of the lattice Boltzmann scheme considered. While we expect our findings to extend to other lattice Boltzmann models, this is conditional upon the equations of the extended models and the resulting structure of the coefficient matrices. This paper should be taken as a motivation to investigate other flavours of the lattice Boltzmann method beyond the vanilla flavour considered here.
In terms of Carleman linearization, a τ larger than unity in lattice units spells good news for the method. It means that the nonlinearity ratio remains bounded by unity even when considering the time discretization:

5. Conclusions

The classical algorithm suffers from a blowup in variable count and sacrifices the exactness of streaming. However, we have shown that the error of the classical Carleman technique could be mitigated, even effaced, in specific applications. On the bright side, we have shown that, at least for the case explored in this paper, the error of the Carleman linearization decreases exponentially with the order of the linearization. This bodes well for the development of a quantum LB algorithm based on Carleman linearization [26].

Author Contributions

Conceptualization, S.S. and W.I.; Methodology, S.S. and W.I.; Software, W.I.; Formal Analysis, S.S. and W.I.; Investigation, S.S. and W.I.; Writing—Original Draft Preparation, S.S. and W.I.; Writing—Review & Editing, S.S. and W.I.; Visualization, W.I.; Supervision, S.S.; Project Administration, S.S.; Funding Acquisition, S.S. All authors have read and agreed to the published version of the manuscript.

Funding

Sauro Succi acknowledges funding from the European Research Council under the European Union’s Horizon 2020 Framework Programme (No. FP/2014-2020) ERC Grant Agreement No.739964 (COPMAT). Wael Itani acknowledges funding from New York University Tandon School of Engineering under the School of Engineering Fellowship 2021.

Data Availability Statement

The MATLAB codes developed for this study are openly available in GitHub at https://github.com/waelitani/Carleman-linearization-lattice-boltzmann (accessed on 27 October 2021).

Acknowledgments

The authors would like to acknowledge Antonio Mezzacapo for the long, fruitful discussions without which major findings of this paper would not have been possible.

Conflicts of Interest

The authors declare no conflict of interest.

Nomenclature

v Continuum particle velocity
c i Discrete velocity in the ith direction
QNumber of discrete velocities number of modes at each lattice site, indexed by i
DNumber of dimensions of the lattice
xDimensions of the lattice, indexed by d, independent position vector variable
NNumber of Carleman variables
N x d Number of sites across the dth dimension x d of the lattice
GVolume of the lattice in the units obtained by the product of the number of sites in each dimension Π d = 1 D N x d
f i Discrete density distribution weight
Ω Collision operator defined by d f d t = Ω ( f )
w i Weight of the ith discrete density
O c Truncation order in Carleman linearization
RRatio providing measure of nonlinearity parametrizing the error bound of the Carleman technique
F 0 Coefficient vector of zero-order terms in a quadratic ODE
F 1 Coefficient matrix of first-order terms in a quadratic ODE
F 2 Coefficient matrix of second-order terms in a quadratic ODE
tIndependent time variable
u Flow velocity
ρ Local fluid density in lattice units
cLattice speed
CCarleman linearization matrix
ε Norm of the solution error
f C Approximated solution of the system
Δ t Discrete timestep
VVector of Carleman variables
e Lattice vectors
M a Mach number
KScaling factor of the logistic equation
TTotal integration time
pOrder of the polynomial describing the driving function Ω
P ( k ) a vector of polynomial functions of kth order in Carlemann variables
R e Reynold’s number
LCharacteristic length scale defined in units of Δ x
UCharacteristic velocity in lattice units
ν Kinematic viscosity in lattice units
c s Speed of sound in lattice units

References

  1. Nitzberg, B. Weather Forecasting Gets Real, Thanks to High-Performance Computing. 2017. Available online: https://www.altair.com/c2r/ws2017/weather-forecasting-gets-real-thanks-high-performance-computing (accessed on 25 November 2021).
  2. Moss, S. China May Already Have Two Exascale Supercomputers. 2021. Available online: https://www.datacenterdynamics.com/en/news/china-may-already-have-two-exascale-supercomputers/ (accessed on 25 November 2021).
  3. Benzi, R.; Succi, S.; Vergassola, M. The lattice Boltzmann equation: Theory and applications. Phys. Rep. 1992, 222, 145–197. [Google Scholar] [CrossRef]
  4. Succi, S.; Benzi, R. Lattice Boltzmann equation for quantum mechanics. Phys. D Nonlinear Phenom. 1993, 69, 327–332. [Google Scholar] [CrossRef]
  5. Yepez, J. Quantum Computation of Fluid Dynamics. In Quantum Computing and Quantum Communications; Williams, C.P., Goos, G., Hartmanis, J., van Leeuwen, J., Eds.; Series Title: Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1999; Volume 1509, pp. 34–60. [Google Scholar] [CrossRef]
  6. Vahala, G.; Yepez, J.; Vahala, L. Quantum Lattice Gas Algorithm for Quantum Turbulence and Vortex Reconnection in the Gross-Pitaevskii Equation. In Proceedings of the 2008 SPIE Quantum Information and Computation VI, Orlando, FL, USA, 23 April 2008; Volume 6976. [Google Scholar] [CrossRef]
  7. Yepez, J. Lattice-Gas Quantum Computation. Int. J. Mod. Phys. C 1998, 9, 1587–1596. [Google Scholar] [CrossRef] [Green Version]
  8. Yepez, J. An efficient quantum algorithm for the one-dimensional Burgers equation. arXiv 2002, arXiv:0210092. [Google Scholar]
  9. Yepez, J. Open quantum system model of the one-dimensional Burgers equation with tunable shear viscosity. Phys. Rev. A 2006, 74, 042322. [Google Scholar] [CrossRef] [Green Version]
  10. Boghosian, B.M.; Yepez, J.; Coveney, P.V.; Wager, A. Entropic lattice Boltzmann methods. Proc. R. Soc. London Ser. A Math. Phys. Eng. Sci. 2001, 457, 717–766. [Google Scholar] [CrossRef] [Green Version]
  11. Boghosian, B.M.; Taylor, W. Simulating quantum mechanics on a quantum computer. Phys. D Nonlinear Phenom. 1998, 120, 30–42. [Google Scholar] [CrossRef] [Green Version]
  12. Steijl, R. Quantum Algorithms for Fluid Simulations. In Advances in Quantum Communication and Information; Bulnes, F.N., Stavrou, V., Morozov, O.V., Bourdine, A., Eds.; IntechOpen: Rijeka, Licko-Senjska, Croatia, 2020. [Google Scholar] [CrossRef] [Green Version]
  13. Mezzacapo, A.; Sanz, M.; Lamata, L.; Egusquiza, I.L.; Succi, S.; Solano, E. Quantum Simulator for Transport Phenomena in Fluid Flows. Sci. Rep. 2015, 5, 13153. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  14. Budinski, L. Quantum algorithm for the advection—Diffusion equation simulated with the lattice Boltzmann method. Quantum Inf. Process. 2021, 20, 57. [Google Scholar] [CrossRef]
  15. Lloyd, S.; De Palma, G.; Gokler, C.; Kiani, B.; Liu, Z.W.; Marvian, M.; Tennie, F.; Palmer, T. Quantum algorithm for nonlinear differential equations. arXiv 2020, arXiv:2011.06571. [Google Scholar]
  16. Succi, S. Lattice Boltzmann 2038. EPL Europhys. Lett. 2015, 109, 50001. [Google Scholar] [CrossRef]
  17. Steeb, W.H. Linearization Procedure and Nonlinear Systems of Differential and Difference Equations. In Nonlinear Phenomena in Chemical Dynamics; Vidal, C., Pacault, A., Eds.; Springer Series in Synergetics; Springer: Berlin/Heidelberg, Germany, 1981; p. 275. [Google Scholar] [CrossRef]
  18. Forets, M.; Pouly, A. Explicit Error Bounds for Carleman Linearization. arXiv 2017, arXiv:1711.02552. [Google Scholar]
  19. Steeb, W.H. Linearization Procedure and Nonlinear Systems of DitJerential and DitJerence Equations. In Nonlinear Phenomena in Chemical Dynamics: Proceedings of an International Conference, Bordeaux, France, 7–11 September 1981; Vidal, C., Pacault, A., Haken, H., Eds.; Springer Series in Synergetics; Springer: Berlin/Heidelberg, Germany, 1981; Volume 12. [Google Scholar] [CrossRef]
  20. Liu, J.P.; Kolden, H.O.; Krovi, H.K.; Loureiro, N.F.; Trivisa, K.; Childs, A.M. Efficient quantum algorithm for dissipative nonlinear differential equations. arXiv 2020, arXiv:2011.03185. [Google Scholar] [CrossRef] [PubMed]
  21. Succi, S. The Lattice Boltzmann Equation: For Complex States of Flowing Matter, 1st ed.; Oxford University Press: Oxford, UK, 2018. [Google Scholar]
  22. Bill, Y.; Meskas, J. Lattice Boltzmann Method for Fluid Simulations. 1997. Available online: https://www.researchgate.net/publication/265077140_Lattice_Boltzmann_Method_for_Fluid_Simulations/ (accessed on 25 November 2021).
  23. Randles, A.P.; Kale, V.; Hammond, J.; Gropp, W.; Kaxiras, E. Performance Analysis of the Lattice Boltzmann Model Beyond Navier-Stokes. In Proceedings of the 2013 IEEE 27th International Symposium on Parallel and Distributed Processing, Boston, MA, USA, 20–24 May 2013; IEEE: Cambridge, MA, USA, 2013; pp. 1063–1074. [Google Scholar] [CrossRef] [Green Version]
  24. He, X.; Luo, L.S. Lattice Boltzmann Model for the Incompressible Navier—Stokes Equation. J. Stat. Phys. 1997, 88, 927–944. [Google Scholar] [CrossRef]
  25. Lallemand, P.; Luo, L.S.; Krafczyk, M.; Yong, W.A. The lattice Boltzmann method for nearly incompressible flows. J. Comput. Phys. 2021, 431, 109713. [Google Scholar] [CrossRef]
  26. Itani, W.; Mezzacapo, A.; Succi, S. Quantum Carlemann Algorithm for Lattice Boltzmann Fluid Simulation. 2021; In preparation. [Google Scholar]
  27. Krüger, T.; Kusumaatmaja, H.; Kuzmin, A.; Shardt, O.; Silva, G.; Viggen, E.M. The Lattice Boltzmann Method: Principles and Practice, 1st ed.; Graduate Texts in Physics; Springer International Publishing: Cham, Switzerland, 2017. [Google Scholar] [CrossRef]
Figure 1. An illustration of the D1Q3 lattice Boltzmann scheme showing how the collision step is a relaxation of the discrete densities towards their equilibrium values whereas streaming involves assigning their values to neighboring cells in the respective directions.
Figure 1. An illustration of the D1Q3 lattice Boltzmann scheme showing how the collision step is a relaxation of the discrete densities towards their equilibrium values whereas streaming involves assigning their values to neighboring cells in the respective directions.
Fluids 07 00024 g001
Figure 2. Different lattice configurations in three (a), two (b) and one (c) dimensions.
Figure 2. Different lattice configurations in three (a), two (b) and one (c) dimensions.
Fluids 07 00024 g002
Figure 3. Numbering convention used for the discrete densities of the D1Q3 lattice Boltzmann scheme. In 1D, the lattice vectors correspond to the respective scalars 1 , 0 , 1 .
Figure 3. Numbering convention used for the discrete densities of the D1Q3 lattice Boltzmann scheme. In 1D, the lattice vectors correspond to the respective scalars 1 , 0 , 1 .
Fluids 07 00024 g003
Figure 4. Illustration of how the streaming step preserves uniformity under periodic boundaries only, using D1Q2. The uniform initial flow with periodic boundaries coincides with the error-free case of collision without streaming while errors form at the boundaries when non-periodic boundary conditions are applied. We see that with the same initial conditions and periodic boundary, local and neighboring information of discrete densities are interchangeable. (a) Uniform initial flow field, (b) Periodic boundary conditions, (c) Non-periodic boundary conditions.
Figure 4. Illustration of how the streaming step preserves uniformity under periodic boundaries only, using D1Q2. The uniform initial flow with periodic boundaries coincides with the error-free case of collision without streaming while errors form at the boundaries when non-periodic boundary conditions are applied. We see that with the same initial conditions and periodic boundary, local and neighboring information of discrete densities are interchangeable. (a) Uniform initial flow field, (b) Periodic boundary conditions, (c) Non-periodic boundary conditions.
Fluids 07 00024 g004
Figure 5. Illustration of the propagation of Carleman linearization error with timestep in a two-dimensional domain with uniform initial flow and non-periodic boundaries. Lattice cells with no fill have discrete exact discrete densities whereas ones with red fill have discrete densities with error. (a) Initial condition, at t = 0 , (b) After one timestep, at t = Δ t . (c) After two timesteps, at t = 2 Δ t .
Figure 5. Illustration of the propagation of Carleman linearization error with timestep in a two-dimensional domain with uniform initial flow and non-periodic boundaries. Lattice cells with no fill have discrete exact discrete densities whereas ones with red fill have discrete densities with error. (a) Initial condition, at t = 0 , (b) After one timestep, at t = Δ t . (c) After two timesteps, at t = 2 Δ t .
Fluids 07 00024 g005
Figure 6. The analytical (left) (analytical integration) and numerical (right) (discrete time-stepping) solutions of the Carleman-linearized logistic equation are shown with their corresponding errors (bottom) as a function of time, varying initial conditions and Carleman linearization orders. The predicted time of validity is shown as a vertical asymptote in each plot.
Figure 6. The analytical (left) (analytical integration) and numerical (right) (discrete time-stepping) solutions of the Carleman-linearized logistic equation are shown with their corresponding errors (bottom) as a function of time, varying initial conditions and Carleman linearization orders. The predicted time of validity is shown as a vertical asymptote in each plot.
Fluids 07 00024 g006
Figure 7. The solution of the discrete densities of the fluid in D1Q3 for successive collisions is shown for different Δ t τ , for the exact and Carleman-linearized formulations as a function of time and Carleman linearization order. The bottom figures show the normalized errors for each discrete density. Note that the solution is exact beyond the first linearization order.
Figure 7. The solution of the discrete densities of the fluid in D1Q3 for successive collisions is shown for different Δ t τ , for the exact and Carleman-linearized formulations as a function of time and Carleman linearization order. The bottom figures show the normalized errors for each discrete density. Note that the solution is exact beyond the first linearization order.
Fluids 07 00024 g007aFluids 07 00024 g007b
Figure 8. Visualization of the sparsity of the Carleman matrix for the collision term at various orders.
Figure 8. Visualization of the sparsity of the Carleman matrix for the collision term at various orders.
Fluids 07 00024 g008
Table 1. Example of D1Q3 expanded to a second order truncation in Carleman linearization, with N = 9 Carleman variables. Note that the dummy variable V 1 = 1 is defined to simplify the form of Equation (23).
Table 1. Example of D1Q3 expanded to a second order truncation in Carleman linearization, with N = 9 Carleman variables. Note that the dummy variable V 1 = 1 is defined to simplify the form of Equation (23).
Carleman VariablesLattice Variables
V 1 1
V 2 f 1 2
V 3 f 3 2
V 4 f 1 f 2
V 5 f 1 f 3
V 6 f 2 f 3
V 7 f 1
V 8 f 2
V 9 f 3
Table 2. The maximum endtime validity for Carleman linearization of the logistic equation as predicted by Equation (41).
Table 2. The maximum endtime validity for Carleman linearization of the logistic equation as predicted by Equation (41).
f ( t = 0 ) T
0
0.12.40
0.21.79
0.31.47
0.41.25
0.51.10
0.60.98
0.70.89
0.80.81
0.90.75
10.69
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Itani, W.; Succi, S. Analysis of Carleman Linearization of Lattice Boltzmann. Fluids 2022, 7, 24. https://doi.org/10.3390/fluids7010024

AMA Style

Itani W, Succi S. Analysis of Carleman Linearization of Lattice Boltzmann. Fluids. 2022; 7(1):24. https://doi.org/10.3390/fluids7010024

Chicago/Turabian Style

Itani, Wael, and Sauro Succi. 2022. "Analysis of Carleman Linearization of Lattice Boltzmann" Fluids 7, no. 1: 24. https://doi.org/10.3390/fluids7010024

Article Metrics

Back to TopTop