If you are reading my blog, perhaps you might have noticed this in my previous posts that I have started working on adaptive mesh refinement. I discussed about the basic funda of this method here. After all the reading work, I started to write my own code for a very simple problem. *One dimensional inviscid Burger’s equation*. It is a wave equation like looking equation with a slight difference. Wave equation has a fixed velocity while it has a variable one.

**My pseudo code goes like this:**

I have a mesh at the beginning, let’s call it *M1*. Then after some time steps, in my code it is 5, I check which grid points have more local truncation error. This is done using an error estimation method based on Richardson’s extrapolation which can be found in the papers of Berger. Then around every such (flag) grid point, I place a small finer mesh to have a better solution. So, if I mark the point **i**, I am creating a small mesh between **i-1** and **i+1** which has a mesh width half as that of *M1*. Because there would be many flag points, therefore I will have many such small meshes, let’s call them *M2*. Initial values of M2 can be interpolated from the values of M1 and then I solve the same PDE on M2 which will produce better solution as M1 because it is finer than it. **My problems at this stage is this:** When we have such kinds of space and time variation (refinement), conservation comes into picture. Initially we only had M1, therefore our conservative PDE was doing its job. But now, since we refined space and time, we have to do the job of make things in such a way that fluxes are conserved.

I expect to solve this problem within a week as I am reading quite a lot about conservation in PDE and the papers which dealt with this problem in AMR.

### Like this:

Like Loading...

*Related*