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

"nan" problem

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2016, 05:47
Question "nan" problem
  #1
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
Dear foamers,

I am working on stirred tank simulation by openfoam. I wanna simulate two phases (water+particles) using the solver twoPhaseEulerFoam.

When I run my case, I have an error message
"wrong token type - expected Scalar, found on line 0 the word 'nan'
file: E:/test/test2/system/data.solverPerformance.e.particles at line 0."

I can't get where is the problem.

NB: I checked initial and boundary condition many times and I tried to simplify my case by running it in laminar model.

I wanna wait your help .

Best regards
foamiste is offline   Reply With Quote

Old   June 8, 2016, 07:38
Default
  #2
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
Dear foamers,

I am working on stirred tank simulation by openfoam. I wanna simulate two phases (water+particles) using the solver twoPhaseEulerFoam.

When I run my case, I have an error message
"wrong token type - expected Scalar, found on line 0 the word 'nan'
file: E:/test/test2/system/data.solverPerformance.e.particles at line 0."

I can't get where is the problem.

NB: I checked initial and boundary condition many times and I tried to simplify my case by running it in laminar model.

I wanna wait your help .

Best regards
Reading the error it seems that you have a string instead of a scalar in the energy boundary conditions files for particles. Could you please post it here?
rdbisme is offline   Reply With Quote

Old   June 8, 2016, 10:35
Default
  #3
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
hello, thanks for your reply,
Everything seems ok in my BC but still having this problem specifically in time=2 the solution diverges and i get error equal to 1e88 or plus !! then the solver replace it by nan and then i get the error message posted at first
foamiste is offline   Reply With Quote

Old   June 9, 2016, 06:49
Default
  #4
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
hello, thanks for your reply,
Everything seems ok in my BC but still having this problem specifically in time=2 the solution diverges and i get error equal to 1e88 or plus !! then the solver replace it by nan and then i get the error message posted at first
Well, so something could be wrong. Initial values or wrong type of BC.

Just tell us more specifically what's your geometry and settings. Otherwise will be impossible to say something
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 10:15
Question
  #5
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
hello,

I attached the max 5 files, i think if i have any problem it will be here for sure, because i checked my boundary conditions and my mesh, they are Okey!!

I remind that i wanna simulate stirred tank with 3 granular phases with liquid phase using the approach EULER-EULER.

Waiting for your help

Best regards
Attached Files
File Type: txt transportProperties.txt (5.1 KB, 6 views)
File Type: txt controlDict.txt (1.2 KB, 6 views)
File Type: txt fvSchemes.txt (1.4 KB, 3 views)
File Type: txt fvSolution.txt (2.4 KB, 4 views)
File Type: txt turbulenceProperties.txt (899 Bytes, 8 views)
foamiste is offline   Reply With Quote

Old   June 9, 2016, 11:29
Default
  #6
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
hello,

I attached the max 5 files, i think if i have any problem it will be here for sure, because i checked my boundary conditions and my mesh, they are Okey!!

I remind that i wanna simulate stirred tank with 3 granular phases with liquid phase using the approach EULER-EULER.

Waiting for your help

Best regards
Well, you told us you needed to simulate 2 phases but for what I see here you're trying to simulate 3 phases right? So you're using multiPhaseEulerFoam right?

I'm no expert with more than two phases.

Than I think first is to check the mesh? What Aspect ratio are you getting?
Then BCs. Tell us the BCs you setted up.
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 11:35
Default
  #7
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
yes that's true , at first i tried to simplify my case and working with only 2 phases ( particles + water) even i had 3 types of particles..
For my boundary conditions I have 5 wall and 1 symmetryPlane and for my mesh it works perfectly in other simulations so i supposed it's ok too

If you can help me just for a simple case treating 2 phases it will be ok!

Thank ypou anyway
foamiste is offline   Reply With Quote

Old   June 9, 2016, 11:38
Default
  #8
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
yes that's true , at first i tried to simplify my case and working with only 2 phases ( particles + water) even i had 3 types of particles..
For my boundary conditions I have 5 wall and 1 symmetryPlane and for my mesh it works perfectly in other simulations so i supposed it's ok too

If you can help me just for a simple case treating 2 phases it will be ok!

Thank ypou anyway
I can try to give you hints. I'm working on slurry simulations so the field is a bit different. Let's see what we can do.

Could you please run a checkMesh to see if everything is ok?

Moreover we need to know what you set on the BCs for each field (like zeroGradient, fixedValue and so on...)
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 11:43
Default
  #9
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
I checked my mesh again as you it s ok !
Attached Images
File Type: jpg Capture du 2016-06-09 14-43-18.jpg (68.0 KB, 9 views)
foamiste is offline   Reply With Quote

Old   June 9, 2016, 11:46
Default
  #10
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
I checked my mesh again as you it s ok !
Ok. What about the Courant Number? Which timestep are you setting up? From my experience the solver is very sensible to mesh and Courant Number.
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 11:49
Default
  #11
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
what does it mean courant number ?
foamiste is offline   Reply With Quote

Old   June 9, 2016, 11:51
Default
  #12
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
what does it mean courant number ?
https://en.wikipedia.org/wiki/Couran...Lewy_condition

I would suggest to document yourself a bit about the most important parameters in a CFD simulation. Than startup with a simple case (for example with two phases and setting one phase to zero so you simulate a single phase flow) and proceeding slowly.
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 11:56
Default
  #13
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
this is my controlDict
Attached Files
File Type: txt controlDict.txt (1.5 KB, 4 views)
foamiste is offline   Reply With Quote

Old   June 9, 2016, 12:07
Default
  #14
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
that's right i am beginer in openfoam but i have achieved good results in more than 10 cases and now i wanna go in the multiphase .. it's not a choice i have to accomplish my work !! if you can help me it's ok otherwise don't reply anymore !! we are here to learn not to hear mockery words

Best regards
It was just trying to help.
I was not saying mockery, it was not my intention.

Since I don't know which BCs still you're setting I'm trying to guess. I would suggest you to keep the Courant number less than 0.5, at least when you're starting up.

I think it would help too if you post the last 10 - 15 time iterations of your last simulation that crashed. Maybe there are hints to understand what you did wrong.

Moreover I would suggest to switch on the phases coupling terms one for each time. So I would start using just oneway drag (only particles into liquid) and see if it's converging or not.
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 12:09
Default
  #15
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
this is my controlDict
Ok. I see 1s of time step. Seems a lot to me. I'm used to 1e-4-like time steps. When you're running your simulation, in the log it should be printed something like:

Code:
Courant Number Mean: 
Max Ur Courant Number:
What values they have in your log?
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 12:14
Default
  #16
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
I get Courant Number mean: 0 max: 0
foamiste is offline   Reply With Quote

Old   June 9, 2016, 12:15
Default
  #17
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Could you attach the log?
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 12:18
Default
  #18
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
this is the log I get with the error message in the terminal
Attached Images
File Type: png Capture du 2016-06-09 15-19-08.png (110.7 KB, 14 views)
Attached Files
File Type: txt log.txt (10.8 KB, 4 views)
foamiste is offline   Reply With Quote

Old   June 9, 2016, 12:23
Default
  #19
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by foamiste View Post
this is the log I get with the error message in the terminal
Yes it's clearly diverging. Could you please post an image of your geometry and tell us about the settings you did in the 0 folder?

What about trying before twoPhaseEulerFoam with just one dispersed phase and a liquid carrier to start? I'm even more comfortable with the case file structure.
rdbisme is offline   Reply With Quote

Old   June 9, 2016, 12:26
Default
  #20
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
I tried twoEulerFoam and I get problems too .. do you have any clear tutorial for this solver?

And for my gemetry it's about tank divided to two zones : mrf zone and fixed zone
foamiste 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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 05:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 06:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 15:52


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