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/)
-   -   How can deltaT exceed the limitation of courant? (http://www.cfd-online.com/Forums/openfoam-solving/65814-how-can-deltat-exceed-limitation-courant.html)

yuhai June 26, 2009 13:54

How can deltaT exceed the limitation of courant?
 
Hi, All foamers,
In OF Users Guide, the selection of deltaT is depend on courant.
I follows this rule, and set my deltaT to under 0.00005, this works fine on turbDyMFoam.

but there seems no such limit in Fluent, in Fluent, I used the same mesh, but I can set "time step size" to 0.005, and have no problem in getting a reasonable solution. And this can save a lot of computation effort.

I wonder whether there will be any possible method to reduce the number of time points needed in OpenFOAM?

And Thanks!

lakeat June 27, 2009 04:51

Quote:

but there seems no such limit in Fluent,
No, I think all CFD codes works under the same rule, CFL condition cannot be broken, or the results would be unphysical.

Keep Courant number below 1, or even 0.1.

yuhai June 27, 2009 08:35

Quote:

Originally Posted by lakeat (Post 220677)
No, I think all CFD codes works under the same rule, CFL condition cannot be broken, or the results would be unphysical.

Keep Courant number below 1, or even 0.1.

User's GUide Chapter 8.9.2:
Time Step Size: The time step size is the magnitude of http://venus.imp.mx/hilario/SuperCom...ml/img1287.gif. Since the FLUENT formulation is fully implicit, there is no stability criterion that needs to be met in determining http://venus.imp.mx/hilario/SuperCom...ml/img1288.gif. However, to model transient phenomena properly, it is necessary to set http://venus.imp.mx/hilario/SuperCom...ml/img1289.gif at least one order of magnitude smaller than the smallest time constant in the system being modeled. A good way to judge the choice of http://venus.imp.mx/hilario/SuperCom...ml/img1290.gif is to observe the number of iterations FLUENT needs to converge at each time step. The ideal number of iterations per time step is 10-20. If FLUENT needs substantially more, the time step is too large. If FLUENT needs only a few iterations per time step, http://venus.imp.mx/hilario/SuperCom...ml/img1291.gif may be increased. Frequently a time-dependent problem has a very fast ``startup'' transient that decays rapidly. It is thus often wise to choose a conservatively small http://venus.imp.mx/hilario/SuperCom...ml/img1292.gif for the first 5-10 time steps. http://venus.imp.mx/hilario/SuperCom...ml/img1293.gif may then be gradually increased as the calculation proceeds. For time-periodic calculations, you should choose the time step based on the time scale of the periodicity. For a rotor/stator model, for example, you might want 20 time steps between each blade passing. For vortex shedding, you might want 20 steps per period.

lakeat June 27, 2009 09:22

There are 2 reasons for choosing a small time step:
1. For stability;
2. For accuracy;

Do use a small time step, I mean small enough, to get a "good" result.
A good test is to compare deltat1 with deltat2, and see if the results' differences are small enough.
This is especially for transient and turbulent problems, about which we care not only to the vortex shedding cycle, but also ACCURACY.

A famous example is cylinder flow, where St is very easy to be right, but Cd is not.

yuhai June 27, 2009 12:00

As I have said, the result of Fluent with deltaT 0,005 could already give a good fit with experiment result.
Well, for OpenFOAM, stability needs 0.0001, and a good result needs 0,00005.

My question should be expressed like, what could be the possible reason that makes the two solvers perform so differently?
50 to 100 times deltaT gap is far more a question of accuracy.

alberto June 28, 2009 02:31

Quote:

Originally Posted by yuhai (Post 220696)
As I have said, the result of Fluent with deltaT 0,005 could already give a good fit with experiment result.
Well, for OpenFOAM, stability needs 0.0001, and a good result needs 0,00005.

My question should be expressed like, what could be the possible reason that makes the two solvers perform so differently?
50 to 100 times deltaT gap is far more a question of accuracy.

You should provide some more information to obtain a specific answer on your case. In particular you should tell us what are the numerical schemes you are using for spatial and temporal discretization in OpenFOAM and FLUENT (you might want to post fvScheme and fvSolution for completeness).

Best,

yuhai June 28, 2009 08:10

Thanks for the hints, Alberto.
---------------------------------------------
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,omega) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
laplacian(DomegaEff,omega) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(rAU,p) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(U) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
--------------------------------------------------------
solvers
{

p PCG
{
preconditioner
{
type DILU;
}
minIter 0;
maxIter 10000;
tolerance 1e-10;
relTol 0;
};
pFinal PCG
{
preconditioner
{
type DILU;
}
minIter 0;
maxIter 10000;
tolerance 1e-10;
relTol 0;
};
U BiCGStab
{
preconditioner
{
type DILU;
}
minIter 0;
maxIter 10000;
tolerance 1e-10;
relTol 0;
};
k BiCGStab
{
preconditioner
{
type DILU;
}
tolerance 1e-10;
relTol 0;
minIter 0;
maxIter 10000;
};
epsilon BiCGStab
{
preconditioner
{
type DILU;
}
tolerance 1e-10;
relTol 0;
minIter 0;
maxIter 10000;
};
omega BiCGStab
{
preconditioner
{
type DILU;
}
tolerance 1e-10;
relTol 0;
minIter 0;
maxIter 10000;
};
R BiCGStab
{
preconditioner
{
type DILU;
}
tolerance 1e-10;
relTol 0;
minIter 0;
maxIter 10000;
};
nuTilda BiCGStab
{
preconditioner
{
type DILU;
}
tolerance 1e-10;
relTol 0;
minIter 0;
maxIter 10000;
};
}
PISO
{
nCorrectors 4;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
-----------------------------------------------
in OpenFOAM turbDyMFOAM, the max Co reports to be 0.15 to 0.3 (depends on the rotation).

Fluent:
Unsteady Formulation: 1st order implicit
Time: Unsteady
Formulation: implicit
Discretization: second Order upwind





.................................................. ...............................
is there any other need to be posted?



greet

alberto June 28, 2009 14:13

Hi,

the schemes are pretty much standard. You might try to see what happens switching to "upwind" for the divergence schemes, but this will lower the order of accuracy.

Might the difference be in the algorithm or approach (what do you use in FLUENT?) to represent the rotation?

Best,

yuhai June 28, 2009 20:18

Quote:

Originally Posted by alberto (Post 220727)
Hi,

the schemes are pretty much standard. You might try to see what happens switching to "upwind" for the divergence schemes, but this will lower the order of accuracy.

Might the difference be in the algorithm or approach (what do you use in FLUENT?) to represent the rotation?

Best,

thanks, Alberto
I have tried upwind, but I don't think that can let OpenFOAM exceed the maxCo=1, in my case, 0.00005 means maxCo about 0.15-0.3, and the setting 0.005 in fluent means maxCo more than 15...........if I could calc in this way.
In Fluent, It is Sliding Mesh Model.

greets

alberto June 28, 2009 21:26

Hi,

I think the condition you notice on your time step in OpenFOAM due to some other reason than the time integration scheme, to which, strictly speaking, the Courant number refers. Using Euler's scheme you should not have the limitation. This, however, does not mean that you do not have limitations on the time step due to other factors in the algorithm (think for example to a non-linear source term whose value might become very large: it might compromise the stability if the time step becomes too big in an iterative solver). I would try to understand what are the differences in the algorithms used in the two codes, to explain why you see such a difference.

Best,

yuhai June 30, 2009 08:17

Thanks Alberto. Pls let me know if you have any new ideas.


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