CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SIGFPE Error with reactingFoam (https://www.cfd-online.com/Forums/openfoam-solving/89312-sigfpe-error-reactingfoam.html)

newOFuser June 9, 2011 09:15

SIGFPE Error with reactingFoam
 
Hello,

I am a new OF user, and was trying to use the reactingFoam solver (slightly modified) to study combustion in a cylindrical swirl combustor. However, after a few time steps I got the error below.

Could someone please point out what could be causing this floating point exception, and how to rectify it?

Thank you so much!
ak
--------------------------------------------------------------
Time = 0.0124618

Solving chemistry
[24] #0 Foam::error::printStack(Foam::Ostream&)diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
in "/home/ak/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[24] #1 Foam::sigFpe::sigFpeHandler(int) in "/home/ak/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[24] #2 in "/lib/libc.so.6"
[24] #3 in "/lib/libm.so.6"
[24] #4 pow in "/lib/libm.so.6"
[24] #5 Foam::ODEChemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam::perfectGas> > > >::omega(Foam::Reaction<Foam::sutherlandTransport< Foam::specieThermo<Foam::janafThermo<Foam::perfect Gas> > > > const&, Foam::Field<double> const&, double, double, double&, double&, int&, double&, double&, int&) const in "/home/ak/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libchemistryModel.so"
[24] #6 Foam::ODEChemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam::perfectGas> > > >::tc() const in "/home/ak/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libchemistryModel.so"
[24] #7
[24] in "/home/ak/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/pFoam"
[24] #8 __libc_start_main in "/lib/libc.so.6"
[24] #9
[24] in "/home/ak/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/pFoam"
[node86:15576] *** Process received signal ***
[node86:15576] Signal: Floating point exception (8)
[node86:15576] Signal code: (-6)
[node86:15576] Failing at address: 0x58f800003cd8
[node86:15576] [ 0] /lib/libc.so.6(+0x33af0) [0x2acc4f3dcaf0]
[node86:15576] [ 1] /lib/libc.so.6(gsignal+0x35) [0x2acc4f3dca75]
[node86:15576] [ 2] /lib/libc.so.6(+0x33af0) [0x2acc4f3dcaf0]
[node86:15576] [ 3] /lib/libm.so.6(+0x13e81) [0x2acc4ef21e81]
[node86:15576] [ 4] /lib/libm.so.6(pow+0x15) [0x2acc4ef33765]
[node86:15576] [ 5] /home/ak/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libchemistryModel.so(_ZNK4Foam17ODEChemistryModelI NS_17psiChemistryModelENS_19sutherlandTransportINS _12specieThermoINS_11janafThermoINS_10perfectGasEE EEEEEE5omegaERKNS_8ReactionIS8_EERKNS_5FieldIdEEdd RdSI_RiSI_SI_SJ_+0x285) [0x2acc4dca9ff5]
[node86:15576] [ 6] /home/ak/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libchemistryModel.so(_ZNK4Foam17ODEChemistryModelI NS_17psiChemistryModelENS_19sutherlandTransportINS _12specieThermoINS_11janafThermoINS_10perfectGasEE EEEEEE2tcEv+0x57e) [0x2acc4dcb524e]
[node86:15576] [ 7] pFoam() [0x426bf3]
[node86:15576] [ 8] /lib/libc.so.6(__libc_start_main+0xfd) [0x2acc4f3c7c4d]
[node86:15576] [ 9] pFoam() [0x421119]
[node86:15576] *** End of error message ***

-----------------------------------------------

djstoneage June 15, 2011 02:31

i do unset sigfpe and it works but not too sure if it is the right way of doign things? try to check your initial conditions

newOFuser June 15, 2011 08:39

Thanks for your reply! How did you unset this option?

I tried "unset FOAM_SIGFPE" in the .bashrc file followed by the “. $HOME/.bashrc” command, but when I run the case, I still get the following before the simulation starts:
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
SetNaN : Initialising allocated memory to NaN (FOAM_SETNAN).

I tried "export FOAM_SIGFPE=false" as well but that didn't work either.

-ak

djstoneage June 19, 2011 22:55

unset FOAM_SIGFPE
 
Just type unset FOAM_SIGFPE in your case directory in terminal

newOFuser June 20, 2011 09:28

Thanks so much!
As you pointed out earlier, I am also looking at choosing appropriate conditions and fvschemes to avoid getting the error.
Thanks again
ak

djstoneage June 20, 2011 12:30

try checking your initial condition. in my case i found when i set values to my initial condition i am able to avoid the sigfpe error. what study are you doing? I am a little problem with my atmospheric wind studies

newOFuser June 20, 2011 12:34

Sure, thanks so much!
I found that changing the fvSchemes and reducing relaxation factors in fvSolution file can also have a significant effect.
I am looking into premixed combustion studies at present.

djstoneage June 20, 2011 12:51

i checked the relaxation factor but it run for a few iteration and after a certain iteration it will get the sigfpe error again. do you have any experience with atmospheric wind studies? right now i've got the boundary layer figure out but, the flow doesnt seem to go though my off shore platform that im looking at

newOFuser June 20, 2011 12:54

sorry, i don't...

tgvosk October 6, 2012 16:01

Bug Report #0000657
 
I know this is an old thread, but I had a very similar problem with a sigFpe in reactingFoam that was solved by the fix pushed in Bug Report #0000657. If you (or anyone) are still having this problem, maybe that will fix it.

I was getting the sigFpe from the exact same function as your error log shows (and found this thread while trying to figure out what was wrong).

amcloughlin801 February 5, 2016 02:44

Reset FOAM_SIGFPE
 
I have unset SIGFPE and now I want to reset it again. Does anyone have any idea how I would do that?

ghorob October 15, 2016 17:02

Foam::sigFpe
 
Hi everyone
I want to solve a simple heat conduction with phase change (solidification) to model cooling of a steel ingot.

My boundary conditions:
Velocities =0, pressure BC=zeroGradient (at this stage im not interested in flow, just simple heat conduction is desired)

Temperature boundary conditions:
I have 5 patches.
2 of them are fixed Gradient and 3 of them are uniformFixedGradient (reading data from the text files).

My Problem:
My solver works perfect when I set 2 of 5 patches to uniformFixedGradient boundary conditions and keep the other 3 fixedGradient.
But when I apply uniformFixedGradient for 3 patches it gives me the following error:





Starting time loop

***** Time ******* = 0.0001

Courant Number mean: 0 max: 0
smoothSolver: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
DICPCG: Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
#0 Foam::error::printStack(Foam::Ostream&) in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib64/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/bin/ingot4"
#7
in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/bin/ingot4"
#8
in "/home/magma/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/bin/ingot4"
#9 __libc_start_main in "/lib64/libc.so.6"
#10
at /home/abuild/rpmbuild/BUILD/glibc-2.15/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception


the solver reads the thermal gradient for 3 BCs of uniformFixedGradient from 3 text files. there is no zero number there. These 3 text files are the same and they start from time zero to end of simulation (26sec).
*****my text file*****
(
(0 -15)
(5 -45)
(10 -30)
(15 -20)
(26 -32)
);
I know that "sigFpe" is related to the numeric calculation. But when I use 2 BCs instead of 3 BCs and read 2 text file instead of 3 my program works. So I think there is no problem with thermal gradient in the text file.


All times are GMT -4. The time now is 15:32.