CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pipe flow in settlingFoam floating point exception (http://www.cfd-online.com/Forums/openfoam-solving/95533-pipe-flow-settlingfoam-floating-point-exception.html)

jochemvandenbosch December 21, 2011 12:18

Pipe flow in settlingFoam floating point exception
 
Dear fellow FOAM'ers,

I'm trying to simulate a two phase (sand/water) flow in a straight pipe using settlingFoam.
To start, I altered the tank3D tutorial of settlingFoam. I use a pipe mesh which I already have succesfully used with single phase flows. Unfortunately, whatever I try, I'm getting a 'Floating point exception' :eek: after 5-20 iterations. I suppose this has something to do with the boundary conditions but I cannot find my mistake. These are them. Would anybody know where I went wrong???

Quote:

FoamFile
object alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.02;
}

outlet
{
type zeroGradient;
}

walls
{
type zeroGradient;
}
}

// ************************************************** *********************** //
Quote:

FoamFile
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -3 0 0 0 0];

internalField uniform 1.973e-07;

boundaryField
{
inlet
{
type fixedValue;
value uniform 1.973e-07;
}

outlet
{
type zeroGradient;
}

walls
{
type zeroGradient;
}
}

// ************************************************** *********************** //
Quote:

FoamFile
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.000259;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.000259;
}

outlet
{
type zeroGradient;
}

walls
{
type zeroGradient;
}
}

// ************************************************** *********************** //
Quote:

FoamFile
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type buoyantPressure;
value uniform 0;
}

outlet
{
type fixedValue;
value uniform 0;
}

walls
{
type buoyantPressure;
value uniform 0;
}
}

// ************************************************** *********************** //
Quote:

FoamFile
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 10 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (0 10 0);
}

outlet
{
type zeroGradient;
}

walls
{
type fixedValue;
value uniform (0 0 0);
}
}

// ************************************************** *********************** //
The exact error I'm getting is
Quote:

Courant Number mean: 3.13403e+06 max: 3.03993e+10
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 5.45561e-06, Final residual = 7.99833e-08, No Iterations 994
DILUPBiCG: Solving for Uy, Initial residual = 4.44506e-08, Final residual = 4.44506e-08, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 2.06501e-05, Final residual = 1.53366e-07, No Iterations 1001
DILUPBiCG: Solving for Alpha, Initial residual = 0.910986, Final residual = 0.00487461, No Iterations 1001
Solid phase fraction = 0.0275489 Min(Alpha) = -8.70379 Max(Alpha) = 13.7391
DICPCG: Solving for p_rgh, Initial residual = 1, Final residual = 2807.85, No Iterations 1001
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = -9.55556e+49, global = 9.42608e+49, cumulative = 1.72383e+57
DICPCG: Solving for p_rgh, Initial residual = 1, Final residual = 2.80816e-05, No Iterations 1001
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = -8.77632e+120, global = 6.77406e+120, cumulative = 6.77406e+120
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 void Foam::fvMatrix<double>::setValuesFromList<Foam::UL ist>(Foam::UList<int> const&, Foam::UList<double> const&) in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
#4
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
#5 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#6
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
Floating point exception
Any help would be very very much appreciated!!!!!!

insane_alien December 21, 2011 17:03

your courant number is going crazy. Likely the timestep is set too big. try reducing it.

jochemvandenbosch December 22, 2011 05:12

2 Attachment(s)
Hi Stephen, my courant number is going like crazy indeed, but when I reduce my timestep with a factor 1000! to 0.0001 I get the same message after 54 iterations.

But when I look at those 54 iterations in ParaView I see no pressure distribution (see attachment) and also no speeds... This makes me believe there is something wrong in the boundary conditions....

Quote:

Time = 0.0054

Courant Number mean: 0.0418895 max: 355.16
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 4.47596e-05, Final residual = 7.60243e-08, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 6.83522e-07, Final residual = 8.58481e-08, No Iterations 125
DILUPBiCG: Solving for Uz, Initial residual = 9.32447e-06, Final residual = 1.20745e-08, No Iterations 1
DILUPBiCG: Solving for Alpha, Initial residual = 0.917158, Final residual = 6.78599e-06, No Iterations 1001
Solid phase fraction = 22.4908 Min(Alpha) = -117512 Max(Alpha) = 92780.4
DICPCG: Solving for p_rgh, Initial residual = 0.996912, Final residual = 0.334048, No Iterations 1001
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 6.29575e+53, global = 2.09099e+53, cumulative = -6.60704e+65
DICPCG: Solving for p_rgh, Initial residual = 1, Final residual = 1.16875e-16, No Iterations 2
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.51501e+150, global = 2.51501e+150, cumulative = 2.51501e+150
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
#6
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
#7 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#8
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/settlingFoam"
Floating point exception

Matt321 February 16, 2012 04:05

Hi Jochem, I am having a similar issue to this, did you manage to fix it?

jochemvandenbosch February 16, 2012 04:24

Hi Matt, my problem was that I set the speed in a direction perpendicular to the wall instead of parallel. But in general the problem can be solved by decreasing your time step. What solver are you using?


All times are GMT -4. The time now is 18:07.