|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21 ![]() |
A tiny error in linear PCG solver.
https://cpp.openfoam.org/v5/PCG_8C_source.html#l00066 It does one more iteration than specified in variable maxIter_ (which is read from system/fvSolution dictionary): Code:
// “PCG.C” Foam::solverPerformance Foam::PCG::solve ( ... ) const { ... // --- Solver iteration do { ... } while ( ( solverPerf.nIterations()++ < maxIter_ ... ) ... ); ... } Code:
// “PCG.C” Foam::solverPerformance Foam::PCG::solve ( ... ) const { ... // --- Solver iteration do { ... } while ( ( ++solverPerf.nIterations() < maxIter_ ... ) ... ); ... } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 ![]() ![]() ![]() |
Hi Sergei,
I came across of that problems several times but never thought about that ![]() https://bugs.openfoam.org/view.php?id=2716
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; October 14, 2017 at 06:54. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 ![]() ![]() ![]() |
It is already resolved by the commit: https://github.com/OpenFOAM/OpenFOAM...7f0fa442d4ac56
In addition henry changed it in two other gradient based solvers
__________________
Keep foaming, Tobias Holzmann |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21 ![]() |
Hi, Tobias. Thanks for taking a burden of posting a bug report from me. The error was found a while ago but was left where it sat till recent moment. Sometimes searching for a bug in the code can be fun.
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Steady-State and Transient Solvers | 70m1 | OpenFOAM Running, Solving & CFD | 21 | May 8, 2021 07:09 |
PEMFC model with FLUENT | brahimchoice | FLUENT | 22 | April 19, 2020 15:44 |
fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 16:08 |
Heat flux BC | lfrigeri3 | OpenFOAM | 9 | February 22, 2014 11:59 |
suitable boundary condition for scavenging process? | immortality | OpenFOAM Running, Solving & CFD | 3 | January 25, 2013 19:10 |