MUSCL scheme implementation
This is a very basic question, regarding MUSCL schemes as described in
When solving a conservation law u_t + d/dx[f(u)] = 0 using a MUSCL scheme,
we arrive at the semi-discrete formula d/dt[u_i] + (1/deltax)*[F(ustar_i+half) - F(ustar_i-half)] = 0.
ustar_i+/- is calculated through the use of a flux limiter phi(r), where r_i = (u_i - u_i-1) / (u_i+1 - u_i). Since r is evaluated at grid point i-1, i, and i+1, this results in the use of five spatial grid points (i-2 through i+2).
My question is the following. Given that this scheme is five points wide, what is typically done for the grid points just inside the left and right boundary? That is, if the grid goes from i=1 to N, then i=2 and i=N-1 require information from points outside the grid. How are these points treated? How is treatment different for Dirichlet vs. Neumann conditions?
Thank you very much for all your help
You can drop the accuracy on the boundary, use a lower order scheme. Usually, dropping the accuracy by one for boundary points does not affect the overall accuracy. But this is a difficult thing to prove in practice, maybe you can do numerical studies.
You can introduce ghost cells and find the solution in them using boundary conditions.
|All times are GMT -4. The time now is 19:43.|