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

CFL Condition

Register Blogs Community New Posts Updated Threads Search

Like Tree27Likes
  • 2 Post By Matt Umbel
  • 1 Post By A. Rajani Kumar
  • 2 Post By Bernard Parent
  • 6 Post By PRAVEEN C
  • 6 Post By Bert Laney
  • 4 Post By Jin Li
  • 2 Post By John C. Chien
  • 1 Post By Jin Li
  • 1 Post By John C. Chien
  • 1 Post By sbaffini
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2001, 21:31
Default CFL Condition
  #1
Matt Umbel
Guest
 
Posts: n/a
This question deals with the Courant number and the CFL condition (C<1) that devines the stability of many numerical methods. My question is this, is it true that the strict CFL condition is only for explicit methods for solving highly hyperbolic PDEs, where the numerical domain of influence is in one direction? That direction being forward in time.

I have heard at least one experienced CFD person claim that it is always necessary to have C<1 or C~1 or else the CFL condition is violated, even when dealing with an implict scheme. However, since the numerical domain of influence with an implicit or partially implicit method is not entirely forward, isn't it meaningless to discuss requirement of the CFL condition for an implicit case?

I realize as C gets very large transient accuracy may become an issue. However, is there some other stipulations, other than stability for explicit solutions of hyperbolic PDEs, that are implied when someone discusses the CFL condition?

Thanks

lex78700 and aero_head like this.
  Reply With Quote

Old   January 9, 2001, 22:24
Default Re: CFL Condition
  #2
Sebastien Perron
Guest
 
Posts: n/a
The CFL condition is not an issue when both the convective and diffusive terms are evaluated at time t=t+1 (an implicit scheme).

But there is a stability condition related to the local Reynolds (or Peclet) number when dealing with an equation involving convection and diffusion. Even when your scheme is implicit.
  Reply With Quote

Old   January 9, 2001, 22:39
Default Re: CFL Condition
  #3
A. Rajani Kumar
Guest
 
Posts: n/a
I agree with Sebastien. Also it is not nessasary to have CFL <1 or ~1 for implicit schemes or semi-implicit schemes. Even in a complecated problems people went upto CFL=30. When you are using implicit you have to apply boundary conditions implicitly. If you use boundary conditions explicitly then you may end up with small CFL number.
dokeun likes this.
  Reply With Quote

Old   January 10, 2001, 09:46
Default Re: CFL Condition
  #4
Bernard Parent
Guest
 
Posts: n/a
I disagree with the fact that implicit schemes are not nounded at a CFL of 1. This definitely depends on the problem you are aiming to solve. There has been a discussion a short while ago on this forum about the stability of implicit methods and I think the post by Batten sums it up very well: in the vicinity of non-linear phenomenae, like very strong shockwaves for example, an implicit scheme linearizing the governing equations will exhibit a restraint on the CFL number which will not exceed 1 considerably. This is due to a variation in time of the linearization jacobians from one iteration to the next, as the shock moves along the grid. Unless excessive artificial viscosity is added, which will smear the shock and reduce the non linear behaviour of the discretized system of equations, one is almost always limited to using very low CFL numbers, or nonlinear unstability will result. For flows where weaker non-linear phenomenae are present (like for incompressible flowfields), the scheme will behave according to linear stability theory (in the von-neumann sense, an implicit scheme is unconditionnally stable independantly of the CFL number) permitting the CFL to be raised significantly above 1.
Chong070940103 and Quasar_89 like this.
  Reply With Quote

Old   January 10, 2001, 10:01
Default Re: CFL Condition
  #5
PRAVEEN C
Guest
 
Posts: n/a
The CFL number arises in any situation where wave phenomena are involved. So, it is there when you are trying to solve a hyperbolic pde. Now, numerical schemes for hyperbolic pde's are designed based on either the particle model or the wave model. The flux vector splitting schemes have a particle model as their basis and the flux difference splitting schemes are based on the wave model. The numerical scheme evolves the solution in time based on the information propagated by the particles/waves, from one cell to the adjacent cell. In most of the numerical schemes, information can go only to adjacent cells. For example, the flux in a finite volume method is found based only on the left and right states. The CFL number is basically a condition on this information flow and an explicit numerical scheme has to satisfy this condition for reasons of stability.

Suppose you are interested only in the steady state solution. You can use an implicit method and use whatever CFL you want. The time step and the time iterations that you do there do not have any physical meaning. What you achieve by using an implicit method is to increase the domain of influence from only the adjacent cells to the entire grid. If you are interested in a time accurate solution, then the CFL number restriction again comes but will be less strict than in the explicit case. If you want more time accuracy, then the solution is not to reduce the CFL number but to use a higher order time integration scheme.
  Reply With Quote

Old   January 10, 2001, 11:58
Default Re: CFL Condition
  #6
Bert Laney
Guest
 
Posts: n/a
Your confusion is not uncommon. Most sources do a poor job of explaining the CFL condition, often equating it with linear or nonlinear stability conditions which are, in actuality, distinct.

In situations that involve finite-speed propagation of information, i.e. waves, only part of the solution at one time can influence a given part of the solution at a later time. This part is called the domain-of-dependence. The CFL condition requires that the domain-of-dependence of a numerical method contain the true physical domain-of-dependence. In other words, if physically the flow at a given point is influenced by the flow two seconds ago two meters to the left, then that should also be also be true numerically.

In practice, the CFL condition often amounts to an upper bound on the numerical time step or, equivalently, the CFL number. Many linear or nonlinear stability conditions will also, in practice, take the form of an upper bound on the CFL number. In some cases, especially for simple methods, the bounds derived from the CFL condition and, say, the linear von Neumann stability condition, will be exactly the same. However, in general, the CFL condition may predict completely different bounds on the CFL condition from a linear stability condition, which in turn may differ from the bounds prediction by a nonlinear stability condition.

Implicit methods tend to sidestep the CFL condition by using the ENTIRE numerical domain, which obviously includes the true limited domain-of-dependence (except possibly at far-field boundaries, where the physical domain-of-dependence may lie partly outside of the numerical domain).

In many cases, there is no theoretical way to predict the practical upper bound on CFL number. The code is run at the highest CFL number possible that, through trial and error, does not invoke obvious instabilities. This practical upper bound is likely to be less than that predicted by the CFL condition, sometimes much less.

For more information, I'll immodestly suggest my book, Computational Gasdynamics, Cambridge University Press, which has an entire chapter devoted to the CFL condition, plus a chapter on linear stability and a chapter on nonlinear stability.
  Reply With Quote

Old   January 10, 2001, 17:16
Default Re: CFL Condition
  #7
Jin Li
Guest
 
Posts: n/a
I'll try to give my view on this issue, from quite another angle.

I always feel that CFL condition has been given too much physics that sometimes prevents a more general understanding. In short, CFL criterion is a stability condition for linerized ODEs (not PDEs, I'll explain later). So there is always a unique dimension in the problem, which is often refered as time. (Then there is no need to discuss "hyperbolic PDEs").

When dealing with numerical solution of PDEs, one way is to seperate spatial descritization from temporal descritization. After spatial descritization, one gets ODEs. I don't know there is any general criterion for nonlinear stabilities, so I'll confine myself to linear case. For linear ODEs, there is a spectrum consisting of finite number of eigenvalues. Now, CFL condition is equivalent to confining dt*lamda within a domain on a complex plain (stabilty region), lamda is an eigenvalue. For different time discritization, the stability domain is different. For instance, RK4 (|dt*lamda| < 2.83) has bigger stability domain than AB2. "Spectrual Methods in Fluid Dynamics" of C.Canuto etc., gives a pretty good review of stability domains of different time schemes. In term of eigenvalue, CFL condition can be interpreted as largest eigenvalue scales as U/dx for spatial discretization, U is some kind of 'velocity'.

Now we can see that there is in general no CFL condition for PDEs (continuous case). Because, then eigenvalues are not bounded. So no matter how small dt is, ther is always an lamda such that dt*lamda lies outside the stability domain. In other words, dx can be viewed infinitely small for PDEs.

2nd issue: is implicit scheme absolutely stable, so dt not limited by CFL condition? Yes and no, depending on what kind of instability. There are two kinds of instabilities, one kind is related to time step dt which can be removed by implicit scheme; 2nd kind is independent of dt, which may be introduced in the discritization procedure, like central differencing scheme for cell Reynold number > 2. Sometimes this is refered as spectral pollution. This 2nd type instability cannot be suppressed by using small dt, becuase it is already there for the continuous ODEs before time decretization. Therefore, CFL criterion, can be removed by strictly implicit time scheme, but not all the instabilities. However in numerical practise the issue is often that the implicit operator cannot not be perfectly inversed. So, CFL condition is then not completely removed, instead it is only weakened.

Jin Li

  Reply With Quote

Old   January 11, 2001, 04:05
Default Good book
  #8
Bart Prast
Guest
 
Posts: n/a
I just bought the book (two months ago). I highly recommend it. The only thing I missed was the real gas effects and their implementation in the flux calculations. You give some references (whose solution I used). But the problem with most of the Gasdynamic books is that they stop after stating that all is based on a ideal (perfect) gas.
  Reply With Quote

Old   January 11, 2001, 05:45
Default Re: Good book
  #9
John C. Chien
Guest
 
Posts: n/a
(1). I had put together real gas effect into Navier-Stokes codes over ten years ago. (2). When you are dealing with hypersonic flows, you will need the capability there, if we are talking about the same thing. (3). But who in the world is interested in hypersonic flows? The answer is the government. And the applications? mostly military applications, I think.(except NASA's projects)
  Reply With Quote

Old   January 11, 2001, 07:30
Default Re: Good book
  #10
Bart Prast
Guest
 
Posts: n/a
John, I already noticed that almost 99% of compressible flows related to real gas effects are about hypersonic flows. I myself work in the high pressure natural gas environment. Real gas effects are different here (phase envelopes and such). I was expecting that I would find more information/experience from the turbomachinery side. This is not the case (or they are not sharing anything). Maybe this will trigger something. What is strange that a lot af the capabilities WE want are in TASCflow, but this is a structured code mainly in use for turbomachinery. For all sorts of reasons we have to use unstructured grids. What I want to say is that apparently there is demand to but real gas effects in commercial codes in the turbo area. I would still like to have some good references to books/articles dealing with real gas effects in compressible (transsonic) flows.
  Reply With Quote

Old   January 11, 2001, 15:10
Default Re: CFL Condition
  #11
Bert Laney
Guest
 
Posts: n/a
Your post mainly deals with a certain type of linearized stability analysis, sometimes called matrix or spectral analysis, which MUST be distinguished from the CFL condition.

I know that many texts take the shortcut of deriving bounds on the CFL number using a stability analysis, and then remarking that this bound is the CFL condition, but this only happens to be coincidentally true in that specific example. This type of treatment is admittedly simpler for newcomers, but can lead to longlasting confusion later on.

The term "CFL condition" by definition refers to something very specific, as described in my previous post. If you don't like my explanation, may I gently suggest that you look the definition up somewhere else? You can find the CFL condition stated correctly in several well-known CFD books. I would like to emphasize that if the term "domain of dependence" or something very similar does not appear in the definition, then you are NOT looking at the CFL condition.

There are dozens of different stability criteria and analysis techniques, such as the ones you mention, with various advantages and disadvantages, but these are all in general distinct from the CFL condition.

In short, not every bound on the CFL number results from the CFL condition. Any number of conditions can lead to bounds on the CFL number (which, contrary to the original post, need not be one or close to one, although this limit is common for simple methods).

I don't want to hurt your feelings, but statements such as yours that "there is in general no CFL condition for PDEs" and "the CFL criterion is a stability condition for linearized ODEs" and "the CFL condition has been given too much physics" are simply wrong, and can only be attributed to a lack of exposure to the actual CFL condition which, as I complained about already, is unfortunately very common.
  Reply With Quote

Old   January 11, 2001, 19:31
Default Re: CFL Condition
  #12
John C. Chien
Guest
 
Posts: n/a
(1). As I have said before, 99% of the time, we are getting the wrong solutions. (2). This is because when people looked at the solution and the test data, they saw the difference. This includes the oscillating solutions and diverged solutions. Both are wrong solutions. (3). The time step and the grid size are part of the finite difference (or finite volume) equations. They are not solution yet. (4). It is wrong to say that a solution (oscillating one, or a non-diverged one) is the right solution if the time step and the grid size are right. (5). It is perhaps easier to work out the time step and the grid size backward with a given exact solution. But unfortunately, in most cases, the transient, hyperbolic solution itself is unknown. And only the exact time step and grid size will give the exact solution in time, which is impossible because time step and grid size are finite and approximate to the equations. The solution will be approximate, it doesn't matter whether it is oscillating approximate solution, or random approximate solution, or even diverged approximate solution. (6). To avoid diverged approximate solution, there are stability limitations on the time step and the grid size. To avoid oscillating approximate solutions, there are artificial viscosity terms one can use to reduce the oscillation. Then I would say that, the results we obtained are mostly in the random approximate solution domain. Such solution changes in time, location, and with the person also. (7). CFL condition or number is simply a warning that if you don't want to get the diverged approximate solution, you'd better do something about the time step and the grid size.
zino and alundilong like this.
  Reply With Quote

Old   January 12, 2001, 05:15
Default Re: CFL Condition
  #13
Jin Li
Guest
 
Posts: n/a
Bert Laney,

(1) The common definition of CFL condition is C < O(1), where Courant number C=dt*U/dx, dt is the time step and dx is spatial grid size. That's also the one I use. It would be interesting to see your version that presumbly bears the phrase 'domain of dependence'. But please try to seperate 'physical explanation' from definition. The latter should be simple, concise and general.

(2) The primary question is whether CFL condition is considered as a criterion for numerical instability associated with time advancing. If not, then I think I got into a wrong discussion. If yes, next question is whether CFL condition is for linear stability or nonlinear stability. As you have correctly pointed out, many factors (other than linear criterion) may result in bounds to Courant number. But I rather view them as bounds to time step. My view is that CFL condition is for linear stability.

(3) For linear stability, eigenvalue method is a much more general tool. CFL condition can be expressed in terms of eigenvalue. And eigenvalue method is not limited to FD/FE type descritization. For instance, when using soetral method, there is no dx explicitly. But there is still stability criterion for spatial resolution expressed in terms of eigenvalue. I fail to see why this way would be a 'shortcut'. It's obvious to me this is a more general concept than 'domain of dependence' if the issue is linear stability

(4) I said "there is in general no CFL condition for PDEs". What I mean is that CFL condition explicitly involves dx, which is product of spatial descritization. Therefore, CFL condition is actually not for 'continuous' PDEs, it is for 'descritized' PDEs or ODEs. Since discretized PDEs are ODEs. Like to hear reason why it is wrong.

I noticed our difference in viewpoints on CFL condition. I wouldn't say that emphasis on 'domain of dependence' is wrong but I rather view eigenvalue analysis as a more general method and a more practical tool in the context of numerical stability. In numerical practice, often it is not easy to determine 'domain of dependence' and I never have the need to do so. From my own simulation experience I find eigenvalue concept is a powerful tool to deal with linear stabilities. For instance we can use eigenvalue concept to see when CFL type condition is relevant. Linear instabilities can be viewed as spurious eigenvalues with positive real part. These spurious eigenvalues are either introduced by spatial discretization or by temporal discretization. CFL type conditions deals with those instabilities introduced by temporal discretization, which is related to time step dt.

alundilong likes this.
  Reply With Quote

Old   January 12, 2001, 10:42
Default Re: CFL Condition
  #14
ken elms
Guest
 
Posts: n/a
CFL number (Courant-Friedrich-Levy). For discretized transport problems, the CFL number determines how many mesh cells, a fluid element passes during a timestep. Or rather, the fraction of a timestep to pass one cell.

For compressible flow, the definition is different. Here, the CFL number determines how many cells are passed by a propagating pertubation. Hence, the wave-speed, i.e. fluid speed plus the sound speed, is employed.

For explicit timestepping schemes, such as Runge-Kutta, the CFL number must be less than the stability limit for the actual scheme to converge. For implicit and semi-implicit schemes, the CFL limit does not constitute a stability limit.

On the other hand, the range of parameters in which these schemes converge may often be characterized by the CFL number.

  Reply With Quote

Old   January 12, 2001, 14:34
Default Never find the right solution.
  #15
John C. Chien
Guest
 
Posts: n/a
(1). We know that finite difference equation (or finite volume eqaution) derived from the governing equation is just an approximation. (2). So, the solution to the finite difference approximate equation is not the exact solution. And the coarse mesh used definitely will provide only approximate solution. (3). Because of this approximate nature of the solution, we have to make sure that as we reduce the mesh size systematically, we can show that the approximate solution will approach the converged solution, which we hope will represent the true solution. This is so-called the "mesh independent" solution. (4). Now, with the CFL condition, it can be written as C=delta(t)*U/delta(x). This in turn provide the condition on delta(t)=C*delta(x)/U, where delta(x) is the mesh size, and delta(t) is the time step. (5). Assuming that U is always finite, the time step delta(t) is proportional to the mesh size delta(x). As we refine the mesh size delta(x), the time step delta(t) is also reduced. (6). When the computer gets more powerful, the memory also becomes larger. So, we can refine the mesh further. This also reduces the time step further. Now it takes more time steps to cover the same period of time (or to reach a steady-state solution, if one happens to be looking for it). (7). Using this simple logic, in our pursue of the real physics, as we reduce the mesh size to zero (or very very small), the time step will also approach zero linearly in the same fashion. With the time step goes to zero, the number of time steps needed to reach a true solution goes to infinity. (8). So, it is the dead end. This is a simple reason why almost all of the solutions computed were wrong (not the true solution). Without the true solution, where is the physics of the problem? (9). Are we talking about the approximate physics of the problem, from the approximate solution? (10). So, obviously, no one is going to reduce the mesh size to zero, or the time step to zero, because no one can afford it. And as a result, we will be talking about the random approximate solution and its random approximate physics, all the time. (11). In CFD, there are models and approximate solutions, there is no physics. (Well, you might have started with the physics, but somewhere along the line, it got changed.) (12). By the way, in fact, we are dealing with only algebraic equations with a very large degree of freedom. And to keep the approximate solution within reach, CFL condition was invented. (13). The variable in the CFL condition is delta(x), which is arbitrary. How do you decide what delta(x) to take in your next problem? It is a random number, and the solution to the problem will be random approximate solution.
amolrajan likes this.
  Reply With Quote

Old   June 30, 2020, 03:02
Default CFL for coupled solver
  #16
New Member
 
Gaurav Chhaparwal
Join Date: Mar 2018
Posts: 3
Rep Power: 8
gchhaperwal is on a distinguished road
What CFL number should be used for coupled solver with second order implicit scheme?

Some says it should be <1 so that one cell should be covered in one time step.

But in coupled solver, it starts from 200 value and many reference suggest that it should be set as high as possible, which can be in million.

Please suggest, I am working on vortex shedding in a confined 2 dimesional duct at Reynolds number 3000-15000 with constant heat flux on one side(nearest to cylinder).
gchhaperwal is offline   Reply With Quote

Old   June 30, 2020, 06:21
Default
  #17
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I guess you are using Fluent, and making confusion between the CFL parameter prsented in the GUI and the time step used to advance the solution in time. You shoul carefully read the manual to understand what is what. However, that CFL in Fluent can be as high as allowed by the computation
gchhaperwal likes this.
sbaffini is offline   Reply With Quote

Old   June 30, 2020, 06:31
Default
  #18
New Member
 
Gaurav Chhaparwal
Join Date: Mar 2018
Posts: 3
Rep Power: 8
gchhaperwal is on a distinguished road
Thank you for your reply!! Yes I am using Fluent with implicit scheme.

I was brainstorming about CFL since morning and reached to this result:

CFL and Courant no. Both are different thing. CFL is a condition which must be followed with explicit scheme but not necessarily with implicit scheme.
While courant no should be as low as possible in both scheme. However, implicit scheme can handle relatively larger time step.

In conclusion, with explicit we are bound to a required time step which corresponds to CFL<1. But in implicit, we have little relaxation, still for accuracy, time step should not be very large. Stability and accuracy are different. Larger time step leads to less accurate results.

For example, in explicit if we must take time step 0.0001 sec, then in implicit we can take little higher time step like, 0.0005 or 0.001 whichever has less effect on solution within 2%.
Please correct me if I am wrong.
gchhaperwal is offline   Reply With Quote

Old   June 30, 2020, 07:04
Default
  #19
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
CFL and Courant number are exactly the same concept and you can use the two terms in the same way (CFL is Courant, Friedrichs, Lewy). Still, this concept can arise in a moltitude of cases (after all, it is just a non-dimensional number involving space, time and velocity).

For explicit schemes, it is like you wrote, CFL<1 (or some other O(1) constant) is required. For implicit schemes it is also true that, despite the greater stability, accuracy demands to be still within some O(1) range. However, unconditional stability of implicit schemes typically holds (or, however, can be proven) for linear problems only. For non linear ones, like the NS equations, this is not anymore true in general and you can't expect to use arbitrarily higher CFL numbers.

In the very specific case of Fluent with unsteady coupled algorithm, the CFL you see is actually linked to the way the algorithm is written. In practice, it relates to the pseudo-time advancement (https://www.afs.enea.it/project/nept...th/node381.htm), as opposed to the true time advancement. So, in this case, you can see the CFL as a sort of implicit Under Relaxation Factor (as opposed to the explicit one), which goes to 1 for CFL going to infinity and to 0 for CFL going to 0 (or sort of, I should do the math because I don't remember). In this case, what controls your accuracy is the physical time step you have set up.
gchhaperwal likes this.
sbaffini is offline   Reply With Quote

Old   June 30, 2020, 08:20
Default
  #20
New Member
 
Gaurav Chhaparwal
Join Date: Mar 2018
Posts: 3
Rep Power: 8
gchhaperwal is on a distinguished road
Thank you..

I think with this discussion, I have reached to conclusion.
gchhaperwal is offline   Reply With Quote

Reply


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
CFL condition: can a mass balance problem arise if violated? bzz77 Main CFD Forum 3 August 24, 2011 15:12
Is CFL condition irrelevant for incompressible flow? violet FLUENT 0 November 5, 2009 17:33
CFL condition for higher order schemes Shyam Main CFD Forum 2 February 14, 2008 14:24
CFL condition for implicit CD schemes turb Main CFD Forum 4 August 16, 2005 12:56
CFL condition Sergei Main CFD Forum 2 October 13, 2004 15:38


All times are GMT -4. The time now is 04:09.