CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Diverging Courant number with interFoam case.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2014, 19:19
Default Diverging Courant number with interFoam case.
  #1
New Member
 
Edgar Fonseca
Join Date: Aug 2014
Posts: 2
Rep Power: 0
edgardfr is on a distinguished road
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;
}
edgardfr is offline   Reply With Quote

Old   August 18, 2014, 04:41
Default
  #2
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Have you checked your mesh? What does checkMesh say?
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   August 18, 2014, 05:33
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Also, show relevant bits of your log file (way before Courant reaches 10^50)
Bernhard is offline   Reply With Quote

Old   August 18, 2014, 12:40
Default Solved
  #4
New Member
 
Edgar Fonseca
Join Date: Aug 2014
Posts: 2
Rep Power: 0
edgardfr is on a distinguished road
It was the mesh indeed, I ran the checkMesh and improved the mesh until it worked.

Thanks
edgardfr is offline   Reply With Quote

Old   August 19, 2014, 04:12
Default
  #5
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Great! If in doubt - check the mesh
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Reply

Tags
convergence, courant number, fvschemes, fvsolution, openfoam


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
Erroneous Courant Number in FOAM log? cwang5 OpenFOAM Running, Solving & CFD 0 April 29, 2014 22:45
Global Courant number diverging The_Architect FLUENT 3 August 29, 2011 02:22
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


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