|
[Sponsors] |
May 16, 2018, 08:34 |
Understand Floating point exception
|
#1 |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
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 10:16. |
|
May 16, 2018, 10:20 |
|
#2 | |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
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:
__________________
If it is easy, then something is fishy! |
||
May 16, 2018, 13:29 |
|
#3 |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
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 06:06. |
|
May 17, 2018, 10:09 |
|
#4 |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
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 |
|
May 21, 2018, 08:05 |
|
#5 |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
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! |
|
May 22, 2018, 05:00 |
|
#6 |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
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 |
|
May 23, 2018, 04:30 |
|
#7 | |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
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:
__________________
If it is easy, then something is fishy! Last edited by kera; May 23, 2018 at 14:07. |
||
May 29, 2018, 06:21 |
|
#8 |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
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. |
|
May 29, 2018, 09:12 |
|
#9 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
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.
|
|
May 30, 2018, 04:26 |
|
#10 |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
Fortunately I am using a OpenFoam v1712 for Windows downloaded form the official site. So I cannot run the debugger.
|
|
May 30, 2018, 04:36 |
|
#11 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
Un-fortunately, is very difficult to help if you dont know what exactly is throwing the exception...
|
|
May 30, 2018, 04:45 |
|
#12 | |
New Member
Igor
Join Date: May 2018
Location: France
Posts: 7
Rep Power: 8 |
Could you check the case on your machine? Here you can find the whole case and the mesh I am using
Quote:
|
||
Tags |
floating point expection, openfoam, tpipe |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
icoFoam floating point exception (8) | leizhao512 | OpenFOAM Running, Solving & CFD | 7 | November 1, 2018 12:43 |
simpleFoam: floating point exception | student666 | OpenFOAM Running, Solving & CFD | 9 | March 13, 2016 19:23 |
Floating point exception (core dumped) for GAMG solver | yuhou1989 | OpenFOAM Running, Solving & CFD | 2 | March 24, 2015 20:28 |
Finished simulation doesn't start: floating point exception [Divide by zero] | MaxCFD | STAR-CCM+ | 3 | June 26, 2011 11:31 |
Cannot Open .sim (Floating Point Exception) | trex930 | STAR-CCM+ | 1 | July 30, 2010 07:51 |