CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   simpleFoam bounding and time step continuity errors (https://www.cfd-online.com/Forums/openfoam-solving/94634-simplefoam-bounding-time-step-continuity-errors.html)

plm November 21, 2011 16:48

simpleFoam bounding and time step continuity errors
 
Hey all,
Quite new to OF so hope I can find some help here........!

I'm trying to run a simpleFoam case on an aerofoil which I am meshing progressively finer and finer with gmsh. I am having trouble, however, seemingly when the mesh gets to a particular level of fineness.....

I am using the spalmart-allmaras model.

The timestep continuity errors shoot up massively as does the bounding of nuTilda (negative value). This is causing an exception error...

I'm also getting a similar problem in another case using k-epsilon modelling, where the bounding of epsilon and k is similarly negative and very large (again occuring when the mesh becomes fine enough).

Here is my fvSchemes file

Quote:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,nuTilda) Gauss linearUpwind grad(nuTilda);
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}


// ************************************************** *********************** //


Can anyone give me any hints/comments?

alberto November 22, 2011 03:50

I would apply a limiter to the gradients: cellLimited Gauss linear 1; On unstructured grids, use least-squares.

Also, you might want to check your under-relaxation factors for the variables that become unbounded.

Best,

plm November 22, 2011 07:59

Hi alberto,
I have tried changing my gradSchemes to
Quote:

gradSchemes
{
default cellLimited Gauss linear 1;
grad(p) cellLimited Gauss linear 1;
grad(U) cellLimited Gauss linear 1;
}
And have also tried using leastSquares (I am indeed using an unstructured grid).

I've also tried reducing the relaxation factor for nuTilda (I think this is the correct thing to do but would welcome comments on why). I have

Quote:

relaxationFactors
{
default 0;
p 0.3;
U 0.7;
nuTilda 0.3;
}


I am still getting the same error though..... here is an excerpt

Quote:

Time = 148

smoothSolver: Solving for Ux, Initial residual = 0.610081558956, Final residual = 0.0400084362249, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.731335804101, Final residual = 0.0677856085541, No Iterations 4
GAMG: Solving for p, Initial residual = 0.842172295544, Final residual = 0.00537577427988, No Iterations 1
time step continuity errors : sum local = 7.39747532602e+98, global = 2.29685796544e+84, cumulative = 2.27139561979e+84
smoothSolver: Solving for nuTilda, Initial residual = 0.609600451293, Final residual = 0.00103376546081, No Iterations 8
bounding nuTilda, min: -3.43444039237e+96 max: 1.75239938872e+94 average: -7.57227581501e+91
ExecutionTime = 135.71 s ClockTime = 141 s

Time = 149

smoothSolver: Solving for Ux, Initial residual = 0.602726092692, Final residual = 0.000172607699897, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.620480876287, Final residual = 0.000181276687112, No Iterations 4
GAMG: Solving for p, Initial residual = 0.0112844600912, Final residual = 0.000615512502725, No Iterations 3
time step continuity errors : sum local = 3.28149820498e+97, global = -1.10712455583e+82, cumulative = 2.26032437423e+84
smoothSolver: Solving for nuTilda, Initial residual = 0.182007863134, Final residual = 0.000705812932937, No Iterations 2
bounding nuTilda, min: -1.33871035339e+93 max: 1.22671944841e+94 average: 2.75116459072e+89
ExecutionTime = 136.62 s ClockTime = 142 s

Time = 150

smoothSolver: Solving for Ux, Initial residual = 0.614010972757, Final residual = 0.0373659328091, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.712775524613, Final residual = 0.0644015111041, No Iterations 4

And then it crashes with the exception error......

Hope you can help

Regards,
plm

alberto November 22, 2011 16:06

Does the code run without problems if you turn off the turbulence model? It seems none of the equations is converging. I would start checking the setup of the boundary conditions, the mesh quality (checkMesh), ...

Best,

plm November 22, 2011 16:50

Hi alberto, thanks once again for the help!

I've tried running without the turbulence model and it appears I am having problems with my mesh... checkMesh turns up this error

Quote:

Checking geometry...
Overall domain bounding box (-15 -15 0) (15 15 1)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
***Boundary openness (2.14168942912e-06 3.6649966099e-06 7.81860757915e-20) possible hole in boundary description.
***Open cells found, max cell openness: 1, number of open cells 11
<<Writing 11 non closed cells to set nonClosedCells
Minumum face area = 8.07879992847e-12. Maximum face area = 1.21577118801. Face area magnitudes OK.
Min volume = 8.07879991934e-12. Max volume = 0.549816126703. Total volume = 706.22812922. Cell volumes OK.
Mesh non-orthogonality Max: 178.844177523 average: 2.93472826671
***Number of non-orthogonality errors: 11.
<<Writing 11 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 11 faces are incorrectly oriented.
<<Writing 11 faces with incorrect orientation to set wrongOrientedFaces
Max skewness = 1.00000101083 OK.

Failed 4 mesh checks.

I will continue to investigate but would welcome any comments

plm November 22, 2011 17:12

1 Attachment(s)
alberto,
I seem to be getting a problem with undefined faces in OF when using gmshToFoam which I think is causing problems later on....

Would it be possible for you to take a look at my .geo file and see what you think - I'm not sure if you're familiar with gmsh but I can't spot any problems...

Regards,
plm

alberto November 22, 2011 22:20

I am not very familiar with gmsh, sorry.

srv537 November 30, 2016 12:58

time step continuity errors
 
same type of problem i am facing

Time = 63

smoothSolver: Solving for Ux, Initial residual = 0.407445, Final residual = 6.2409e-06, No Iterations 48
smoothSolver: Solving for Uy, Initial residual = 0.713688, Final residual = 8.41503e-06, No Iterations 40
GAMG: Solving for p, Initial residual = 1, Final residual = 0.281817, No Iterations 1000
time step continuity errors : sum local = 5.16688e+27, global = -3.34408e+27, cumulative = -3.34408e+27
smoothSolver: Solving for epsilon, Initial residual = 0.113747, Final residual = 5.51399e-06, No Iterations 2
bounding epsilon, min: -1.00648e+42 max: 2.17508e+52 average: 8.0165e+49
smoothSolver: Solving for k, Initial residual = 4.4491e-10, Final residual = 4.4491e-10, No Iterations 0
ExecutionTime = 30.43 s ClockTime = 31 s


Time = 64

smoothSolver: Solving for Ux, Initial residual = 0.00072263, Final residual = 0.000301801, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 0.00426629, Final residual = 0.000911303, No Iterations 1000
#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::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8 Foam::fvMatrix<double>::solve() at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? at ??:?
Floating point exception (core dumped)


how did you solve it?

thanks

cfd lover March 27, 2018 03:34

Floating point exception (core dumped)
 
I solved this problem. i read in a forum that this error happens because of a division to zero. and this happend in my simulation because i put an inflation over a surface and the first layer was too small. i changed it and it worked.
You can also get rid of this error by changing the value of k and epsilon if you are using this model for as the turbulence model.


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