Вы находитесь на странице: 1из 11

1

Introduction to CFD

Computational Fluid Dynamics (CFD) is a branch of Fluid mechanics, and is


concerned with the numerical simulation of flow phenomena. It is one of the
three principal avenues in which fluid flows may be studied. The other two
avenues are experimental and theoretical.

Figure 1: The three avenues of investigation for fluids problems


CFD is a broad ranging topic; It covers a number of subdivisions and categories such as
DNS - Direct Numerical Simulation.
LES - Large Eddy Simulation.
RANS - Reynolds Averaged Navier Stokes.
Within these broad classifications, there also exists a wide range of physical
phenomena which CFD aims to address, and a number of branches of mathematics which must be exploited.
Those engaged in the practice of CFD must have a thorough understanding
of the strengths and limitations of the algorithms used to produce the numerical
solutions.
Regardless of the nature of the simulation, CFD must deal with coupled
systems of non-linear partial differential equations (PDEs). For example, to
1

Figure 2: The three main research areas in CFD

Figure 3: Important subject areas in CFD

simulate an inviscid incompressible flow, we would need to solve the following


equations
u = 0
Du
= p
Dt
where u = (u, v, w)T . In this system of equations, p drives the velocity field via
its gradient, but u is also constrained to satisfy the continuity equation. u and
p are thereby coupled, and therefore need to be solved simultaneously.

1.1

Alternative approaches in CFD

Direct Numerical Simulation (DNS).


This approach resolves the equations governing motion fully. i.e.
it also resolves turbulent fluctuations in the fluid flow. It has the
advantage of not requiring any form of turbulence modelling. It has
the disadvantage of being profoundly expensive.
Large Eddy Simulation (LES).
This method resolves directly the large scales turbulent motions such
as the vortices which extract energy from the mean flow, but approximates the small scale turbulent behaviour. It is supposed to be as
accurate as DNS, while being as computationally cheap as RANS
(but it can work the other way around!)
Reynolds Averaged Navier Stokes (RANS).
This techniques involves the time (or ensemble) average of the flow
over all length scales. The averaged quantities are then modelled
using some set of assumptions. It is the cheapest of the three (and
the one currently embraced by industry), but suffers from (at present)
a lack of generality in its application.
The last two approaches discussed previously make use of turbulence models
1.1.1

Why do we need turbulence models?

We cannot solve the equations governing turbulent fluid flows at all.


We do not fully understand the dynamical processes undergone by a turbulent flow.
We need some way of estimating the stresses set up in the flow by the
turbulence dynamics.

1.1.2

Are there many turbulence models?

YES!
For RANS calculations, there are
0 equation models - Mixing length hypothesis
1 equation models - turbulence kinetic energy transport equation
2 equation models - k model
Stress transport models : DSM, ASM
Also there are DIA, EDQNM, RNG k ....
Not one of them works perfectly for all flow problems!

1.2

The CFD methodology

The equations governing a fluid flow can be classified by type:


Elliptic - Poisson problems
Hyperbolic - method of lines (characteristics)
Parabolic - time marching problems
The nature of the differential equation must be accommodated by the numerical method, i.e. a method derived for hyperbolic based flows will not
work for elliptic problems. Broadly speaking, each of the above problems can
be discretised using the following methodology
We start with the system of governing equations defined on some domain
, with boundary ;
We cannot solve the equation at every point in the domain (=exact solution) so; approximate
Break domain up into small fragments, delineated by a mesh
Across each fragment (cell/point), we assume a particular behaviour for
the solution
Finite difference/finite volume solution is locally polynomial
Fourier pseudospectral solution is globally a trigonometric polynomial
We discretise the governing equations. i.e. approximate terms such as p,
using the approximate (assumed) solution behaviour.

Figure 4: A typical problem; the flow around a turbine blade.

Figure 5: Discretisation of the flow domain

Figure 6: Approximating the solution as a polynomial


The discretisation step leads to a sparse linear system of equations, typically of the form
Ay = b
where b contains (say) (u (x) , v (x) , w (x) , p (x))
Solve this equation either
Directly
Iteratively
The resultant numerical solution should be an approximate solution to the
exact equations (it is one of the objectives of numerical analysis to ensure
that this is so).

1.3

Looking ahead

Over the next few weeks, we shall be looking at various aspects of the discretisation process, including
Interpolation schemes
Approaches to discretisation;
Finite difference methods
6

Finite Volume methods


Solution methods for large linear systems of equations
Time dependant (unsteady) problems

1.4

Interpolation schemes

1.5

Motivation

The exact solution to a differential equation describes a curve at every


point over the domain of definition of the problem.
We do not have the capacity to solve these equations numerically for the
infinite number of points in the continuum domain.
We therefore try to solve the equations at a finite set of points.
Derivatives need information about the solution behaviour local to a point.
We therefore assume a particular behaviour for the way in which the set
of points are joined together.
The nature of this assumption is closely reflected in the accuracy and
robustness of the resultant numerical algorithm.
The way in which the points are joined is called interpolation.
When using finite differences or finite volume methods, we effectively find
the interpolating polynomial for a set of points and then differentiate that
polynomial in order to approximate the derivatives in the problem.

Interpolation methods

Suppose we have a set of points in the x y plane


S = {(x0 , f (x0 )), (x1 , f (x1 )), . . . , (xn1 , f(xn1 ))} .
Through any set of n points, there exists a polynomial of degree n 1denoted
here
n1

P (n1) (x) =
am xm
(1)
m=0

(n1)

such that P
(xk ) = fk . i.e. the polynomial interpolates the set S. In the following sections, we examine a number of ways in which the desired interpolating
polynomial P (n1) (x) can be derived.

2.1

Method 1 : The method of undetermined coefficients

This method allows us to find the coefficients am in equation 1 directly. We


observe that at each of the points in the set P (n1) (xk ) = fk which, when
written out for each xi 1 i n yields
P (n1) (xi ) =

n1


m=0

am (xi )m = fi .

We can write this equation out in matrix form as

x00
x01
x02
..
.

x10
x11
x12

x20
x21
x22

Xa = f

..

a0
a1
a2
..
.

f0

f1

=
.
f
2

.
.
.

The coefficient vector a can be found formally by inverting the linear system to
obtain a = X1 f .
While straightforward, this method is undesirable due to the coefficient matrix rapidly becoming ill conditioned with increasing n. Ill conditioning will be
discussed later in the course, but for now it is sufficient to point out that ill
conditioning renders difficult the task of accurately inverting the X matrix. Ill
conditioning arises because of the increasingly near linear dependence between
successively higher monomials of x. Another drawback of the approach is that
it requires a linear system solver, which could be expensive.

2.2

Newtons Method

Suppose we fit a straight line between (x0 , f(x0 )) and (x1 , f(x1 )). We call the
resultant polynomial P (1) (x);
P (1) (x) = f0 +

f1 f0
(x x0 ) = b0 + b1 (x x0 ).
x1 x0

Suppose we now add a third point (x2 , f (x2 )) by using


P (2) (x) = P (1) (x) + b2 (x x0 )(x x1 ).
When x = x0 or x = x1 , the second term on the right hand side of the above
equation vanishes, and we are guaranteed that the resultant approximation collocates with (x0 , f (x0 )) and (x1 , f(x1 )). This approach can be repeated all the
way up to (xn1 , f (xn1 )) if required. The general form of the Newton polynomial is
P (n1) (x) =
+
+
..
.

b0
b1 (x x0 )
b2 (x x0 ) (x x1 )
..
.

+ bn1 (x x0 ) (x x1 ) . . . (x xn1 )
or
P

(n1)

(x) = b0 +

n1


m=1

m1


bm
(x xr ) .
r=0

Calculation of the bi is straightforward but tedious. The resultant polynomial is identical to that obtained by the method of undetermined coefficients,
but circumvents the ill-conditioning of the coefficient matrix.

2.3

Lagranges Method

Suppose that, for each point (xi , f (xi )), we introduce a polynomial Li (x) designed such that

1 j = i 0 i, j n 1
Li (xj ) =
.
0
j
= i

4
2
-2

-1

2
1

-2

-1

-2

-2

-4

-4

-6

-6

Lagrange polynomials for L0 (x) and L1 (x)


By definition, at each point xi ,
fi Li (xi ) = fi
,
fi Li (xj ) = 0
i.e. we can assemble the polynomial piece by piece, guaranteeing along the way
that the resultant polynomial collocates on the required sets. Hence the form
of the Lagrange polynomial is
P (n1) (x) =

n1


fm Lm (x)

m=0

2.3.1

design of Lm (x)

Similar to the Newton method, we construct a product which is zero at all of


the points (xi , f (xi )), except when j = m. We define first an intermediate
polynomial Lm (x) as
Lm (x) = (x x0 ) (x x1 ) . . . (x xm1 ) (x xm+1 ) . . . (x xn1 ) .
10

Lm (x) has part of the desired property, i.e. Lm (xj ) = C mj where C is some
constant. To complete the construction, we need to normalize Lm (xj ). We do
this by observing that at xm the value of Lm (xm ) is
Lm (xm ) = (xm x0 ) (xm x1 ) . . . (xm xm1 ) (xm xm+1 ) . . . (xm xn1 ) .
Hence if we divide Lm (x) through by this value, the resultant polynomial will
have all of the desired properties. We finally arrive at the definition of the
Lm (x);
n1

x xi
0 m n 1.
Lm (x) =
xm xi
i=0,i=m

All of the schemes so far presented can be applied to the entire set of points
(xi , f (xi )), or to contiguous subsets of these points. This last point will be
returned to later in the context of finite differences, finite volumes and Taylor
series expansions. If the function f (x) P (n1) (x) m < n (i.e. the function is
a polynomial of degree less than that estimated by the number of points), then
these methods will automatically find that polynomial.

11

Вам также может понравиться