1 Introduction
Modeling and simulating multiphase flows is a challenging task for traditional computational fluid dynamics (CFD). Firstly, the CFD approach is generally based on the macroscopic continuum equations, e.g., Navier–Stokes equations (NSEs), and then discretized by finite difference, finite element, or finite volume schemes, etc. Secondly, there exists a wide range of space time scales in the multiphase system owing to the existence of complex interfaces between various phases/components, which may break the validity of the macroscopic thermohydrodynamic description [
1]. Nevertheless, as a mesoscopic approach and a bridge between the microscopic molecular dynamics and the macroscopic CFD, the lattice Boltzmann (LB) method [
2–
16] is particularly promising in the multiphase area [
2,
3,
17–
45]. The reasons are also twofold. On the one hand, it should be noted that, the interparticle interaction (IPI) is the underlying physical reason for phase separation and interfacial tension in such systems. When the IPI is appropriately incorporated, the complex behaviors of the system will emerge naturally. On the other hand, the distinct advantage of the LB method, i.e., the intrinsic kinetic nature, makes the IPI be incorporated easily and flexibly into the LB framework.
Broadly speaking, to date, there are two kinds of LB models for the simulation of multiphase flows. The first is the isothermal models, where only mass and momentum conservations are kept, thermodynamic effects are not taken into account. Well-known models of this category includes the chromodynamic model by Gunstensen
et al. [
18], the pseudo-potential model by Shan and Chen (SC) [
19,
20], and the free-energy model by Swift
et al. [
21,
22], etc. The chromodynamic model is a further development of the two-component lattice-gas automata model originally proposed by Rothman and Keller [
17]. In this approach, red and blue colored particles are used to represent two different fluids. Phase separation is achieved through controlling the IPI based on the color gradient. In the SC-type model, nonlocal interactions between particles at neighboring lattice sites are incorporated. The interactions determine the form of the equation of state (EOS) and the interfacial dynamics of the system. In the free-energy model, besides the mass and momentum conservation constraints, additional ones are imposed on the equilibrium distribution function to make the pressure tensor consistent with that of the free-energy functional of inhomogeneous fluids.
Given the great importance of thermohydrodynamics of multiphase flows in many fields of physics and engineering, constructing LB models for nonideal fluids with thermodynamics has been attempted since the early days of LB research. This results in the second category, the thermal LB models. Existing thermal LB models can be roughly classified into four subcategories, i.e., the hybrid approach [
34–
37], the double-distribution-function (DDF) approach [
38], the shifting approach [
39], and the multispeed-extra-force (MEF) approach [
40–
43]. In the hybrid approach, the mass and momentum are described by an isothermal multiphase LB model, while the temperature dynamics are obtained by solving a scalar transport energy equation via various numerical schemes. To ensure that the velocity and pressure fields evolve in a thermodynamically consistent manner, an appropriate coupling between the isothermal and thermal modules of the numerical scheme is introduced through a suitably defined body force. This approach is conceptually simple and numerically robust, because of the absence of energy conservation constraint in the LB model. Alternatively, in the DDF approach, two different distribution functions are utilized. One is used to simulate the density and the velocity fields, and the other one is employed to monitor the temperature field. Actually, the DDF approach can be regarded as another version of the hybrid approach, since the only difference between them is that the energy equation in the DDF approach is solved by an auxiliary LB model, rather than by solving the energy equation at the macroscopic level as in the hybrid approach [
46]. The third is the shifting approach, which implements energy conservation by introducing an additional suitable shift of the temperature field in the local equilibrium besides Shan–Chen’s velocity shift. The MEF approach is generally based on a multispeed TLB model for ideal gas system, e.g., the D2V33-TLB model proposed by Watari and Tsutahara (WT) [
47]. To obtain the correct full set of thermohydrodynamics at the mesoscopic level, the multispeed model uses discrete-velocity model (DVM) with high spatial isotropy and includes higher-order of the flow velocity in the Taylor expansion of the equilibrium distribution. Although originally works only for ideal gas system, the multispeed model can be extended to multiphase system using the extra force method. The one developed by Gonnella, Lamura, and Sofonea (GLS) [
41] is typical. In this model, an extra term
, accounting for IPI, is added into the LB equation to describe the van der Waals (VDW) fluids. Chapman–Enskog (CE) procedure indicates that the model reproduces in the continuum the full set of thermohydrodynamic equations with the stress terms as recently developed by Onuki [
48,
49]. Compared to TLB multiphase models listed above, the model considers all factors, e.g., viscous dissipation, interfacial tension, and compression work done by the pressure, in both the momentum and energy equations.
In a recent work [
42], we improved the GLS model by using the fast Fourier transform (FFT) and its inverse (IFFT) to discretize the spatial derivatives in the convection term
and the force term
, so that the total energy conservation can be better held and the spurious velocities can be damped to a negligible scale in numerical simulations. For convenience of description, we refer to this model as the FFT–TLB model. However, the previous version is still subject to at least the following two constraints: (i) fixed critical density and temperature, and (ii) suitable only for periodic boundary conditions (PBCs). In the present study, we further analyze the merits of the FFT algorithm over traditional finite difference (FD) schemes and investigate the effects of smoothing factors on the accuracy and stability of the model in detail, then try to remove the above two limitations by inserting VDW EOS with flexible parameters and designing improved boundary conditions for nonperiodic system.
The rest of the paper is structured as follows. The FFT–TLB model is briefly reviewed in Section 2. In Section 3, we analyze the merits of the FFT scheme, incorporate new VDW EOS into the FFT–TLB model, and discuss how to implement solid wall boundary conditions when the FFT scheme is used. Finally, in Section 4, we summarize the results and suggest directions for future research.
2 Outline of the model
Here we present the FFT–TLB model for VDW fluids. The model consists of the following three parts: (i) WT model for ideal gas system, (ii) an appropriate interparticle force accounting for nonideal gas effects, and (iii) the FFT approach used to calculate the spatial derivatives.
2.1 WT model for ideal gas system: Based on the multispeed approach
By using the multispeed approach, Watari and Tsutahara proposed a TLB model for compressible flows [
47]. The model uses a DVM that is at least up to seventh rank isotropy,
where subscript indicates the k-th group of the particle velocities whose speed is vk, and denotes the direction of particle’s speed. The equilibrium distribution function , corresponding to a Maxwellian distribution, is expanded in polynomial up to the fourth order of fluid velocity ,
with Fk the weighting factors, T the local temperature and n the density. Hydrodynamic quantities can be calculated from the following moments:
where is the the distribution function.
2.2 GLS model for nonideal gas system: Based on the extra force approach
Gonnella, Lamura, and Sofonea improved the WT model by introducing an appropriate force term, , to describe the nonideal gas effects. The GLS–LB equation reads
where takes the following form:
The GLS-LB equation is designed to recover the following NSEs for VDW fluids:
where is the reversible part of stress, comprising the VDW EOS and the nonideal gas interaction term , with the surface tension coefficient and a constant, the unit tensor. is the usual viscous stress tensor with the shear and bulk viscosities and , respectively. is the total energy density including the gradient contributions.
Chapman–Enskog (CE) expansion indicates that the coefficients A, , C, and Cq in Eq. (7) can be expressed in the following forms so as to reproduce Eqs. (8)-(10):
It is worth remarking that the introduction of the term Cq makes the thermal conductivity be tuned independently from the shear viscosity η. As a result, the model can handle flows with variable Prandtl numbers by adjusting the parameter q,
Compared to the multiple-relaxation-time [
50] or the hybrid approach [
34–
37] that can also achieve this goal, the extra force approach is more easy to implement and contains more physical connotation.
2.3 The FFT approach
Here we briefly review the basics of the FFT approach, and conduct a further analysis on the merits of this way in detail in the next section.
This approach originates from a general theorem of derivative based on FFT which reads [
51,
52]
where i is an imaginary unit, kx the wave number along the x -direction, and the Fourier transform of . The theorem provides a way to calculate the spatial derivative composed of the following three steps: (i) Transforming in real space into in reciprocal space; (ii) multiplying with ; (iii) taking the IFT of , and then can be obtained. This approach is naturally suitable for periodic system since the FFT and IFT algorithms intrinsically adapt the PBCs. Besides, via this way, higher-order and fractional-order derivatives can be conveniently computed only if we replace with , where n is the order of the derivative. This is one of the main merits of the FFT over FD scheme.
Within the condition that
is infinitely differentiable, the FFT approach gives the exact result with infinite order accuracy [
51–
54], typically well beyond that of the standard FD schemes. Nevertheless, in many cases it is hard to ensure that the infinite differentiability condition is well satisfied. For example if
has a discontinuity, then the discontinuity will induce oscillations, known as the Gibbs phenomenon. The Gibbs effects influence the accuracy of the FFT not only in the neighborhood of the point of singularity, but also over the entire computational domain. In the recent work [
42], based on Taylor series expansion of wave number
kx, we presented a way to construct smoothing factors that can be used to refrain the Gibbs oscillations effectively. First, we expand
kx in Taylor series
Second, in order to damp the Gibbs oscillations, or, equivalently, to filter out more high frequency waves, kx may take the form of an appropriately truncated Taylor series expansion of , e.g., kx may take the following forms:
and
Some simple derivations demonstrate that the FFT approach with , , , and has a second-order, fourth-order, sixth-order, and eighth-order accuracy in space, respectively. Then the smoothing factor for can be formulated as:
Smoothing factors for k2, k3, and k4 can be calculated in a similar way.
Here we only discuss how to approximate for simplicity. In the y-direction we can do in a similar way, since the derivatives and are approximated dimension by dimension. When approximating , one fixes x and use a one-dimensional approximation in the y-direction.
3 Numerical results and physical analyses
In this section, we analyze the merits of the FFT scheme with k1 over the traditional FD scheme, e.g., the second-order central difference (2nd-order CD) scheme; discuss effects of the smoothing factors on the FFT approach; incorporate VDW EOS with flexible parameters; discuss how to adapt suitable boundary conditions for the FFT scheme when solid walls are present.
3.1 Merits of the FFT scheme over the 2nd-order CD scheme
The FFT scheme with k1 is 2nd-order in precision, the 2nd-order CD scheme has the same precision. While, compared to the latter, the former has higher precision, better numerical stability, more advantages to guarantee energy conservation and to refrain spurious velocities. Next, we illustrate these advantages one by one.
3.1.1 Higher precision
The FFT scheme with k1 corresponds to the following formula:
Taking IFT of the RHS of Eq. (23) gives
where represents the third-order derivative. Therefore, the FFT scheme with operator k1 has a 2nd-order accuracy in space. Similarly, if , then the FFT approach corresponds to the normal 2nd-order CD scheme,
Although both Eqs. (24) and (25) are 2nd-order, the remainder errors are different from each other. In Eq. (24) the remainder error is , which is smaller than the one in Eq. (25). So, from this point of view, the FFT scheme with has higher precision than the 2nd-order CD scheme does. Similarly, the FFT scheme with k2 has higher accuracy than the fourth-order CD scheme does.
3.1.2 Better numerical stability
Figure 1 shows patterns calculated from GLS model with the 2nd-order CD scheme in (a) and the FFT scheme with in (b) at . The time derivative is calculated via the 2nd-order Runge–Kutta scheme. The initial conditions are set as , , , where is a random density with an amplitude of . The remaining parameters are set to be , , , , , , , , , , , and lattice size . PBCs are imposed on - and -directions. We see that when the 2nd-order CD scheme is used, spurious oscillations will occur [see Fig. 1(a)]. Numerical results indicate that such oscillations will also appear if the 4th-order CD scheme is employed. These oscillations enlarge spatial derivatives in both the convection term and the extra force term. As a result, with the decrease of , the simulation becomes unstable. For example, when decreases to , simulation with the 2nd-order CD scheme is unstable, while the one by FFT scheme with k1 can keep on working.
3.1.3 Better energy conservation
Figure 2 depicts the variations of the total energy for the phase separating system plotted in Fig. 1. To be seen is that the FFT scheme has more advantage to guarantee energy conservation.
3.1.4 Smaller spurious velocities
In order to clarify this point, we conduct two simulations about the liquid-vapor interface with the 2nd-order CD scheme and the FFT scheme. Simulations were carried out over a domain with PBCs in both directions. The initial conditions are set as
where and are the theoretical values at . Parameters are unchanged. Time evolution of the maximum velocity with these two schemes are given in Fig. 3. Compared to the 2nd-order CD scheme, spurious velocities obtained from the FFT approach decrease to a negligible scale when .
3.2 Effects of the smoothing factors
Smoothing factors for , , , , and with and are displayed in Fig. 4, where and denote wave number and smoothing factor for the 2nd-order CD scheme, respectively. One sees that the lower-order smoothing factors, e.g., and , filter out more high-frequency waves, and may result in excessively smeared approximations, which are unfaithful representations of the true physics. On the other hand, the higher-order smoothing factors, such as and , reserve more higher-frequency waves, but may not damp the Gibbs phenomenon when the discontinuity is strong enough, then cause numerical instability. The smoothing factors should survive the dilemma of stability versus accuracy.
Compared to , , , and , damps the highest waves to zero. Consequently, we may conclude that the oscillations shown in Fig. 1(a) is due to the overshoot of the filtering operator that results in a serious lack of high-frequency waves. In other words, high-frequency waves are necessary to describe the continuous sharper interface, the lack of them will lead to the lack of corresponding information. While for a shock interface, too many high-frequency waves will induce numerical instability. Therefore, smoothing factors should be minimal but make the evolution stable at the same time.
Figure 5 shows patterns calculated from the FFT–TLB model at
, where
,
,
, and
are used in (a), (b), (c), and (d), respectively. The initial conditions and parameters are consistent with what we used in Fig. 1. We cannot find obvious differences between these patterns. To further analyze the differences, the Minkowski analysis technique [
31,
42] is employed. We choose a density threshold
and pixelize the map into high-density regions (with
) and low-density regions (with
). Then according to a general theorem of integral geometry, three Minkowski measures, the white area fraction
, the boundary length
and Euler characteristic
, totally describe the Turing patterns [
55]. Figure 6 presents the time evolution of these measures with two density thresholds
and
. Apparently, for
or
, in each figure, the four lines obtained from the 2nd-order, the 4th-order, the 6th-order, and the 8th-order schemes overlap with each other, indicating that the above four smoothing factors have negligible effects on the morphological characterization of the phase separating system.
Figures 5 and 6 demonstrate that if we focus on the macroscopic thermohydrodynamic behaviors of multiphase flows, e.g., the evolution of density patterns, the rheological and morphological characterizations of patterns (growth law of domain growth and structure factors), the differences induced by different smoothing factors can be neglected. However, if we focus on the interfacial dynamics, e.g., spurious velocities, thermal effects of motion of interfaces and so on, we suggest to use the higher-order smoothing factors. Figure 7 shows the time evolutions of with the 2nd-order, the 4th-order, the 6th-order, and the 8th-order FFT schemes for a liquid-vapor interface. The initial conditions are consistent with what we used in Fig. 3, except for . It is clear that, in each case, oscillates and decreases at the initial stage, then reduces to nearly a constant when . More importantly, with the increase of precision, decreases further. Besides the advantage of refraining spurious velocities more effectively, the higher-order smoothing factors have more strengths in guaranteeing the total energy conservation, compared to the lower-order ones, as shown in Fig. 8. With the increase of precision, variations of the total energy for the phase separating system displayed in Fig. 5, decrease consistently.
3.3 Inserting VDW EOS with flexible parameters
The FFT–TLB model uses VDW EOS which provides a simple description for the coexistence of vapor and liquid. It is based on the assumption of a long range mean field attraction a between molecules and a hard core excluded volume b, and gives the pressure Pw as a function of density n and temperature T,
However, in this model, and are fixed parameters. Therefore, the critical density and temperature are fixed to and , respectively, which is an inconvenience in the use of the model to study the thermal multiphase flows. Actually, CE analysis demonstrates that this limitation can be removed by modifying the extra force term, i.e., replacing the term in Eq. (13) with . As a result, the improved model can recover VDW EOS with flexible critical density and temperature.
To check if the model can correctly reproduce the equilibrium thermodynamics of a VDW system at various temperatures, a series of simulations were performed. Here we test four cases with different critical densities and temperatures, as listed in Table 1. The initial conditions are described by
where and are the theoretical vapor and liquid densities at , respectively. Parameters are set to be , , leaving all the others unchanged. The initial temperature is set to be , but drops by a small value when the equilibrium state of the system has been achieved. Simulations are then run until the temperature has reduced to . Here the FFT scheme with k4 is used to discretize the spatial derivatives. Figure 9 illustrates phase diagrams recovered with LB simulations and Maxwell constructions for the four cases listed in Table 1, where the scattered points are for simulation results and solid lines are for analytical solutions. For each case, the two sets of results have a satisfying agreement, demonstrating that the improved model has high accuracy in capturing various equilibrium states under different EOSs and temperatures.
3.4 Design of appropriate boundary conditions in the presence of solid walls
Although the FFT approach is powerful for periodic systems, it can also be applied in systems which have walls in the x- and/or y-directions provided that the following simple treatments are made. For example, for a system with left and right walls, we can simply double the computational domain by making a mirror reflection of the original one around the right (or left) wall. Thus, for the extended computational domain, the left and the right walls are exactly the same. We may consider that the system periodic and the FFT scheme can be used in the horizontal direction. We show this via the following example.
Let us consider a system, as schematically shown in Fig. 10, with (i) PBCs in the y-direction and (ii) left and right walls with fixed temperatures TL and TR, respectively. To use the FFT algorithm, we first make a mirror reflection of the original computational domain around the right wall. Thus, the number of lattice in the x-direction is . There are two outside boundaries and two inner boundaries in the x-direction, as shown in Fig. 10 by “a”, “b”, “c”, and “d”. Here, “b” and “c” are symmetric about the vertical line , “a” and “d” are symmetric about the same line, too. Consequently, physical quantities on boundary “b” equal to the ones on boundary “c”, and so are the physical quantities on boundaries “a” and “d”. As a result, on boundary “a”, we set
on boundary “b”,
on boundary “c”,
and on boundary “d”,
where j is the index of lattice node along the y direction.
It is noteworthy to point out that, the boundary conditions mentioned above, have the following advantages. Firstly, from the view point of numerical stability and accuracy, this approach makes physical quantities on the left boundary “a” equal to the ones on the right boundary “d”, therefore, the Gibbs oscillation can be avoided entirely; secondly, from the perspective of physics, the restraints on density in Eqs. (31) and (32) are equivalent to the adoption of the neutral wetting boundary conditions [
36,
37,
56], i.e.,
, where
is an inward normal unit vector to the boundaries. Moreover, on each boundary,
ux is set to be
, then there is no density flux across the walls. So, in the region
or
, the mass conservation law is satisfied if the molecular diffusion is negligible.
Using the aforementioned boundary conditions, we conduct simulations on phase separation, where the system is kept in contact with walls at fixed temperatures. The initial conditions are
where
,
,
is the mean density of liquid and vapor at
,
is a random density with an amplitude of
. Here we consider the following two cases: (I)
; (II)
,
. Figures 11 and 12 illustrate the density patterns at representative times for cases I and II, respectively. Similar to work of Gonnella
et al. [
36,
37,
41,
56], we mention that the phase separation process first occurs near the walls [see Fig. 11(a)], where the temperature is kept lower than the critical value. At about
the spinodal decomposition pattern can be observed in the bulk. After that the bubbles (droplets) increase their sizes by the coalescence of relatively small low (high) density domains. Moreover, the left and right parts of the computational domain evolve in a symmetric way and we only need to focus on the behaviors of either of the two parts.
From Fig. 12, we find that the bubbles (droplets), especially the ones near the colder walls, e.g., walls “c” and “d”, grow much faster than that in Fig. 11 owing to the larger surface tension at lower temperatures. Most droplets are absorbed by the colder walls, and then in Fig. 12(d), we find a thicker liquid layer at the middle part of the computational domain, and two thinner liquid layers on the left and right boundaries, respectively. It is necessary to emphasize that, though this approach can cancel this limit, it doubles the computational load.
4 Conclusions
In this paper three open issues on the FFT–TLB model are re-addressed. Compared to the typical CD counterpart with the same order of accuracy, the FFT scheme has higher precision and better numerical stability, has more advantages to guarantee energy conservation and to refrain spurious velocities. The smoothing factors influence the accuracy and stability of this scheme by controlling the strength of high-frequency waves. Higher (Lower)-order smoothing factors owns higher (lower) accuracy, less (more) dissipation, but worse (better) stability. The smoothing factors should be minimal but make the evolution stable. The VDW EOS with flexible parameters makes possible simulating multiphase flows with various critical densities and temperatures. When solid walls are present, via making a mirror reflection of the original one around the wall, the FFT scheme can still be used. If the gravitational force is introduced further, the model can be used to study the hydrodynamic instabilities, e.g., Rayleigh–Taylor instability (RTI), competitions between RTI and Kelvin–Helmholtz instability [
57–
60].
© Higher Education Press and Springer-Verlag Berlin Heidelberg 2012