up

HW4, Math 228B, UC davis, Winter 2011

Nasser M. Abbasi

Contents

1 my solution
2 Problem 1 results, Animation of acoustic wave equation solution using Lax-Wendroff
 2.1 pressure Wave reflecting off both the left and the right boundary
 2.2 pressure Wave which reflects off the left boundary only and absorbed at the right boundary
3 Problem 3 results, solving the advection 1-D using finite volume method
 3.1 Results for wave packet as initial conditions
 3.2 Results for smooth low frequency initial conditions
 3.3 Results for step function
 3.4 Results for mixed step function and smooth function

1 my solution

This is my HW4 web page, it contains animations and links to my report in PDF and HTML versions. The problem description is here PDF which contains detailed description of the 3 problems solved.

The following is my solution report in HTML and PDF

2 Problem 1 results, Animation of acoustic wave equation solution using Lax-Wendroff

The following are animated GIFs showing the finite difference numerical solution to problem 1 as described in the above HW. The scheme used is Lax-Wendroff.

Clicking on an image will start the animation in a new window.

These simulations only show the pressure wave, p(x,t)  and not the acoustic perturbation velocity u (x, t)  .

2.1 pressure Wave reflecting off both the left and the right boundary

This solution was run with boundary conditions which caused the sound wave to reflect from both boundaries. This is what would happen inside a room with reflective walls such as concerete or wood.





PIC

PIC

PIC

PIC





two sin waves

triangle pulse

one sine wave

rectangular pulse

2.2 pressure Wave which reflects off the left boundary only and absorbed at the right boundary

This solution was run with boundary conditions which caused the sound wave to reflect from only the left boundary but absorbed into the right boundary. This is what would happen inside a room with one wall treated with material to absorbe the sound waves reaching it.









PIC

PIC

PIC

PIC





two sin waves

triangle pulse

one sine wave

rectangular pulse





3 Problem 3 results, solving the advection 1-D using finite volume method

The following are animations of the numerical solution to ut + aux = 0  . The solution used the finite volume method using 7 different numerical flux limiter functions to compare performance.

These 7 methods are defined in the problem statement in the report above.

The methods are

1.
Upwinding
2.
Lax-Wendroff
3.
Beam-Warming
4.
minmod (high resolution)
5.
superbee (high resolution)
6.
MC limited (high resolution)
7.
Van Leer (high resolution)

The following tables show the results of the simulations. 4 tables are given. Each table is for a different initial conditions. In all of these results, the maximum run time was 5  seconds. In order to reduce the size of the animation file, not every frame was captured from the simulation run.

Courant number used was 0.9  , the advection speed was set at a = 1  and grid spacing was h = 0.005  meters. The domain is [0,1]  using cell centered grid.

These animations will run only once and stop at 5 seconds. To run it again, simply reload the web page using the browser reload button, this will cause the animation to start from the beginning again.

3.1 Results for wave packet as initial conditions

The wave packet is defined as u(x,0 ) = cos (16 πx)exp (− 50(x − 0.5)2)









PIC

PIC

PIC

PIC

Upwinding: Large diffusion at wave crest and trough. but no shift. Grade F

Lax-Wendroff: Some diffusion at wave crest and trough, in addition of significant shift to the left relative to exact solution, grade: B −

Beam-Warming: Similar to Lax-Wendroff, but shift is to the right. Grade                            B

Minmod: diffusion at wave crest and trough, as with upwinding, but not as bad. No shifting. Grade                                                              C





PIC

PIC

PIC

Superbee: NO shifting, and very small amount of diffusion at the crest and trough. Grade B+

MC Limited: Similar to superbee, but a little more diffusion at the crest and trough. Grade B

Van Leer: Similar to MC limited, but even more diffusion at the crest and trough. Grade    B −





3.2 Results for smooth low frequency initial conditions

The wave packet is defined as u(x,0 ) = sin (2 πx)sin(4πx )









PIC

PIC

PIC

PIC

Upwinding: No shifting, but large amount of diffusion at the crest and trough of the wave. Grade C

Lax-Wendroff: Did well, no shifting nor diffusion seen. Grade A

Beam-Warming: Similar to Lax-Wendroff. Grade    A

Minmod: No shifting, but small amount of diffusion near the crest and trough. Grade                                           B





PIC

PIC

PIC

Superbee: No shift and no diffusion. But at the crest and trough, the numerical solution appeared to less smooth than with Lax-Wendroff making a small straight edge. Grade A −

MC Limited: Similar to Lax-Wendroff, better than Superbee around the crest and trough, no straight edge appeared. Grade A

Van Leer: No diffusion and no shifting. Grade    A





3.3 Results for step function

A step function from x =  0.25  to x = 0.75  .









PIC

PIC

PIC

PIC

Upwinding: No ripples seen, follows the general form of the step function, but large amount of diffusion near the corners. Grade C

Lax-Wendroff: Large ripples around the corners on the left of the step function. Less diffusion than upwinding. Grade C

Beam-Warming: The ripples are larger and have a larger extent than Lax-Wendroff. Grade    C −

Minmod: No ripples and little diffusion. An improved version of upwinding. Grade                                           C+





PIC

PIC

PIC

Superbee: The best scheme for the step function. No ripples, very closely followed the exact solution, but very small diffusion is still there. Grade A −

MC Limited: Similar to supperbee, but more diffusion. Grade B

Van Leer: Similar to MC limited. Grade B+





3.4 Results for mixed step function and smooth function

The initial condition used for this test is                                                    2
u(x,0) = (X  > 0.1)(X <  0.3) + exp (− 200 (X  − 0.75) )

This test just combines the step function with the low frequency smooth test done above. Hence, the same comments will apply as above.









PIC

PIC

PIC

PIC

Upwinding

Lax-Wendroff

Beam-Warming

Minmod





PIC

PIC

PIC

Superbee

MC Limited

Van Leer