recover solution from dual grid
I'm new to solving pdes. I coded up a finite volume scheme for advection on a dual grid, and I'm seeing some weird behavior. I'll recap my scheme (seems pretty standard), but my real question is on recovering the solution.
So I start out with a triangular mesh, which I then break up into a barycentric dual grid. I'll call the function I wish to represent u(x,y,t), and so initially I set the cell value w for the volume V of the dual equal to the average value of the initial condition
Then my simplified update is (f is velocity field, n_j is normal from edge E_ij between cell i and cell j, alpha is upwind parameter)
Anyways, when I plot the result, I see advection, and my little 2d gaussian moves, but it diffuses as well. But I think that's because I should be looking at the function value u(x,y,t), not w(i,t). Perhaps u(x,y,t) isn't diffusing?
So my question is how to recover u(x,y,t) from w(i,t). Using the barycentric dual scheme, the value of each dual cell is the average value over that cell, so maybe if I do something like
but that seems iffy.
tldr; Is there a standard way of recovering the function value from a dual grid?
edit: in all the scenarios I've tried, the max(w) is decaying exponentially. This makes me think the scheme isn't working as it should. Do you see any problems there?
|All times are GMT -4. The time now is 09:46.|