COURANT STABILIZATION AS CONVERGENCE CRITERIA

Personal, Science, Technical — acosta @ 5:53 pm

Most of you know that I’m currently doing a significant amount of computational fluid dynamics work. If you’re at all interested in you can of course read my personal page which roughly describes my work here. One of the types of simulations I do is a finite element system perturbation, where an internal field or fields are set, and then the system is turned “on”. This can be as simple as a stream of nitrogen or a pressure sink being introduced, or very complex sets of different perturbations applied concurrently. The problem is, how do I know when to kill the simulation when the I’ve reached a steady state and the solution has converged? Often these simulations take weeks or (yes, I’m not kidding) months.

The solution to this problem lies in the Courant-Freidrichs-Lewy condition, or more simply, the Courant number. Although the formal definition of this quantity differs depending on the given problem, it is defined generally as a relationship of the time step of the simulation and the velocity of the fluid over the spatial mesh size.

Co=\boldsymbol{\nu}\Delta t/\Delta x^2

One finds that doubling the spatial resolution of the simulation (or, halving the mesh size) will require four times the time resolution. Depending on the order of the simulation space, this can mean a huge increase in the computational complexity of the problem. So what does this mean for me? When the simulation is actually at a steady state and has converged, the Courant number will reach a stable value, as the velocity vectors will have stabilized.

What I do is automatically decrease the time step if the Courant number goes over about 0.8. As a general rule the solution is deemed unstable (and is computational very inefficient) if the Courant number exceeds 1.0. So, as soon as I see this number stabilizing on its own, I know I have achieved a reasonably steady-state solution. So here’s a plot.

courant number stabilization-ps

What’s cool about this, other than knowing that simulating past 2500 time steps in this particular case is pointless, is that it also gives me some sort of idea as to at what time steps (or, at what times) major changes in stability of the case occur. So, in the example above, the first major perturbation turns out to be the time that one of the fluids I introduce into the case impacts a surface. I’m sure no one cares about any of this. It’s still nice and useful for me.

Cheers.

2 Comments »

  1. keep up the good work, anthony

    Comment by shollen — 12/14/2006 @ 8:51 am
  2. what it looks like when you have a really small-element mesh (lots of elements).

    Mean and max Courant Numbers = 0.00126733 0.803808
    deltaT = 5.12821e-07
    Time = 0.0140005

    ICCG: Solving for pd, Initial residual = 0.485075, Final residual = 9.34447e-11, No Iterations 457
    ICCG: Solving for pd, Initial residual = 0.0982662, Final residual = 9.98074e-11, No Iterations 388
    ICCG: Solving for pd, Initial residual = 0.0415916, Final residual = 9.5289e-11, No Iterations 429
    ICCG: Solving for pd, Initial residual = 0.0143274, Final residual = 9.93149e-11, No Iterations 368
    ICCG: Solving for pd, Initial residual = 0.00632578, Final residual = 9.66151e-11, No Iterations 366
    ICCG: Solving for pd, Initial residual = 0.00129106, Final residual = 9.48097e-11, No Iterations 346
    time step continuity errors : sum local = 5.00658e-15, global = 8.3674e-17, cumulative = -1.27523e-16
    ExecutionTime = 2827.52 s ClockTime = 3013 s

    yes thats 3000 seconds of clocktime for one iteration. i have to get from .014 to probably somewhere around .025 -> .03 in deltaTs of 5E-7. this is gonna take awhile …

    Comment by acosta — 12/18/2006 @ 10:27 am

RSS feed for comments on this post.

Leave a comment

vdov.net is an anthony costa production. ownership of the content provided is retained by the author and by vdov.net.