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

Understand Floating point exception

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kera

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2018, 07:34
Question Understand Floating point exception
  #1
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Hello everyone, I am trying to run a CFD simulation in OpenFoam, but I encountered a problem linked to my mesh geometry. In fact when i use a simple T type pipe mesh the simpleFoam solver works fine, but if i use a different geometry (inlet is inside of a main pipe) a got a error message after 10 iterations.
In the last iterations as you can see k and epsilon become big, and I tried to change them but with no success to a result.
One more precision: simulation in a laminar state works fine. I attach 2 different meshes link to googledrive (https://drive.google.com/open?id=1DI...d1g108faWpzEeR Tpipe-works fine, meshd - gives an error) and a screenshot of the error i got https://drive.google.com/open?id=1vY...IHCSTwk7q50Dxk. In fact I am trying a solve this problem since 2 weeks, but I have not managed to find any tip online witch can help me.
Can anyone give me a piece of advice where should I search for solution or from where should I start?
Thank you in advance

As for my software: I am using a OpenFoam v1712 for Windows downloaded form the official site. I made a mesh with Salome 8.3 also for windows.
I am using a tutorial case of "incompressible/simpleFoam/pitzDaily"

Last edited by Igor_L; May 16, 2018 at 09:16.
Igor_L is offline   Reply With Quote

Old   May 16, 2018, 09:20
Default
  #2
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Hallo Igor,

For starters I would use hex mesh instead of tetra mesh.

However, if you still wanna stick with tetra mesh, increase your nNonOrthogonalCorrectors in your system/fvSolution as your max non orthogonality is greater than 70 --> google "tipstricksOF.pdf" you will get a lot of information there regarding schemes and other simulaiton settings.

One of the common mistakes people make is they forget to convert their mesh to meters, so convert to meters before exporting your mesh to ".UNV" format --> I see that your cylinder diameter is 2 meters (unless 2 meters is really what you want to simulate), just saying !

hope this helps!

Regards
Ricky

Quote:
Originally Posted by Igor_L View Post
Hello everyone, I am trying to run a CFD simulation in OpenFoam, but I've encountered a problem linked to my mesh geometry. In fact when i use a simpe T type pipe mesh the simpleFoam solver works fine, but if i use a different geometry (inlet is inside of a main pipe) a got a error message after 10 iterations.
In the last iterations as you can see k and epsilon become big, and I tried to change them but with no success to a result.
One more precision simulation in a laminar state works fine. I attach 2 different meshes link to googledrive (https://drive.google.com/open?id=1DI...d1g108faWpzEeR Tpipe-works fine, meshd - gives an error) and a screenshot of the error i got https://drive.google.com/open?id=1vY...IHCSTwk7q50Dxk. In fact I am trying a solve this problem since 2 weeks, but I have not managed to find any tip online.
Can anyone give me a piece of advice where should I search for solution or from where should I start?
Thank you in advance

As for my software: I am using a OpenFoam v1712 for Windows downloaded form the official site. I made a mesh with Salome 8.3 also for windows.
I am using a tutorial case of "incompressible/simpleFoam/pitzDaily"
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   May 16, 2018, 12:29
Default
  #3
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Thank you for your answer Kera, I changed the non-orthogonality correctors and got the same kind of error (screenshot: "aftercorrectingnonothogonalityto80"). Then I changed the mesh type to tetrahedral mesh but I still got the same error see attached files there are log file and a screenshot: https://drive.google.com/open?id=1yq...9ZgnH99Z3f8Lw_
I'll check the doc later this evening.

Edit: my bad, I used a tetra mesh twice

Last edited by Igor_L; May 17, 2018 at 05:06.
Igor_L is offline   Reply With Quote

Old   May 17, 2018, 09:09
Default
  #4
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Hello Kera, I checked the document "Tips and tricks in OpenFoam" but still I have the error floating point exception. Here what I've done:
Firstly I used a bit different mesh (meshg.unv added in a link https://drive.google.com/open?id=15H...n8Y7ryaavdofDk)
The checkMesh gives "non-ortho max =62.6 and average 26. Max skewness = 0.86420. Mesh ok" so I changed fvSolution and fvSchemes files.

fvSolution: nNonOrthogonalCorrectors 2 instead of 0 because the non-ortho is between 50 and 70.

fvSchemes:
gradSchemes
{
default cellMDLimited Gauss linear 0.5;//was default Gauss linear;
grad(U) cellMDLimited Gauss linear 0.5;//was non existent
}
divSchemes
{
default none;
div(phi,U) Gauss linearUpwind grad(U);//was div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,k) Gauss linearUpwind default;//was div(phi,k) bounded Gauss limitedLinear 1;
div(phi,epsilon) bounded Gauss limitedLinear 1;
div(phi,omega) Gauss linearUpwind default;//was div(phi,omega) bounded Gauss limitedLinear 1;
div(phi,v2) bounded Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
div(nonlinearStress) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited 0.777;//was default Gauss linear corrected
}
snGradSchemes
{
default limited 0.777;//was default corrected;
}


So these changes didn't help... In the rar file there log file of simulation and a screenshot of the error.
Moreover I haven't succeed in meshing a hexahedral mesh. I will keep trying something with tet mesh...
In fact my geometry is part of a bigger thing, but it crash in the same way, so I'd like to fix this issue before starting a more complex geometry. So diameter is 1m and the diameter of inlet tube is 0.3m.



Some more ideas what should I change? Where should I look for information?
thank you in advance
Igor_L is offline   Reply With Quote

Old   May 21, 2018, 07:05
Default
  #5
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Hallo Igor,

it is difficult to help you with little code snipts/error message you provide. The errors what you are getting might be due to many reasons:

1) Wrong boundary conditons
2) Wrong initialization
3) Dimensions/mesh
4) Schems and many more.

It would be great if you can provide us with a test case so that even others might be able to look into it and help you out.

regards,
Ricky
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   May 22, 2018, 04:00
Default
  #6
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Hello Ricky, here is the link with the case, I hope I have not forget anything

https://drive.google.com/open?id=1VB...hNVo-4WQMafIAn
Igor_L is offline   Reply With Quote

Old   May 23, 2018, 03:30
Default
  #7
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Hallo,

I didn't made any big changes to your case excpet for fvSchmes and fvSolutions.

It seems that your case is running now. --> I didn't look in to the physics of the problem, so that is upto you.

And I would still suggest you to change your mesh.

You can now download your case from here.

Regards
Ricky

Quote:
Originally Posted by Igor_L View Post
Hello Ricky, here is the link with the case, I hope I have not forget anything

https://drive.google.com/open?id=1VB...hNVo-4WQMafIAn
Igor_L likes this.
__________________
If it is easy, then something is fishy!

Last edited by kera; May 23, 2018 at 13:07.
kera is offline   Reply With Quote

Old   May 29, 2018, 05:21
Default
  #8
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Hello Ricky,
Thank you very much! It works for this case.
I tried to change the number of inlets and outlets and it crashed again (same if I increase the number of iterations. So I tried to modify the fvSolution the part about the relaxationFactors:
"
relaxationFactors
{

fields
{
p 0.3;
}
equations
{
".*" 0.4;//was 0.7
}
}
"
It helped but not for many 150 iterations
I saw that these factors are used to stabilise the solution, but still I don't really understand what are they? Is it like a filter of values?
Nevertheless, I manage to do what I wanted to. I'll try to make a mesh with the snappyhexmesh, but the last time I tried i didn't work. So I'll post my advancement here because the solution may be the changing of the mesh and I want to find where I was wrong.
Igor_L is offline   Reply With Quote

Old   May 29, 2018, 08:12
Default
  #9
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
First you need to know which subroutine is throwing the exception. If you run in Linux, use the gdb debugger when running OF. The latter will tell you which routine threw the exception.
Santiago is offline   Reply With Quote

Old   May 30, 2018, 03:26
Default
  #10
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Fortunately I am using a OpenFoam v1712 for Windows downloaded form the official site. So I cannot run the debugger.
Igor_L is offline   Reply With Quote

Old   May 30, 2018, 03:36
Default
  #11
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Un-fortunately, is very difficult to help if you dont know what exactly is throwing the exception...
Santiago is offline   Reply With Quote

Old   May 30, 2018, 03:45
Default
  #12
New Member
 
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8
Igor_L is on a distinguished road
Could you check the case on your machine? Here you can find the whole case and the mesh I am using
Quote:
Originally Posted by Igor_L View Post
here is the link with the case, I hope I have not forget anything
https://drive.google.com/open?id=1VB...hNVo-4WQMafIAn
Igor_L is offline   Reply With Quote

Reply

Tags
floating point expection, openfoam, tpipe


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
icoFoam floating point exception (8) leizhao512 OpenFOAM Running, Solving & CFD 7 November 1, 2018 11:43
simpleFoam: floating point exception student666 OpenFOAM Running, Solving & CFD 9 March 13, 2016 18:23
Floating point exception (core dumped) for GAMG solver yuhou1989 OpenFOAM Running, Solving & CFD 2 March 24, 2015 19:28
Finished simulation doesn't start: floating point exception [Divide by zero] MaxCFD STAR-CCM+ 3 June 26, 2011 10:31
Cannot Open .sim (Floating Point Exception) trex930 STAR-CCM+ 1 July 30, 2010 06:51


All times are GMT -4. The time now is 16:12.