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

Why simulation results showing "nan" values?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2012, 22:07
Default Why simulation results showing "nan" values?
  #1
Member
 
Sangeeta
Join Date: Jul 2012
Location: Kingston, Canada
Posts: 70
Rep Power: 14
Sargam05 is on a distinguished road
Hello everyone,

I am running solidDisplacementFoam for 3D model. After simulation log file is showing "nan" values as given below:

Iteration: 98

GAMG: Solving for T, Initial residual = 3.24013e-09, Final residual = 3.24013e-09, No Iterations 0
Min/Max/Ave T:-99.9999 99.9998 4.79039
GAMG: Solving for Dx, Initial residual = nan, Final residual = nan, No Iterations 1000
GAMG: Solving for Dy, Initial residual = nan, Final residual = nan, No Iterations 1000
GAMG: Solving for Dz, Initial residual = nan, Final residual = nan, No Iterations 1000
Min/Max/Ave DEqnnan nan nan) (nan nan nan) (nan nan nan)
ExecutionTime = 19286.7 s ClockTime = 19301 s

Iteration: 99

GAMG: Solving for T, Initial residual = 3.24013e-09, Final residual = 3.24013e-09, No Iterations 0
Min/Max/Ave T:-99.9999 99.9998 4.79039
GAMG: Solving for Dx, Initial residual = nan, Final residual = nan, No Iterations 1000
GAMG: Solving for Dy, Initial residual = nan, Final residual = nan, No Iterations 1000
GAMG: Solving for Dz, Initial residual = nan, Final residual = nan, No Iterations 1000
Min/Max/Ave DEqnnan nan nan) (nan nan nan) (nan nan nan)
ExecutionTime = 19321.6 s ClockTime = 19336 s

Iteration: 100

GAMG: Solving for T, Initial residual = 3.24013e-09, Final residual = 3.24013e-09, No Iterations 0
Min/Max/Ave T:-99.9999 99.9998 4.79039
GAMG: Solving for Dx, Initial residual = nan, Final residual = nan, No Iterations 1000
GAMG: Solving for Dy, Initial residual = nan, Final residual = nan, No Iterations 1000
GAMG: Solving for Dz, Initial residual = nan, Final residual = nan, No Iterations 1000
Min/Max/Ave DEqnnan nan nan) (nan nan nan) (nan nan nan)
Max sigmaEq = nan
ExecutionTime = 19357.5 s ClockTime = 19372 s

Does anyone have any idea why this problem is coming?

Thanks,
Sangeeta
Sargam05 is offline   Reply With Quote

Old   September 6, 2012, 15:45
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Sangeeta,

That basically means that the solver started to diverge when trying to solve Dx, Dy and Dz.

You should look higher in the log file and look for where the simulation starts diverging.

It can happen due to several reasons:
  • Bad boundary conditions.
  • Bad mesh for the case you're trying to solve.
  • Bad "fvSchemes" settings and/or relaxation values.
  • etc...



About keeping a log: taking as an example the tutorial "stressAnalysis/solidDisplacementFoam/plateHole", you can easily run that tutorial and clean that case by running the following commands:
  • Code:
    foamRunTutorials
    Will run the case, namely blockMesh and then the application defined in "controlDict". It will keep a log of both runs.
  • Code:
    foamCleanTutorials
    Will clean the case, removing the standard case files that foamRunTutorials generates.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 6, 2012, 23:06
Default
  #3
Member
 
Sangeeta
Join Date: Jul 2012
Location: Kingston, Canada
Posts: 70
Rep Power: 14
Sargam05 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Sangeeta,

That basically means that the solver started to diverge when trying to solve Dx, Dy and Dz.

You should look higher in the log file and look for where the simulation starts diverging.

It can happen due to several reasons:
  • Bad boundary conditions.
  • Bad mesh for the case you're trying to solve.
  • Bad "fvSchemes" settings and/or relaxation values.
  • etc...



About keeping a log: taking as an example the tutorial "stressAnalysis/solidDisplacementFoam/plateHole", you can easily run that tutorial and clean that case by running the following commands:
  • Code:
    foamRunTutorials
    Will run the case, namely blockMesh and then the application defined in "controlDict". It will keep a log of both runs.
  • Code:
    foamCleanTutorials
    Will clean the case, removing the standard case files that foamRunTutorials generates.
Best regards,
Bruno

Hi Bruno,

Thank you for the reply. I have generated a 3D mesh in snappyHexMesh and using this mesh for solving stress analysis by using solidDisplacementFoam solver. I have re-checked my boundary conditions, and fvSchemes (relaxation value etc.). I have used tighter tolerance and increased number of ncorrectors but still I am having same problem. I have gotten good simulation results for similar problem for 2D. Do you think that this problem is coming because of 3D geometry?

Thanks in advance.

Regards,
Sangeeta
Sargam05 is offline   Reply With Quote

Old   September 8, 2012, 15:21
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Sangeeta,

OK, there are two other points you can check/test:
  1. What does checkMesh tell you when you check you mesh?
    Just in case you don't know, you can check your mesh by simply running:
    Code:
    checkMesh
    For more, you can:
    • Find out more commands for checkMesh:
      Code:
      checkMesh -help
    • You can see an example for removing bad cells from the mesh: http://openfoamwiki.net/index.php/SetSet - although it can also be just as hazardous to simply remove the bad cells...
      Anyway, from that example you can see a couple of additional useful options for checkMesh.
  2. Try with a simply 3D example, to check if your settings are good enough.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 10, 2012, 13:37
Default
  #5
Member
 
Sangeeta
Join Date: Jul 2012
Location: Kingston, Canada
Posts: 70
Rep Power: 14
Sargam05 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Sangeeta,

OK, there are two other points you can check/test:
  1. What does checkMesh tell you when you check you mesh?
    Just in case you don't know, you can check your mesh by simply running:
    Code:
    checkMesh
    For more, you can:
    • Find out more commands for checkMesh:
      Code:
      checkMesh -help
    • You can see an example for removing bad cells from the mesh: http://openfoamwiki.net/index.php/SetSet - although it can also be just as hazardous to simply remove the bad cells...
      Anyway, from that example you can see a couple of additional useful options for checkMesh.
  2. Try with a simply 3D example, to check if your settings are good enough.
Best regards,
Bruno
Hi Bruno,

Thanks a lot for the reply. I hope this will help to solve my problem.

Regards,
Sangeeta
Sargam05 is offline   Reply With Quote

Reply


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
Bubble Column Simulation: Different Turbulence Models different results zobekenobe CFX 5 January 28, 2013 10:02
Different results between 3 processors simulation and 7 processors simulation mfmohdyasin OpenFOAM Programming & Development 1 August 27, 2012 05:07
Simulation of a complex wing in solidworks flow simulation niels1900 FloEFD, FloWorks & FloTHERM 6 April 20, 2011 11:44
Gravity g's influence on Simulation Results Colin Main CFD Forum 6 November 2, 2003 15:13
graphical handling of simulation results yf yap Main CFD Forum 3 February 12, 2001 20:35


All times are GMT -4. The time now is 14:13.