All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Computational fluid dynamics is a branch of fluid mechanics that uses numerical analysis and data structures to analyze and solve problem that involves fluid flows. The fluid flow characteristics are very random and complex and usually defined by Navier-Stokes equations and Euler equations. These equations are in the differential…
Siddharth jain
updated on 08 May 2021
Computational fluid dynamics is a branch of fluid mechanics that uses numerical analysis and data structures to analyze and solve problem that involves fluid flows. The fluid flow characteristics are very random and complex and usually defined by Navier-Stokes equations and Euler equations. These equations are in the differential and integral form, which are complex to feed into the computer as a part of input. Then there is need of discretizing those governing equation into an algebraic form, which can represent the governing equation in a numerical representation.
There are different discretizing methods in Computational fluid dynamics. Some of the major discretization methods are:
1. Finite difference method
2. Finite volume method
3. Finite element method
However in this literature, we'll look upon Finite Volume Method and its interpolation schemes.
What is finite volume method (FVM)?
Ans:
Differences between Finite Difference Method (FDM) and Finite Volume Method (FVM):
Finite Difference Method (FDM):
E.g: In order to calculate solution for the entire domain, first we discretize it into small elements and nodal co-ordinates are generated. The governing equations are solved for each and every node iteratively until the expected convergence is achieved.
Lets take an example of 1D steady state heat conduction
Fig (1): Finite difference discretization (Discrete points / nodes)
To calculate the function at (i,j) by using any of the difference approximation schemes, we get,
Lets take second order central differencing scheme,
`(del^2T)/(delx^2) = (T_(i-1,j) - 2T_(i,j) + T_(i+1,j))/(trianglex^2)`
The above equation represents the Finite Difference discretization approach calculated at the nodal co-ordinates (grid points) of a domain.
Finite Volume Method (FVM):
E.g: The domain is divided in small chunks of control volume (discretized boxes or in case any arbitary shape). These control volumes have a centre point (centroid) representing the control volume as (i-1), (i), and (i+1). The vertical dividing line between control volumes is nothing but the face from which flux of a conserved variable will be taken into account.
Fig (2): Finite volume discretization (Discrete control volumes)
The governing equations of partial differential equations are solved for a control volume and then integrated to calculate it for whole domain.
Steps in Finite Volume discretization:
1. Writing the governing equations in its integral form.
Why so?
Ans: Because, we take any infinitesimal control volume and apply governing equation of partial differential form. So in order to calculate it for whole control volume (domain), it is required to integrate the differential equation of specified function.
2. Apply gauss divergence theorem.
Why use it?
Ans: Gauss divergence theorem is generally used in representation of Navier-Stokes and Euler equations. It converts the volume integral to surface integral and vice versa to account for the fluxes incoming and outgoing the control volume.
3. Come up with suitable methods to calculate flux terms.
Let's take an example of one dimensional steady state heat conduction in a rod and let's try to discretize it using finite volume method,
The 1D steady steady state heat diffusion with a source term can be stated as,
`(del)/(delx) (alpha(delT)/(delx)) + S = 0`
Here source term is responsible for heat generation and `alpha` is diffusion coefficient.
Fig (3): Structure of discrete control volumes
Here control volume boundary is nothing but the face between the adjacent control volume.
Nodal point is centroid of the control volume.
Step 1: Grid generation
The first step in finite volume method is to divide the domain into discrete control volumes. Nodal points W, P and E are the centroid of their respective control volumes. The boundaries (or faces) of control volumes are positioned between mid way between adjacent nodes. Thus each node is surrounded by a control volume or a cell.
Fig (4): Grid generation of cell centered control volume
A general nodal point is identified by P and its neighbours in one dimensional geometry, the nodes to the west and east are identified by W and E respectively. The west side face of a control volume is referred to by w and east side face by e.
For simplication of the notations and considering structured grids,
`deltaX_(WP)` = `deltaX_(EP)` = `deltaX_(we)` = `trianglex`
`deltaX_(wP)` = `deltaX_(Pe)` = `(triangle x)/2`
Step 2: Discretization
The key step of the finite volume method is the integration of the differential equations over a control volume to yield a discretized equation at its nodal point P.
`int_(triangleV)(del)/(delx)(
Here A is the cross sectional area of the control volume face, `triangle V` is the volume and `bar S` is the average value of the source S over the control volume.
We have very attractive feature of finite volume method that the discretized equation has clear physical interpretation. The above clearly states that the diffusive flux of T leaving the east face minus the diffusive flux of T entering the west is equal to the generation of T i.e. it constitutes a balance equation for T over the control volume.
In order to derive useful forms of the discretized equations, the interface diffusion coefficient "`alpha`" and the gradient `(delT)/(delx)` at east and west are required.
We can use linear approximations to calculate the interface values and the gradients.
`alpha_w = (alpha_W + alpha_P)/2 rightarrow 1`
`alpha_e = (alpha_P + alpha_E)/2 rightarrow 2`
And the diffusive terms can be evaluated as,
`(alphaA(delT)/(delx))_e = alpha_eA_e((T_E - T_P)/(trianglex)) rightarrow 3`
`(alphaA(delT)/(delx))_w = alpha_wA_w((T_P - T_W)/(trianglex)) rightarrow 4`
Accordingly, the source term is a function of temperature. In such cases the finite volume method approximates the source term by means of a linear form,
`barStriangleV = S_u + S_PT_P rightarrow 5`
Substituting equation 3, 4 and 5 in equation A, we get,
`alpha_eA_e((T_E - T_P)/(triangle x)) - alpha_wA_w((T_P - T_W)/(trianglex)) + (S_u + S_PT_P) = 0 rightarrow 6`
With certain rearrangement, we can write,
`((alpha_e)/(trianglex)A_e + (alpha_w)/(trianglex)A_w -S_P)T_P = ((alpha_w)/(trianglex)A_w)T_W + ((alpha_e)/(trianglex)A_e)T_E + S_u rightarrow 7`
The coefficients of `T_P`, `T_W` and `T_E` can be said to be as `a_P`, `a_W` and `a_E`
Rewriting the above equation,
`a_PT_P = a_WT_W + a_ET_E + S_u rightarrow 8`
where
`a_W` | `a_E` | `a_P` |
`(alpha_w)/(trianglex)A_w` | `(alpha_e)/(trianglex)A_e` | `a_W + a_E - S_P` |
There are various interpolation schemes for gradients, diffusion terms, convective terms etc to interpolate values at faces in order to account for fluxes.
Need for Discretization / Interpolation Schemes:
CFD code offer many different types of discretization / interpolation schemes,
The CFD user must know which scheme to be used to solve and to simulate a given problem. As every scheme has different behaviour and application characteristics.
Case:
Most of the CFD codes uses cell-centered approach. In this approach, the CFD codes compute values at the cell centroids (P). A single cell may be surronded by many cells, but for the ease we take a single neighbour with centroid (N).
Fig (5): Generalized cell structured discretization in FVM
All the flow variables like velocity, pressure, temperature and density are calculated and stored at cell centroid.
The face shaded in grey represents the face between owner and neighbour cell. Using the same model other discretization schemes will be discussed.
Set-up:
Here, assume that we know the value of any flow quantity such as (`phi`) on the owner centroid (`phiP`) and the neighbour cell centroid (`phiN`). The flow quantity might be any scalar field such as temperature (T), pressure (p) or vector field of velocity (U).
By taking these cell centroid values, we are interested in calculating flow quantity at the face centroid (`phif`).
Fig (6): Cell structure with flow quantity at the centroid
There are many ways to calculate the face centroid value, and these are nothing but face interpolation schemes. As we are interested in calculating the value of field on the grey face or more precisely at the face centroid.
Let's take our first interpolation scheme,
1. Linear/Central differencing Scheme:
Fig (7): Cell structure in linear differencing scheme Fig (8): Behaviour of upwind differencing in a cell structure
In Fig (7) the co-ordinates of each cell is given by bold symbol `x_P`, `x_f` and `x_N`. As these cells are spaced in 3D space, we know their co-ordinates and ultimately their relative lengths.
So in central differencing scheme, there is linear relationship between the owner cell centroid `phi_P` and the neighbour cell centroid `phi_N`.
The value of the face centroid `phi_f` will be linearly interpolated between those cells.
`psi = abs(x_f - x_P)/abs(x_N - x_P) = (blue)/(red)`
Similarly in Fig(8), we assume that there is mass flux coming in from the left hand side entering the owner cell and having the value of `phi_P`. Accordingly it moves to the neighbour cell (N) and gives the value of `phi_N`. So at the face, the flow quantity `phi_f` can be achieved by linearly interpolating between those cells.
The value of flow quantity at face centroid can be given as,
`phi_f = psiphi_N + (1-psi)phi_P`
Where, `0lepsile1`
It is the most straighforward interpolation scheme. The variation between those centroids is linear. Linear / Central differencing scheme is second order accurate. The scheme is ofter regarded as unbounded as it is prone to some non physical oscillations. That is why central differencing schemes are used under some circumstances.
Lets take incompressible form of the Navier-Stokes equation,
`(delU)/(delt) + nabla.(UU) = 1/(rho)nablap + nunabla^2U + g`
So here the central differencing scheme is normally used for diffusion term which is `nunabla^2U` in the above equation.
The central differencing scheme should never be used for the convection term (`nabla.(UU)`) discretization in a RANS solver.
2. Upwind differencing:
Upwind differencing depends on the direction of the mass flux, more precisely mass flow rate across the face. Mass flux is a very important concept in upwind differencing because we can tell the direction of the flow into and out of the cell.
`F_f = rho_(f)A_(f)(U_f - hatn)`
Where,
`F_f` = Mass flux across the face
`rho_f` = Density of the fluid at the face centroid
`A_f` = Area of the face
Here velocity is taken as dot product with a normal vector of the face.
Fig (9): Cell structure in upwind differencing scheme Fig (10): Behaviour of upwind differencing in a cell structure
In this case,
If `F_f > 0` indicates mass flow out of the cell from the owner end to the neighbour cell.
And `F_f<0` indicates mass flow into the cell from the neighbour end to the owner cell.
The value of `phi` on the cell face `phi_f` is given by,
`phi_f = phi_P` `F_f >0` (Mass flow out)
`phi_f = phi_N` `F_f <0` (Mass flow in)
If `F_f > 0` then in the upwind differencing, we assume that the value of `phi_f` takes the same value of cell centroid of the owner cell (`phi_P`). And same if `F_f < 0` then `phi_f` takes the value of the cell centroid of neighbour cell (`phi_N`).
In Fig (10), we see that the value of `phi_f` is projection of the value of owner cell centroid (`phi_P`) onto that face. Likewise the value of `phi_N` projected again onto that face of the downstream cell.
The value between the cell centroid and the face has no variation across the cell. This means upwind differencing scheme is only first order accurate. However it is not as accurate as central differencing scheme. It is just appreciated for its stability.
The major reason for its inaccuracy is that it projects same value of cell centroid to the face centroid. Due to this what happens is, in a CFD simulation at discrete flow structures this flow characteristics usually get smeared out (loss of resolution of the simulation at the critical points) or in some cases the physics of the flow does not get captured correctly.
However, upwind differencing scheme still has its significance in interpolation schemes. In some circumstances, if there is a bad mesh or simulation is quite unstable and there is difficulty to achieve convergence. Then use this scheme initially to get a stable solution which is not accurate. Finally switch onto the another more accurate scheme to get the accurate solution.
3. Linear upwind / hybrid differencing:
Linear upwind differencing is a very popular scheme and can be seen in most of the CFD codes. This scheme also depends upon the value of mass flux.
Fig (11): Behaviour of linear upwind / hybrid differencing in a cell structure.
Mathematically, linear upwind differencing scheme can be given as,
`phi_f = phi_P + (nablaphi)_P*r` `F_f > 0` (Mass flux comes from owner cell and goes to neighbour cell)
`phi_f = phi_N + (nablaphi)_N*r` `F_f < 0` (Mass flux comes from neighbour cell and goes to owner cell)
Here, `r` = vector between the cell centroid and the face.
In this scheme, gradient of the flow quantity at the cell centroid of the control volume `(nablaphi)` is used to improve the accuracy of the projection of the cell face. This scheme is nominally second order accurate, as we do have a linear variation between the owner cell centroid and the cell face. It is way accurate than upwind differencing scheme.
However, sometimes linear upwind differencing tends to get unstable and can be visualized by the following figure.
Fig (12): Unphysical gradient jump in a cell structure
As we know `(nablaphi)_P` is projected as the value of `phi_P` onto the cell face `phi_f` . If `(nablaphi)_P` at cell centroid is too steep, then the value of `phi_f` is projected shown by the red line in the fig (12). Upon clear insight, we can see that `phi_f > phi_N` and is also greater than the value of of `phi_P`.
This clearly is not physical because we have a value of `phi_f` which is greater than the value of both the cell centroids. This will cause introduction of instabilities in our simulation. To make linear upwind stable, we need to limit the value of the `phi_f` between `phi_P` and `phi_N`.
Now there is an introduction of gradient limiter (also called as flux limiter).
What is gradient limiter?
Answer:
In simple words, the gradient/flux limiter limits the sudden jump of rate of change of any flow quantity at cell face such that it is set between the values of both the cell centroids. Generally it is used in limiting the solution gradient near shocks or discontinuities. It confirms the value of cell face centroid to be more realistic.
So coming back to linear upwind differencing scheme, the effect of gradient is explicitly stated in the fig (12) by green dotted line.
Mathematically, the gradient limiter can be stated as,
`phi_f = phi_P + psi (nablaphi)_P*r` `0lepsile1`
Here `psi` = flux limiter function
If the limiter function is constrained to `psi = 1` then we do not limit the linear upwind scheme. However, when it is constrained to zero, we implicitly reduce the linear upwind scheme to upwind differencing scheme. No particular limiter has been found to work well for all problems, and a particular choice is usually made on trial and error basis.
The above explained interpolation schemes are most fundamental and are widely used. However at present there are ample of interpolation schemes and they are combination of these above explained schemes.
Advanced interpolation / discretization schemes:
Advanced intepolation schemes use a combination of:
1. Linear differencing to have accuracy in the numerical solution (`phi_(CD)`).
2. Upwind differencing for more stable results (`phi_(UD)`).
These advanced interpolation schemes uses a blending function to switch between those schemes,
Mathematically,
`phi_f = Psi phi_(UD) + (1-Psi)phi_(CD)`
The advanced interpolation schemes will vary the value of `Psi` over the mesh depending over the solution. At instance, if there is an area where there are some unphysical oscillations then these advanced schemes will cleverly switch to such value of `Psi` that upwind differencing is resulted to remove those oscillations. Similarly in areas there is no stability issue, `Psi` will be automatically chosen to result in central differencing to improve accuracy.
Some advanced interpolation schemes are:
1. Total variation diminishing (TVD)
2. QUICK
And many more interpolation schemes depending on various applications.
Conclusion:
The Finite Volume method (FVM) uses a cell centered approach to account for flow quantities. And there is need to discretize or more precisely interpolate the flow quantities with some dedicated interpolation scheme. For every physical characteristic, there is necessity to satiate the dependencies and flow characteristics within the domain in an appropriate manner. Most fundamental interpolation schemes were studied in detailed approach. There are some advanced schemes used in CFD codes which are combination of linear, upwind and linear upwind / hybrid differencing schemes.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week 5 - Rayleigh Taylor Instability
Aim: To perform Rayleigh-Taylor instability CFD simulation. Objectives: 1. To develop a numerical case set-up for Rayleigh-Taylor instability problem in Ansys Fluent. 2. To conduct grid dependency test to understand the variation in RT instabilites. 3. To understand the effect on RT instabilities due to variation…
20 Jan 2022 08:26 AM IST
Week 4 - CHT Analysis on Exhaust port
Aim: To develop a numerical set-up for conjugate heat transfer analysis on exhaust port. Objectives: 1. Investigate wall adjacent and surface heat transfer coefficients. 2. Understand flow and thermal characteristics. 3. To perform mesh independent study. 4. Set-up a rough surface model to understand…
20 Jan 2022 08:24 AM IST
Week 3 - External flow simulation over an Ahmed body.
Aim: To simulate external flow over an Ahmed body using Ansys fluent. Objectives: 1. To set-up simulation case for velocity of 25 `m/s` with working fluid as air. 2. Simulate various cases with different `Y^+` values (coarse, medium and refined mesh at the boundary). 3. Calculate drag and…
19 Jul 2021 03:20 PM IST
Week 2 - Flow over a Cylinder.
Aim: To simulate flow past a cylinder with varying Reynolds number and interpret the flow characteristics. Objectives: 1. Simulate the steady and unsteady (transient) cases for range of Reynolds number. 2. To calculate the drag and lift coefficients for the respective cases. 3. To calculate strouhal number for unsteady…
11 Jun 2021 03:02 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.