CFD Online Logo CFD Online URL
Home > Forums > General Forums > Main CFD Forum

Gmres fails to converge, but LU is fine

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

LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2013, 20:01
Default Gmres fails to converge, but LU is fine
New Member
Ennio Barbaro
Join Date: Apr 2013
Location: Pisa
Posts: 1
Rep Power: 0
sbabbi is on a distinguished road
I am working on a finite-element simulation for the 3D prandtl boundary layer equations on a flat plate, using fenics.
I am using P2-P1 elements in the plane normal to the flow, and implicit euler along the stream direction.
Everything works fine if i use the LU method to factorize the Jacobian in the newton solver. On the other hand, gmres fails to converge on the very same matrix.
Now, to my understanding of gmres, there is no way that it can fail if the LU solver converge (am I wrong?).
I tested the gmres solver in other problems, and it works fine. I also tried to coarse the grid and to increase the restart parameter, with no luck.
Are there any particular reasons for which gmres may fail to converge, or is it a bug in my code?
Thanks in advance for help.
sbabbi is offline   Reply With Quote

Old   April 11, 2013, 08:54
Senior Member
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 17
Jonas Holdeman is on a distinguished road
I have experienced a similar problem in MATLAB and will give you my solution. My lines of code are,

% Parameters for GMRES solver
% parameters for ilu preconditioner
su.type = 'ilutp';
su.droptol = 2.e-5;
[Lm,Um] = ilu(Mat,su); % incomplete LU
Qr = gmres(Mat,RHS,GM.MIter,GM.Tol,GM.MRstrt,Lm,Um,[]); % GMRES

When the drop tolerance su.droptol is too large, GMRES does not converge. Making it sufficiently small has worked in all cases.

According to the documentation, ilutp is supposed to be the default, but the MATLAB code does not follow the documentation in ver. R2012b and must be set as above. I have not checked to see if this has been corrected in R2013a.
The parameter values are those I use in one program and vary for other programs.
Jonas Holdeman is offline   Reply With Quote


boundary layer, fenics, gmres

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interfoam blows on parallel run danvica OpenFOAM Running, Solving & CFD 16 December 22, 2012 02:09
Question on ILU(0) Preconditioned GMRES Shenren_CN Main CFD Forum 2 August 6, 2012 19:19
inviscid 2d computation for M=0.3 flow past cylinder on fine mesh can not converge boubalos Main CFD Forum 3 March 20, 2011 04:26
CFX FAQ updated - my simulation fails to converge Glenn Horrocks CFX 0 September 1, 2007 07:33
how to converge the solution for fine mesh kathiravan Siemens 5 August 11, 2006 01:30

All times are GMT -4. The time now is 22:29.