TVD Limiters Can Affect Your Solution in Surprising Ways
What are TVD Limiters?
“Total Variation Diminishing” (TVD) limiters, as you are probably aware, are used to prevent spurious oscillations of a solution in the vicinity of strong gradients (such as shocks). Almost every production code uses them, and there are a number of different algorithms that various people have developed over the years.
All TVD limiters work in roughly the same way. Near shocks, they are designed to switch the spatial discretization scheme down to a first order accurate method. Away from shocks, they are not supposed to do anything. Thus, a second order or higher numerical scheme can be used for the majority of a flow domain, while still capturing shock waves and other strong gradients without a lot of “wiggles”. That, at least, is the theory.
In practice, however, your limiter can have a significant impact on regions far removed from any shocks. As with so many things, I had to find that out the hard way. How I Learned my Lesson about Limiters
A colleague was trying to run some inlet simulations, and he observed unexplained oscillations in total pressure out in the middle of the duct, away from any major flow features. Further, he needed total pressure held accurately to one part in 10,000, and it was just not happening with this code. Fortunately, he was able to get what he needed using another code, but we also wanted to find out what was wrong with the first one.
We tried everything we could think of, and then, in desperation, I began porting algorithms from the other code (which worked) to the code which was having the problems. I tried a new implicit solver—no difference. I tried a new time step calculation routine—no difference. I tried a new explicit spatial operator—no difference.
Finally, I ported the TVD limiter that the other code was using. “Magically” everything cleared up, and I was able to duplicate the results from the other code.Case Study: Steady Flow in a Duct
The figure above illustrates the impact that a TVD limiter can have. The plot shows total pressure contours from two different simulations on the same lengthwise cross-section of a duct. The simulations were obtained from the same code using exactly the same algorithms, except that different limiters were employed.
The contour scale has been greatly compressed so that the difference between the blue (low pressure regions) and red (high pressure regions) is only about two parts in one thousand. Note that there is a block boundary running down the centerline, which accounts for the streak down the middle of the duct. Also note that there are no shocks in this flow, so the limiters are really supposed to be inactive.
In the core flow (away from the disturbances caused by the centerline boundary), the Koren limiter is producing a much smoother result than the minmod limiter. In addition, the residuals in the Koren limiter solution converged an order of magnitude further than the minmod limiter case.Conclusions
In the above case, the Koren limiter was a superior choice to the minmod limiter. Note, however, that the Koren limiter is not appropriate for all cases. For example, in the above plot, the Koren limiter allowed a small overshoot in total pressure at the edge of the lower boundary layer in the aft section of the duct. Depending on the application, this sort of behavior might be unacceptable.
Also, the Koren limiter is less able to deal with strong shocks than the minmod limiter. And, of course, there are many other limiters available in different codes, each with their strengths and weaknesses. So be aware of the TVD limiters at your disposal and keep alert to signs of trouble.
When you are
finished learning about TVD limiters, you can return to the CFD Tips page.
Or browse the other topics on the
Innovative CFD home page