CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Poisson solver (

Steve June 18, 2004 11:54

Poisson solver
Hi, I am writing a code for solving viscous incompressible flows using Navier Stokes equations in (u,v,p). Using normal cartesian non-staggered grid.

I am using the fractional step method, so I will be solving for intermediate velocities and then a pressure Poisson equation to get the new velocities.

Presently I am using the point by point SOR method for my Poisson solver. I would like to ask what Poisson solution method would be better, if I am still required to solve on point-by-point basis. I am thinking of using conjugate gradient, and for my code, multigrid method is not advisable.

Another thing is, for conjugate gradient, do I need to include my boundary equations in Ax=b ??

Thanks a lot!!

agg June 18, 2004 14:56

Re: Poisson solver
You will have to include boundary equations in Ax=b. This will make your matrix A asymmetric. For this you should use the bi-conjugate gradient method.

Steven June 24, 2004 04:20

Re: Poisson solver
Ok, great, thanks! Is it necesary to include a preconditioner?

agg June 24, 2004 14:31

Re: Poisson solver
Preconditioning is used to accelerate convergence. If your convergence is slow it would be worthwhile using it since you will be solving Poisson equation in every time step.

Steve June 28, 2004 06:06

Re: Poisson solver
Any recomendations for a preconditioner? I tried without one and one with the Jacobi precond under NEUMANN boundary conditions for a Poisson problem of f=cos(0.5pi x)cos(0.5pi y). But I couldn't derive machine zero convergence for both methods. Any particular reason why?

I am using a meshfree method, so it would be advisable for me to implement a precond that doesn't require the transpose of the A matrix (in Ax=b) or preferrably something less fanciful...

agg June 28, 2004 11:34

Re: Poisson solver
Since i haven't written any preconditioners myself, I'm sorry I cannot help you in this part. But there should be books on it for help.

Regarding machine accuracy, it takes too many iterations to reach, also I cannot reach it most of the time. For second order 5-pt or 7-pt scheme, for my case I find that a tolerance of 1E-8 and 1E-10 do not differ much in the solutions.

cregeo July 22, 2004 21:16

Re: Poisson solver
May I add one question to this thread?

For the poisson equation that will turn out

to be matrix equation:

div(grad(p) = f

how can I insert the Neumann boundary conditions into the matrix:

<grad(p), n> = 0

where <,> is inner product and n is a unit normal on the boundary.

In a staggered grid, the boundary condition turns out to be as follows usually:

p_i = (- n_x * p_(j))/(n_x + n_y) + (-n_y * p(k))/(n_x + n_y)

where p_i, p_j, and p_k are the pressure at cell centers and neighbor to each other..

My question is whether I should replace this into the poisson equation modifying the poisson equation without changing the size of the matrix or use the boundary condition as a Lagrange Multiplier?

Please help me..


All times are GMT -4. The time now is 18:46.