# Arbitrary Choosing of the Solution Domain - Navier Stokes and Manufactured Solutions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 11, 2015, 10:33 Arbitrary Choosing of the Solution Domain - Navier Stokes and Manufactured Solutions #1 New Member   Fabian Gabel Join Date: Oct 2014 Location: Darmstadt Posts: 13 Rep Power: 10 I want to verify a finite-volume solver (SIMPLE-Algorithm) for the incompressible Navier-Stokes equations by using a manufactured solution. I use Dirichlet boundary conditions for the velocity at all boundaries. The manufactured solution for the velocities I use, is constructed as the curl of a vector field and thereby fulfills the continuity equation at any point. Depending on how I choose the domain on which to solve the equations I run into convergence problems: The residual of the pressure correction equation stagnates after an initial decrease. I am approximating the mass fluxes through boundary faces using the midpoint rule and apparently this leads to a net loss/gain of mass considering the entire problem domain. Is this the normal behavior? Are there any remedies other than choosing a manufactured solution that identically vanishes at the boundaries? Would it be an option to provide the exact mass flux instead of the approximate (not sure if this is allowed, since the Dirichlet boundary condition only fixes the velocity)?

 January 11, 2015, 15:53 #2 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 1,981 Blog Entries: 29 Rep Power: 36 The principle underlying the manufactured solution approach to the verification is that, for a given solver, you should be able to normally set-up the problem according to the known solution (thus, the appropriate set of Dirichlet/Neumann b.c. and source terms, when encessary). If your solver does not produce the expected results than there is something wrong in it. Is this an in-house code or some commercial package?

 January 11, 2015, 16:54 #3 New Member   Fabian Gabel Join Date: Oct 2014 Location: Darmstadt Posts: 13 Rep Power: 10 The Solver I use is neither commercial nor in-house - it is a modification of caffa I implemented for my masters thesis. Apparently the global mass balance is not fulfilled when the boundary mass fluxes aren't calculated precise enough or the manufactured solution doesn't vanish on the boundaries. On the other side I was able to create solutions that are symmetric in the sense, that the mass fluxes on different sides of the problem domain complement each other, leading to a zero net mass flux over the domain boundaries. I think a higher order of integration for mass fluxes at the boundaries might help. Note that I already verified the solver on problem domains that have the afore mentioned beneficent properties. Unfortunately I don't have the ability and the time to confirm my suspicion by using another cfd tool. I was hoping someone of the community already had stumbled upon this exact problem and could share some insight.

 January 11, 2015, 19:38 #4 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 1,981 Blog Entries: 29 Rep Power: 36 I am not very confident on the Peric codes but, is it possible that this is a staggered grid issue? I can't see why a 0 boundary value should be different from any other numerical value as long as the overall boundary integration still results in mass conservation.

January 12, 2015, 04:20
#5
New Member

Fabian Gabel
Join Date: Oct 2014
Posts: 13
Rep Power: 10
Quote:
 I am not very confident on the Peric codes but, is it possible that this is a staggered grid issue?
I use a collocated grid arrangement.

Quote:
 I can't see why a 0 boundary value should be different from any other numerical value as long as the overall boundary integration still results in mass conservation.
You are right. If you look again, this is not contradicting my previous post.

Quote:
 On the other side I was able to create solutions that are symmetric in the sense, that the mass fluxes on different sides of the problem domain complement each other, leading to a zero net mass flux over the domain boundaries.
What I meant to say is, that even though locally at the boundary faces the boundary value of the velocity isn't zero, I accomplish a zero net mass flux (mass is conserved) due to the symmetry of my manufactured solution. If I am not able to use this symmetry, because the geometry of the used solution domain changes, the mass fluxes will not complement each other anymore, leading to a overall mass flux unequal to zero.

This effect can be weakened by using a finer grid (since my discretization is consistent) or by using a higher order of integration at the boundaries.

 January 12, 2015, 08:35 #6 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 1,981 Blog Entries: 29 Rep Power: 36 I edited the post because i finally got your issue. If i got it correctly, your manufactured solution is such that it is locally divergence free but it preserves global continuity only for certain domain configurations. Obviously what you are doing cannot be done and there certainly is a problem with either your manufactured solution or the domain over which you are solving for it. The domain you can use must be such that the manufactured solution preserves the global continuity. This, at least, for incompressible solvers. It is a mathematical constraint for the well posedness of the pressure equation.