|
[Sponsors] |
April 10, 2013, 09:17 |
How to solve Floating point exception error
|
#1 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Hi Foamers,
I am doing simulations on 2D rectangular channel by using steady state solver. I prepared my solver by modifying "simpleFoam" solver. The dimensions (length*breadth) of the channel are 0.143*0.0017 (m). My geometry has 500*10 grids in x- and y- directions respectively. When i run my solver with 500*10 grids, it is giving good results. But when I refine grids or increase the dimensions of the channel, It is giving the following error. Error: Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 in "/lib/i386-linux-gnu/libm.so.6" #4 pow in "/lib/i386-linux-gnu/libm.so.6" #5 Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #6 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::pow<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::dimensioned<double> const&) at /opt/openfoam211/src/OpenFOAM/lnInclude/GeometricScalarField.C:273 #7 at /opt/openfoam211/src/OpenFOAM/lnInclude/GeometricScalarField.C:349 #8 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #9 in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/SBM25Foam" Floating point exception Regards Reddy |
|
April 10, 2013, 09:47 |
|
#2 |
New Member
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13 |
I had a similar problem just a couple of days ago. I found that if I refine the mesh I get problems with vortices that causes the sovler to abort.
Are you running with turbulence models? In that case, try lowering relaxation factors, i.e. for k and epsilon. You can also save every iteration and later on analyse flow vectors (U) the last steps before the crash using Paraview and a glyph filter. |
|
April 11, 2013, 05:28 |
|
#3 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Dear Erichu,
Thanks for your quick reply. I am running with laminar flow only. As you noticed, i saved each iteration data and found the values are tending to infinite. I also tried by lowering relaxation factors but the same result. Could you please suggest me is anything should i change? Thanks M Reddy |
|
April 12, 2013, 23:10 |
|
#4 |
Senior Member
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 17 |
Hey mmkr,
though I am not able to exactly point out the root cause, one thing I can suggest is "bounding" the solution values in your fvSchemes file. Usually this works for RANS turbulence models when the k and epsilon values overshoot often to cause sigFpe. You may try something like that. And if you are not sure which parameter to bound, you have to compile the code in debug mode. Here your error appears in a pow() operation....Compiling in the debug mode will actually give you the exact line number in your solver and associated header files, which will make it easier for you to trace the parameter causing the issue. If I remember right, to compile in debug mode you need to add Code:
-DFULLDEBUG -g -O0 Let me know if this works. good luck, Atm |
|
April 13, 2013, 04:16 |
|
#5 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Dear Atm,
Thanks for your response. I compiled my code in debug mode and found the exact line number which causing the errors. In my solver after few iterations the values for the field T (let say) tends to very high value (O(10^39)). Moreover i have one more parameter "f" which is pow(T) and this operation causing the error. Could you please tell me how to bound this in "fvSchemes" file. Thanks M Reddy |
|
April 13, 2013, 18:25 |
|
#6 |
Senior Member
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 17 |
Hi M. Reddy,
The 10^39 squared will give you a number very high which causes the sigFpe. I guess bounding should work here, but I am not sure of the parameters since you are running a steady state case. You may actually try using flux limiters to bound the values, and this feature is there in OpenFOAM. In case you are running turbulence, I would suggest bounding scalar k and epsilon values as Code:
div(phi,k) Gauss limitedVanLeer <lower limit> <Upper limit>; The choice of schemes here can be changed. However, to get a complete idea of how bounding can be done, refer to this thread http://www.cfd-online.com/Forums/ope...g-epsilon.html Also, bounding scalars which are part of the modeling scheme is more advisable than bounding state variables like velocity etc, since that might lead to huge errors due to continuity equation. |
|
April 16, 2013, 06:28 |
|
#7 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Dear Atm,
Thank you very much for your valuable information. I would like to explain in more detail about my solver. In my solver i have three field variables (p, U & T) and it is steady and the flow is laminar. I modified "simpleFoam" to fit my needs (I commented the lines where turbulent related terms are present). Since in my solver i am using shear rate term good initial guess for the velocity is necessary. I plotted the residuals plots. For the field variable "T", the residual plot has oscillations and the residuals are increasing gradually. At present i am using "Gauss linear" for the div operations. As you suggested i tried to change the div schemes to "Gauss upwind" but the following error is coming. Error: Code:
--> FOAM FATAL IO ERROR: attempt to read beyond EOF file: /home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/run/caseFile4/system/fvSchemes::divSchemes::div(Epnn1) at line 32. From function ITstream::read(token&) in file db/IOstreams/Tstreams/ITstream.C at line 83. FOAM exiting Regards M Reddy |
|
April 16, 2013, 15:39 |
|
#8 |
Senior Member
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 17 |
Dear M Reddy,
the EOF refers to the code trying to read beyond the "end of file" looking for an identifier, or an OpenFOAM option, which you might have missed. most of the time this happens due to incorrect declaration of numerical schemes - Did you miss including a "Gauss" or a "phi" somewhere? Please check the OF website for the settings and makes sure this is consistent. If thats fine, check if you have not missed a ";" at the end of the statement. These are the most common causes in my experience. Atm |
|
April 18, 2013, 10:22 |
|
#9 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 14 |
Dear Atm,
I corrected the error but still after few iterations the solution is diverging. For the first few iterations the solution seems qualitatively OK but as the iterations increases the values for the field "T" going beyond bounds. Physically the solution for T should be in between (0, 0.68). When T value exceeds 0.68 it is diverging. I didn't encounter this problem for coarser mesh. Could you please tell me how to bound T in between (0, 0.68). Thanks M Reddy |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
c++ libraries and solver compiling | vaina74 | OpenFOAM Installation | 13 | February 3, 2012 18:43 |
[OpenFOAM] Saving ParaFoam views and case | sail | ParaView | 9 | November 25, 2011 16:46 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
POSDAT problem | piotka | STAR-CD | 4 | June 12, 2009 09:43 |