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

Floating point exception with simpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By tomf
  • 1 Post By TReviol
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Display Modes
Old   October 28, 2013, 20:55
Default Floating point exception with simpleFoam
  #1
New Member
 
Samanta Busmayer
Join Date: May 2012
Posts: 10
Rep Power: 5
sbusmayer is on a distinguished road
Hi all,
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:

Code:
sbusmayer@SBusmayer-CAE:~/OpenFOAM/sbusmayer-2.0.1/CFD-OpenFOAM/simpleFoam$  #0  Foam::error::printStack(Foam::Ostream&) in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/libc.so.6"
#3    Foam::DICPreconditioner::calcReciprocalD(Foam::Field<double>&,  Foam::lduMatrix const&) in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4   Foam::DICPreconditioner::DICPreconditioner(Foam::lduMatrix::solver  const&, Foam::dictionary const&) in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5    Foam::lduMatrix::preconditioner::addsymMatrixConstructorToTable<Foam::DICPreconditioner>::New(Foam::lduMatrix::solver  const&, Foam::dictionary const&) in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6   Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver  const&, Foam::dictionary const&) in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#7   Foam::PCG::solve(Foam::Field<double>&,  Foam::Field<double> const&, unsigned char) const in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#8   Foam::fvMatrix<double>::solve(Foam::dictionary const&) in  "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#9  Foam::fvMatrix<double>::solve() in "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/bin/simpleFoam"
#10  
 in "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/bin/simpleFoam"
#11  __libc_start_main in "/lib/libc.so.6"
#12  
 in "/home/sbusmayer/OpenFOAM/sbusmayer-2.0.1/platforms/linux64GccDPOpt/bin/simpleFoam"
sbusmayer@SBusmayer-CAE:~/OpenFOAM/sbusmayer-2.0.1/CFD-OpenFOAM/simpleFoam$ ^C
[1]+  Floating point exceptionsimpleFoam > log
On this last sim, I used timeStep = 0.0001, and it goes fine up to 10s, but it soon increases the Courant number and I got floating points exception. It also happened with timeStep = 0.1/0.01/0.001.

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

log.txt

p.txt

U.txt

k.txt

epsilon.txt
sbusmayer is offline   Reply With Quote

Old   October 28, 2013, 20:58
Default The other files
  #2
New Member
 
Samanta Busmayer
Join Date: May 2012
Posts: 10
Rep Power: 5
sbusmayer is on a distinguished road
The rest of "system" files:

Please I really need someone's help because here where I study no one uses OpenFOAM, so there is no one to assist me.

controlDict.txt

fvSchemes.txt

fvSolution.txt
sbusmayer is offline   Reply With Quote

Old   October 29, 2013, 08:44
Default
  #3
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 224
Rep Power: 10
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Samanta,

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.

Good luck.
Tom
sbusmayer likes this.
tomf is offline   Reply With Quote

Old   October 29, 2013, 19:46
Default
  #4
New Member
 
Samanta Busmayer
Join Date: May 2012
Posts: 10
Rep Power: 5
sbusmayer is on a distinguished road
Dear tomf,

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!! =)
sbusmayer is offline   Reply With Quote

Old   October 30, 2013, 04:37
Default
  #5
New Member
 
Thomas Reviol
Join Date: Jul 2011
Location: Germany, Kaiserslautern
Posts: 25
Rep Power: 6
TReviol is on a distinguished road
Hi,

have a look at this link.

Thomas
sbusmayer likes this.
TReviol is offline   Reply With Quote

Old   October 30, 2013, 05:57
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 224
Rep Power: 10
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Samanta,

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.

Regards,
Tom
sbusmayer likes this.
tomf is offline   Reply With Quote

Old   October 30, 2013, 16:47
Talking
  #7
New Member
 
Samanta Busmayer
Join Date: May 2012
Posts: 10
Rep Power: 5
sbusmayer is on a distinguished road
Quote:
Originally Posted by TReviol View Post
Hi,

have a look at this link.

Thomas
That's awesome! Thanks mate! =)
sbusmayer is offline   Reply With Quote

Old   October 30, 2013, 17:34
Thumbs up
  #8
New Member
 
Samanta Busmayer
Join Date: May 2012
Posts: 10
Rep Power: 5
sbusmayer is on a distinguished road
Quote:
Originally Posted by tomf View Post
Hi Samanta,

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.

Regards,
Tom
Thank you for your attention Tom!
Your help was really valuable! =D
sbusmayer is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating point exception with pimpleDyMFoam ebah6 OpenFOAM Running, Solving & CFD 8 May 13, 2013 09:01
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
simpleFoam Floating point exception error -help sudhasran OpenFOAM Running, Solving & CFD 3 March 12, 2012 17:23
Pipe flow in settlingFoam floating point exception jochemvandenbosch OpenFOAM Running, Solving & CFD 4 February 16, 2012 04:24
block-structured mesh for t-junction Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 05:59


All times are GMT -4. The time now is 20:49.