|
[Sponsors] |
September 8, 2017, 09:53 |
nan values in output file
|
#1 |
New Member
Laura Luhede
Join Date: Mar 2014
Posts: 3
Rep Power: 12 |
Hi everyone
we use our custom solver to calculate the shear stress at interfaces. We had to switch from OF 3 to OF 4 and got a problem. While reconstructing the case we get an error and found that some cells got a "-nan" value instead of the scalars (Image 1). When checking the Cell ID, we found them to be away from out actual interface (Image 2). In these cells the shear stress is supposed to be set to zero, so the problem is not located in our shear stress calculations. Does anyone know, when OpenFoam writes nan values in the output files? The log doesn't show any divergence and the solver just keeps running until the end, it crashes when we try to reconstruct . Now we have trouble locating the error. So far we tried to change the decompose method. Best, Laura |
|
September 8, 2017, 14:13 |
Re: nan values in output file
|
#2 |
Member
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 11 |
Hi Laura,
In my experience, OpenFOAM produces NAN output when division by zero occurs, which usually stops the simulation so perhaps your issue is different. Could you provide some more details about the simulation? Particularly, was there any error or warning output produced during the simulation even though it didn't fail to complete? What is the problem you are modeling and what are your initial conditions? What solver did you use (or rather what one did you modify)? Solution method and schemes (fvSchemes, fvSolution)? How are you generating your mesh? Best regards, Andrew |
|
September 28, 2017, 12:25 |
|
#3 |
New Member
Laura Luhede
Join Date: Mar 2014
Posts: 3
Rep Power: 12 |
Hi Andrew,
thank you for your answer and sorry for the very late reply. I found the issue. In the end it was a problem with the break criteria in the shear stress calculation loop we applied in our code. So in rare cases the shear flow calculation went wrong and we divided by 0. I still don't get, why the simulation didn't crash though Best Laura |
|
Tags |
decomposed, divergence, interfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 15:30 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 18:18 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |