CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

PBiCG VS smoothsolver

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2015, 03:57
Default PBiCG VS smoothsolver
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Hello guys!

From my simulations, I found these matrix solver's un-normal behavior(for my passive scalar transport equations), especially for PBiCG.

All in all, PBiCG is fast but not stable, smoothsolver is stable but slow.

for example:

I add 6 passive scalar transport equations into my solver. I found PBiCG is quite fast to get to Final residual. Usually under 20 times to 1e-16. But for smoothsolver, it takes nearly thousands times. However, sometimes smoothsolver can not reach to final residual. So we can see this PBiCG is quite fast!

However, PBiCG is not stable. I dont know if anyone experienced this before, Long time ago my solver blowed up in parallel but succeeded in serial. Then I switch PBiCG to smoothsolver. It worked out. And the results are quite good!

This time, Im facing kind of similar problem too. Cuz I need to run long long time, I want it to be quite fast. So I use PBiCG. But it blows up! But smoothsolver runs smoothly!

Im not familiar with matrix solver. I barely know nothing about this. So if someone can clarify this or have something to discuss. I would like to hear any suggestions!

Best,
sharonyue is offline   Reply With Quote

Old   October 8, 2015, 12:09
Default
  #2
Member
 
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 15
f0208secretx is on a distinguished road
I have experienced the same thing. I am using SA-DDES + PimpleFoam + AMI for non-conforming meshes. I tried PBiCG and smoothSolver on my U and NuTilda, and it seems that the stability of the smoothSolver is better. I do not see a huge difference in speed however, the convergence for U is reached usually within a few iterations.

Have you figured out why this is happening? Could it be a bug in DILU (my preconditioner for PBiCG) or PBiCG?
f0208secretx is offline   Reply With Quote

Old   October 8, 2015, 13:08
Default
  #3
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hello, i found that best solver for cases with rotating meshes is BiCGStab from OF extend, i ported it to OF 2.3
mkraposhin is offline   Reply With Quote

Old   October 8, 2015, 14:16
Default
  #4
Member
 
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 15
f0208secretx is on a distinguished road
Thanks for the reply. Is BiCGStab not preconditioned? Is there a preconditioned version to speed it up? I did not see this option in the official documentation in OF2.3 and OF2.4.

Do you have any other insights on the performance of the two solver? My mesh is stationary so factorization should only be done once. Is there a flag to turn this on or is it by default? I used AMI purely to handle nonconforming interface.
f0208secretx is offline   Reply With Quote

Old   October 8, 2015, 15:38
Default
  #5
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
No, BiCGStab preconditioned with DILU. BiCGStab is not available for official version, but you can download my port of BiCGStab to OF 2.3 and OF 2.4 (added after your post) here

https://github.com/unicfdlab/libcompressibleTools

Don't be confused with name "compressibleTools" - this solver works for incompressible applications

I'm not specialist in linear algebra, and i'm relying on my experience only - PBiCG solver sometimes can converge to wrong values. So, when i see that PBiCG gives wrong solution, i'm switching to BiCGStab. I checked BiCGStab only for OF 2.3

Last edited by mkraposhin; October 9, 2015 at 16:55.
mkraposhin is offline   Reply With Quote

Old   October 8, 2015, 19:52
Default
  #6
Member
 
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 15
f0208secretx is on a distinguished road
Okay thanks. I am using AMI's feature from 2.4 so unfortunately I can't use it directly. If its reliable and sufficiently better maybe you should request to put it in official OF distribution.
f0208secretx is offline   Reply With Quote

Old   October 9, 2015, 15:10
Default
  #7
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Well, i checked and i found that it compiles well on OF 2.4.0

So, i added folder for OF 2.4.0 to git.

It will be nice if you will test it on your case and tell me your opinion

Because i used BiCGStab for more than 4 years and found that this solver is best comparing to smoothSolver and PBiCG
rajibroy likes this.
mkraposhin is offline   Reply With Quote

Old   October 13, 2015, 05:47
Default
  #8
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
I found your lib of BiCGStab also works with OpenFOAM-2.2.x. Let me try to see, haha.





I did a quick try, with DILU preditioner. This matrix solver is amazing. In the case where PBiCG diverges, it does not! And much faster than smoothsolver.

Could u please provide some documents about this solver? Quite interesting.
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   October 13, 2015, 06:25
Default
  #9
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by sharonyue View Post
I found your lib of BiCGStab also works with OpenFOAM-2.2.x. Let me try to see, haha.





I did a quick try, with DILU preditioner. This matrix solver is amazing. In the case where PBiCG diverges, it does not! And much faster than smoothsolver.

Could u please provide some documents about this solver? Quite interesting.
Well, i'm not an author of this solver

If you will look in the source code, you will see that this solver was implemented by H. Jasak. for OF-extend
So, my part of work was to simply port it to OpenFOAM official version
But, in my institution i have 2 colleagues, who have a lot of experience with BiCGStab and linear algebra solvers. I will ask them for literature
rajibroy likes this.
mkraposhin is offline   Reply With Quote

Old   October 13, 2015, 10:22
Default
  #10
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Thank bro,

This BicgStabsolver is very great. Wish someone can try this too. Thanks to your porting!

Best,
dongyue
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   August 7, 2016, 09:33
Default
  #11
New Member
 
Jim
Join Date: Feb 2014
Location: UK
Posts: 22
Rep Power: 12
jimteb is on a distinguished road
Hi Matvey,

I successfully compiled your libcompressibleTools for OpenFOAM-3.0.x, with no errors. However, when I try to run a case to test the BiCGStab solver I get the error:

Code:
[5] --> FOAM FATAL IO ERROR: 
[5] Unknown asymmetric matrix solver BiCGStab

Valid asymmetric matrix solvers are :

4
(
BICCG
GAMG
PBiCG
smoothSolver
Am I possibly missing a step here or something?

Thanks
jimteb is offline   Reply With Quote

Old   August 9, 2016, 21:20
Default
  #12
Member
 
Kaufman
Join Date: Jul 2013
Posts: 55
Rep Power: 12
kmefun is on a distinguished road
Quote:
Originally Posted by jimteb View Post
Hi Matvey,

I successfully compiled your libcompressibleTools for OpenFOAM-3.0.x, with no errors. However, when I try to run a case to test the BiCGStab solver I get the error:

Code:
[5] --> FOAM FATAL IO ERROR: 
[5] Unknown asymmetric matrix solver BiCGStab

Valid asymmetric matrix solvers are :

4
(
BICCG
GAMG
PBiCG
smoothSolver
Am I possibly missing a step here or something?

Thanks
Try to add the following line at the end of the controlDict

libs ("libBiCGStab.so")

Good Luck!
kmefun is offline   Reply With Quote

Old   August 16, 2016, 04:20
Default
  #13
New Member
 
Jim
Join Date: Feb 2014
Location: UK
Posts: 22
Rep Power: 12
jimteb is on a distinguished road
Quote:
Originally Posted by kmefun View Post
Try to add the following line at the end of the controlDict

libs ("libBiCGStab.so")

Good Luck!
Thanks for the heads-up. Just to note, the actual library that needs to be called in controlDict is:

libs ("libcompressibleTools.so");

Thanks
lpz456 likes this.
jimteb is offline   Reply With Quote

Old   September 26, 2016, 08:39
Default
  #14
New Member
 
Joris C.
Join Date: Jan 2013
Posts: 29
Rep Power: 13
Coris is on a distinguished road
I would like to add that the PBiCGStab solver has been recently added to OF 4 and OF dev: https://github.com/OpenFOAM/OpenFOAM...f61cbfc49298ee

Its use is advised for all cases previously using PBiCG (see OF dev commit https://github.com/OpenFOAM/OpenFOAM...b316c7c0618d5c).
Coris is offline   Reply With Quote

Old   September 27, 2016, 13:45
Default
  #15
New Member
 
AW
Join Date: Mar 2016
Posts: 17
Rep Power: 10
Andy_Wang is on a distinguished road
Hi Matvey, i don't know if you still can read this, but i really have a problem with the BiCGStab solver. I compiled it in of240, which gives me no error. And i tried it with DILU preconditioner. As a result, i get an error report says that the DILU precondition is unknown. Do you know what i might have done wrong or i missed something? (PS: i added libs(libcompressibleTools.so)in the controlDict). Any help is appreciated!
Andy_Wang is offline   Reply With Quote

Old   December 27, 2017, 03:10
Default
  #16
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
No, BiCGStab preconditioned with DILU. BiCGStab is not available for official version, but you can download my port of BiCGStab to OF 2.3 and OF 2.4 (added after your post) here

https://github.com/unicfdlab/libcompressibleTools

Don't be confused with name "compressibleTools" - this solver works for incompressible applications

I'm not specialist in linear algebra, and i'm relying on my experience only - PBiCG solver sometimes can converge to wrong values. So, when i see that PBiCG gives wrong solution, i'm switching to BiCGStab. I checked BiCGStab only for OF 2.3
Hi
when I want to compile it, gives me this error:
cannot find -lfftw3
I have searched a lot about this lib, but I didn't find any thing!
could you please help me?
Thanks
alimea is offline   Reply With Quote

Old   December 27, 2017, 05:57
Default
  #17
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Hello,

I do not know if this can be of any help. However, it seems that the code has to be compiled with the library FFTW (http://www.fftw.org/). Try to download and compile it in your pc and then add its path to you LD_LIBRARY_PATH in .bashrc .
AliE is offline   Reply With Quote

Old   December 27, 2017, 06:31
Default
  #18
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by AliE View Post
Hello,

I do not know if this can be of any help. However, it seems that the code has to be compiled with the library FFTW (http://www.fftw.org/). Try to download and compile it in your pc and then add its path to you LD_LIBRARY_PATH in .bashrc .
Thanks for your help
I read in a cite that I must remove the address of lib from options file. I compile it successfully, but again it gives me this error when I run a case with BiCGStab solver:

unknown asymmetric matrix solver BiCGStab .
Do you know why?!
Thanks
alimea is offline   Reply With Quote

Old   December 27, 2017, 07:19
Default
  #19
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Well, my idea is that OF you are using do not know any solver called in that way. Maybe, you have to add it somewhere with the proper call to the solver. I think that just compile the solver is not enough, but you must addi it to the list that the code already has got... Unfortunately I do not program too much in openFoam and I can't help more than this. Sorry
AliE is offline   Reply With Quote

Old   December 27, 2017, 07:49
Smile
  #20
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by AliE View Post
Well, my idea is that OF you are using do not know any solver called in that way. Maybe, you have to add it somewhere with the proper call to the solver. I think that just compile the solver is not enough, but you must addi it to the list that the code already has got... Unfortunately I do not program too much in openFoam and I can't help more than this. Sorry
Thank you.
The problem is solved.
The order of these two libraries in controlDict is important:
libs ("libBiCGStab.so")
libs ("libcompressibleTools.so");
lpz456 likes this.
alimea is offline   Reply With Quote

Reply


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
a problem with convergence in buoyantSimpleFoam skuznet OpenFOAM Running, Solving & CFD 6 November 15, 2017 12:12
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
simpleFoam 3D case: crashes after 7 cycles alvariten OpenFOAM Running, Solving & CFD 20 July 3, 2015 09:41
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 21:14


All times are GMT -4. The time now is 13:31.