top of page
Search
• Anand Zambare

# Introduction to Computational Fluid Dynamics

Updated: Jul 2, 2021

The most beautiful predictions in fluid dynamics are made using differential equations, let's solve them using CFD! Hello, Mech n Flow family!! As fluid mechanics enthusiasts you all have at least heard a word which is very often used these days CFD i.e. 'Computational Fluid Dynamics' but is it actually ‘Computational Fluid Dynamics’ for you? Or like many others, you are also following ‘Colorful Fluid Dynamics?’ Let’s discuss this in this article. We will look at what CFD is fundamentally and get ourselves ready to witness the beauty of this domain. Whenever you see a beautiful and colorful plot of velocity vectors in a flow field, do you feel how this can be calculated? As a mechanical engineering student do you feel mathematics is involved in solving such flow problems? What is the role of mathematics here? How can computers be used to solve such flow problems? Have you ever wondered with such questions in your mind when you are trying to sleep!!! Lol yes. Let’s explore then. ### Flow problem and Fluid Mechanics :

The first question one should ask while exploring this domain is, what does it mean by solving a flow problem? The exact answer to this question is when you are dealing with flows which are having an assumption of fluid as a continuum using the Eulerian frame of reference then your aim is to calculate primary properties of this flow like pressure (p), velocity (𝑉̅), temperature (T), etc as a function of space (x, y, z) and time (t) so finding these primary properties in space and time is called as solving a flow problem.

### Some Basics:

Before we go ahead let's just brush up about the continuum and Eulerian frame.

• We can say that fluid as continuum only if the characteristic lengths inflow are greater than the mean free path of molecules.

• The Eulerian frame is a frame in which we are observing fixed space also called control volume and we are not following any particular particles. These are basic concepts in fluid mechanics and they have huge importance as we go along.

Now the next question is, what are the possible ways of solving such flow problems? This time answer is very simple.

There are two possible ways to solve a flow problem:

1. Theoretical Methods

2. Experimental Methods

### Experimental Methods :

Let’s discuss the second way first. Solving the flow problem experimentally is straightforward. (No it’s not! Believe me, it is hard) directly doing an experiment and taking measurements of pressure and velocity in the regions of study. Isn’t it simple? (Haha) There are lots of limitations when it comes to doing experiments. The first and biggest limitation is, the requirement for money! You need to have good financial support to solve each flow problem experimentally. The second Limitation is limitations in the precision and accuracy of the measuring devices. The third limitation is, it won’t be possible for some cases to perform experiments, and also it is not possible to extract all of the information exactly as required from the experiments.

### Theoretical Methods :

So now with lots of limitations in the experimental method, we are going to look at the theoretical method. How to solve flow problems using the theoretical method? Simply by solving equations of motion which are used to describe the fluid flows also known as governing equations. Depending on the different forces under consideration which are governing the phenomena one can write equations of motion.

For example, if we consider Viscous Forces, Force due to gravity, and Pressure forces we will be using Navier-Stokes equations to solve the fluid flow.

There are two ways of solving these equations:

1. Analytically

2. Numerically

Analytical solutions of the equations only exist for simple geometries (Domains) and for simple boundary conditions and we have solved such equations in mathematics. But in reality, domains are complex so as boundary conditions, and hence one has to go towards numerical solutions.

Numerical solutions are very powerful techniques to handle complex partial differential equations and find solutions approximately. So now we have arrived at some situation where we can say what actually CFD is,

CFD is a technique to solve flow problems by a theoretical method where we solve equations of motion using computers (programs) i.e. numerical or computational techniques.

Depending on the types of equations we are looking at there are different methods that one can use to solve them numerically. Finite Element Method (FEM), Finite Difference Method (FDM), Finite Volume Method (FVM), and there are many more methods to solve such equations. These methods are used to solve various flow problems.

The basic idea behind every method is the same, we convert the differential equations into discrete algebraic equations and then solve them simultaneously to find the unknowns like pressure, velocity, and so on. So let’s look at the following chart which simply explains what the CFD is in a short manner. Flow to solve CFD

The flow chart is very much self-explanatory and now we can say that we have understood fundamentally what actual CFD is. So, as we discussed at the start, the goal of this article was to understand what CFD is and what the role of mathematics in it is.

### Role of Mathematics :

Let’s discuss what role mathematics is playing in this. As you can see in the flow chart there are three smiling emoji’s at three different levels and each emoji is representing the presence of maths in it. Step one is having the governing equations and from here itself the mathematics is in the picture. Step two is using FVM/FDM/FEM techniques which can transform the partial differential equations into discrete algebraic equations and in this step, we generally use basic laws of calculus like Taylor’s series, Divergence theorem, and Stokes theorem or so (not to get worried here, we will look at each of them carefully).

Step two gives us discrete algebraic equations and now our only task left is to calculate the unknowns by solving these equations simultaneously. Here the role of numerical methods is huge because we solve these equations using these methods. Also, we have to keep in mind that our solution should satisfy the boundary conditions also and this is to be incorporated with numerical schemes we will be using. So one should understand that mathematics is the base or backbone of Computational Fluid Dynamics (They will go hand in hand, as a writer’s and reader’s mind should go).

### History and Story :

There is one simple logic behind so much of maths in fluid mechanics and that is, this subject of fluid mechanics was uplifted by mathematicians in the beginning people like Sir Isaac Newton, Leonhard Euler and till date, this is of very much interest for mathematicians all over the globe.

Here I would like to add a little story about when this world realized the power of CFD specifically in aerodynamics. In the late 1970’s one early success was the experimental NASA aircraft called HiMAT (Highly Manoeuvrable Aircraft Technology). Wind tunnel experiments of this primary design showed that it would have unacceptable drag at speeds near the speed of sound. If build that way the play would be unable to provide any useful data. The cost of redesigning and doing wind tunnel testing would have been around 150,000 \$ and with a huge delay in the project. The wing was redesigned by NASA using CFD just at 6,000 \$. (Introduction to CFD by Prof. Anderson: MIT Press 1989).

So this was the small introduction to CFD, at a glance one can say that if you are really into “Computational Fluid Dynamics” not into “Colorful Fluid Dynamics” you need some basic mathematics skills. And it’s all about solving the flow problems using various ways available to get it done. Alright with this we will take a little break now before we move to the next article of this series and meanwhile, we can brush up on our fundamentals in mathematics. See you guys in the next article!!

### Summary

1. Solving a flow problem is nothing but finding out the Pressure (P), Velocity (V), Temperature (T), etc required fields.

2. There are two approaches to solving any flow problem, experimental as well as theoretical with each having some limitations.

3. CFD is a technique to solve flow problems by a theoretical method where we solve equations of motion using computers and numerical techniques.

4. Mathematics (especially calculus and linear algebra) has a huge role to play when it comes to actual Computational Fluid Dynamics. Solving a Fluid problem

Some Short animations from the domain of Multi-phase Flows : (All credits to Computational Multiphase Flow channel on Youtube)

Droplet Rebounding from the ground.

Rising of the bubble using dynamic meshing.

Now we have dived into the sea of Computational Fluid Dynamics and we need a swim tube to survive here. Taylor's Series is the swim tube for us and we will be looking at Taylor's Series in the next blog of this series. Do join for the next blog to increase the slope of your learning curve.