CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Why simulation results showing "nan" values? (http://www.cfd-online.com/Forums/openfoam/106703-why-simulation-results-showing-nan-values.html)

Sargam05 September 5, 2012 21:07

Why simulation results showing "nan" values?
 
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 DEqn:(nan 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 DEqn:(nan 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 DEqn:(nan 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

wyldckat September 6, 2012 14:45

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

Sargam05 September 6, 2012 22:06

Quote:

Originally Posted by wyldckat (Post 380615)
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

wyldckat September 8, 2012 14:21

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

Sargam05 September 10, 2012 12:37

Quote:

Originally Posted by wyldckat (Post 380881)
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


All times are GMT -4. The time now is 21:24.