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

pisoFoam : error floating point

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

Like Tree2Likes
  • 1 Post By gwierink
  • 1 Post By Dbutant

Reply
 
LinkBack Thread Tools Display Modes
Old   November 25, 2011, 11:35
Default pisoFoam : error floating point
  #1
New Member
 
Join Date: Nov 2011
Posts: 5
Rep Power: 5
Dbutant is on a distinguished road
Hello,
I'm trying to use pisoFoam on a test case.
This is just a box (1m) in a flow of 24m/s.
I want use a k-epsilon model, transient, incompressible, turbulent.
But there is an error and pisoFoam stop calculation :

Code:
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/libc.so.6"
#3  Foam::DILUPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4  Foam::DILUPreconditioner::DILUPreconditioner(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5  Foam::lduMatrix::preconditioner::addasymMatrixConstructorToTable<Foam::DILUPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6  Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#7  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#8  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
#9  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
#10  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
#11  __libc_start_main in "/lib/libc.so.6"
#12  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
Exception en point flottant
I've done the mesh on gmsh. The file .geo compressed is CarreSimple.geo.tar.gz
The 0 folder is 0.tar.gz.
The system folder is system.tar.gz
The properties files are Properties.tar.gz
And the boundaries boundary.tar.gz

When I execute checkMesh, it's ok.

I tried to unset the FOAM_SIGFPE in etc/bashrc but nothing change.

I'm not sure of my initial conditions for R, epsilon and k. I don't know which values I need to put, so I let the default values from the tutorial.

I don't know if it's can provide from the mesh that I need to refine.

I'm waiting your answers.

Thanks
Dbutant is offline   Reply With Quote

Old   November 26, 2011, 05:22
Default
  #2
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9
gwierink is on a distinguished road
Hi there,

What are you trying to set up? Your BCs seem a bit strange. If you would like to have a flow inlet on the left and outflow on the right, you probably want to specify U at the inlet, have inletOutlet for U at the outlet, have p zeroGradient at the inlet, and fix p at, say, 0 at the outlet. have a look at $FOAM_TUTORIALS/incompressible/pisoFoam/les/pitzDaily for some inspiration.

k and \varepsilon can be modelled as (have a look at the User Guide):

k = \tfrac{3}{2} \left( UI \right)^{2},

where I is turbulent intensity (guestimate can be e.g. 0.02 or 0.05), and

\varepsilon = \frac{C_{\mu}^{0.75} k^{1.5}}{L},

where C_{\mu}=0.09 and L is a characteristic length scale (e.g. 20% of channel inlet diameter).

From $FOAM_TUTORIALS/incompressible/pisoFoam/les/pitzDaily you can see that e.g. 0/U has the following for the inlet:
Code:
    inlet
    {
        type                   turbulentInlet;
        referenceField     uniform (10 0 0); // main flow U
        fluctuationScale  (0.02 0.01 0.01); // I in x, y, and z direction
        value                  uniform (10 0 0);
    }
Hope this helps you on your way a bit .
ScarFace likes this.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 28, 2011, 10:19
Default
  #3
New Member
 
Join Date: Nov 2011
Posts: 5
Rep Power: 5
Dbutant is on a distinguished road
Thank you for your answer, I have changed my BC but it doesn't work, could you say me if everything is ok.

0/epsilon :
Code:
dimensions      [0 2 -3 0 0 0 0];

internalField   uniform 0.04571;

boundaryField
{
    AvtArr
    {
        type            empty;
    }
    HautBas
    {
        type            fixedValue;
        value           uniform 0.04571;
    }
    Sortie
    {
        type            fixedValue;
        value           uniform 0.04571;
    }
    Entree
    {
        type            fixedValue;
        value           uniform 0.04571;
    }
    Objet
    {
        type            epsilonWallFunction;
        value           uniform 0.04571;
    }
}
0/k :
Code:
internalField   uniform 0.0864;

boundaryField
{
    AvtArr
    {
        type            empty;
    }
    HautBas
    {
        type            fixedValue;
        value           uniform 0.0864;
    }
    Sortie
    {
        type            fixedValue;
        value           uniform 0.0864;
    }
    Entree
    {
        type            fixedValue;
        value           uniform 0.0864;
    }
    Objet
    {
        type            kqRWallFunction;
        value           uniform 0.0864;
    }
}
0/p :
Code:
internalField   uniform 0;

boundaryField
{
    Entree      
    {
        type            zeroGradient;
    }

    Sortie      
    {
        type            fixedValue;
        value           uniform 0;
    }
    Objet     
    {
        type            zeroGradient;
    }
    HautBas     
    {
        type            zeroGradient;
    }

    AvtArr    
    {
        type            empty;
    }
}
0/U :
Code:
internalField   uniform (0 0 0);

boundaryField
{
    Entree      
    {
        type        turbulentInlet;
        referenceField    uniform (24 0 0); // main flow U
        fluctuationScale  (0.01 0.01 0.01); // I in x, y, and z direction
        value        uniform (24 0 0);
    }

    Sortie      
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           uniform (0 0 0);
    }
    Objet     
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    HautBas     
    {
        type            freestream;
        freestreamValue uniform (0 0 0);
    }

    AvtArr    
    {
        type            empty;
    }
}
I don't understand what I need to do.
Dbutant is offline   Reply With Quote

Old   November 28, 2011, 17:02
Default
  #4
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9
gwierink is on a distinguished road
Ok, what is the error you get?
I noticed that your mesh is 3D. Do you want your domain to be a thin 3D slice, or do you want 2D? In OpenFOAM the 2D mesh will be one cell thick, looking like 3D, but I don't think you need to do that in your meshing tool. The mesh converter will take care of that.
Another thing is what you want to do. What kind of simulation are you interested in? What are the boundaries? For example, if HautBas are your lower and upper walls, you probably want to set something like fixedValue (0 0 0) there for velocity ...
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 29, 2011, 06:14
Default
  #5
New Member
 
Join Date: Nov 2011
Posts: 5
Rep Power: 5
Dbutant is on a distinguished road
The error that I get is :
Code:
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/libc.so.6"
#3  Foam::LimitedScheme<double, Foam::limitedLinearLimiter<Foam::NVDTVD>, Foam::limitFuncs::magSqr>::limiter(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#4  Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#5  Foam::fv::gaussConvectionScheme<double>::fvmDiv(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#8  Foam::incompressible::RASModels::kEpsilon::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#9  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
#10  __libc_start_main in "/lib/libc.so.6"
#11  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
Exception en point flottant
I want a 2D domain so I have done a 3D with one cell thick.

mesh.jpg
The HautBas is not wall.

I tried with this 0/U :
Code:
internalField   uniform (24 0 0);

boundaryField
{
    Entree      
    {
        type                   turbulentInlet;
        referenceField     uniform (24 0 0); // main flow U
        fluctuationScale  (0.01 0.01 0.01); // I in x, y, and z direction
        value                  uniform (24 0 0);
    }
    Sortie      
    {
        type            zeroGradient;
    }
    Objet     
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    HautBas     
    {
        type            zeroGradient;
    }
    AvtArr    
    {
        type            empty;
    }
}
And that :

Code:
internalField   uniform (24 0 0);

boundaryField
{
    Entree      
    {
        type                   turbulentInlet;
        referenceField     uniform (24 0 0); // main flow U
        fluctuationScale  (0.01 0.01 0.01); // I in x, y, and z direction
        value                  uniform (24 0 0);
    }
    Sortie      
    {
        type             fixedValue;
         value           uniform (24 0 0);
    }
    Objet     
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    HautBas     
    {
        type            fixedValue;
          value           uniform (24 0 0);
    }
    AvtArr    
    {
        type            empty;
    }
}
But there is always an error.

I have reduced my deltaT in controlDict to 0.00001, my smallest deltaX is 0.005. So my Courant number is 0.048<1.
But when I see the last iteration, the log write a max Courant number of 97 :
Code:
Time = 5e-05

Courant Number mean: 0.00490689 max: 0.796989
DILUPBiCG:  Solving for Ux, Initial residual = 0.825801, Final residual = 3.40013e-06, No Iterations 11
DILUPBiCG:  Solving for Uy, Initial residual = 0.93573, Final residual = 4.85214e-06, No Iterations 11
DICPCG:  Solving for p, Initial residual = 0.787761, Final residual = 0.0756733, No Iterations 9
time step continuity errors : sum local = 9.71158e-06, global = -2.36612e-09, cumulative = -1.1106e-07
DICPCG:  Solving for p, Initial residual = 0.364313, Final residual = 9.27039e-07, No Iterations 336
time step continuity errors : sum local = 1.96103e-09, global = -1.34322e-11, cumulative = -1.11073e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.123204, Final residual = 7.07044e-06, No Iterations 7
bounding epsilon, min: -2.42782e+10 max: 2.51261e+11 average: 3.90569e+07
DILUPBiCG:  Solving for k, Initial residual = 0.986799, Final residual = 6.01388e-06, No Iterations 11
bounding k, min: -5539.94 max: 8.89783e+06 average: 10386.5
ExecutionTime = 2.34 s  ClockTime = 2 s

Time = 6e-05

Courant Number mean: 0.00545273 max: 97.8431
DILUPBiCG:  Solving for Ux, Initial residual = 0.681026, Final residual = 8.30994e-06, No Iterations 4
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 9.54478e-09, No Iterations 5
DICPCG:  Solving for p, Initial residual = 0.448027, Final residual = 0.0447951, No Iterations 72
time step continuity errors : sum local = 9.72168e-05, global = 1.50061e-08, cumulative = -9.60673e-08
DICPCG:  Solving for p, Initial residual = 0.0616509, Final residual = 9.43425e-07, No Iterations 334
time step continuity errors : sum local = 6.20469e+10, global = 6.24885e+08, cumulative = 6.24885e+08

Last edited by Dbutant; November 29, 2011 at 06:55.
Dbutant is offline   Reply With Quote

Old   November 30, 2011, 06:01
Default
  #6
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9
gwierink is on a distinguished road
You are using pisoFoam, so that means you want to do LES? What turbulence model are you using? I see that k and epsilon go unbounded. Is that you subgrid model, or are you using RAS properties with and LES solver? Also, I see that you fix k everywhere, which is neither physical, nor stable. Can you perhaps upload the case, so I can have a look?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 30, 2011, 08:50
Default
  #7
New Member
 
Join Date: Nov 2011
Posts: 5
Rep Power: 5
Dbutant is on a distinguished road
I want a RAS, k-epsilon model.
My 0 folder is this one : 0.tar.gz
I am a beginner on OpenFOAM and try to copy the tutorials files but I don't find really BCs I want...
Thanks
Dbutant is offline   Reply With Quote

Old   November 30, 2011, 11:30
Default
  #8
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9
gwierink is on a distinguished road
Perhaps it is worth checking out $FOAM_TUTORIALS//incompressible/pimpleFoam/TJunction. It is a RAS kEpsilon case with inlet and outlets, using pimpleFoam. Can you use your mesh with that case (with the correct boundary names etc)?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   December 8, 2011, 07:01
Default
  #9
New Member
 
Join Date: Nov 2011
Posts: 5
Rep Power: 5
Dbutant is on a distinguished road
Thank you.
I have resolved my problem see this pisoFoam floating point error - GAMG
I put in fvSolution : nCorrectors to 3 and relTol to 0 for p.
ScarFace likes this.
Dbutant is offline   Reply With Quote

Old   February 8, 2012, 02:16
Default Floating error
  #10
Member
 
Join Date: Jan 2012
Posts: 58
Rep Power: 5
sheikh nasir is on a distinguished road
Hello.
I am getting floating error:invalid number. I am working on train moving in tunnel. Can any body help me. My email is sheikhnasir39@gmail.com
thanks
sheikh nasir is offline   Reply With Quote

Old   October 9, 2012, 09:45
Default
  #11
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 7
cfdonline2mohsen is on a distinguished road
Hi all
I had a same problem (Floating point exception) when running pisoFoam for a RAS simulation
Floating point exception means that you have division by zero somewhere in your solution especially for k or e (see the k-e equations, they appear in the denominator somewhere! ).
check your 0 folder and instead of giving zero for the initial values of k or e, give a very small number (e.g.1e-20)
It worked for me!
If it didn't work, as already Dbutant mentioned above, follow the instructions in the following post pisoFoam floating point error - GAMG for changing your system folder parameters.

Best Wishes
cfdonline2mohsen 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
block-structured mesh for t-junction Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 05:59
Problem with UDF compiling for kTkLW model Wantami FLUENT 0 July 18, 2011 05:11
pisoFoam floating point error - GAMG sErik OpenFOAM Running, Solving & CFD 8 January 14, 2010 11:43
Gmsh and samplesurface touf Open Source Meshers: Gmsh, Netgen, CGNS, ... 2 December 10, 2007 03:27
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 09:13.