Unformatted text preview:

Lecture 6Monday, April 18, 2005Supplementary Reading: Osher and Fedkiw, §14.3.2, §14.3.3In the previous lecture we introduced the numerical flux function. To review,we start with the strong form of the conservation law,ut+ f(u)x= 0.Integrating over a grid cell, we have the weak form(uav e,i4x)t+ fui+12− fui−12= 0.Replacing uav e,iwith the pointwise value uiwe make an O(4x2) error(ui4x)t+ fui+12− fui−12= O(4x2)Introducing the numerical flux function instead of the physical flux functioneliminates the error(ui)t+Fxi+12− Fxi−124x= 0.1 Constructing the Numerical Flux FunctionWe define the numerical flux function through the relationf(ui)x=Fi+1/2− Fi−1/2∆x(1)To obtain a convenient algorithm for computing this numerical flux function,we define h(x) implicitly through the following equationf(u(x)) =14xZx+4x/2x−4x/2h(y)dy (2)1and note that taking a derivative on both sides of this equation yieldsf(u(x))x=h(x + 4x/2) − h(x − 4x/2)4x(3)which shows that h is identical to the numerical flux function at the cell walls.That is Fi±1/2= h(xi±1/2) for all i. We calculate h by finding its primitiveH(x) =Zxx−1/2h(y)dy (4)using polynomial interpolation, and then take a derivative to get h. We build adivided difference table to construct H.zeroth order D0i+12H at cell wallsfirst order D1iH at cell centerssecond order D2i+12H at cell wallsthird order D3iH at cell centers.........That is, the even divided differences of H are at the cell walls, and the odddivided differences of H are at the cell centers. Since we are actually interestedin determining h, we do not need the zeroth order divided differences of H asthey will drop out when we differentiate to obtain h. Therefore, we can ignorethe zeroth level of the divided difference table for H, and construct the tablestarting at the first level. The first level is given byD1iH =Hxi+12− Hxi−124x= f (ui)= D0ifThis is becauseH(xi+12) =Zxi+1/2x−1/2h(y)dy=iXj=0 Zxj+1/2xj−1/2h(y)dy!= 4xiXj=0f(u(xj))And s imilarly,H(xi−12) = 4xi−1Xj=0f(u(xj))2So thatH(xi+12) − H(xi−12) = 4xf(u(xi))The higher divided differences areD2i+1/2H =f(u(xi+1)) − f(u(xi))24x=12D1i+1/2f (5)D3iH =13D2if (6)continuing in that manner.According to the rules of polynomial interpolation, we can take any pathalong the divided difference table to construct H, although they do not all givegood results. ENO reconstruction consists of two important features. First,choose D1iH in the upwind direction. Second, choose higher order divided dif-ferences by taking the smaller in absolute value of the two possible choices. Oncewe construct H(x), we evaluate H0(xi+1/2) to get the numerical flux Fi+1/2.2 ENO-Roe Discretization (Third Order Accu-rate)For a specific cell wall, located at xi0+1/2, we find the associated numerical fluxfunction Fi0+1/2as follows. First, we define a characteristic speedλi0+1/2= f0(ui0+1/2)For example, recall Burgers’ equation,ut+u22x= 0.The flux is given byf(u) =u22so thatf0(u) = uTherefore,λ(x) = f0(u(x)) = u(x).The value of u at the half grid points is defined using a standard linear averageui0+1/2= (ui0+ ui0+1)/23Then, if λi0+1/2> 0, set k = i0. Otherwise, set k = i0+ 1. DefineQ1(x) = (D1kH)(x − xi0+1/2) (7)If |D2k−1/2H| ≤ |D2k+1/2H|, then c = D2k−1/2H and k?= k − 1. Otherwise,c = D2k+1/2H and k?= k. DefineQ2(x) = c(x − xk−1/2)(x − xk+1/2) (8)If |D3k?H| ≤ |D3k?+1H|, then c?= D3k?H. Otherwise, c?= D3k?+1H. DefineQ3(x) = c?(x − xk?−1/2)(x − xk?+1/2)(x − xk?+3/2) (9)ThenFi0+1/2= H0(xi0+1/2) = Q01(xi0+1/2) + Q02(xi0+1/2) + Q03(xi0+1/2) (10)which simplifies toFi0+1/2= D1kH + c (2(i0− k) + 1) 4x + c?3(i0− k?)2− 1(4x)2.


View Full Document

Stanford CS 237C - CS 237C Lecture Notes

Download CS 237C Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS 237C Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 237C Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?