+ All Categories
Home > Documents > Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical...

Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical...

Date post: 07-Oct-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
6
Simulating Acoustic Propagation Using A Lattice Boltzmann Model Of Incompressible Fluid Flow NATHAN FRASER RICHARD HALL § Dept. Computer Science & Engineering, La Trobe University, Melbourne, 3086, Victoria, Australia [email protected] [email protected] § Abstract: Waveguide mesh models that simulate airborne acoustics require extra non-physical rules to accurately represent acoustic propagation collisions with objects. In this paper we describe a physics- based cellula automata of fluid flow phenomena which simulates acoustic as a by-product, in which such rules are unnecessary. We evaluate our simulation with respect to sound speed and boundary interactions. Applications include audio signal processing and computer generated sound. Key-Words: Acoustics; Lattice Boltzmann; 1 Introduction A digital waveguide mesh (DWM) is a finite– difference, time domain computational model that can simulate aspects of airborne acoustic (room) phenomena [1]. Spatial dimensions are discretised into a regular lattice of signal processing elements which are joined by unit delays and are updated synchronously in discrete time steps [2]. DWM have been applied to airborne, or room acoustics in 2–dimensions [1] and in 3–dimensions [3], with some limitations, which can be partly overcome by in- troducing additional rules at object boundaries [4]. Such rules appear to trade off the physical iden- tity of DWM against computational expense (and perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference physical models for fluid flow, whose origins lie in physical cellular automata models for self–reproduction [5], and lat- tice gas automata [6]. So–called lattice Boltzmann models (LBM) bear a remarkable resemblance to DWM except they calculate fluid mass interac- tions to solve the Navier–Stokes equations for fluid flow [7]. They have already been used to model acoustic wave generation in wind instruments [8], non–linear acoustics [9], and viscous acoustic ab- sorption [10]. The possibilitiy of using lattice Boltz- mann models to simulate acoustic propagation has been suggested [11]. In this paper, a LBM of incompressible fluid flow in 2–dimensions is tested for its ability to represent basic aspects of acoustic propagation. In section 2 we outline the design of our model. We describe experiments which investigate the model’s ability to represent sound speed and boundary interactions in section 3. Finally, in section 4 we outline future work and applications of the model. 2 Method For empirical tests of the LBM, a 2–dimensional lattice with 9 fluid velocities (denoted D2Q9 in Figure 1) was used with a single relaxation time (ala [12]). The lattice structure is almost iden- tical to that used for the interpolated rectilinear waveguide mesh [13]. We use a 2–dimensional lat- tice for two reasons: such approximations are able to represent many audio effects to acceptable accu- racy [14]; and they can be warped to account for 3–D effects [15]. Lattice Boltzmann models compose a family of discrete–time discrete–velocity approximations of the Boltzmann equation for fluid flow: ∂f ∂t + vf = Ω(f ) Where statistical mass distributions f of particles move with velocity v and are redistributed accord- ing to a kinetic collision function Ω [16]. Replacing Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)
Transcript
Page 1: Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference

Simulating Acoustic Propagation Using A Lattice Boltzmann Model OfIncompressible Fluid Flow

NATHAN FRASER† RICHARD HALL§

Dept. Computer Science & Engineering,La Trobe University, Melbourne,

3086, Victoria, Australia

[email protected][email protected]§

Abstract: Waveguide mesh models that simulate airborne acoustics require extra non-physical rules toaccurately represent acoustic propagation collisions with objects. In this paper we describe a physics-based cellula automata of fluid flow phenomena which simulates acoustic as a by-product, in whichsuch rules are unnecessary. We evaluate our simulation with respect to sound speed and boundaryinteractions. Applications include audio signal processing and computer generated sound.

Key-Words: Acoustics; Lattice Boltzmann;

1 IntroductionA digital waveguide mesh (DWM) is a finite–difference, time domain computational model thatcan simulate aspects of airborne acoustic (room)phenomena [1]. Spatial dimensions are discretisedinto a regular lattice of signal processing elementswhich are joined by unit delays and are updatedsynchronously in discrete time steps [2]. DWMhave been applied to airborne, or room acoustics in2–dimensions [1] and in 3–dimensions [3], with somelimitations, which can be partly overcome by in-troducing additional rules at object boundaries [4].Such rules appear to trade off the physical iden-tity of DWM against computational expense (andperceived complexity) of physical models.

However, DWM are remarkably similar in designto lattice–based finite–difference physical modelsfor fluid flow, whose origins lie in physical cellularautomata models for self–reproduction [5], and lat-tice gas automata [6]. So–called lattice Boltzmannmodels (LBM) bear a remarkable resemblance toDWM except they calculate fluid mass interac-tions to solve the Navier–Stokes equations for fluidflow [7]. They have already been used to modelacoustic wave generation in wind instruments [8],non–linear acoustics [9], and viscous acoustic ab-sorption [10]. The possibilitiy of using lattice Boltz-mann models to simulate acoustic propagation has

been suggested [11].In this paper, a LBM of incompressible fluid flow

in 2–dimensions is tested for its ability to representbasic aspects of acoustic propagation. In section 2we outline the design of our model. We describeexperiments which investigate the model’s abilityto represent sound speed and boundary interactionsin section 3. Finally, in section 4 we outline futurework and applications of the model.

2 MethodFor empirical tests of the LBM, a 2–dimensionallattice with 9 fluid velocities (denoted D2Q9 inFigure 1) was used with a single relaxation time(ala [12]). The lattice structure is almost iden-tical to that used for the interpolated rectilinearwaveguide mesh [13]. We use a 2–dimensional lat-tice for two reasons: such approximations are ableto represent many audio effects to acceptable accu-racy [14]; and they can be warped to account for3–D effects [15].

Lattice Boltzmann models compose a family ofdiscrete–time discrete–velocity approximations ofthe Boltzmann equation for fluid flow:

∂f

∂t+ v∇f = Ω(f)

Where statistical mass distributions f of particlesmove with velocity v and are redistributed accord-ing to a kinetic collision function Ω [16]. Replacing

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)

Page 2: Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference

Figure 1: D2Q9 Topology: [a] Nodes are arranged in a 2–dimensional rectilinear lattice of size m × n, with links tonearest (solid) and next–nearest (dashed) neighbours, andperiodic boundaries as indicated. [b] Each fluid node has 9link velocities c0 . . . c8 and three lattice speeds: 0, 1 and

√2.

v with a set of discrete velocities, and replacing thecollision function Ω with a single relaxation time(τ) kinetic approximation [12] yields a discrete ve-locity Boltzmann equation [17]:

Fi (x + ci∆t, t + ∆t)− Fi (x, t) = −1

τ

“Fi (x, t)− F

(eq)i (x, t)

”(1)

Where the position of a node is denoted by x, massfunctions Fi represent the quantity of mass at thatnode moving according to the velocity ci and equi-librium functions F

(eq)i express the relax state of

nodes, and hence the desired dynamics of the sys-tem. If 1/τ is replaced with ω and ∆t is set to 1,the state and evolution of nodes on the lattice withlocal mass density ρ, local momentum j, and localvelocity u are described by:

ρ (x, t) =X

i

Fi (x, t) (2)

j (x, t) = ρ (x, t) u (x, t) =X

i

ciFi (x, t) (3)

Fi (x + ci, t + 1) = Fi + ω“F

(0)i − Fi

”(4)

The left hand side of (4) represents streamingof mass distributions to adjacent nodes along lat-tice velocities (see Figure 1), while the right handside represents relaxation toward an equilibriumstate that conserves local mass and momentum.The equilibrium functions F

(0)i chosen for the LBM

tested in this paper are formed from a truncatedpower series of local momentum and mass densityfor the simulation of a linear and incompressiblefluid flow:

F(0)i (ρ, j) =

Wi

ρ0

ρ +

1

Aci · j +

1

2ρA

»1

A(ci · j)2 − j2

–ff(5)

Weights Wi and the free parameter A are chosento maximise stability of the underlying hydrody-namic system for all lattice sizes [18], and to obtaina solution at the macroscopic limit of the Navier–Stokes equations. The values used (as given in [7])

along with the discrete lattice velocities are:

ci = (0, 0) i = 0ci = (±1, 0) i = 1, 3ci = (0,±1) i = 2, 4ci = (±1,±1) i = 5, 6, 7, 8

Wi/ρ0 = 49

i = 0

Wi/ρ0 = 19

i = 1, 2, 3, 4

Wi/ρ0 = 136

i = 5, 6, 7, 8

A = 13

(6)

Substituting these values into (5) gives the spe-cific functions:

F(0)i =

8>><>>:49ρ

ˆ1− 1

2u2

˜i = 0

19ρ

h1 + 3 (ci · u) + 9

2(ci · u)2 − 1

2u2

ii = 1, 2, 3, 4

136

ρh1 + 3 (ci · u) + 9

2(ci · u)2 − 1

2u2

ii = 5, 6, 7, 8

(7)

Combining (2), (3), (4) and (7) produces amacroscopic Navier–Stokes approximation with alattice sound speed of cs = 1/

√3. The acous-

tic pressure (pa) and kinematic shear viscosity (ν)terms are [7]:

pa (x, t) ' (ρ (x, t)− ρ0) /3 (8)

ν =2− ω

6ω(9)

Acoustic pressure is approximate since the appli-cation of input pressures by a small change in localmass density modifies average mass density, andthe pressure is assumed to be proportional to den-sity. ρ0 is used as an approximation of the averagewhich is correct only at initialisation. So long asinput signals contain no DC offset, this approxima-tion provides a valid estimate of acoustic pressure,as the average density on the lattice will remainclose to ρ0.

Boundaries are considered in terms of inputs,outputs, and the intersection of free-space and ob-jects. Input of pressure to the model is modeled byincreasing the mass density at a chosen node by anamount proportional to the desired local pressureincrease (pin):

∆Fi (x, t) = 3Wipin (10)

Since pressure is distributed in a balanced fash-ion across the velocities, this does not introduce anet fluid velocity change for the input node. A pres-sure input may be applied to any free-space nodeon a lattice. Outputs involve measuring the acous-tic pressure with (8), and since no change is madeto the measured nodes, can be specified arbitrarilywithout affecting the model. Solid obstacle nodes

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)

Page 3: Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference

perform no relaxation step - each Fi is assigned avalue from its opposite velocity:

F0 = F0

F1,3 = F3,1

F2,4 = F4,2

F5,7 = F7,5

F6,8 = F8,6

(11)

This boundary is lossless and slightly error–prone, however it has better stability and is lesscomputationally expensive than some other alter-natives [19].

In our empirical experiments, a signal is inputinto a chosen lattice geometry and pressure mea-surements were taken at specific locations on thelattice for a chosen number of update steps. Thevalues for pa, mass distributions F0...8 and a tem-porary update array F ′

1...8 were stored in a multi–dimensional array. Fi’s were initialised from a spec-ified ρ0 then the steps [a-d] in Figure 2 were re-peated. Output waveforms were analysed using thenumerical computation package Octave [20] and vi-sualisations were obtained from RMS pressure plotbitmaps, which were either normalised in amplitudeor converted to a visual representation of relativesound pressure level in decibels (dB).

3 ResultsFor a model of acoustics to exhibit high physicalcorrespondence, sound speed in the lattice mustbe close to actual sound speed, and interactionsbetween propagating acoustic waves and objectboundaries must be realistic. While the theoreticalsound speed cs for the D2Q9 model is supposedly

Figure 2: Node update process at each iteration: [a] Inputpressure is converted to mass and distributed to the massfunctions Fi. [b] Local mass density, velocity and pressure

are calculated from the Fi. [c] Equilibrium functions F(0)i

and intermediate mass functions F ′i are computed. [d] F ′

i arepropagated to Fi at adjacent nodes along direction i (exceptrest mass F0).

1/√

3, in practice the sound wave travel speed isdependent both on frequency and ω. A couplingbetween velocity and viscosity [21] and model dis-cretisation will affect the speed of acoustic propa-gation. To measure the effect of ω on average soundspeed, a grid of size lx = ly = 260, ρ0 = 0.1 wasstimulated with an impulse of varying amplitudes(a = 0.001, 0.01, 0.1, 0.2) and run for 300 iterations.For each value of ω, impulse responses were ob-tained for positions in one octant at a distance ofapproximately 50 units from the input: r ' 50 and0 < θ < π/4. Each measured point was analysedto determine the time to the first peak in the im-pulse response, and hence the propagation speed tothat point. These speeds were then averaged andthe results are graphed in Figure 3 along with thetheoretical sound speed 1/

√3.

The measured sound speed was within 5% of cfor values of ω over 1.1, and within 0.5% near 1.8.Increasing the amplitude of the impulse tended toslightly raise the sound speed travel, but only signif-icantly when the input signal amplitude was simi-lar or greater in magnitude than ρ0. No meaningfulresults were obtained for ω less than 0.5 since over–damping made the impulse response an inaccuratemeasure of sound speed.

We also demonstrate the acoustic propagationproperties via pressure plots of D2Q9 with respectto three typical types of object boundaries: par-allel reflection; diagonal reflection; and diffraction.Firstly, for parallel reflection Figure 4 shows a pe-riodic plane wave incident on a solid wall, reflect-ing and setting up a standing wave pattern. Thegenerated pattern shows incomplete cancellation atnodes because the discrete node lengths inexactlycorrespond with the wave travel speed 1/

√3 and

wave period. Secondly, for diagonal reflection, Fig-ure 5 shows a plane impulse wave incident on a wallat an angle of 45o. The plane wave reflects down-ward on the first impact [b], bounces between thewall angles [c], then returns, traveling to the left [d].

Finally, for diffraction, a simple slitted wall ex-periment is shown in Figure 6. A periodic planewave is incident on a boundary with a slit of length20. Pressure plots in normalised dB show thediffraction present at low frequencies, and the shad-owing at higher ones.

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)

Page 4: Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference

0.56

0.57

0.58

0.59

0.6

0.61

0.62

0.63

0.64

0.65

0.66

0.67

0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

cs

ω

Propagation Speed

a = 0.20

a = 0.10

a = 0.01

a = 0.001

1/√

3

Figure 3: Measured sound propagation speed against ω over a range of impulse amplitudes. ρ0 = 0.1, r ' 50, 0 < θ < π/4

[a]

Solid WallInput

[b]

Figure 4: Generation of plane standing waves by a planewave incident on a solid wall (ω = 1.8, lx = 800). [a]: f =0.025 [b]: f = 0.05.

4 ConclusionIn this paper we described the use of a physicalcellula automota model for computational fluid dy-namics which was subverted to simulate acousticpropagation in a fluid medium. We demonstratedthat our model D2Q9 represents sound speed andobject boundary interactions reasonably realisti-cally without the need for additional boundaryrules (ala DWM), thus it has good physical cor-respondence. Operation of the model is indepen-dent of lattice geometry and the relative positions

of sources and sinks, allowing accurate simulationeven if this geometry changes during simulation.

The fluid–based approach to simulating acousticsis also being evaluated in terms of scalability andoperational frequency range. With scalability, wewish to exploit the regular structure and communi-cation patterns of Lattice Boltzmann models in or-der to achieve real–time simulation of room acous-tics with arbitrary geometry. With operational fre-quency range, we want to know if the model hasthe same limits of digital waveguide meshes, and ifthe alternative approach can improve on current in-terpolation and digital filtering techniques. Bound-ary condition geometry is easily specified in lattice–based models but, while simple boundaries are triv-ially implemented, they are typically non–physicaland cannot represent an absorptive boundary accu-rately. Many boundary methods are available fromLBM research and we intend to evaluate these incomparison with DWM boundaries for simulationsof room acoustics with lossy boundaries.

There exist several potential applications of themodel, such as physically correct simulation, imag-inary musical instrument sound synthesis, and ed-ucational purposes. The first application is de-sired in digital signal processing, audio engineer-ing, sound synthesis and music. The second ap-plication can be achieved using small lattice sizesthat can be computed in real–time that simulatea musical instrument with arbitrary, perhaps im-possible, geometry, whose output is still based on

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)

Page 5: Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference

[a]

[b]

[c]

[d]

Figure 5: Four stages from a simulation of a plane waveobliquely reflecting on a diagonal boundary and then return-ing in the opposite direction. [a]:t = 15 [b]: t = 60 [c]:t = 120 [d]: t = 160

physical behaviour. These instruments could becontrolled using a graphical interface or optimisedfrom a desired output profile. Such a graphical in-terface could also allow the model to be used foreducational purposes. Acoustic wave propagationcould be presented at several time scales with var-ious types of signals. Furthermore, since an under-standing of the update process at each node can bereached without an understanding of mathematicalmethods, the model could be used as an introduc-tion to computational and numerical methods forsolving difficult equations.

References

[1] Mullen J., Howard D.M., and Murphy D.T.Digital Waveguide Modelling of the VocalTract Acoustics. In Proceedings of the IEEEWorkshop on Applications of Signal Process-ing to Audio and Acoustics. New Paltz, NY,Oct. 2003.

[2] van Duyne S.A. and Smith III J.O. Physicalmodeling with the 2-D digital waveguide mesh.In Proceedings of the International ComputerMusic Conference. Tokyo, Japan, sep 1993.

[a]

[b]

[c]

Figure 6: Wave propagation through a slit of length =20. Pressure fields are displayed in dB, white is ≤ -60dB.[a]:f = 0.025 [b]:f = 0.05 [c]: f = 0.1.

[3] Savioja L. and Lokki T. Digital waveguidemesh for room acoustic modeling. In ACM Sig-graph Campfire: Acoustic Rendering for Vir-tual Environmens. Snowbird, Utah, May 2001.

[4] Laird J., Masri P., and Canagarajah N. Mod-elling Diffusion at the Boundary of a DigitalWaveguide Mesh. In Proceedings of the Inter-national Computer Music Conference. Bejing,China, Oct. 1999.

[5] von Neumann J. Theory of self-reproducingautomata. University of Illinois Press, 1966.Edited and completed by Arthur W. Burks.

[6] Toffoli T. and Margolas N. Cellular AutomataMachines. MIT Press, Cambridge, MA, 1987.

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)

Page 6: Simulating Acoustic Propagation Using A Lattice Boltzmann ... · perceived complexity) of physical models. However, DWM are remarkably similar in design to lattice–based finite–difference

[7] Wolf-Gladrow D.A. Lattice-Gas Cellular Au-tomata and Lattice Boltzmann Models, An In-troduction, vol. 1725 of Lecture Notes in Math-ematics. Springer-Verlag, Berlin, 2000.

[8] Kuhnelt H. Simulating the mechanism ofsound generation in flutes using the latticeboltzmann method. In Proceedings of theStockholm Music Acoustics Conference. Stock-hom, Sweeden, Aug. 2003.

[9] Buick J.M., Greated C.A., and Gilbert J. Lat-tice Boltzmann BGK simulation of nonlinearsound waves: the development of a shock front.Journal of Physics A, vol. 33, 2000, pp. 3917–3928.

[10] Fraser N. and Hall R. Extending the waveg-uide mesh to represent viscous absorption.WSEAS Transactions on Acoustics and Mu-sic, vol. 1(2), 2005, pp. 5–10.

[11] Buick J.M., Neal M.A., and Campbell D.M.The Lattice Boltzmann Model and its Appli-cation to Acoustics. In Proceedings of the 17thInternational Congress on Acoustics. Rome,Italy, 2001.

[12] Bhatnagar P.L., Gross E.P., and Krook M.A model for collision processes in gases. I.Small amplitude processes in charged and neu-tral one–component systems. Physical Review,vol. 94(3), May 1954, pp. 511–525.

[13] Savioja L. and Valimaki V. Improved discrete–time modeling of multi–dimensional wavepropagation using the interpolated digitalwaveguide mesh. In Proceedings of IEEE In-ternational Conference on Acoustics, Speech,and Signal Processing ICASSP-97, vol. 1, Apr.1997.

[14] Murphy D.T. and Howard D.M. 2–D DigitalWaveguide Mesh Topologies in Room AcousticModelling. In Proceedings of the COST G-6Conference on Digital Audio Effects. Verona,Italy, Dec. 2000.

[15] Chopard B., Luthi P.O., and Wagen J.F. Lat-tice Boltzmann method for wave propagationin urban microcells. IEE Proceedings–Microwaves, Antennas and Propagation,vol. 144(4), Aug. 1997, pp. 251–255.

[16] Buick J.M. Lattice Boltzmann Methods in In-terfacial Wave Modelling. Ph.D. thesis, Uni-versity of Edinburgh, 1997. http://www.ph.ed.ac.uk/~jmb/thesis/tot.html.

[17] Sterling J.D. and Chen S. Stability Analysis oflattice Boltzmann Methods. Journal of Com-putational Physics, vol. 123, 1996, pp. 196–206.

[18] Worthing R.A., Mozer J., and Seeley G. Sta-bility of lattice Boltzmann methods in hy-drodynamic regimes. Physical Review E,vol. 56(2), 1997, pp. 2243–2253.

[19] Zou Q. and He X. On pressure and velocityflow boundary conditions and bounceback forthe lattice Boltzmann BGK model. Physics ofFluids, vol. 9, 1997, pp. 1591–1598.

[20] Eaton J.W. GNU Octave, a high-level lan-guage, primarily intended for numerical com-putations. http://www.octave.org/.

[21] Qian Y.H. and Zhou Y. Complete Galilean–Invariant Lattice BGK Models for theNavier–Stokes Equation. Europhysics Letters,vol. 42(4), 1998, pp. 359–364.

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp42-47)


Recommended