Overview
Computational Fluid Dynamics (CFD) is basically using a computer to solve fluid mechanics problems. This, as the name points out, involves computers to solve problems in fluid dynamics hence CFD. I see quite often that because CFD has become so easy-to-use, people can simply utilize it. In this article, I will discuss what the basics behind CFD are.
First, I have to introduce to you what fluid dynamics are. Fluid dynamics is the study of fluid flow and behavior. A fluid can be either liquid or gas. From my perspective, I can observe fluid dynamics everywhere. Like literally there is no escaping from it. From the moment you brush your teeth, your morning coffee, the windy commute to work, rain falling, rivers flowing, ships moving, and even a rocket, etc.
And because there is no way to avoid it, researchers, scientists, and engineers are so encouraged to study the phenomena and the properties of fluids. As a matter of fact, people have been studying fluid dynamics for centuries. In the past, most of these studies were either analytical or experimental. Experiments are typical and really fun to do until you have to experiment with something dangerous, for example, to study the exhaust of a rocket or something even impossible. As one more example, to fit a full-size airplane in an actual wind tunnel is an incredible work. (Some animation of a scaled model in a wind tunnel or rocket exhausts firing.)
Full Scale Wind Tunnel (NASA Langley)
CFD Introduction with Analysis
Discussing analytical fluid mechanics is not easy. With nowadays computers becoming so powerful so fast, solving fluid problems with computers became more and more popular and affordable – in many study fields. And that is the reason why I began to utilize CFD Software. Please allow me to explain it further. A small warning before that it’s going to be a little technical from here, so here’s how we’re going to break it down.
First, I am going to discuss the differential equations that govern fluid flow. Next, I will tell you why it is really impossible to directly solve them and eventually how it’s so possible to convert these equations into simpler forms that computers can use to solve.
As any branch of physics, fluid mechanics is thoroughly governed by some fundamental principles. These are the conservation of mass, conservation of momentum, and conservation of energy. The conservation of mass is something which you are probably familiar with-Mass can neither be created nor destroyed- To better understand the equations let’s take the example of water flowing through a pipe. The conservation of mass says that whatever mass of fluid goes in has to come out. Mathematically, that can be expressed in an integral equation like this.
First, I am going to discuss the differential equations that govern fluid flow. Next, I will tell you why it is really impossible to directly solve them and eventually how it’s so possible to convert these equations into simpler forms that computers can use to solve.
As any branch of physics, fluid mechanics is thoroughly governed by some fundamental principles. These are the conservation of mass, conservation of momentum, and conservation of energy. The conservation of mass is something which you are probably familiar with-Mass can neither be created nor destroyed- To better understand the equations let’s take the example of water flowing through a pipe. The conservation of mass says that whatever mass of fluid goes in has to come out. Mathematically, that can be expressed in an integral equation like this.
Now imagine if you shrink the domain that you are interested into an infinitesimally small control volume. Mass conservation has to still hold, but now the equation changes to a differential form. The conservation of momentum is an expression of Newton's second law of motion which states that the rate of change of momentum is equal to a force.
Now even the momentum equation can be expressed in an integral form that you see here and there's a differential form as well. The differential form is more intuitive to understand as you see a mass represented by a density here which is balanced by the forces on the right-hand side- the pressure force, the body force, and the viscous forces. So you see the differential form of the momentum equation is an exact representation of Newton’s second law of motion and is very intuitive to understand.
I now talked about the conservation of mass and momentum. But there's still a third principle- which is the conservation of energy. The energy conservation principle looks very similar to the momentum equation but also has a separate variable of temperature that is used only in situations where there are changes in temperature and density of fluids. Both the mass and momentum equations constitute what is called as the NS equations that describe any type of fluid flow Now, there are some characteristics of these equations you can recognize just by looking at them.
Now even the momentum equation can be expressed in an integral form that you see here and there's a differential form as well. The differential form is more intuitive to understand as you see a mass represented by a density here which is balanced by the forces on the right-hand side- the pressure force, the body force, and the viscous forces. So you see the differential form of the momentum equation is an exact representation of Newton’s second law of motion and is very intuitive to understand.
I now talked about the conservation of mass and momentum. But there's still a third principle- which is the conservation of energy. The energy conservation principle looks very similar to the momentum equation but also has a separate variable of temperature that is used only in situations where there are changes in temperature and density of fluids. Both the mass and momentum equations constitute what is called as the NS equations that describe any type of fluid flow Now, there are some characteristics of these equations you can recognize just by looking at them.
First, they're both partial differential equations. Now the momentum conservation equation, the term on the left-hand side can be rewritten as. Clearly, you see there are also some nonlinearities in this equation. Another important characteristic of this equation is that both the mass and momentum equations are highly coupled. To solve any type of fluid flow you need both equations and you can’t solve one without the other. Because the NS equations are PDEs that are highly coupled and analytical solution is almost impossible to find and you have to simplify the problem a lot. This is why we resort: To solve a partial differential equation you need something called boundary conditions. The boundary could be the ends of the domain you are solving the problem at or the surface of the body around which you want to compute the flow. But, the Navier stokes are no ordinary set of equations. For a 3-Dimensional problem and a set of Initial conditions, mathematicians have not yet proven that smooth solutions to this problem exist.
And that’s where CFD comes in. CFD consists of three main steps. The first step is discretization, followed by a solution to these discretized equations and the final is post-processing. Discretization is the process of breaking down a huge volume of fluid into smaller volumes or elements. This is one of the most important steps in CFD and if you ask me- THE most important step. If your discretization, otherwise known as meshing is not right, will most probably give you wrong results, or even worse- it won’t give you a result at all. In computer language, this is known as Garbage in garbage out.
In conclusion, I hope that reading this article will at least give you some clarification, and a better understanding of what behinds CFD. In the next part, we will take a look at its analogy, to get a better understanding of Discretization.
And that’s where CFD comes in. CFD consists of three main steps. The first step is discretization, followed by a solution to these discretized equations and the final is post-processing. Discretization is the process of breaking down a huge volume of fluid into smaller volumes or elements. This is one of the most important steps in CFD and if you ask me- THE most important step. If your discretization, otherwise known as meshing is not right, will most probably give you wrong results, or even worse- it won’t give you a result at all. In computer language, this is known as Garbage in garbage out.
In conclusion, I hope that reading this article will at least give you some clarification, and a better understanding of what behinds CFD. In the next part, we will take a look at its analogy, to get a better understanding of Discretization.
Credits
Jade Teekhasaenee
CFD Engineering Manager - Cradle Consulting Thailand
The author had experienced in wide researches of the Combustion engine, and Chemical Reaction related. He graduates with a Master's degree from Drexel University (Graduate School of Engineering) Philadephia, USA, specialized in Advanced Engineering Simulation.
The author had experienced in wide researches of the Combustion engine, and Chemical Reaction related. He graduates with a Master's degree from Drexel University (Graduate School of Engineering) Philadephia, USA, specialized in Advanced Engineering Simulation.