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

sonicFoam - Floating point eception (core dumped)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2014, 12:04
Default sonicFoam - Floating point eception (core dumped)
  #1
New Member
 
Marc
Join Date: Nov 2014
Location: Barcelona, Catalonia (still Spain)
Posts: 7
Rep Power: 12
MSans is on a distinguished road
Hello everyone!

I am working with a 3D nozzle. First of all I ran simpleFoam with no further issues but after introducing compressibility and turbulence it's when problems appear. The error is ot FOAM FATAL ERROR as usual. The exact script is the following:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo <eConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model laminar

Starting time loop

Time = 0.05

#0 Foam::error:: PrintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam:: operator/(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sonicFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sonicFoam"
Floating point exception (core dumped)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I've seen in other posts that dicreasing the deltaT sometimes works but already tried with no better results.
Does ayone know what's this all about and how could I solve this?

Thank you very much!

Marc
MSans is offline   Reply With Quote

Old   November 17, 2014, 12:31
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

as the error happens during Courant number calculation (according to your output)

Code:
    scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().internalField()
      / rho.internalField()
    );

    CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

    meanCoNum =
        0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
and the error is FPE in division, I guess either you've got a problem with density IC (rho is zero somewhere) or your mesh is rather interesting (cell volume is zero somewhere).
MSans likes this.
alexeym is offline   Reply With Quote

Old   November 17, 2014, 14:04
Default
  #3
New Member
 
Marc
Join Date: Nov 2014
Location: Barcelona, Catalonia (still Spain)
Posts: 7
Rep Power: 12
MSans is on a distinguished road
Thank you Alexey.

So, assuming (and hoping) it's not a 0-volume-cell problem (simpleFoam ran with no problem and it would have appeared then too, isn't it?) it most probably is a problem with density. Then, how can I fix it? is it just due to a certain value I should increase or decrease or it comes from combining pressure, velocity and temperature to satisfy Bernoulli's equation?

Thank you,

Marc
MSans is offline   Reply With Quote

Old   November 17, 2014, 15:02
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well, if we take a look at createFields.H:

Code:
    Info<< "Reading thermophysical properties\n" << endl;

    autoPtr<psiThermo> pThermo
    (
        psiThermo::New(mesh)
    );
    psiThermo& thermo = pThermo();
    thermo.validate(args.executable(), "e");

    volScalarField& p = thermo.p();
    volScalarField& e = thermo.he();
    const volScalarField& psi = thermo.psi();

    volScalarField rho
    (
        IOobject
        (
            "rho",
            runTime.timeName(),
            mesh
        ),
        thermo.rho()
    );
and then at psiThermo.C:

Code:
Foam::tmp<Foam::volScalarField> Foam::psiThermo::rho() const
{
    return p_*psi_;
}
p_ is inherited form basicThermo and is a pressure, psi_ is calculated by concrete implementation of the thermo class. If any of these is zero, density is also zero, etc.
alexeym is offline   Reply With Quote

Old   November 17, 2014, 18:45
Default
  #5
New Member
 
Marc
Join Date: Nov 2014
Location: Barcelona, Catalonia (still Spain)
Posts: 7
Rep Power: 12
MSans is on a distinguished road
But, as p is set as fixedValue and psi is the compressibility (psi=(rho*T*R)/W where rho is density, T temperature, R is the constant of gases and W not 100% sure what it exactly is but its units must be 1/mol) and all the variables come from the thermoPhysicalProperties document and those are constants, the only option is that at the very begining of the iterative process (this is why the terminal crashes at the first time loop), rho is set as 0 and it leads to psi=0 so rho* is again =0 and it makes my core dump.

Thank you very much Alexey!

But now (and this is the very last issue I bother you with, I hope) where can I change this initial value of rho?
MSans is offline   Reply With Quote

Old   November 18, 2014, 03:12
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well,

post your 0 folder and thermophysicalProperties, otherwise it'll be just speculations.
alexeym is offline   Reply With Quote

Old   November 18, 2014, 04:42
Default
  #7
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 19
chriss85 will become famous soon enough
Without having looked very much into your problem, crashes can occur because of too large time steps or in unconverged solutions. Did you try lowering the time step size?
chriss85 is offline   Reply With Quote

Old   November 18, 2014, 06:28
Default
  #8
New Member
 
Marc
Join Date: Nov 2014
Location: Barcelona, Catalonia (still Spain)
Posts: 7
Rep Power: 12
MSans is on a distinguished road
Hello Chris, yes, I already tried but that's not the problem. Thank you anyway for taking a look at my post and try to help.

Alexey, here I leave you my 0 folder and the thermophysicalProperties (this is directly copied from the sonicFoam airfiol tutorial, though)
Attached Files
File Type: zip 0 3Dnozzle.zip (2.7 KB, 5 views)
MSans is offline   Reply With Quote

Old   November 18, 2014, 06:52
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

if you take a look at your p file:

Code:
...
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;
...
you'll see, at t=0 pressure overall the calculation domain is 0 (well, inlet and outlet have non-zero value).
alexeym is offline   Reply With Quote

Old   November 19, 2014, 05:22
Default
  #10
New Member
 
Marc
Join Date: Nov 2014
Location: Barcelona, Catalonia (still Spain)
Posts: 7
Rep Power: 12
MSans is on a distinguished road
Oh dear... it sounded so stupid and so obvious that seemed it had to work but didn't... It's true that we could go a bit forward. Following the steps sonicFoam follows when solving I've seen it crashes when it tries to calculate density
(or just after it but without having the right value (it leaves rho=0) and has to divide by it. Dividing by 0 -> core dumped).

Now the code is:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo <eConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model laminar

Starting time loop

Time = 5e-05

Courant Number mean: 0.000373442 max: 0.00330131
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam:perator/(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::diagonalSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#7 Foam::fvMatrix<double>::solve() in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sonicFoam"
#8
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sonicFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sonicFoam"
Floating point exception (core dumped)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

I've been trying to find where the error is and changed some parameters but ,sadly, it was not effective. I am sure there is another stupid mistake like the one with the pressure but I am not able to find it.

I leave you here the full case so you can take a look at it (if you can).
I removed polyMesh and trisurface from the constant folder just due to a folder-size problem

Thank you!
Attached Files
File Type: zip 0.zip (2.8 KB, 11 views)
File Type: zip system.zip (8.6 KB, 11 views)
File Type: zip constant.zip (2.3 KB, 9 views)
MSans is offline   Reply With Quote

Old   November 19, 2014, 07:03
Default
  #11
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well, sonicFoam is transient solver, not quite sure it likes this

Code:
ddtSchemes
{
    default         steadyState;
}
I'll skip source code walk-through this time.
alexeym is offline   Reply With Quote

Old   November 19, 2014, 16:54
Default
  #12
New Member
 
Marc
Join Date: Nov 2014
Location: Barcelona, Catalonia (still Spain)
Posts: 7
Rep Power: 12
MSans is on a distinguished road
Awesome!

After changing it to Euler and adjusting FvSchemes and FvSolution to it, finally worked!

I am really really grateful

Thank you very much Alexey!

Marc
MSans is offline   Reply With Quote

Old   August 4, 2015, 06:10
Default
  #13
New Member
 
Ipos
Join Date: Feb 2015
Posts: 7
Rep Power: 11
Kittipos is on a distinguished road
Hi

I have a problem with running rhoPorousSimpleFoam.

I used Gambit to generated mesh and export 3D mesh to OpenFoam.

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::heRhoThermo<Foam::rhoThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so"
#4 Foam::heRhoThermo<Foam::rhoThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so"
#5
in "/opt/openfoam221/platforms/linuxGccDPOpt/bin/rhoPorousSimpleFoam"
#6 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#7
in "/opt/openfoam221/platforms/linuxGccDPOpt/bin/rhoPorousSimpleFoam"
Floating point exception (core dumped)
Attached Files
File Type: zip 0.zip (7.3 KB, 2 views)
File Type: zip constant.zip (3.7 KB, 2 views)
File Type: zip system.zip (5.0 KB, 3 views)
Kittipos is offline   Reply With Quote

Reply

Tags
core dumped, floating point, sonicfoam


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 (core dumped) File OpenFOAM Running, Solving & CFD 26 March 6, 2021 05:26
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 15:07
Floating point exception (core dumped) Punt3r OpenFOAM Running, Solving & CFD 1 September 3, 2013 09:51
Floating point error and divergence detected aannjj FLUENT 0 July 2, 2013 04:44
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 12:25


All times are GMT -4. The time now is 12:37.