Time-domain lifted wavelet collocation method for modeling nonlinear

0 downloads 0 Views 485KB Size Report
Mar 26, 2002 - second-generation wavelet collocation using a lifting scheme and makes use ... We use an adaptive computational grid that is able to.
Lee et al.: Acoustics Research Letters Online

[DOI 10.1121/1.1507121]

Published Online 28 August 2002

Time-domain lifted wavelet collocation method for modeling nonlinear wave propagation Kelvin Chee-Mun Lee and Woon-Seng Gan Digital Signal Processing Laboratory, School of Electrical and Electronic Engineering, Nanyang Technological University, S2-B4a-03, Nanyang Ave Singapore 639798 [email protected] and [email protected]

Abstract: A time-domain adaptive numerical method for modeling nonlinear wave propagation is developed. This method is based on a second-generation wavelet collocation using a lifting scheme and makes use of the multilevel decomposition nature of the scheme to allow for automatic grid refinement according to the magnitude of waveform steepening. The multiplication in the nonlinear term is also easy due to the collocation nature. With thresholding, the solution is compact at every level of resolution and computed only at collocation points associated with the remaining significant wavelet coefficients. The error tolerance and compression ratio of the new method are totally controlled by the threshold value used. This brings substantial savings in computation time when compared to the conventional finite difference scheme on a uniformly fine grid. ©2002 Acoustical Society of America PACS numbers: 43.25.C, 43.25.L Date Received: 26 March 2002 Date Accepted: 13 April 2002

1. Introduction The time-domain numerical method of simulating nonlinear wave propagation in a sound beam by using an implicit backward finite difference (IBFD) scheme to solve the KhokhlovZabalotskaya-Kuznetsov (KZK) equation has been described in previous literature3. The accuracy of the IBFD scheme depends on the implicit integration solver and the fineness of the computational grid used and is therefore proportional to the computation time required to solve the problem. The purpose of this paper is to introduce a wavelet collocation approach that solves in a compact manner without the redundant computations in the wellapproximated solution regions. We use an adaptive computational grid that is able to accommodate local structures through dynamic grid refinement. We first study the new method in a 1-D Burgers problem and then apply it in an axisymmetric 2-D form of the KZK equation. A comparison between the new results and that from a conventional finite difference scheme is also made to access the performances of both. 1.1 Lifted Interpolating Wavelet Transform Wavelets form a versatile tool for representing general functions or data sets because they are highly capable of capturing the essence of a function with only a small set of coefficients. Generally, wavelets are defined as the dyadic translates and dilates of a particular mother wavelet function. However, in this section, a new class of wavelets termed “secondgeneration wavelets” is introduced. These biorthogonal wavelets are not necessarily translates and dilates of each other but rather constructed from a spatial domain approach known as the lifting scheme1,4. They allow interpolation procedures to be defined on more complicated nonuniform computational grid structures since the filter coefficients used in these wavelets

124

ARLO 3(4), Oct 2002

1529-7853/02/3(4)/124/6/$19.00

(c)2002 Acoustical Society of America

124

Lee et al.: Acoustics Research Letters Online

[DOI 10.1121/1.1507121]

Published Online 28 August 2002

can be position- and level-dependent. The simplest form of such wavelets is the lifted interpolating wavelet transform and is the basis set for the wavelet collocation method because of its simplicity and its in-place computation without the need of auxiliary memory4. Essentially, the transform is constructed out of the spatial domain using 3 basic steps: split/merge, predict (dual lifting) and update (regular lifting). The first step splits the data into 2 subsets (odd and even); the second step predicts the even set based on the odd one and finds the difference between them; and the third step updates the odd set to preserve the mean of the function. The resulting approximation and detail values (or λ and γ coefficients respectively) are then obtained, and the process is iterated using the approximation coefficient λ as the new input until a specified level of coarsest resolution is reached.

Fig. 1. The forward lifted interpolating wavelet transform (left) and its inverse (right).

The multiresolution analysis property of wavelets is still valid for second-generation wavelets and can be expressed as V 0 ⊕ W 0 ⊕ W 1 ... ⊕ W J -1 ⊂ L , where V j and W j are the orthogonal subspaces that correspond to the scaling and wavelet functions respectively, and L is the space spanned by the original function. Thus, when wavelet decomposition is performed on the original function P, its representation at the finest resolution level J can be obtained as PJ ( x) =

J −1

∑ λ φ ( x) + ∑ ∑ γ 0 0 k k

k ∈K

0

j = 0 l∈L

j l

φl j ( x ) .

(1)

j

The strength of this multilevel decomposition is then obvious: the function is decomposed into a set of orthogonal components at different resolution levels. It is crucial for a fast way to compute the solution via the construction of an adaptive computational grid, which will be elaborated in the next section. Local structures of the original function due to waveform steepening at different scales can be isolated and recorded in the magnitude of the γ coefficients. We use the lifted interpolating wavelet transform with the number of dual vanishing moments N = 2 and the number of real vanishing moments N = 2 throughout our discussion in this paper. 2. Numerical Method A coordinate transformation is applied to the KZK equation for an axisymmetric and unfocused sound beam3 that propagates in the positive z direction (see Fig. 3) to arrive at the following dimensionless form in terms of the normalized acoustic pressure P : ∂P 1 = ∂σ 4(1 + σ ) 2

τ



−∞

∂ 2 P 1 ∂P ∂2 P NP ∂P τ . + d ' + A + ∂ρ 2 ρ ∂ρ ∂τ 2 (1 + σ ) ∂τ

(2)

For 1-D nonlinear wave propagation, a dimensionless Burgers equation identical to Eq. (2) without the diffraction term is used. The problem is conveniently transformed into a regular and dimensionless computational grid represented by the axial distance σ and the radial distance ρ and is discretized for finite difference calculations as Pi, j,k = P(σ k ,τ min + i∆τ , j∆ρ ) . As we have point values, the derivative operators can be implemented using conventional finite difference stencils2 whereas the integral operator in the diffraction term

125

ARLO 3(4), Oct 2002

1529-7853/02/3(4)/124/6/$19.00

(c)2002 Acoustical Society of America

125

Lee et al.: Acoustics Research Letters Online

[DOI 10.1121/1.1507121]

Published Online 28 August 2002

can be implemented using an adaptive Simpson quadrature w.r.t. τ ' . Multiplication in the nonlinear term is also straightforward and a local operation since we are working with collocation points. A 4th order explicit Runge-Kutta solver is also used to march forward in space, integrating Eq. (2) numerically with respect to σ to get the solution at the next propagation step.

Fig. 2. Radiation geometry from an axisymmetric sound source located in the plane z

=0.

2.1 Adaptive Computational Grid The multilevel decomposition of Eq. (1) allows us to construct a set of nested grids with different resolutions. Assuming the solution is normalized, a relative error threshold ε can be set to split the solution P J into 2 regions: one with coefficients above the threshold and one with coefficients below. This can be expressed as

P J (σ ,τ , ρ ) = PγJj ≥ε (σ ,τ , ρ ) + PγJj ≤ε (σ ,τ , ρ ) l

j = 0,1...J − 1 , l ∈ L j .

(3)

l

Thresholding the latter removes a substantial amount of collocation points from the grid because they contain trivial details and results in lesser subsequent computations. This provides a simple way of controlling the compression factor of the computational grid and the approximation error of the solution. The selection of the threshold value is easy by specifying the percentage amount of signal energy to be retained after thresholding. The finite difference and quadrature schemes are then applied locally on each level where there are no γ coefficients on finer scales. Convolution with the finite difference stencil also leads to an increase in support, so we need to add extra neighboring collocation points next to the edge points in the computational grid at every level so as to correct for this. Furthermore, the differentiated function might also have new significant coefficients appearing in the neighboring regions. This manner of dynamically allocating collocation points at every level allows the computational grid to adapt dynamically to the local changes as harmonics are introduced into the solution due to the nonlinear term. Upon inverse wavelet transform, the full solution at all collocation points can be obtained for the current integration step. 3. Results and Discussion The results for the proposed numerical method are presented. As mentioned earlier, a 4th order Runge-Kutta integration solver (MATLAB’s ode45) is used together with a relative error threshold of ε = 5 × 10−3 for the first example using Burgers equation and a relative error threshold of ε = 10 −3 for the next example using KZK equation. For stability in the integration, we use ∆τ = ∆ρ = 0.01 and an initial propagation step-size of ∆σ = 1e − 4 , which will then be adjusted by ode45’s variable step-size control algorithm during the simulation. For higher efficiency, the program is compiled as a MEX (MATLAB-EXecutable) file before execution in MATLAB.

3.1 1-D Dimensionless Burgers Equation

126

ARLO 3(4), Oct 2002

1529-7853/02/3(4)/124/6/$19.00

(c)2002 Acoustical Society of America

126

Lee et al.: Acoustics Research Letters Online

[DOI 10.1121/1.1507121]

Published Online 28 August 2002

The dimensionless Burgers equation for simulating 1-D nonlinear wave propagation is generally expressed as ∂P ∂2 P ∂P = A 2 − NP (4) ∂σ ∂τ ∂τ where, for this example, A = 0.05 , N = 1 , and the initial function at σ = 0 is represented by P (σ = 0,τ ) = Po sin(2πτ ) given −0.5 ≤ τ ≤ 0.5 is the range of the time window used and the boundary conditions are P (σ ,τ = ±0.5) = 0 . The number of decomposition levels is fixed at 7 and, because the function is largely smooth, we choose a large error threshold of ε = 5 × 10−3 . The solution starts developing a sharp gradient at τ = 0 and evolves into a sawtooth-like waveform as it propagates away from the source. This is a good test of the new method’s adaptivity to refine the solution at local regions where shocks are forming, i.e., to refine the computational grid around τ = 0 as the shock develops. Note that increasingly higher resolution is allocated to such local structures in the solution. The new method is able to refine the grid in the vicinity of the shock according to the magnitude of the gradient, even after much attenuation. The number of significant coefficients in the higher levels also increases as the gradient increases until the shock is finally resolved at the finest resolution level. The results obtained are compared to results from the conventional finite difference scheme (i.e., ε = 0 ). The method demonstrates sufficient robustness in handling nonlinearities throughout the whole computation process. Snapshot samples of these results, taken at selected intervals σ = (0, 0.2, 0.4, 2, 7) are shown below. x 10 0.8

7

3

6

2

0.6 5

P/P

o

Level j

0.2 0 -0.2

3 2

-0.4 -0.6

-3

0 0

0.5

-0.5

0 -1 -2

1

-0.8 -0.5

1

4

Error

0.4

-3

0

-4 -0.5

0.5

x 10

0

0.5

0

0.5

0

0.5

0

0.5

0

0.5

-3

7 4

0.8

6

3

0.6 5

P/P

o

Level j

0.2 0 -0.2

3

-0.4

2

-0.6

1

1 0 -1 -2

-0.8 -0.5

2

4

Error

0.4

-3

0 0

0.5

-0.5

-4 0

0.5

-0.5 x 10

0.8

4 3

5

2

0.2

4

Level j

o 0 -0.2

3 2

-0.4 -0.6

0.5

-0.5

1 0

-2

0 0

0

-3 -0.5

0.5

x 10 7

8

0.2 6

6

0.1

5

4

0.05

4

0 -0.05

-0.2

-4 -6

0 0

0.5

-0.5

0 -2

1

-0.15

-0.5

3 2

-0.1

-4

2

Error

P/P

o

Level j

0.15

-3

-1

1

-0.8 -0.5

Error

6

0.4

0.6

P/P

7

0

0.5

-0.5

x 10

-4

7

P/P

o

Level j

0.05 0 -0.05

6

3

5

2

4

Error

0.1

3

1 0

2

-1

1

-2

-0.1 0 -0.5

0

τ

0.5

-0.5

-3 0

0.5

τ

-0.5

τ

Fig. 3. Adaptivity of the lifted wavelet collocation method in handling evolving shocks: refinement on a finer grid is done as the shock gradient increases. Comparison with the conventional finite difference solution of the Burgers equation shows similar results within the tolerance of the given relative error threshold ε = 5 × 10−3 .

127

ARLO 3(4), Oct 2002

1529-7853/02/3(4)/124/6/$19.00

(c)2002 Acoustical Society of America

127

Lee et al.: Acoustics Research Letters Online

[DOI 10.1121/1.1507121]

Published Online 28 August 2002

3.2 Dimensionless Axisymmetric KZK Equation The initial source condition for the KZK equation in Eq. (2) is given as   τ + ρ 2 2  2 P(σ = 0,τ , ρ ) = exp −  (5)   sin 2π (τ + ρ )   π / 2   with −5 ≤ τ ≤ 5 as the range of the time window used and 0 ≤ ρ ≤ 5 as the radial distance range (Fig. 4). This can also be seen as the size of the initial computational grid to be used.

(

)

Initial Source Condition (normalized)

Retarded Time τ

5 4

0.8

3

0.6

2

0.4

1

0.2

0

0

-1

-0.2

-2

-0.4

-3

-0.6

-4

-0.8

-5

0

0.5

1

1.5

2 2.5 3 Radial Distance ρ

3.5

4

4.5

5

Fig. 4. Initial source condition of computational grid.

With the number of decomposition levels fixed at 5, the results obtained from the lifted wavelet collocation method are shown and compared with those obtained from the conventional finite difference scheme in Figs. 5 and 6. The first set of results in Fig. 5 shows the on-axis solutions of the propagating wave at various propagation distances σ whereas the second in Fig. 6 shows the solutions along the ρ axis at τ = 0 at the same distances. The algorithm is stable with ε = 10 −3 throughout the integration range and is seen by the convergence of the absolute approximation errors in the far-right columns of Figs. 5 and 6 to within the specified ε . However, it may be possible to control the error threshold adaptively according to the percentage amount of signal energy retained after thresholding so as to further reduce the complexity of the computations. 0.01

4.5

0.008

0.6

4

0.006

0.4

3.5

0 -0.2 -0.4

0.004

3

0.002

Abs. Error

Resolution Level

5 0.8

0.2

o

P/P (normalised)

σ=0, ρ=0

2.5 2

0 -0.002

1.5 -0.004 1

-0.6

-0.006

0.5

-0.8

-0.008

0

-0.01 -5

0

5

-5

0

5

-5

σ=0.5, ρ=0

x 10 5

0

5

0

5

-4

1.5

4.5

0.02

4

0.015

3.5

0.01 0.005

o

0 -0.005

1

0.5

3

Abs. Error

Resolution Level

P/P (normalised)

0.025

2.5 2 1.5

0

-0.5

1

-0.01

0.5

-0.015

-1

0 -0.02 -5

0

5

-5

0

-1.5

5

σ=1, ρ=0

-5

x 10 5

-5

6

4.5 0.01

4

4 3.5

0

-0.005

-0.01

2

3

Abs. Error

Resolution Level

o

P/P (normalised)

0.005

2.5 2 1.5

0

-2

1 0.5

-0.015

-4

0 -5

0

τ

5

-5

0

5

τ

-6

-5

0

5

τ

Fig. 5. On-axis solutions at various axial distances using the wavelet collocation method ( N =1, A =0.1).

128

ARLO 3(4), Oct 2002

1529-7853/02/3(4)/124/6/$19.00

(c)2002 Acoustical Society of America

128

Lee et al.: Acoustics Research Letters Online

[DOI 10.1121/1.1507121]

Published Online 28 August 2002

σ=0, τ=0 0.8 0.6

5

0.01

4.5

0.008

4

0.006

0 -0.2

0.004

3

Abs. Error

Resolution Level

0.2

o

P/P (normalised)

3.5 0.4

2.5 2

0.002 0 -0.002

1.5 -0.004 1

-0.4

-0.006

0.5 -0.6

-0.008

0

-0.01 0

1

2

3

4

5

0

1

2

3

4

5

0

1

σ=1, τ=0

-3 x 10

x 10

4

5

2

4.5

0

4

2

3

4

5

-5

4

3

3.5

-4

o

-6 -8 -10

2

3

Abs. Error

Resolution Level

P/P (normalised)

-2

2.5 2

0.5

-14 -16

0

-1

1 -12

1

1.5

-2

0 0

1

2

3

4

5

0

1

2

ρ

3

4

-3

5

0

1

2

ρ x 10

0.02

5

4

5

-5

8

4.5 0.01

3

ρ

σ=0.5, τ=0 6

4 4

-0.02

2

3

Abs. Error

Resolution Level

-0.01

o

P/P (normalised)

3.5 0

2.5 2 1.5

0 -2 -4

1 -6 -0.03

0.5 -8

0 -0.04

0

1

2

3

4

5

0

1

2

3

4

5

-10

0

1

2

3

4

5

Fig. 6. Solutions along ρ axis at τ = 0 at various axial distances using the wavelet collocation method ( N =1, A =0.1)

4. Conclusion

An adaptive numerical method based on second-generation wavelets is developed. The adaptivity of the method is achieved by using a lifted interpolating wavelet basis to approximate the solution and refining the computational grid in local regions to accommodate developing shocks. By specifying the error threshold value, it is possible to actively control the accuracy of the solution and the size of the adaptive computational grid. The sparse representation leads to significant savings in the memory storage and the number of computations required to solve the Burgers and KZK equations numerically. This method uses an adaptive computational grid and outperforms the conventional finite difference method, which uses a uniform fine grid throughout. Due to the collocation nature, the method can also handle general boundary conditions and nonlinearities effortlessly. References and links 1 Daubechies, I., Sweldens, W., “Factoring Wavelet Transforms into Lifting Steps”, J. Fourier Anal. Appl., 4(3), 245-267 (1998). 2 Holmstrom, M., “Solving hyperbolic PDEs using interpolating wavelets”, SIAM J. Sci. Comput., 21(2), 405420 (1999). 3 Lee, Y. S., Hamilton, M. F., “Time Domain Modeling of pulsed finite-amplitude sound beams”, J. Acous. Soc. Am, 97(2), 906-917 (1995). 4 Sweldens, W., “The lifting scheme: A construction of second-generation wavelets”, SIAM J. Math. Anal., 29(2), 511-546 (1998). 5 Vasilyev, O. V., Bowman, C., “Second generation wavelet collocation method for the solution of partial differential equations”, J. Comp. Phys, 165, 660-693 (2000).

129

ARLO 3(4), Oct 2002

1529-7853/02/3(4)/124/6/$19.00

(c)2002 Acoustical Society of America

129

Suggest Documents