CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Diverging Courant number with interFoam case. (https://www.cfd-online.com/Forums/openfoam-pre-processing/140207-diverging-courant-number-interfoam-case.html)

edgardfr August 10, 2014 19:19

Diverging Courant number with interFoam case.
 
Hi,

I have been using OpenFoam to simulate the filling phase in injection molding.
I began with the damBreak tutorial case and then I changed the mesh and the boundary conditions.
I am using as BC:

Inlet:
U--> fixedValue
value uniform (0 0 "velocity")
p--> zeroGradient
alpha--> fixedValue
uniform 1

Walls
U--> fixedValue
uniform (0 0 0)
p--> zeroGradient
alpha --> zeroGradient

Outlet

U--> zeroGradient
p-->fixedValue
uniform 0
alpha--> zeroGradient


My problem is that the Courant number increases with each step until it reaches the order of 10^50 or greater. If I set the adjustTimeStep , I find this: " Increased the timePrecision from 10 to 11 to distinguish between timeNames at time 5.97756e-10" and the solver get stuck increasing the precission of the timestep forever.
I even tried to set the inlet velocity as 0 ( if everything else was Ok, with an U=(0,0,0) the courant number should be 0). But the result was no different.
I also tried laminar, kepsilon and kOmegaSST for the turbulence model. The same problem.

I think it has something to do with the fvSchemes or fvSolution dictionaries but I don't know really how to check those files.

Any thoughts?

fvSolution dictionary.


solvers
{
"alpha.plastic.*"
{
nAlphaCorr 2;
nAlphaSubCycles 1;
cAlpha 1;

MULESCorr yes;
nLimiterIter 3;

solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
}

pcorr
{
solver PCG;
preconditioner DIC;
tolerance 1e-5;
relTol 0;

}

p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0.05;
}

p_rghFinal
{
$p_rgh;
tolerance 5e-9;
relTol 0;
}

"(U|k|epsilon).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
minIter 1;
}
}

PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;


}

relaxationFactors
{
fields
{
}
equations
{
".*" 1;
}
}

fvSchemes dictionary





dtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss;
}

divSchemes
{
default none;

div(rhoPhi,U) Gauss linearUpwind grad(U);
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;

div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p_rgh;
pcorr;
alpha.plastic;
}

jhoepken August 18, 2014 04:41

Have you checked your mesh? What does checkMesh say?

Bernhard August 18, 2014 05:33

Also, show relevant bits of your log file (way before Courant reaches 10^50)

edgardfr August 18, 2014 12:40

Solved
 
It was the mesh indeed, I ran the checkMesh and improved the mesh until it worked.

Thanks

jhoepken August 19, 2014 04:12

Great! If in doubt - check the mesh ;)


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