Floating point exception with simpleFoam
I'm having trouble to run simulations with turbulence (k-epsilon model) and my desired case settings.
To give an idea, the simulation consists of:
* A rectangular tank (2x2x2) generated using SALOME-MECA
* Mesh -> NETGEN Max size 0.10
* There are 3 groups: inlet, outlet, walls
* Diameter of pipes = 0.075m
* U (inlet) = (0.5 0 0)
* nu = 1e-06 (water)
* Initial k-epsilon values are k=0.00094 and epsilon=0.00031 (these values were calculated using openfoam suggested formula)
* timeSteps used for now => 1, 0.1, 0.01, 0.001, 0.0001
The thing is, I ran the simulation with icoFoam and got no problems.
But now using simpleFoam I got this error:
I've attached my system files, and am hoping that someone could help me with this as I need the simulation to complete my final thesis :eek:
The other files
First of all, I was wondering why you are checking the Courant number in simpleFoam? It is a steady state solver, so it does not need to check for the Courant number, which is only relevant in time dependent problems. Out of the box this check is not available, so the source code must have been changed.
So, you should be able to run the case also with a "time step" (better would be iteration counter) of 1.
The only thing that it does point out in this case is that you get very high velocities, which is probably due to some issues with the turbulence variables, maybe the initial conditions are not correct for your simulation? I think you set-up a case with 5 % Turbulence intensity, which seems appropriate, but I think your epsilon value is a bit low. If I use a length scale of 0.07 times the pipe diameter I come to a value of 0.35, instead of the value of 0.00031.
Thank you for your reply!
You're totally right.. Thanks for pointing it out! I think I messed up with my source code when trying to find what was going wrong, and now that I put the original simpleFoam it worked without problems!
I also used delta_t = 1s as you said.
I just have one question, why do you use the "length scale of 0.07 times the pipe diameter"?
OpenFOAM suggests to use:
epsilon = (C_mu^0.75 x k^1.5) / L
where L was set as 20% of pipe diameter, so:
epsilon = (0.09^0.75 x 0.00094^1.5) / (0.20 x 0.075) = 0.00031
Just to complement, k was calculated as follow:
k = 1/2 (Ux'² + Uy'² + Uz'²), I considered that Ux'=Uy'=Uz' so:
k = 3/2 (U'²), the I said that U'=5% of U
k = 3/2 (0.05 x 0.5)² = 0.00094
I would much appreciate a bit more of your attention!! =)
have a look at this link.
Well it looks like we have used a different formula to estimate epsilon. I think I made a mistake to get to 0.35, however the 0.07 factor is what we use instead of 20% and the 0.07 seems to work for most of our internal flow cases. For external flow I would rather get the estimate from the viscosity ratio. Anyway it seems like if you pipe length is large enough, the exact value at the inlet is not influencing the final result, except for stability issues. As always best would be to compare with experimental data.
Good to hear that the simulation is running.
Your help was really valuable! =D
|All times are GMT -4. The time now is 12:07.|