CFD Methods FDM Fem FVM

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

We solve the governing partial differential equations numerically as the problems represented by

the differential equations either don’t have the analytical solution or are too difficult to solve
analytically. We have three main methods to solve them numerically: FDM, FEM and FVM. In
all the three methods we convert a ‘continuous’ problem (represented by a p.d.e.) into a
‘discrete’ algebraic problem of the form [A]{x} = {b}, and then solve this algebraic problem
essentially as {x} = [A]-1{b}, Where {x} is the solution vector. This is the CRUX OF CFD in
simple words.

Finite Difference Method (FDM): is the oldest and perhaps the least favorite among the three
methods today, but it (in my opinion) is the most important one because being the oldest, most of
the pioneering conceptual breakthroughs were achieved in FDM. FDM is a differential approach
as we get to [A]{x} = {b} form by directly discretizing the p.d.e. and we get the strong form
solution. Strong form solutions means the solution must be differentiable as many times as the
order of the p.d.e. The continuous problem domain is divided into smaller ‘uniform’ segments
and the solution (the dependent variable of the p.d.e.) is considered to exist on the joints (called
nodes) of these segments. The derivative terms are replaced by the approximate difference terms
(using Taylor series), resulting in a difference equation to solve in place of the p.d.e. This is the
process of ‘discretization’. Next, with the help of this difference equation we write the
expression for the unknown variable at all the n nodes (means we have n simultaneous
equations). These n simultaneous equations can easily be written as [A]{x} = {b}, where [A] is a
n x n coefficient matrix.

Finite Element Method (FEM): is perhaps the most popular CFD method due to its sound
mathematical basis and its capability to negotiate complex geometries (A drawback with FDM).
FEM (as well as FVM) is an integral approach in which we integrate the weighted residual of the
governing equation and obtain the weak formulation.
For example if the p.d.e. in operator form is written as:
Lu(x,t) = s
where L is the differential operator
The residual would be R = Lu(x,t) - s
Then the weak formulation would be w(x,t) R = w(x,t) ((Lu(x,t) – s) ………………………(1)
The integration process takes advantage of ‘integration by parts’, due to which the resulting
formulation has a weakened requirement of differentiability for the solution. Therefore in FEM
we implement solution in weak form (means the solution may be differentiable lesser number of
times than the order of the p.d.e.). In weak formulation we have variable (u) and the weight
function (w). We discretize the domain in to n-1 subdomains called ‘elements’ between n nodes
(n for 1D problem and more than n nodes for 2D and 3D problems) and assume that the
approximate solution is represented by u(x,t) = N1(x) u1+N2(x) u2, where N(x)’s are the shape
functions or basis functions and u1, u2 are the nodal (numerical) values of the solution. For the
sake of simplicity only 1D problem has been considered where we have only two nodes for an
element (linear element). Similarly w(x,t) can also be written in terms of some shape functions
and nodal values of solution as w(x,t) = M1(x) u1+M2(x) u2 . Depending on what weight
function we choose, we get different type of FEM. For example:
If weight function also use same shape functions as the approx. solution i.e. N1(x) = M1(x) and
N2(x) = M2(x), we get the Galerkin Finite Element Method.
And if we choose w(x,t) = R, then we get the Least-Squares Finite Element Method.

Now in (1) we have two sets of nodal solution vectors u1, u2,……un = {u}_num coming from u
and w. We now use the variational principle and differentiate the weak formulation (1) with
respect to one {u}_num and equate the derivative to Zero we get the appropriate FE formulation.
We determine [ke]{ue} = {b} for an element first, where [ke] is called the element stiffness
matrix. We assemble (or stitch together) this element stiffness matrix over all the elements to get
Global stiffness matrix to get [K]{U} = B where [K] is the global stiffness matrix and {U} is the
global solution vector. This is our algebraic formulation equivalent of [A]{x} = {b} for FEM.

Finite volume method (FVM):


Finite volume method is another method based on integral approach. Consider the p.d.e. with no
production terms with time and space derivative written separately as ut + fx (u)= 0 , where fx(u)
represents flux terms. Since FVM is based on integral approach we get the integral as :
𝑥𝑖+1/2 𝑥𝑖+1/2
∫ 𝑢𝑡 𝑑𝑥 + ∫ 𝑓𝑥 (𝑢)𝑑𝑥 = 0
𝑥𝑖−1/2 𝑥𝑖−1/2
Here the region of integration is taken to be a control volume (in FEM it was element),
associated with the point of coordinate xi , represented by xi−1/2 ≤ x ≤ xi+1/2.
If we approximate the first integral using the mid-point rule we finally have the semi-discrete
form
|𝑢𝑡 |𝑖 (𝑥𝑖+1/2 − 𝑥𝑖−1/2 ) + 𝑓 (𝑢𝑖+1/2 ) − 𝑓 (𝑢𝑖−1/2 ) = 0

This approach produces a conservative scheme since we are matching the flux crossing the
boundary of one finite volume to the adjacent volume. So in FVM it is very crucial to assess the
flux crossing the boundaries.

The most popular CFD package ANSYS FLUENT is based on Finite Volume Method. Other
popular CFD packages like ADINA and ANSYS CFX are Finite Element Method based.

You might also like