|
[Sponsors] |
May 14, 2015, 04:57 |
PBiCG VS smoothsolver
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
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, |
|
October 8, 2015, 13:09 |
|
#2 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
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? |
|
October 8, 2015, 14:08 |
|
#3 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
Hello, i found that best solver for cases with rotating meshes is BiCGStab from OF extend, i ported it to OF 2.3
|
|
October 8, 2015, 15:16 |
|
#4 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
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. |
|
October 8, 2015, 16:38 |
|
#5 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
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 17:55. |
|
October 8, 2015, 20:52 |
|
#6 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
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.
|
|
October 9, 2015, 16:10 |
|
#7 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
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 |
|
October 13, 2015, 06:47 |
|
#8 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
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 |
|
October 13, 2015, 07:25 |
|
#9 | |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
Quote:
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
__________________
MDPI Fluids (Q2) special issue for OSS software: https://www.mdpi.com/journal/fluids/..._modelling_OSS GitHub: https://github.com/unicfdlab Linkedin: https://linkedin.com/in/matvey-kraposhin-413869163 RG: https://www.researchgate.net/profile/Matvey_Kraposhin |
||
October 13, 2015, 11:22 |
|
#10 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
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 |
|
August 7, 2016, 10:33 |
|
#11 |
New Member
Jim
Join Date: Feb 2014
Location: UK
Posts: 22
Rep Power: 12 |
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 Thanks |
|
August 9, 2016, 22:20 |
|
#12 | |
Member
Kaufman
Join Date: Jul 2013
Posts: 55
Rep Power: 13 |
Quote:
libs ("libBiCGStab.so") Good Luck! |
||
August 16, 2016, 05:20 |
|
#13 |
New Member
Jim
Join Date: Feb 2014
Location: UK
Posts: 22
Rep Power: 12 |
||
September 26, 2016, 09:39 |
|
#14 |
New Member
Joris C.
Join Date: Jan 2013
Posts: 29
Rep Power: 13 |
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). |
|
September 27, 2016, 14:45 |
|
#15 |
New Member
AW
Join Date: Mar 2016
Posts: 17
Rep Power: 10 |
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!
|
|
December 27, 2017, 04:10 |
|
#16 | |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
Quote:
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 |
||
December 27, 2017, 06:57 |
|
#17 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
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 . |
|
December 27, 2017, 07:31 |
|
#18 | |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
Quote:
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 |
||
December 27, 2017, 08:19 |
|
#19 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
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
|
|
December 27, 2017, 08:49 |
|
#20 | |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
Quote:
The problem is solved. The order of these two libraries in controlDict is important: libs ("libBiCGStab.so") libs ("libcompressibleTools.so"); |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
a problem with convergence in buoyantSimpleFoam | skuznet | OpenFOAM Running, Solving & CFD | 6 | November 15, 2017 13:12 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
simpleFoam 3D case: crashes after 7 cycles | alvariten | OpenFOAM Running, Solving & CFD | 20 | July 3, 2015 10:41 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |