Computers fail to comprehend calculus. The core of all calculus problems require us to consider something infinitely small. Ask a computer to ponder the concept of infinity and watch its circuits fry. If we want to solve the equations of computational fluid dynamics (CFD), we need a way to fake calculus. Enter interpolation equations.
Interpolation equations came from a whole new branch of mathematics known as finite difference mathematics. This whole field devoted itself to semi-accurate ways of representing calculus operations as algebra formulas. Interpolation equations were the subset first applied to CFD. (Other fields of finite difference mathematics came later to CFD.)
Figure 2‑1 shows a graphical example of one interpolation scheme. The point P is the point of interest. By collecting data from that point and the neighboring points, the interpolation scheme can calculate the appropriate derivatives required for the calculus equations. This was essential for CFD engineers to understand. Interpolation equations depend on the neighboring cells.
The mathematicians developed numerous schemes for interpolation equations, but the important distinguishing feature was the order of interpolation. These schemes generally fell into one of two categories:
Higher orders of interpolation are mathematically possible. But practically speaking, CFD solvers get too unstable. In most commercial CFD packages, you only see first order and second order options.
First order methods provide linear interpolation. They calculate first order derivatives (slope of the curve). These methods offer better stability. But they tend to smear the results over a larger extent. (Figure 3‑1) If you try to resolve a sharp gradient, first order methods are not the best option.
Second order methods are the preferred option; they provide quadratic interpolation. These calculate the first and second order derivative, offering better accuracy. Better accuracy leads to faster grid convergence and less cells required. This comes at the price of overshooting the values sometimes. (Figure 3‑2) As a result, second order methods may introduce greater instability into the simulation.
Ideally, every CFD equation would utilize second order interpolation. If this were an ideal world, only CFD developers would know about interpolation equations. Practically, CFD engineers start with all second order interpolation and then downgrade selective equations as necessary. But which equations? Table 4‑1 provides guidance on that.
Attempt | Momentum | Continuity | Turbulence | Volume Fraction |
Ideal | 2nd order | 2nd order | 2nd order | 2nd order |
Attempt 1 | 2nd order | 2nd order | 1st order | 2nd order |
Attempt 2 | 2nd order | 2nd order | 1st order | 1st order |
Change timestep | ||||
Change mesh |
In general, the momentum and continuity / pressure equations should always be 2nd order. Only drop those to 1st order interpolation for debugging purposes. Never for a production run.
The interpolation equations taught the computer calculus. Or at least, how to approximate calculus. The CFD engineer must remain aware of that approximation, understanding how it affects simulation quality and stability. The order of interpolation plays a major part in that. The CFD engineer chooses the order of interpolation for each individual equation in the simulation. This impacts the stability, the mesh quality, and the ultimate simulation quality.
[1] | V. R. Raj, “Quadratic Profile Used in QUICK Scheme,” Wikimedia Commons, 12 Nov 2012. . Available: https://commons.wikimedia.org/wiki/File:Quadratic_profile.jpg. . |
[2] | Max Pixel, “Cumulus Storm Turbulence Thunderstorm Cloud Roller,” Max Pixel, 01 Jan 2019. . Available: https://www.maxpixel.net/Cumulus-Storm-Turbulence-Thunderstorm-Cloud-Roller-567678. . |
[3] | S. Wasserman, “Choosing the Right Turbulence Model for Your CFD Simulation,” Engineering.com, 22 Nov 2016. . Available: https://www.engineering.com/DesignSoftware/DesignSoftwareArticles/ArticleID/13743/Choosing-the-Right-Turbulence-Model-for-Your-CFD-Simulation.aspx. . |
[4] | Q. Wang, C. Yan and T. Hui, “Mechanism Design for Aircraft Morphing Wing,” Research Gate, <https://www.researchgate.net/figure/y-plus-value-for-the-CFD-model-10-degree-of-extension-angle-of-attack-6_fig4_268478784>, Accessed: 2019, Jan, 01, April 2012. |
[5] | S. Tao, F. Yuqing, L. Graeme and J. Kaixi, “CFD simulation of bubble recirculation regimes in an internal loop airlift reactor,” in 27th International Mineral Processing Congress, <https://www.researchgate.net/publication/289001212_CFD_simulation_of_bubble_recirculation_regimes_in_an_internal_loop_airlift_reactor>, Accessed: 2019, Jan, 01., January 2014. |