CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   error - Foam::sigFpe::sigHandler(int) at ??:? (https://www.cfd-online.com/Forums/openfoam-post-processing/140726-error-foam-sigfpe-sighandler-int.html)

aylalisa August 21, 2014 12:43

error - Foam::sigFpe::sigHandler(int) at ??:?
 
Dear Foamers,

I try to compute the turbulence intensity (utiliy) and receive an error:

I've tried:
Code:

Tu = sqrt(0.3 *mag(Rxx + Ryy + Rzz))/sqrt(sqr(U.component(0))+sqr(U.component(1))+sqr(U.component(2)));
and:
Code:

Tu = sqrt(0.3 *mag(Rxx + Ryy + Rzz))/sqrt(mag(sqr(U.component(0))+sqr(U.component(1))+sqr(U.component(2))));
error:
Code:

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
 #1  Foam::sigFpe::sigHandler(int) at ??:?
 #2  in "/lib64/libc.so.6"
 #3 
 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
 #4 
 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
 #5 
  at ??:?
 #6  __libc_start_main in "/lib64/libc.so.6"
 #7 
  at /home/abuild/rpmbuild/BUILD/glibc-2.18/csu/../sysdeps/x86_64/start.S:125

Could somebody help? What's wrong with the division?

Best regards,
Ayla

kmooney August 25, 2014 22:56

Hi Ayla,

Can you be 100% sure that U is non-zero throughout the entire domain?

If you want to make the evaluation more fpe-proof add a

Code:

+VSMALL
somewhere in the denominator.

I hope that helps!
Cheers,
Kyle

aylalisa August 26, 2014 13:45

Hi Kyle,

thanks for your answer!
I think the code is wrong anyway.

I've changed it accordingly:
Quote:

Tu = (sqrt((1/3) * (Rxx + Ryy + Rzz))/stabilise(mag(U),SMALL*UUnits));
I guess entries of R are already divided by rho and units are m2/s2. How could I figure out?

The trace elements of R and the values of mag(U) are good but Tu = 0, why?
Whereas in ParaFoam I can compute Tu with the same formula and Tu is not 0.

Greetings!
Ayla


All times are GMT -4. The time now is 04:03.