CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Reg. BICGSTAB (https://www.cfd-online.com/Forums/main/15173-reg-bicgstab.html)

sandy May 10, 2008 11:49

Reg. BICGSTAB
 
Hi, i wrote a code for solving Pressure Poisson equation using BiCgSTAB iterative technique. My code is working fine except for the very fine grids(dx~1e-3) so i cant run some cases. Plz advice me reg. this. Is pre-conditioning of any use..?

InddZen May 12, 2008 05:53

Re: Reg. BICGSTAB
 
Hi,

It's known that BI-CGStab can breakdown, I found in a paper the reasons, there are 3, but I can't remember...

But basically, Pressure Poisson Equations matyrix is supposed to be symmetric and positive definite!!! And BiCGStab is designed for unsymmetric matrices!!! So why not use simply CG or CGS. With or whitout preconditionning, you will get very fast and accurate results.

If your matrice is not symmetric, you will probably have to think about GMRES. In this case you have to choose a fairly large restart but it should be ok. Not as fast as BICGStab but you'll always get good results.

sandy May 12, 2008 14:12

Re: Reg. BICGSTAB
 
Hi, Thank you for your suggestions. If possible please give the details of that paper.


InddZen May 12, 2008 16:36

Re: Reg. BICGSTAB
 
The title of the paper is "The Breakdowns of BiCGStab" Link: http://www.springerlink.com/content/62w0t6nh2p8frala/


Tom May 13, 2008 04:45

Re: Reg. BICGSTAB
 
If you're not preconditioning the matrix then it's likely that bicgstab will not converge (well not within a reasonable number of iterations anyway).

Things to check:

(1) make sure you are running in double precision and your convergence criteria is sensibly set.

(2) Try diagonal preconditioning to see if it improves matters.

(3) If (2) appears to work then try another simple preconditioner (Jacobi, Guass-Seidel, SOR or SSOR are all easy to program).

(4) If all the above fail try another solver such as GCR(k) or GMRES(k).

NOTE: most iterative methods have the potential to breakdown/stagnate (it's happened to me with both GCR and GMRES even with preconditioning).

InddZen May 13, 2008 05:18

Re: Reg. BICGSTAB
 
The most simple preconditionner you can use is the diagonal of the matrix. It's improving the simulation enough to see if you need to invesigate more the idea of the preconditionner or simply move to another method.

sudhakar May 13, 2008 08:01

Re: Reg. BICGSTAB
 
hi, Could you tell us your grid size? I am using BiCGSTAB (without preconditioning) to solve pressure poisson equation with 550*450 grid points. It is converging and working very wel.. It is good if you once again check your implementation.

InddZen May 13, 2008 09:56

Re: Reg. BICGSTAB
 
I also used BICGStab for another kind of matrix, unsymmetric of course. Diverging for n=18000 if no preconditionning Diverging for n=32000 if diagonal preconditionning n being the size of the matrix of course. So it is a fact : BICGStab can breakdown for numerous reasons!!

About BiCGStab May 13, 2008 10:44

Re: Reg. BICGSTAB
 
N=18000 or N=32000 is not important here, and it is not the reason it has broken down. And since it has broken down diagonal preconditioning is not gonna help because your matrix clearly is not diagonally dominant (not a M matrix). The reason for preconditioned BiCGStab is not very clear from what you have written. (I had made BiCGStab failed for even N=6).

If your case is too ill conditioned the fail safe method is LSQR.

Tom May 13, 2008 11:05

Re: Reg. BICGSTAB
 
Do you actually mean diverging or do you mean "not converging" - they are different things?

The only time I've had "divergence" has been to programming error (or bad initialization resulting in a division by zero).

The not converging case occurs when the iteration increments either become zero (stagnation) or the residual oscillates without decreasing.


sandy May 13, 2008 12:56

Re: Reg. BICGSTAB
 
The problem is coming when i put, say, 21 grids in 1/600cm(to capture some details in a case, i've used clustered grids.Total domain size was 5.5*0.1 mm with 550*62 grids),in short, when the dx or dy are of very low magnitude. Except for such kind of fine grids, it is working for any no. of grid points, so where could possibly the bug be..?. Please suggest how to modify the implementation as it is just being influenced by the grid dimension?


sandy May 13, 2008 12:57

Re: Reg. BICGSTAB
 
(in continuation)

My code is Diverging for such grids.

InddZen May 13, 2008 18:16

Re: Reg. BICGSTAB
 
What I meant is that for my case, the BIGgstab was giving great results for "coarse" meshes and was breacking down for "finer" mesh. And my matrix is diagonal dominant... But currently I'm using SuperLU or GMRES, which is giving great satisfation, specially the first.


About BiCGStab May 13, 2008 18:28

Re: Reg. BICGSTAB
 
BiCGStab with good preconditioner is very good. I give you an idea about how fast it could be : on a unstructured grid of 70 000 cells, and heat transfer equation with non linear source term. 1 iteration of it reduced the absolute error by factor of 10^-7. That is convergent in 1 iteration. The preconditioner was AMG. ;-)

So if the preconditioner is good, BiCGStab is also very good and robust.

sudhakar May 14, 2008 00:47

Re: Reg. BICGSTAB
 
hi InddZen,

Is it true that the discretization of pressure Poisson equation always produces symmetric and positive definite matrix? Is this the case even for non-uniform grid? is CG faster than multigrid?

sandy May 14, 2008 01:43

Re: Reg. BICGSTAB
 
No, afaik,For non-uniform/non-orthogonal grid the discretization will not produce symmetric matrix.

Matrix May 14, 2008 02:25

Re: Reg. BICGSTAB
 
Actually for incompressible case the matrix will be symmetrical and positive definite. Even for unstructured grids. CG could be used and is used usually, but i have found that BiCGStab (ILU preconditioner) converges much faster than CG. So I always use it.

InddZen May 14, 2008 03:39

Re: Reg. BICGSTAB
 
Ok, AMG is working fine for elliptic equations, what about other kind of matrices, for exemple the one obtained by a FEM discretisation of Navier Stokes equation (incompressible flow of course), specially for high Reynold Numbers... You should read again your papers... Actually I don't have time to spend on trying to developp the right AMG for my matrix, which is really special, probaly latter...

Tom May 14, 2008 04:38

Re: Reg. BICGSTAB
 
"Actually for incompressible case the matrix will be symmetrical and positive definite."

No it won't - try discretizing the 1D problem on a nonuniform grid using finite differences!

Tom May 14, 2008 04:42

Re: Reg. BICGSTAB
 
Try nondimensionalizing your equations and make sure you're using a relative (dimensionless) error estimate for convergence. Also make sure you're using double precision.


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