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

Floating point exception

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2016, 06:43
Default Floating point exception
  #1
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
Hello all,

I am relatively new to OpenFoam and I am trying to simulate a photoreactor on incompressible turbulent flow at steady-state. I copied most of the code of the pitzDaily model from the tutorials adjusting all the parametres for my case. When running the case in parallel I get the following error:

Code:
mpirun noticed that process rank 7 with PID 3333 on node XXXXX exited on signal 8 (Floating point exception).
Commands I used:
Code:
decomposePar
mpirun -n 16 renumberMesh -overwrite -parallel
mpirun -np 16 simpleFoam -parallel
reconstructPar -latestTime
Things I did:
  • deltaT: I tried reducing the deltaT to a point of a Courant number of 0.5 and still getting the error.
  • Lack of memory: running on a workstation of 64GB of RAM and the used RAM does not even go above 1.5 GB.
  • Laminar flow: simulation succeeds on calculating the laminar case.

I believe there is some bad boundary condition but I cannot find where it is.

Here is a 7z file with the case: https://mega.nz/#!Z1JTjZoY!YSOBNCHdW..._ArkRD3O1SmzvU

Last edited by cristian.arbe; April 22, 2016 at 05:43.
cristian.arbe is offline   Reply With Quote

Old   April 11, 2016, 11:27
Default
  #2
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
Succeeded by simulating the case in laminar flow but turbulent still does not work.
cristian.arbe is offline   Reply With Quote

Old   April 12, 2016, 05:26
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

you can try to use the laminar pre-calculation for your turbulent calculation. Normally, I suppose that you made a mistake in the set-up of your turbulence variables k, epsilon or omega. For your 7z file we need some key! "To access this folder/file, you will need its Decryption key.
If you do not have the key, contact the creator of the link."
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 12, 2016, 06:38
Default
  #4
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
Sorry about the file! I edited the post so that the link includes the key to access.

For the k and \epsilon parametres I used the formulas:

k=\frac{3}{2}\left(UI\right)^{2}

\epsilon=C_{\mu}\frac{k^{\frac{3}{2}}}{l}
cristian.arbe is offline   Reply With Quote

Old   April 12, 2016, 06:51
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by cristian.arbe View Post
Sorry about the file! I edited the post so that the link includes the key to access.

For the k and \epsilon parametres I used the formulas:

k=\frac{3}{2}\left(UI\right)^{2}

\epsilon=C_{\mu}\frac{k^{\frac{3}{2}}}{l}
Use the correct boundary conditions! Do not set it by yourself.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 12, 2016, 07:00
Default
  #6
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
I am sorry, what do you mean by using the correct boundary conditions? This is how my k and epsilon files look like respectively:

Code:
internalField   uniform 8.7277e-006;

boundaryField
{
    fluidInlet
    {
        type	fixedValue;
		value	uniform 0.0090220;
    }
	fluidOutlet
    {
        type	zeroGradient;
    }
	fluidCylinder
    {
        type	kqRWallFunction;
        value	uniform 8.7277e-006;
    }
	fluidRefinement
    {
        type	kqRWallFunction;
        value	uniform 0.0090220;
    }
}
Code:
internalField   uniform 3.0534e-006;

boundaryField
{
	fluidInlet
    {
        type            fixedValue;
		value           uniform 0.33827;
    }
	fluidOutlet
    {
        type            zeroGradient;
    }
	fluidCylinder
    {
        type            epsilonWallFunction;
        value           uniform 3.0534e-006;
    }
	fluidRefinement
    {
        type            epsilonWallFunction;
        value           uniform 0.33827;
    }
}
I set different values for Cylinder and Inlet/Refinement since they have different diametres and velocities.

Last edited by cristian.arbe; April 22, 2016 at 05:43.
cristian.arbe is offline   Reply With Quote

Old   April 12, 2016, 07:30
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
What about:

Code:
turbulentIntensityKineticEnergyInlet
mixingLength...DissipationRate
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 14, 2016, 09:44
Default
  #8
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
Quote:
Originally Posted by Tobi View Post
What about:

Code:
turbulentIntensityKineticEnergyInlet
mixingLength...DissipationRate
Tried changing the conditions as you suggested but still getting the error

Code:
mpirun noticed that process rank 6 with PID 2520 on node XXXX exited on signal 8 (Floating point exception).
I assume the mixing length refers to this?

Last edited by cristian.arbe; April 22, 2016 at 05:43.
cristian.arbe is offline   Reply With Quote

Old   April 14, 2016, 10:06
Default
  #9
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

the mixingLength is okay. So I will check our case now (:
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 14, 2016, 10:32
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

some hints:


  1. For the first try use Gauss upwind for k, epsilon
  2. You are not really underrelaxing
Code:
k  0.2
epsilon 0.2
U 0.4
p 0.3

Try again you will see it should work and then you will find the problem cells

You sill will get a bounding problem:


Code:
bounding epsilon, min: -0.00074722 max: 1053.16 average: 1.14941

Thats due to your mesh. The inlet and outlet patches are not good. Also your nCellsBetweenLevels should be increased and the inlet and outlet patch should be refined 1 level more. The transition between inlet/outlet patches to your refine walls should be smooth. I did not check if you also have layers in the refinement walls - skip that at the beginning.


Cheers.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 15, 2016, 04:47
Default
  #11
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
I'm trying to do all the changes you suggested, although I wanted to ask, when you talk about inlet and outlet, you refer to the tubes or the actual patches? Since the inlet/outlet patches only refer to the surface of I/O not the whole inlet tube.

Thank you very much for your time!
cristian.arbe is offline   Reply With Quote

Old   April 15, 2016, 05:02
Default
  #12
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by cristian.arbe View Post
I'm trying to do all the changes you suggested, although I wanted to ask, when you talk about inlet and outlet, you refer to the tubes or the actual patches? Since the inlet/outlet patches only refer to the surface of I/O not the whole inlet tube.

Thank you very much for your time!

I refer only to the patches. The outlet and inlet patches have some "bad" faces at the connection between your refinement patch and inlet/outlet patch. These faces are not aligned correct.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 15, 2016, 05:11
Default
  #13
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
SNAP controls.

increase the nSolveIter
decrease tolerance
decrease nFeatureIter

CASTELLATED controls.

increase nCellsBetween

At least I am not a fan of featureEdge refinement. I think there was some new keyword about tolerance etc. Using this, you could get troubles (see tutorial on my homepage) if the backgroundMesh is aligned with one patch/feature edge - I think in your case it is okay.

TRIANGULATED SURFACE (STL)

I will never use STL's that will not be closed or exported by CAD software. The triangulation is very bad. In your case the STL is not waterproof. My experience after 6 years: Never use an non-waterproofed STL and snappyHexMesh. It could work or otherwise you could get some unexpected results (sometimes) especially if the gaps are bigger than the cells.

So a few things to do.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 15, 2016, 05:16
Default
  #14
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
One thing left.

surfaceFeatureEdges... please check it before using them. See attachment. Due to the fact that your STL's are not identical at the interfaces (same amount of points at the same locations) the featureEdges will also be different (attachment). So my question to you, which one should snappy use now? In addition, some feature edges are not closed etc...

Correct this too!
Attached Images
File Type: jpg feature.jpg (28.4 KB, 33 views)
File Type: jpg feature2.jpg (26.9 KB, 26 views)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 15, 2016, 05:40
Default
  #15
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
The STL files are exported from a model from SolidWorks I made myself and it was fine before exporting. What is your suggestion to import the geometry then?
cristian.arbe is offline   Reply With Quote

Old   April 15, 2016, 05:48
Default
  #16
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
CAD files are okay. But after exporting single surfaces you will never get a closed surface. Just open paraview and load your STL. Show the edges and you wlil see.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 15, 2016, 06:23
Default
  #17
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
So should I stick with the STL files even if there are some errors or is there something I can do to fix it?
cristian.arbe is offline   Reply With Quote

Old   April 15, 2016, 06:26
Default
  #18
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Export your geometry as STEP, open it with SALOME, create your different patches (create groups), go to mesh module and mesh the different patches like you want. Keep in mind that the interfaces should be identical triangulated. Export the surfaces as STL and combine them like
Code:
cat *.stl > mySTL.stl
surfaceCheck mySTL.stl
Then you should have a waterproofed STL.


PS: If you stick your STL together, you would end up with a non closed STL -> bad. This happens always if you export out of CAD software (ALWAYS). You can export the whole geometry, then you get a closed STL but then you do not have regions // single patches (thats the problem).
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 15, 2016, 09:37
Default
  #19
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
I tried installing and running SALOME but I get the error
Quote:
ImportError: No module named site
followed the README and set the environment variables but still getting the error.

Edit: solved by downloading the generic binaries instead of Ubuntu ones.
cristian.arbe is offline   Reply With Quote

Old   April 15, 2016, 10:12
Default
  #20
New Member
 
cristian.arbe's Avatar
 
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10
cristian.arbe is on a distinguished road
So what you are saying is to export the STL geometry from SALOME or to actually mesh the model on SALOME and export the mesh?
cristian.arbe is offline   Reply With Quote

Reply


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
A floating point exception - SEM Model yansheng STAR-CCM+ 1 April 4, 2016 04:57
Floating point exception from twoPhaseEulerFoam openfoammaofnepo OpenFOAM Running, Solving & CFD 1 March 19, 2016 13:56
floating point exception [invalid operation] jubair073 STAR-CCM+ 5 April 24, 2015 13:05
Inlet Velocity Profile BC - Floating Point exception during solution initialization Janshi STAR-CCM+ 4 March 14, 2012 10:21


All times are GMT -4. The time now is 23:30.