CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Manufactured solutions for incompressible Navier-Stokes (https://www.cfd-online.com/Forums/main/115120-manufactured-solutions-incompressible-navier-stokes.html)

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.

mlohry March 25, 2013 09:14

Quote:

Originally Posted by Italo (Post 416004)
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.

If the solution you're using is not divergence free, then it wouldn't satisfy incompressible NS, and an incompressible solver couldn't accurately recreate the solution. Or is there something else I'm missing?

Similarly, your numerical method would have to drop to first order if your solution contains discontinuities, so I wouldn't be surprised to see only first order convergence for any such solution.

Italo March 25, 2013 09:20

Quote:

Originally Posted by mlohry (Post 416241)
If the solution you're using is not divergence free, then it wouldn't satisfy incompressible NS, and an incompressible solver couldn't accurately recreate the solution. Or is there something else I'm missing?

The manufactured solution is not a solution for the original NS equations. A source term must be added to the equations so that it becomes a solution.


All times are GMT -4. The time now is 07:23.