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

Catching an exception - division by zero.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 15, 2014, 23:36
Default Catching an exception - division by zero.
  #1
Member
 
Manan
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 3
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, 12:00
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,594
Rep Power: 24
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimpleDyMFoam constantly giving floating point exception and solution divergence fedvasu OpenFOAM Running, Solving & CFD 0 November 28, 2013 01:53
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 4 August 7, 2013 16:39
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
reactingFoam floating point exception pajofego OpenFOAM 0 November 6, 2010 18: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 10:53.