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

Nut generating a floating point exception

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2018, 23:11
Post Nut generating a floating point exception
  #1
New Member
 
Roberto Vázquez
Join Date: May 2018
Location: Mérida, Yucatán, México
Posts: 1
Rep Power: 0
robvazdom is on a distinguished road
Good evening,
I'm pretty new to OpenFOAM and CFD in general, so this may be a dumb question. I'm trying to simulate flow in a pipe with chtMultiRegionSimpleFoam, but when I run my case, I get the following message:
#0 Foam::error:: printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam:: operator/(Foam::tmp<Foam::Field<double> > const&, Foam::UList<double> const&) at ??:?
#5 Foam::CompressibleTurbulenceModel<Foam::fluidTherm o>::nu(int) const at ??:?
#6 Foam::nutkWallFunctionFvPatchScalarField::calcNut( ) const at ??:?
#7 Foam::nutWallFunctionFvPatchScalarField::updateCoe ffs() at ??:?
#8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() at ??:?
#9 Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Fo am::ThermalDiffusivity<Foam::CompressibleTurbulenc eModel<Foam::fluidThermo> > > >::correctNut() at ??:?
#10 ? at ??:?
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12 ? at ??:?Floating point exception (core dumped)


I've read other posts with similar errors, with replies saying that most likely k and epsilon have initial values of zero. Mine are very small, around 3e-6, but definitely not zero. I don't really know what to do when I don't get a FOAM fatal error, so any help would be appreciated .

Thank you all in advance!

Last edited by robvazdom; May 17, 2018 at 23:13. Reason: smileys in my text
robvazdom is offline   Reply With Quote

Old   June 19, 2018, 18:24
Default
  #2
Member
 
Raunak Bardia
Join Date: Jan 2015
Posts: 32
Rep Power: 11
raunakbardia is on a distinguished road
I am facing the same issue while trying to run "reactingFoam". I understand that the error is being generated from the calcNut() function called from the boundary condition "nutkwallfunction".

Here is that function:
Code:
tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const
{
    const label patchi = patch().index();

    const turbulenceModel& turbModel = db().lookupObject<turbulenceModel>
    (
        IOobject::groupName
        (
            turbulenceModel::propertiesName,
            internalField().group()
        )
    );

    const scalarField& y = turbModel.y()[patchi];
    const tmp<volScalarField> tk = turbModel.k();
    const volScalarField& k = tk();
    const tmp<scalarField> tnuw = turbModel.nu(patchi);
    const scalarField& nuw = tnuw();

    const scalar Cmu25 = pow025(Cmu_);

    tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
    scalarField& nutw = tnutw.ref();

    forAll(nutw, facei)
    {
        label celli = patch().faceCells()[facei];

         scalar yPlus = Cmu25*y[facei]*sqrt(k[celli])/nuw[facei]; 

        if (yPlus > yPlusLam_)
        {
           nutw[facei] = nuw[facei]*(yPlus*kappa_/log(E_*yPlus) - 1.0);
        }
    }

    return tnutw;
}
The issue seems to generate from the highlighted line as the line#5 in the error mentioned by Roberto refers to nu(int). On tracking line#5, I ended up in the file: OpenFOAM-5.0/src/TurbulenceModels/compressible/CompressibleTurbulenceModel. The reference to the nu(int) function is on line #125. The function is:

Code:
//- Return the laminar viscosity on patchi
        virtual tmp<scalarField> nu(const label patchi) const
        {
            return
                this->transport_.mu(patchi)/this->rho_.boundaryField()[patchi];
        }
The error is with division, and this implies that my rhoField has a value of zero at the boundaryField. I have defined the density using icoPolynomial<8> format. Is the error related to this or am I missing something else? How can we resolve this error? I have attached my 0 directory files.

Help from the more experienced FOAMers will be really useful.
Attached Files
File Type: zip 0directory.zip (7.8 KB, 11 views)

Last edited by raunakbardia; June 19, 2018 at 18:52. Reason: Identifying the Code component separately.
raunakbardia is offline   Reply With Quote

Old   July 25, 2020, 08:34
Default
  #3
New Member
 
BTmaxxx
Join Date: Aug 2019
Posts: 4
Rep Power: 7
yppoonia is on a distinguished road
Hello,
Did you find a solution to this? I have run into a similar problem.
yppoonia is offline   Reply With Quote

Old   May 2, 2024, 10:47
Default
  #4
Member
 
bany
Join Date: Nov 2019
Posts: 50
Rep Power: 8
bany is on a distinguished road
Quote:
Originally Posted by yppoonia View Post
Hello,
Did you find a solution to this? I have run into a similar problem.

A possible reason may be the transport data.

You should check your transportProperties file and make sure that As, Ts not equal zero.
bany is offline   Reply With Quote

Reply

Tags
chtmultiregionsimplefoam, floating point error, nut, openfoam


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
icoFoam floating point exception (8) leizhao512 OpenFOAM Running, Solving & CFD 7 November 1, 2018 12:43
A floating point exception has occurred: floating point exception [Overflow]. starlight STAR-CCM+ 4 May 4, 2016 10:08
A floating point exception - SEM Model yansheng STAR-CCM+ 1 April 4, 2016 05:57
Floating point exception from twoPhaseEulerFoam openfoammaofnepo OpenFOAM Running, Solving & CFD 1 March 19, 2016 14:56
Floating point exception (core dumped) for GAMG solver yuhou1989 OpenFOAM Running, Solving & CFD 2 March 24, 2015 20:28


All times are GMT -4. The time now is 10:22.