|
[Sponsors] |
SVN 1226 - Possible bug with cell centres and volumes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2009, 19:08 |
SVN 1226 - Possible bug with cell centres and volumes
|
#1 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello,
A Good Evening to everyone :-)! I hope all is well, and things are going good for everyone! Just wanted to report that the change made to the file "primitiveMeshCellCentresAndVols.C" in SVN Revision 1226 seems to cause an issue when dealing with fine meshes..... In SVN Rev. 1226 the line: "cellCtrs /= cellVols" was changed to "cellCtrs /= cellVols + SMALL" in order to prevent division by zero errors in the case when cellVols = 0.0. However, when working with fine meshes (in my case, > 1.2 million cells) whose cells inherently have volumes close to 1e-15 (m^3), the addition of the value "SMALL" (which is 1e-15 for double precision) causes a variety of OpenFOAM systems to fail with unusual errors. The first sign of this was a sudden flurry of errors in checkMesh on meshes which had run fine on earlier SVN revisions of OpenFOAM-1.5-dev.... I also experienced meshes which caused OpenFOAM to abort with a floating point exception after the first pressure solver iteration (again.... these were cases which had run through fine before), etc...etc... Removing the addition of "SMALL" rectified all the issues.... Wouldn't "VSMALL" be a better option? Or are there other issues which forced the usage of "SMALL" ?? Have a great evening ahead! Philippose |
|
June 5, 2009, 07:27 |
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Could you please try it and let me know if it works.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
June 5, 2009, 14:19 |
|
#3 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Hrv,
A Good Evening to you! I recompiled OpenFOAM-1.5-dev after changing the line: "cellCtrs /= cellVols + SMALL" ==> "cellCtrs /= cellVols + VSMALL" And ran checkMesh on the case with which I discovered the issue, and everything worked out fine.... a simpleFoam simulation of the same case also went through without any further issues. For reference, I am attaching two checkMesh log files, one with the original code (using SMALL), and one with the modified one (using VSMALL).... I hope it gives you more clarity... Have a nice evening, and a great weekend :-)! Philippose |
|
|
|