## HW4, Math 228B, UC davis, Winter 2011

### 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-Wendroﬀ

The following are animated GIFs showing the ﬁnite diﬀerence numerical solution to problem 1 as described in the above HW. The scheme used is Lax-Wendroﬀ.

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

These simulations only show the pressure wave, and not the acoustic perturbation velocity .

#### 2.1 pressure Wave reﬂecting oﬀ both the left and the right boundary

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

 two sin waves triangle pulse one sine wave rectangular pulse

#### 2.2 pressure Wave which reﬂects oﬀ the left boundary only and absorbed at the right boundary

This solution was run with boundary conditions which caused the sound wave to reﬂect 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.

 two sin waves triangle pulse one sine wave rectangular pulse

### 3 Problem 3 results, solving the advection 1-D using ﬁnite volume method

The following are animations of the numerical solution to . The solution used the ﬁnite volume method using 7 diﬀerent numerical ﬂux limiter functions to compare performance.

These 7 methods are deﬁned in the problem statement in the report above.

The methods are

1.
Upwinding
2.
Lax-Wendroﬀ
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 diﬀerent initial conditions. In all of these results, the maximum run time was seconds. In order to reduce the size of the animation ﬁle, not every frame was captured from the simulation run.

Courant number used was , the advection speed was set at and grid spacing was meters. The domain is 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 deﬁned as

 Upwinding: Large diﬀusion at wave crest and trough. but no shift. Grade Lax-Wendroﬀ: Some diﬀusion at wave crest and trough, in addition of signiﬁcant shift to the left relative to exact solution, grade: Beam-Warming: Similar to Lax-Wendroﬀ, but shift is to the right. Grade Minmod: diﬀusion at wave crest and trough, as with upwinding, but not as bad. No shifting. Grade Superbee: NO shifting, and very small amount of diﬀusion at the crest and trough. Grade MC Limited: Similar to superbee, but a little more diﬀusion at the crest and trough. Grade Van Leer: Similar to MC limited, but even more diﬀusion at the crest and trough. Grade

#### 3.2 Results for smooth low frequency initial conditions

The wave packet is deﬁned as

 Upwinding: No shifting, but large amount of diﬀusion at the crest and trough of the wave. Grade Lax-Wendroﬀ: Did well, no shifting nor diﬀusion seen. Grade Beam-Warming: Similar to Lax-Wendroﬀ. Grade Minmod: No shifting, but small amount of diﬀusion near the crest and trough. Grade Superbee: No shift and no diﬀusion. But at the crest and trough, the numerical solution appeared to less smooth than with Lax-Wendroﬀ making a small straight edge. Grade MC Limited: Similar to Lax-Wendroﬀ, better than Superbee around the crest and trough, no straight edge appeared. Grade Van Leer: No diﬀusion and no shifting. Grade

#### 3.3 Results for step function

A step function from to .

 Upwinding: No ripples seen, follows the general form of the step function, but large amount of diﬀusion near the corners. Grade Lax-Wendroﬀ: Large ripples around the corners on the left of the step function. Less diﬀusion than upwinding. Grade Beam-Warming: The ripples are larger and have a larger extent than Lax-Wendroﬀ. Grade Minmod: No ripples and little diﬀusion. An improved version of upwinding. Grade Superbee: The best scheme for the step function. No ripples, very closely followed the exact solution, but very small diﬀusion is still there. Grade MC Limited: Similar to supperbee, but more diﬀusion. Grade Van Leer: Similar to MC limited. Grade

#### 3.4 Results for mixed step function and smooth function

The initial condition used for this test is

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

 Upwinding Lax-Wendroﬀ Beam-Warming Minmod Superbee MC Limited Van Leer