• No results found

Example: Exact wave initialisation

5.3 Lattice Boltzmann equation

5.3.3 Example: Exact wave initialisation

1+ O(k40) +18X2

114k20+ O(k40)+ O(X3).

(5.64)

As in the forced wave case, this reduces to the DVBE solution (5.42b) as k00. The numerical accuracy is second order except the lowest order absorption, where the the lack of a k20term has been shown in an earlier numerical study [11].

Indeed, the exact dispersion and absorption, plotted in Figure 5.15, show that the absorption changes slowly with k0. In addition, there is always zero absorption for X=0, unlike the forced wave case.

Accuracy

We have seen that the lattice Boltzmann equation is second-order accurate in space and time, at least in the linear limit. As the numerical resolution is improved, the LBE solution converges to the solution of the discrete-velocity Boltzmann equation, on which the LBE is based. This DVBE predicts the same lowest-order absorption but different dispersion to the isothermal Navier-Stokes-Fourier model. The series expansions of ˆk/k0(5.63) and ˆω/ω0(5.64) quantify the severity of numerical errors in absorption and dispersion.

Let us determine when the numerical dispersion is one percent, mean-ing that numerical errors cause sound waves to propagate one percent more slowly than they should. For forced and free waves at low X, the series expansions indicate to a good approximation that this occurs whenω20/12 = 0.01 and k20/36 = 0.01, respectively. Relating these to the wavelength, both lead to λ0 = 2π/

0.36 10.5. Thus, with more than 10.5 nodes per wavelength, the numerical dispersion is less than one percent.

5.3.3 Example: Exact wave initialisation

The usefulness of the eigenvalue problem (5.59) is not limited to predicting the wavenumber ˆk of forced waves or the frequency ˆω. The eigenvector ˆfcan also be useful when initialising a simulation. Not so much in the forced wave case where the wave is generated by a source,* but more so

*Such acoustic sources will be described in Chapter 6.

5.3 Lattice Boltzmann equation 147

in the free wave case where the wave must already exist fully formed when the simulation is started.

Let us look at a simple one-dimensional free wave case. With one wavelength of a wave of spatially constant amplitude initialised inside a periodic system, an infinite wave is simulated. The initial conditions thus fulfil

ρ(x, 0) =ρcos(−k0x+ϕρ), (5.65a) u(x, 0) =ucos(−k0x+ϕu), (5.65b) for 0≤x ≤λ−1, with the wavenumber being k0=2π/λ. The periodic boundary condition connects the nodes at x=0 and x=λ−1, making them neighbours.

One oft-used initialisation method for this case is to initialise at equi-librium with the amplitudes and phases initialised using the Euler-level relationships ρ0u = c0ρ and ϕρ = ϕu [109–111]. These can be found from (5.22) with X=0. This results in an initial distribution function

fi(x, 0) =ρ0wi+ρwi(1+ξi/c0)cos(−k0x+ϕρ). (5.66) In another, similar initialisation method the choice u = 0 is made instead [77, 112], so that the initial condition represents the superposition of two plane waves propagating in opposite directions.*

However, this type of initialisation is inexact for two reasons. Firstly, it neglects the small magnitude ratio difference and phase shift caused by viscosity and discretisation error, as described previously in this chapter.

Secondly, the system is initialised at equilibrium with fineq =0, a state which ends immediately when the simulations start unlessτ=1.

Instead, the free wave can be initialised using the eigenvalue prob-lem (5.59). Nonlinear effects notwithstanding, this method should be exact since is based on an exact solution of the same problem. As the wavenumber k0is known from the system sizeλ, we can directly numer-ically find the eigenvector ˆffrom the matrix ˆA and use it to initialise the simulation as

fi(x, 0) =ρ0wi+Re

ˆfie−ik0x

. (5.67)

The two methods of initialisation can be compared directly to each other by simulation. We choose a system length of λ = 11 which as previously shown should give a dispersion error of less than one percent.

This choice corresponds toω0≈0.33 and k00.57. A relaxation time of τ=0.52 is chosen, resulting in an acoustic viscosity number X≈0.013.

The amplitude was chosen asρ0=10−6in order to avoid nonlinear effects.

*The Euler-level amplitude relationship is in generalρ0u= ±c0ρ; the sign corresponds to propagation in the±x-direction.

148 Chapter 5 Acoustic linearisation analysis

0 10 20 30 40 50 60 70 80 90 100

0.8 0.9 1

t

Normalisedamplitude

Euler init.

Eigenvec. init.

e−iαtt

Figure 5.16: Normalised amplitude of the fundamental frequency component absorbed in time, for two different methods of free wave initialisation, along with the predicted Navier-Stokes model absorption. Simulation parameters areλ=11,τ=0.52(leading toX≈0.013), andρ0=10−6.

The comparison of the absorption in time for the two different initial-isation methods is shown in Figure 5.16, along with the absorption (5.17) predicted from the Navier-Stokes-Fourier model. The eigenvector ini-tialisation (5.67) and the Navier-Stokes-Fourier model agrees to plotting accuracy. However, with the Euler initialisation (5.66) the wave misbe-haves, with a strong periodic ripple in the amplitude.

The errors in the Euler initialisation are caused by the wave being initialised in a way which is not fully consistent with the desired + x-propagating wave mode. The initialisation is based on Euler-level ex-pressions which do not take into account the effects of viscosity and discretisation error. Consequently, the actual initialised state is a super-position of two waves: A strong one propagating in the+x-direction and a weak one propagating in the−x-direction.

The ripple in Figure 5.16 comes from constructive and destructive interference of the two waves. They are initialised at constructive inter-ference, and interfere twice in each wave period. If this explanation of the Euler initialisation errors holds, the ripple period must be half of the wave’s period, or approximately λ/2c0 9.5, which matches the observed ripple period quite well.

Of course, this example is somewhat exaggerated, with fairly large values of k0and X. If these quantities are smaller, the deviations between the two initialisation methods, which should scale with k20and X2, will also decrease. Even so, the eigenvector-based initialisation should still be chosen if possible for the highest possible accuracy.