Chapter 1
Introduction to CFD
Abstract
This chapter is an introduction to Computational Fluid Dynamics (CFD). Many organizations implement CFD in the computer-aided engineering phase. However, most of the time, higher management is not interested, perhaps because of the lengthy simulations or uncertainty regarding results. These issues are discussed and various misconceptions about CFD are explored and cleared up. The basics of CFD with governing equations are also discussed.
Keywords
CFD; Governing equations; Simulations; Uncertainty
1. Colorful Dynamics or Computational Fluid Dynamics?
Computational fluid dynamics (CFD) is one of the most quickly emerging fields in applied sciences. When computers were not mature enough to solve large numerical problems, two methods were used to solve fluid dynamics problems: analytical and experimental. Analytical methods were limited to simplified cases such as solving one-dimensional (1D) or 2D geometry, 1D flow, and steady flow. However, experimental methods demanded a lot of resources such as electricity, expensive equipment, data monitoring, and data post-processing. Sometimes for engineering analysis work, it is not within the budget of a small organization to establish such a facility. However, with the advent of modern computers and supercomputers, life has become much easier. With the passage of time numerical methods got matured and are now used to solve complex fluid dynamics problems in a short time. Thus, today, with a small investment, some good configuration personal computers can be bought and used to run CFD code that can handle complex flow geometries easily. The results can be achieved more quickly if some of the computers are joined or clustered together.
From an overall perspective, CFD is more economical than experiments. The twentieth century has seen the computer age move with cutting-edge changes, and problems or experiments that had never been thought possible to be performed experimentally or were difficult to perform because of limited resources are now possible with the modern technology. It can be said that CFD is more economical than experiments. With the advent of modern computer technology, it has gained in popularity as well because advanced methods for solving fluid dynamics equations can be analyzed quickly and efficiently.
In terms of accuracy, CFD lies in between the domain of theory and experiments. Because experiments mostly replicate real phenomena, they are much reliable. Analytical method is second because of certain assumptions involved while solving a particular problem. CFD is last because of it involves truncation errors, rounding off errors, and machine errors in numerical methods. To avoid making it “colorful dynamics,” it is the responsibility of the CFD analyst to fully understand the logic of the problem and correctly interpret results.
There are many benefits to performing CFD for a particular problem. A typical design cycle now contains two and four wind-tunnel tests of wing models instead of the 10–15 that were once routine. Because our main focus is High-Performance Computing (HPC), we can say that if CFD is the rider, HPC is the ride. Through HPC complex simulations (such as very high-speed flow) are possible that otherwise would have required extreme conditions for a wind tunnel. For hypersonic flow in the case of a re-entry vehicle, for example, the Mach number is 20 and CFD is the only viable tool with which to see flow behavior. For these vehicles, which cross the thin and upper atmosphere levels, nonequilibrium flow chemistry must be used.
Consider the example of a jet engine whose entire body is filled with complex geometries, faces, and curvature. CFD helps engineers design the after-burner mixers, for example, which provide additional thrust for greater maneuverability. Also, it is helpful in designing nacelles, bulbous, cylindrical engine cowlings, and so forth.
2. Clearing Misconceptions about CFD
An obvious question is why so many CFD users seem unhappy. Sometimes the problem lies in beliefs regarding CFD. Many organizations do not place value on CFD and rely on experiments. According to their view, the use of experiments is customary even though experiments are also prone to errors.
In addition, CFD has captured the research market quicker than experiments owing to the worldwide economic crisis, and it is the obvious choice over experiments for a company when a sufficient budget is scarce. It is also unfortunate that many people do not trust CFD, including the heads of companies and colleagues who sometimes do not understand the complexity of fluid dynamics problems. The analyst must first dig for errors, if any, and then examine how he or she should portray it to higher management. If management is spending money buying expensive hardware and software and hiring people, the importance of CFD is clear. If management still does not recognize the importance of CFD facts, it becomes the job of analysts to educate and mentor the bosses. If it is desired that the statements/arguments related to CFD remain unquestioned, they must be provided either with some scientific or mathematical proof or with some acknowledgment by those who have understanding and firm believe in the truth of the results.
One should compromise for less reliable CFD results when it is known that not enough computational resources are available. This brings us to a question regarding the control of uncertainties. Certain numerical schemes result in dissipation error, such as first order. Other schemes such as second-order result in dispersion error. Then there is machine error, grid accuracy error, human error, and truncation error, to name a few. Thus, unexpected predictions could cause the question, “Did I do something wrong?.” In this case, it is essential to familiarize the user completely with CFD tool(s) and avoid allowing him or her to use the tool as a black box.
Many engineers do not pursue product development, design, and analysis as deeply as do CFD engineers. They do not understand turbulence modeling, convergence, mesh, and such. To sell something in the market using CFD, one should be smart and clever enough to say something the customer can understand.
It is also annoying when software does not correspond the way it should. This occurs when results do not converge or when there is some complex mesh to deal with. At first, one should:
1. Carefully make assumptions if required.
2. Try to make the model simpler (such as using a symmetric or periodic boundary condition).
3. Use reasonable boundary conditions. With an excellent mesh, results do not converge mostly owing to incorrect boundary conditions.
5. If not satisfied, go to mesh.
6. If experimental data are unavailable, perform a grid convergence study.
In this way, the efforts will not change skeptics' perceptions overnight but if a history of excellent CFD solutions is delivered, they will start to believe it.
Although CFD has been criticized, there are many great things about it. A CFD engineer enjoys writing code and obtaining results, which increases his confidence level. From a marketing point of view, people are mostly attracted to the colorful pictures of CFD, which is how one can make a presentation truly overwhelming. If one can produce good results but cannot present the work convincingly, then all of the effort is useless.
From this discussion, it can be concluded that there are two important points to remember. One is that the problem does not lie in CFD but could be in the limitation of resources, lack of experimental data, or wrong interpretation of results. Second, skepticism regarding CFD exists but one should be smart enough to present the results in an attractive and evocative manner. Remember the saying that a drop falling on a rock over a long time can create a hole in it. That philosophy will definitely work here, as well. CFD can be colorful dynamics or computational fluid dynamics with colorful, meaningful results. It is your choice: What do you want to see and what do you see?
3. CFD Insight
CFD mainly deals with the numerical analysis of fluid dynamics problems, which embodies differential calculus. The equations involved in fluid dynamics are Navier–Stokes equations. Until now, solutions to Navier–Stokes equations have not been explicitly found except for some cases such as Poiseuille flow, Couette flow, and Stokes flow with certain assumptions. Therefore, several engineers and scientists have spent their lives devising methods to solve these differential equations so as to give a meaningful solution for a particular set of geometry and initial conditions. Thus, CFD is the process of converting the partial differential equations of fluid dynamics into simple algebraic equations and then solving them numerically to obtain some meaningful result.
3.1. Comparison with Computational Structure Mechanics
Because it is a numerical tool, CFD relies heavily on experimental or analytical data for validation. In the author's experience, people who are in the field of computational structure mechanics (CSM) using Finite Element Analysis (FEA) codes for structural deformation in solids do not bother much about creating the grid. This is because the field of FEA is more mature than CFD. For example, there are no complex issues to solve such as the boundary layer, so meshing efforts are reduced. No monster exists such as y+, so life is easier.
In...