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

Catching an exception - division by zero.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2014, 22:36
Default Catching an exception - division by zero.
  #1
Member
 
Manan
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 12
MaLa is on a distinguished road
Hello,

I need a little help. I wrote a turbulence model and was trying to test it. But I ran into a division-by-zero error (I think):

#0 Foam::error:rintStack(Foam::Ostream&) in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#2
at sigaction.c:0
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField>(Foam::FieldField< Foam::fvPatchField, double>&, Foam::FieldField<Foam::fvPatchField, double> const&, Foam::FieldField<Foam::fvPatchField, double> const&) in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libincompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC::correct() in "/chalmers/users/mananl/OpenFOAM/mananl-2.2.x/platforms/linux64Gcc47DPOpt/lib/libaddedIncompressibleRASModels.so"
#7
in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/simpleFoam"
#8 __libc_start_main in "/lib64/libc.so.6"
#9
in "/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/simpleFoam"


Can people share their experiences about the best way to figure where the exception is occuring or how to trouble shoot in such a situation?

Thanks so much.
MaLa is offline   Reply With Quote

Old   February 16, 2014, 11:00
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo,

You divide by 0 in one of the boundary conditions. Visible from error #4, which includes a fvPatchField.

Good luck,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj 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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 21:51
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 05:57
pimpleDyMFoam constantly giving floating point exception and solution divergence fedvasu OpenFOAM Running, Solving & CFD 0 November 28, 2013 00:53
reactingFoam floating point exception pajofego OpenFOAM 0 November 6, 2010 17:29
Cannot Open .sim (Floating Point Exception) trex930 STAR-CCM+ 1 July 30, 2010 06:51


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