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

nan values in output file

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By LauraL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2017, 08:53
Default nan values in output file
  #1
New Member
 
Laura Luhede
Join Date: Mar 2014
Posts: 3
Rep Power: 12
LauraL is on a distinguished road
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
Attached Images
File Type: png NAN_Cells.PNG (182.8 KB, 63 views)
File Type: jpg Part_Mesh.jpg (58.6 KB, 44 views)
LauraL is offline   Reply With Quote

Old   September 8, 2017, 13:13
Default Re: nan values in output file
  #2
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 10
aow is on a distinguished road
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
aow is offline   Reply With Quote

Old   September 28, 2017, 11:25
Default
  #3
New Member
 
Laura Luhede
Join Date: Mar 2014
Posts: 3
Rep Power: 12
LauraL is on a distinguished road
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
Kummi likes this.
LauraL is offline   Reply With Quote

Reply

Tags
decomposed, divergence, interfoam


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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 14:30
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 17:18
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08


All times are GMT -4. The time now is 01:52.