Italo |
March 24, 2013 09:56 |
Manufactured solutions for incompressible Navier-Stokes
I am testing a solver for the incompressible Navier-Stokes equations using manufactured solutions. The code uses a 1st order projection method on staggered grid, very similar to the MAC method. I use 1st order time stepping and second order spatial derivatives.
If I choose a manufactured solution that is divergence-free, all works fine. I get second order convergence for a stationary problem. But if the manufactured solution is not divergence-free, the method drops to 1st order, even though I added the source term for the Poisson equation.
I found some publications that also use divergence-free manufactured solutions, but none explain why. Must the manufactured solution be divergence-free? Isn't it possible to test the code with a more generic solution? It seems intuitive that it should work.
When solving the Poisson equation on a square surrounded by Neumann boundary conditions, I must prescribe the pressure at one point. And that is exactly on that point that the error is big. And the error only shows up when using non-divergence-free manufactured solutions.
|