CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   "nan" problem (https://www.cfd-online.com/Forums/openfoam-solving/172542-nan-problem.html)

foamiste June 2, 2016 04:47

"nan" problem
 
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

rdbisme June 8, 2016 06:38

Quote:

Originally Posted by foamiste (Post 602974)
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?

foamiste June 8, 2016 09:35

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

rdbisme June 9, 2016 05:49

Quote:

Originally Posted by foamiste (Post 603935)
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 :)

foamiste June 9, 2016 09:15

5 Attachment(s)
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:confused:

rdbisme June 9, 2016 10:29

Quote:

Originally Posted by foamiste (Post 604095)
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:confused:

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.

foamiste June 9, 2016 10:35

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

rdbisme June 9, 2016 10:38

Quote:

Originally Posted by foamiste (Post 604119)
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...)

foamiste June 9, 2016 10:43

1 Attachment(s)
I checked my mesh again as you it s ok !

rdbisme June 9, 2016 10:46

Quote:

Originally Posted by foamiste (Post 604122)
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.

foamiste June 9, 2016 10:49

what does it mean courant number ?

rdbisme June 9, 2016 10:51

Quote:

Originally Posted by foamiste (Post 604125)
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. :)

foamiste June 9, 2016 10:56

1 Attachment(s)
this is my controlDict

rdbisme June 9, 2016 11:07

Quote:

Originally Posted by foamiste (Post 604129)
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 June 9, 2016 11:09

Quote:

Originally Posted by foamiste (Post 604129)
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?

foamiste June 9, 2016 11:14

I get Courant Number mean: 0 max: 0

rdbisme June 9, 2016 11:15

Could you attach the log?

foamiste June 9, 2016 11:18

2 Attachment(s)
this is the log I get with the error message in the terminal

rdbisme June 9, 2016 11:23

Quote:

Originally Posted by foamiste (Post 604139)
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.

foamiste June 9, 2016 11:26

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


All times are GMT -4. The time now is 06:11.