CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Courant Number

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 5 Post By ghorrocks

Reply
 
LinkBack Thread Tools Display Modes
Old   July 2, 2003, 11:29
Default Courant Number
  #1
Aaron Latty
Guest
 
Posts: n/a
Hello all:

Is there a way in CFX (using v5.6) to specify a value for the courant number so that the solver will adjust the timestep accordingly to maintain the value?

Thanks,

Aaron
  Reply With Quote

Old   July 2, 2003, 16:47
Default Re: Courant Number
  #2
Robin
Guest
 
Posts: n/a
CFX-5 is fully implicit, why would you want to do this?

Robin
  Reply With Quote

Old   July 2, 2003, 17:36
Default Re: Courant Number
  #3
Jan Rusås
Guest
 
Posts: n/a
Robin, Could you please explain your comment a bit more detailed. I did beleive that when doing a transient calculation that the Courant number was important (less or equal to 1 or 5 depending on time scheme) Regards Jan
  Reply With Quote

Old   July 3, 2003, 06:02
Default Re: Courant Number
  #4
Aaron Latty
Guest
 
Posts: n/a
Even though a scheme might be implicit, if you are doing a transient calculation, the courant number will be important within a given time step. Otherwise, you won't capture the transient behaviour between the timesteps.

Aaron

  Reply With Quote

Old   July 3, 2003, 09:33
Default Re: Courant Number
  #5
Robin
Guest
 
Posts: n/a
This is true of explicit methods, but is not the case for a fully implicit code. Since CFX-5 solves the mass and momentum equations in a coupled-implicit manor, you are not restricted by the Courant Number.

Rather, you need to ensure that the equations are converging within your timestep. You should choose a timestep that is small enough to converge within 3 to 5 coefficient loops in order to accurately resolve the transient physics.

Robin

  Reply With Quote

Old   July 4, 2003, 00:06
Default Re: Courant Number
  #6
Neale
Guest
 
Posts: n/a
Yes, but, as Robin pointed out already in the other post, since CFX-5 is fully implicit, if you take a timestep small enough and converge the solution within a timestep (i.e. global balances and RMS residuals are low enought that you have "solved" the equations) then you do not need to worry about the Courant number.

Furthermore, if the convergence condition within a timestep is achieved then it basically means that you are taking a timestep which is adequately resolving the transient physics. If your timestep is too big then you will not converge within a timestep. Given it's "linear" scheme nature, the Courant number on it's own can never be an adequate measure of how well you are solving an inherently non-linear problem.

Neale.
  Reply With Quote

Old   July 4, 2003, 03:32
Default Re: Courant Number
  #7
Jan Rusås
Guest
 
Posts: n/a
Thanks for your reply Robin, I am happy with your answer, cause normally I just calculate the Courant number just to get an idea about the size of if. It is other parameters that determine the size of the time step. I guess the confusion comes from, as I understand it, that the Courant number rather is a stability criteria more than a measure for the transient behaviour of the flow.
  Reply With Quote

Old   July 10, 2003, 02:05
Default what is Courant Number
  #8
henry
Guest
 
Posts: n/a
What exactly is this courant number, can someone throw some light in this regard?

thanks henry
  Reply With Quote

Old   August 15, 2012, 11:41
Default
  #9
New Member
 
Pharg Mandadapu
Join Date: Jul 2011
Posts: 16
Rep Power: 6
pharg_yrartibra is on a distinguished road
Quote:
Originally Posted by Robin View Post
CFX-5 is fully implicit, why would you want to do this?

Robin
What does it mean that the solver is implicit? Does implicit mean the same thing here as in implicit Runge–Kutta methods?

If so, how does this implicit method work? All I know is that backward (or implicit) Euler for example, tends to reverse the energy development of a signal that is being transported (since it's working backwards) if ideally the energy development would be zero. So for example if normal Euler is unstable and will make the energy of the signal exponentially increase, as in an UPWIND scheme with a Courant number > 1, backward Euler would reverse the energy development and instread exponentially decrease it, and tend to low-pass filter the signal that is transported. But for a Courant number < 1, UPWIND is stable and will low-pass filter the signal, thus making the energy exponentially decrease, so wouldn't an implicit method in this case make the energy exponentially increase and thus be unstable?
pharg_yrartibra is offline   Reply With Quote

Old   August 15, 2012, 18:44
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,830
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Explicit methods take gradients at the current time step and extraplote that forward in time to get the next time step. So the fundamental solution procedure is algebraic. This approach is limited to a Courant number (of CFL number if compressible) of 1.0.

Implicit methods solve the next time step as a set of simultaneous equations, with gradients calculated back to the previous time step. This means a matrix solution is required, but also means the Courant number/CFL number limit does not apply.

If you want a more detailed explanation than that I will refer you to any reasonable CFD textbook. The difference between implicit and explicit methods is basic numerical methods.
ghorrocks is offline   Reply With Quote

Old   November 11, 2012, 19:39
Default
  #11
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 141
Rep Power: 4
Crank-Shaft is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Explicit methods take gradients at the current time step and extraplote that forward in time to get the next time step. So the fundamental solution procedure is algebraic. This approach is limited to a Courant number (of CFL number if compressible) of 1.0.

Implicit methods solve the next time step as a set of simultaneous equations, with gradients calculated back to the previous time step. This means a matrix solution is required, but also means the Courant number/CFL number limit does not apply.

If you want a more detailed explanation than that I will refer you to any reasonable CFD textbook. The difference between implicit and explicit methods is basic numerical methods.
Great reply Ghorrocks as always mate.

I needed to know whether the comment regarding the selection of appropriate time steps to allow convergence within 3-5 iterations is verified and widely accepted.

I have been trying to analyse flow over a ramp geometry which induces separation and would like to capture any resulting vortex shedding. Currently using transient simulation, pressure-based, SIMPLE pressure-velocity correction algorithm with all transport and turbulence scalar equations set to second-order upwind.

I started to use the time-steps which allows the stream-wise, free-stream velocity to traverse the smallest cell size in step. This resulted in 0.002s steps and I have iterations at 40 max/timestep. I did this as a maximal value and there are many time-steps which do not really converge even after 40 iterations.

Even after very long runs of 100 time-steps, the residuals for all the transport equations and scalars are all oscillating at a constant frequency. Is there a way to identify what I could be doing wrong here? Should I alter the time-step size to follow the 3-5 iteration convergence guideline?
Crank-Shaft is offline   Reply With Quote

Old   November 11, 2012, 19:51
Default
  #12
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,830
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Quote:
I needed to know whether the comment regarding the selection of appropriate time steps to allow convergence within 3-5 iterations is verified and widely accepted.
It is the recommended approach in the CFX documentation. I have been preaching it for many years and it has never let me down in my modelling using it. In a very small number of simulations I have had to increase it to 5-10 coeff loops per time step but that is very rare.

Quote:
Currently using transient simulation, pressure-based, SIMPLE pressure-velocity correction algorithm
I presume this work is not using CFX then. CFX does not use SIMPLE.

Quote:
Even after very long runs of 100 time-steps, the residuals for all the transport equations and scalars are all oscillating at a constant frequency. Is there a way to identify what I could be doing wrong here?
I suspect your time step is too big for reliable convergence.

Quote:
Should I alter the time-step size to follow the 3-5 iteration convergence guideline?
Of course, I would not be saying if I thought otherwise

You will probably find 3-5 coeff loops approach give you much smaller time steps, but very fast and reliable convegence in each time step. This is faster, more accurate and more reliable than larger time steps with longer convergence per time step.

If you do not believe me then do a simple benchmark simulation where you play with the number of coeff loops and look at the final result. Best do this on a benchmark where you have good reliable benchmark data to compare to - maybe vortex shedding off a cylinder or something like that. Then you can explore this for yourself and I suspect you will too will believe.
ghorrocks is offline   Reply With Quote

Old   November 11, 2012, 22:18
Default
  #13
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 141
Rep Power: 4
Crank-Shaft is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
It is the recommended approach in the CFX documentation. I have been preaching it for many years and it has never let me down in my modelling using it. In a very small number of simulations I have had to increase it to 5-10 coeff loops per time step but that is very rare.



I presume this work is not using CFX then. CFX does not use SIMPLE.



I suspect your time step is too big for reliable convergence.



Of course, I would not be saying if I thought otherwise

You will probably find 3-5 coeff loops approach give you much smaller time steps, but very fast and reliable convegence in each time step. This is faster, more accurate and more reliable than larger time steps with longer convergence per time step.

If you do not believe me then do a simple benchmark simulation where you play with the number of coeff loops and look at the final result. Best do this on a benchmark where you have good reliable benchmark data to compare to - maybe vortex shedding off a cylinder or something like that. Then you can explore this for yourself and I suspect you will too will believe.
I have used a Fluent Solver for this and I do my post-processing in CFX post. I have found this to be much more flexible and gave me better control over all of the simulations settings.

I will basically need to perform convergence/sensitivity analysis for this rather than blindly using the time-step suggested by the CFL criteria of 1 (as per my previous attempt). The only problem I imagine is the long lead times involved in trying to identify an appropriate time-step by trial and error. Do you use a general guideline or ratio that is suitable for the refinement or coarsening of the time-steps in such a case, when trying to identify suitable time-steps?

I currently don't have access to multiple computers or a cluster so I am stuck with a single workstation so the turnaround for something like this is important. I currently have 4 levels of mesh refinement which relate to each of the steps in my grid convergence and independence study. Should I include all of these in my attempts to find the appropriate time-steps or choose the one deemed 'fine enough'? I am not too sure about this however, I imagine we should use a grid which would completely isolate any convergence issues to the time-step changes rather than due to lack of resolution/discretisation.

Comments are greatly appreciated everyone.
Crank-Shaft is offline   Reply With Quote

Old   November 11, 2012, 22:54
Default
  #14
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,830
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
If you are using Fluent then my comments are not applicable. SIMPLE is very different to the coupled solver in CFX and requires a different approach. You might get similar behaviour using the coupled solver in Fluent but I cannot guarantee it.

But your comment is totally right - blindly applying Courant number =1 is not useful. Best to do a sensitivity analysis and determine for yourself what time step it needs. Between mesh sizes you can use Curant number to give you a starting point but it is preferable to repeat the sensitivyt analysis.

For general comments on CFD accuracy see "Computational Fluid Mechanics" by Roache, or the excellent summary which has become the Journal of Fluids Engineering Editorial policy: http://journaltool.asme.org/Template...umAccuracy.pdf
ghorrocks is offline   Reply With Quote

Old   November 11, 2012, 23:36
Default
  #15
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 141
Rep Power: 4
Crank-Shaft is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
If you are using Fluent then my comments are not applicable. SIMPLE is very different to the coupled solver in CFX and requires a different approach. You might get similar behaviour using the coupled solver in Fluent but I cannot guarantee it.

But your comment is totally right - blindly applying Courant number =1 is not useful. Best to do a sensitivity analysis and determine for yourself what time step it needs. Between mesh sizes you can use Curant number to give you a starting point but it is preferable to repeat the sensitivyt analysis.

For general comments on CFD accuracy see "Computational Fluid Mechanics" by Roache, or the excellent summary which has become the Journal of Fluids Engineering Editorial policy: http://journaltool.asme.org/Template...umAccuracy.pdf
Well since I am still in the process of learning about CFD I might even try out the coupled solver in Fluent and check whether a similar strategy yields quicker convergence. I imagine each iteration of the coupled solver will take a significantly longer time however, if the time steps are adjusted to converge in <10 iterations I will be a happy man.

The prospect of having to repeat the time-step sensitivity study for each of the meshes is quite daunting though, as previously mentioned. Ultimately the objective of the grid-independence study was to settle on a mesh to use for the simulation so that reliable results could be quoted. I may do this only if the convergent time-step is quite similar to the initial value used with CFL=1, otherwise I will have study the finest mesh and use it's time-step for the others.

I already read through the Journal's policy, guidelines and the paper by Roache. Most of his work is very fundamental and given his reputation, they are definitely important to consider however, I am just concerned whether or not it is worth trying to achieve this level of verification given the time limitations of my undergraduate research topic?
Crank-Shaft is offline   Reply With Quote

Old   November 12, 2012, 05:54
Default
  #16
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,830
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
The CFX coupled solver should solve to a defined convergence level much faster than the SIMPLE based methods, but each coeff loop will take much longer. In the end you generally get steady state flows converging considerably faster with a coupled solver, but results are variable with transient simulations - some are faster and some are slower.

Yes, the time step sensitivity study for each mesh level is daunting, that's why in CFX you use 3-5 coeff loops per iteration and then the solver automatically takes care of it. Very nice, removes a degree of freedom, so to speak. But yes, if you take the fine mesh time step and apply that to everything you will probably be OK - just watch out for round-off errors causing convergence difficulties.

If you use even a few of Roache/Celik's techniques to validate your code that would be impressive for an undergraduate project. The Richardson extrapolation technique is a very nice one which is simple in concept and powerful - check it out.
ghorrocks is offline   Reply With Quote

Old   November 12, 2012, 19:27
Smile
  #17
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 141
Rep Power: 4
Crank-Shaft is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
The CFX coupled solver should solve to a defined convergence level much faster than the SIMPLE based methods, but each coeff loop will take much longer. In the end you generally get steady state flows converging considerably faster with a coupled solver, but results are variable with transient simulations - some are faster and some are slower.

Yes, the time step sensitivity study for each mesh level is daunting, that's why in CFX you use 3-5 coeff loops per iteration and then the solver automatically takes care of it. Very nice, removes a degree of freedom, so to speak. But yes, if you take the fine mesh time step and apply that to everything you will probably be OK - just watch out for round-off errors causing convergence difficulties.

If you use even a few of Roache/Celik's techniques to validate your code that would be impressive for an undergraduate project. The Richardson extrapolation technique is a very nice one which is simple in concept and powerful - check it out.
I definitely want to use such techniques to add more credibility and quantify the uncertainty in my work. Hopefully I can still manage to achieve the overall objectives and make significant conclusions on my study without getting too distracted by it all.

Last night, I used another mesh which is slightly coarser than the previous with ~1.3M cells. This used the same time-step of 0.002 s and this finally converged within 4-5 iterations on each time-step. Another interesting technique I have been using is that the steady state solver was used to initialise the URANS simulations. Hence, the URANS was initiated after 1000 steady-state iterations.

I am happy with the progress so far and now I will seriously explore my validation options. Thanks for all your guidance everyone.
__________________
--
Mechanical Engineering
Sydney, Australia


Crank-Shaft is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.cfd-online.com/Forums/cfx/19747-courant-number.html
Posted By For Type Date
Courant Number Fluent-Wiki Finder This thread Refback August 3, 2013 22:23

Similar Threads
Thread Thread Starter Forum Replies Last Post
IcoFoam unstability, courant number gets large! vivien OpenFOAM 10 July 23, 2013 12:48
Courant number fireman FLUENT 4 October 4, 2010 12:54
LES near wall model & courant number kasim CFX 5 March 16, 2008 19:23
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Courant number calculation - unsteady flow Kuba FLUENT 0 November 8, 2005 23:44


All times are GMT -4. The time now is 08:20.