# CFL condition for variable coefficients

I understand that the constant in the Courant-Friedrichs-Lewy condition is defined as $\mathrm{CFL} = \frac{u \Delta t}{\Delta x}$, where $u$ is the principal coefficient. I came across this post: Estimating the Courant number ..., which basically suggests that the CFL number can be used to decide on the time step size to ensure stability and convergence. I have seen mentioned in many papers that the results were obtained with for instance $\mathrm{CFL} = 0.5$, which would suggest that the CFL is a constant.

But how is the CFL number defined if the coefficient $u$ changes with time? I am particularly interested in the solution of hyperbolic inviscid Euler equations, where $u = u$, $u+a$ or $u-a$, where the velocity $u$ varies with time and $a$ is the speed of sound.

• The CFL number in your example is defined using the maximum velocity over your domain grid. If your velocity changes with time, then you will have to calculate a new CFL bound at every time step. Aug 28 '15 at 13:35
• Also, slight clarification on a point that you might have wrong in your mind: the CFL condition does not ensure stability and convergence. Rather, the CFL condition is a necessary condition for stability/convergence. It's a subtle distinction, but it's quite important. Aug 28 '15 at 13:49
• Hi, thank you for the clarifications. So am I right that in the case of hyperbolic equations, the maximum of u , |u|+a, and |u|-a is selected as the velocity used to calculate CFL at each time step? Aug 28 '15 at 13:58
• You're on the right track... Look at the bound for $\Delta t_\mathrm{Hyperbolic}$ in @gnzlbg's answer to the question linked in your original post. Aug 28 '15 at 14:12
• ok, Thanks. On a slightly different note, I am looking at a wave propagation case, where the speed of sound is sqrt(k/rho) , where rho changes with time also, and k = bulk modulus. In other words my speed of sound also changes. The changes in rho are minimal though, and I wonder if I should just use the initial density in that case? Aug 28 '15 at 14:19

$\nu = u(x,t) \frac{\Delta t}{\Delta x}$.
The velocity may vary in time and space and the grid may be non-uniform (in $x$ and/or $t$). So the CFL number can be different at each point in time and space. A necessary condition for convergence of a consistent method is that the CFL condition be satisfied at each point in time and space. Therefore, to choose the timestep one must enforce a bound on the maximum CFL number (maximum in space).