Professional Documents
Culture Documents
1.1 Introduction[2]
Fig. 1.1 A computer simulation of high velocity air flow around the Space Shuttle during re entry.
The fundamental basis of almost all CFD problems are the Navier–Stokes
equations, which define any single-phase fluid flow. These equations can be simplified by
removing terms describing viscosity to yield the Euler equations. Further simplification,
1
by removing terms describing vorticity yields the full potential equations. Finally, these
equations can be linearized to yield the linearized potential equations.
The equations are useful because they describe the physics of many things of
academic and economic interest. They may be used to model the weather, ocean currents,
water flow in a pipe and air flow around a wing. The Navier–Stokes equations in their full
and simplified forms help with the design of aircraft and cars, the study of blood flow, the
design of power stations, the analysis of pollution, and many other things. Coupled with
Maxwell's equations they can be used to model and study magneto hydrodynamics.
The Navier–Stokes equations dictate not position but rather velocity. A solution of
the Navier–Stokes equations is called a velocity field or flow field, which is a description
of the velocity of the fluid at a given point in space and time. Once the velocity field is
solved for, other quantities of interest (such as flow rate or drag force) may be found. This
is different from what one normally sees in classical mechanics, where solutions are
typically trajectories of position of a particle or deflection of a continuum. Studying
velocity instead of position makes more sense for a fluid; however for visualization
purposes one can compute various trajectories
2
1.2.1.1 Properties
A. Nonlinearity
B. Turbulence
Turbulence is the time dependent chaotic behavior seen in many fluid flows. It is
generally believed that it is due to the inertia of the fluid as a whole: the culmination of
time dependent and convective acceleration; hence flows where inertial effects are small
tend to be laminar (the Reynolds number quantifies how much the flow is affected by
inertia). It is believed, though not known with certainty, that the Navier–Stokes equations
describe turbulence properly
C. Applicability
The Navier–Stokes equations assume that the fluid being studied is a continuum
not moving at relativistic velocities. At very small scales or under extreme conditions,
real fluids made out of discrete molecules will produce results different from the
3
continuous fluids modeled by the Navier–Stokes equations. Depending on the Knudsen
number of the problem, statistical mechanics or possibly even molecular dynamics may
be a more appropriate approach.
where is the flow velocity, ρ is the fluid density, p is the pressure, is the
(deviatoric) stress tensor, and represents body forces (per unit volume) acting on the
fluid and is the del operator. This is a statement of the conservation of momentum in a
fluid and it is an application of Newton's second law to a continuum; in fact this equation
is applicable to any non-relativistic continuum and is known as the Cauchy momentum
equation.
This equation is often written using the material derivative Dv/Dt, making it more
apparent that this is a statement of Newton's second law:
The left side of the equation describes acceleration, and may be composed of time
dependent or convective effects (also the effects of non-inertial coordinates if present).
The right side of the equation is in effect a summation of body forces (such as gravity)
and divergence of stress (pressure and shear stress).
A. Convective acceleration
4
Fig. 1.3 An example of convection. Though the flow may be steady (time independent), the fluid
decelerates as it moves down the diverging duct (assuming incompressible flow), hence there is an
acceleration happening over position.
5
Here is the tensor derivative of the velocity vector, equal in Cartesian
coordinates to the component by component gradient. The convection term may, by a
vector calculus identity, be expressed without a tensor derivative:
The form has use in irrotational flow, where the curl of the velocity (called
vorticity) is equal to zero.
B. Stresses
The effect of stress in the fluid is represented by the and terms; these are
gradients of surface forces, analogous to stresses in a solid. is called the pressure
gradient and arises from the isotropic part of the stress tensor. This part is given by
normal stresses that turn up in almost all situations, dynamic or not. The anisotropic part
of the stress tensor gives rise to , which conventionally describes viscous forces; for
incompressible flow, this is only a shear effect. Thus, is the deviatoric stress tensor, and
the stress tensor is equal to:
where is the 3×3 identity matrix. Interestingly, only the gradient of pressure
matters, not the pressure itself. The effect of the pressure gradient is that fluid flows from
high pressure to low pressure.
The stress terms p and are yet unknown, so the general form of the equations of
motion is not usable to solve problems. Besides the equations of motion, Newton's second
law, a force model is needed relating the stresses to the fluid motion. For this reason,
assumptions on the specific behavior of a fluid are made (based on natural observations)
6
and applied in order to specify the stresses in terms of the other flow variables, such as
velocity and density.
The Navier–Stokes equations result from the following assumptions on the deviatoric
stress tensor :
the deviatoric stress vanishes for a fluid at rest, and – by Galilean invariance –
also does not depend directly on the flow velocity itself, but only on spatial
derivatives of the flow velocity
in the Navier–Stokes equations, the deviatoric stress is expressed as the product of
the tensor gradient of the flow velocity with a viscosity tensor , i.e. :
the fluid is assumed to be isotropic, as valid for gases and simple liquids, and
consequently is an isotropic tensor; furthermore, since the deviatoric stress
tensor is symmetric, it turns out that it can be expressed in terms of two scalar
As a result, in the Navier–Stokes equations the deviatoric stress tensor has the following
form:
with the quantity between brackets the non-isotropic part of the rate-of-strain tensor The
dynamic viscosity μ does not need to be constant – in general it depends on conditions
like temperature and pressure, and in turbulence modelling the concept of eddy viscosity
is used to approximate the average deviatoric stress.
The pressure p is modeled by use of an equation of state. For the special case of an
incompressible flow, the pressure constrains the flow in such a way that the volume of
fluid elements is constant: isochoric flow resulting in a solenoidal velocity field with
7
C. Other forces
The vector field represents body forces. Typically these consist of only gravity
forces, but may include other types (such as electromagnetic forces). In a non-inertial
coordinate system, other "forces" such as that associated with rotating coordinates may be
inserted.
Often, these forces may be represented as the gradient of some scalar quantity.
Gravity in the z direction, for example, is the gradient of − ρgz. Since pressure shows up
only as a gradient, this implies that solving a problem without any such body force can be
mended to include the body force by modifying pressure.
D. Other equations
8
phenomena are important. The incompressible flow assumption typically holds well even
when dealing with a "compressible" fluid — such as air at room temperature — at low
Mach numbers (even when flowing up to about Mach 0.3). Taking the incompressible
flow assumption into account and assuming constant viscosity, the Navier–Stokes
equations will read, in vector form:
Here f represents "other" body forces (forces per unit volume), such as gravity or
centrifugal force. The shear stress term becomes the useful quantity ( is the
vector Laplacian) when the fluid is assumed incompressible, homogeneous and
Newtonian, where is the (constant) dynamic viscosity.
It's well worth observing the meaning of each term (compare to the Cauchy
momentum equation):
Note that only the convective terms are nonlinear for incompressible Newtonian
flow. The convective acceleration is an acceleration caused by a (possibly steady) change
in velocity over position, for example the speeding up of fluid entering a converging
nozzle. Though individual fluid particles are being accelerated and thus are under
unsteady motion, the flow field (a velocity distribution) will not necessarily be time
dependent.
9
If temperature effects are also neglected, the only "other" equation (apart from
initial/boundary conditions) needed is the mass continuity equation. Under the
incompressible assumption, density is a constant and it follows that the equation will
simplify to:
Note that gravity has been accounted for as a body force, and the values of gx, gy,
gz will depend on the orientation of gravity with respect to the chosen set of coordinates.
When the flow is at steady-state, ρ does not change with respect to time.
The continuity equation is reduced to:
10
When the flow is incompressible, ρ is constant and does not change with respect
to space. The continuity equation is reduced to:
The velocity components (the dependent variables to be solved for) are typically
named u, v, w. This system of four equations comprises the most commonly used and
studied form. Though comparatively more compact than other representations, this is still
a nonlinear system of partial differential equations for which solutions are difficult to
obtain.
A change of variables on the Cartesian equations will yield the following momentum
equations for r, φ, and z:
The gravity components will generally not be constants, however for most
applications either the coordinates are chosen so that the gravity components are constant
or else it is assumed that gravity is counteracted by a pressure field (for example, flow in
horizontal pipe is treated normally without gravity and without a vertical pressure
gradient). The continuity equation is:
11
(iii) Spherical coordinates
In spherical coordinates, the r, φ, and θ momentum equations are (note the convention
used: θ is polar angle, or colatitude, 0 ≤ θ ≤ π):
These equations could be (slightly) compacted by, for example, factoring 1 / r2 from
the viscous terms. However, doing so would undesirably alter the structure of the
Laplacian and other quantities.
12
Taking the curl of the Navier–Stokes equation results in the elimination of pressure.
This is especially easy to see if 2D Cartesian flow is assumed (w = 0 and no dependence
of anything on z), where the equations reduce to:
Differentiating the first with respect to y, the second with respect to x and
subtracting the resulting equations will eliminate pressure and any conservative force.
Defining the stream function ψ through
There are some phenomena that are closely linked with fluid compressibility. One
of the obvious examples is sound. Description of such phenomena requires more general
13
presentation of the Navier–Stokes equation that takes into account fluid compressibility.
If viscosity is assumed a constant, one additional term appears, as shown here:
1.2.2.1 History
The Euler equations first appeared in published form in Eulers article “Principe’s
généraux du movement des fluids,” published in Memories de l'Academie des Sciences
de Berlin in 1757. They were among the first partial differential equations to be written
down.
where
14
The second equation includes the divergence of a dyadic product, and may be clearer
in subscript notation; for each j from 1 to 3 one has:
Note that the above equations are expressed in conservation form, as this format
emphasizes their physical origins (and is often the most convenient form for
computational fluid dynamics simulations). The second equation, which represents
momentum conservation, can also be expressed in non-conservation form as:
but this form obscures the direct connection between the Euler equations and Newton's
second law of motion.
where
15
This form makes it clear that fx, fy and fz are fluxes.
Note the odd form for the energy equation; see Rankine–Hugoniot equation. The
extra terms involving p may be interpreted as the mechanical work done on a fluid
element by its neighbor fluid elements. These terms sum to zero in an incompressible
fluid.
The Euler equations are nonlinear hyperbolic equations and their general solutions
are waves. Much like the familiar oceanic waves, waves described by the Euler Equations
'break' and so-called shock waves are formed; this is a nonlinear effect and represents the
solution becoming multi-valued. Physically this represents a breakdown of the
assumptions that led to the formulation of the differential equations, and to extract further
information from the equations we must go back to the more fundamental integral form.
Then, weak solutions are formulated by working in 'jumps' (discontinuities) into the flow
quantities – density, velocity, pressure, entropy – using the Rankine–Hugoniot shock
conditions. Physical quantities are rarely discontinuous; in real flows, these
discontinuities are smoothed out by viscosity. (See Navier–Stokes equations)
For certain problems, especially when used to analyze compressible flow in a duct
or in case the flow is cylindrically or spherically symmetric, the one-dimensional Euler
equations are a useful first approximation. Generally, the Euler equations are solved by
Riemann's method of characteristics. This involves finding curves in plane of independent
16
variables (i.e., x and t) along which partial differential equations (PDE's) degenerate into
ordinary differential equations (ODE's). Numerical solutions of the Euler equations rely
heavily on the method of characteristics.
In fluid dynamics, potential flow describes the velocity field as the gradient of a
scalar function: the velocity potential. As a result, a potential flow is characterized by an
irrotational velocity field, which is a valid approximation for several applications. The
irrotationality of a potential flow is due to the curl of a gradient always being equal to
zero.
Applications of potential flow are for instance: the outer flow field for aerofoils,
water waves, electroosmotic flow, and groundwater flow. For flows (or parts thereof)
with strong vorticity effects, the potential flow approximation is not applicable.
Fig. 1.4 Streamlines for the incompressible potential flow around a circular cylinder in a uniform on flow.
17
Sometimes, also the definition v = −∇φ, with a minus sign, is used. But here we
will use the definition above, without the minus sign. From vector calculus it is known,
that the curl of a gradient is equal to zero:
and consequently the vorticity, the curl of the velocity field v, is zero:
This implies that a potential flow is an irrotational flow. This has direct
consequences for the applicability of potential flow. In flow regions where vorticity is
known to be important, such as wakes and boundary layers, potential flow theory is not
able to provide reasonable predictions of the flow. Fortunately, there are often large
regions of a flow where the assumption of irrotationality is valid, which is why potential
flow is used for various applications. For instance in: flow around aircraft, groundwater
flow, acoustics, water waves, and electroosmotic flow.
A. Incompressible flow
with the dot denoting the inner product. As a result, the velocity potential φ has to satisfy
Laplace's equation
Where is the Laplace operator (sometimes also written Δ). In this case the
flow can be determined completely from its kinematics: the assumptions of irrotationality
and zero divergence of the flow. Dynamics only have to be applied afterwards, if one is
interested in computing pressures: for instance for flow around airfoils through the use of
Bernoulli's principle.
18
B. Steady flow
Potential flow theory can also be used to model irrotational compressible flow. The
full potential equation, describing a steady flow, is given by:
and
where a is the local speed of sound. The flow velocity v is again equal to ∇Φ, with
Φ the velocity potential. The full potential equation is valid for sub-, trans- and
supersonic flow at arbitrary angle of attack, as long as the assumption of irrotationality is
applicable.
with M∞ = V∞ / a∞ the Mach number of the incoming free stream. This linear equation is
much easier to solve than the full potential equation: it may be recast into Laplace's
equation by a simple coordinate stretching in the x-direction.
A. Sound waves
19
Small-amplitude sound waves can be approximated with the following potential-flow
model:
which is a linear wave equation for the velocity potential φ. Again the oscillatory
part of the velocity vector v is related to the velocity potential by v = ∇φ, while as before
Δ is the Laplace operator, and ā is the average speed of sound in the homogeneous
medium. Note that also the oscillatory parts of the pressure p and density ρ each
individually satisfy the wave equation, in this approximation.
Potential flow does not include all the characteristics of flows that are encountered
in the real world. For example, potential flow excludes turbulence, which is commonly
encountered in nature. Also, potential flow theory cannot be applied for viscous internal
flows. Richard Feynman considered potential flow to be so unphysical that the only fluid
to obey the assumptions was "dry water".
More precisely, potential flow cannot account for the behavior of flows that
include a boundary layer. Nevertheless, understanding potential flow is important in
many branches of fluid mechanics.
Potential flow finds many applications in fields such as aircraft design. For
instance, in computational fluid dynamics, one technique is to couple a potential flow
solution outside the boundary layer to a solution of the boundary layer equations inside
the boundary layer.
20
Chapter 2
Discretization methods[5]
Methodology
During preprocessing
o The geometry (physical bounds) of the problem is defined.
o The volume occupied by the fluid is divided into discrete cells (the mesh).
The mesh may be uniform or non-uniform.
o The physical modeling is defined – for example, the equations of motions
+ enthalpy + radiation + species conservation
o Boundary conditions are defined. This involves specifying the fluid
behaviour and properties at the boundaries of the problem. For transient
problems, the initial conditions are also defined.
The simulation is started and the equations are solved iteratively as a steady-state
or transient.
Finally a postprocessor is used for the analysis and visualization of the resulting
solution.
Discretization methods
The finite volume method is a method for representing and evaluating partial
differential equations in the form of algebraic equations [LeVeque, 2002; Toro, 1999].
21
Similar to the finite difference method or finite element method, values are calculated at
discrete places on a meshed geometry. "Finite volume" refers to the small volume
surrounding each node point on a mesh. In the finite volume method, volume integrals in
a partial differential equation that contain a divergence term are converted to surface
integrals, using the divergence theorem. These terms are then evaluated as fluxes at the
surfaces of each finite volume. Because the flux entering a given volume is identical to
that leaving the adjacent volume, these methods are conservative. Another advantage of
the finite volume method is that it is easily formulated to allow for unstructured meshes.
The method is used in many computational fluid dynamics packages.
2.1.1 1D example
flux or flow of . Conventionally, positive represents flow to the right whilst negative
represents flow to the left. If we assume that equation (1) represents a flowing medium
of constant area, we can sub-divide the spatial domain, , into finite volumes or cells with
cell centres indexed as . For a particular cell, , we can define the volume average value
of at time and , as
where and represent locations of the upstream and downstream faces or edges
respectively of the cell.
22
Integrating equation (1) in time, we have:
Where .
We assume that is well behaved and that we can reverse the order of integration.
Also, recall that flow is normal to the unit area of the cell. Now, since in one dimension
Where .
We can therefore derive a semi-discrete numerical scheme for the above problem
with cell centers indexed as , and with cell edge fluxes indexed as , by differentiating
(6) with respect to time to obtain:
23
2.1.2 General conservation law
We can also consider the general conservation law problem, represented by the
following PDE,
On integrating the first term to get the volume average and applying the
divergence theorem to the second, this yields
where represents the total surface area of the cell and is a unit vector normal
to the surface and pointing outward. So, finally, we are able to present the general result
equivalent to (7), i.e.
Finite volume schemes are conservative as cell averages change through the edge
fluxes. In other words, one cell's loss is another cell's gain!
24
2.2 Finite element method[2]
Fig. 2.1 2D FEM solution for a magnetostatic configuration (lines denote the direction and colour the
magnitude of calculated flux density)
Fig. 2.2 2D mesh for the image above (mesh is denser around the object of interest)
The finite element method (FEM) (its practical application often known as finite
element analysis (FEA)) is a numerical technique for finding approximate solutions of
partial differential equations (PDE) as well as of integral equations. The solution
approach is based either on eliminating the differential equation completely (steady state
problems), or rendering the PDE into an approximating system of ordinary differential
equations, which are then numerically integrated using standard techniques such as
Euler's method, Runge-Kutta, etc.
2.2.1 Application
FEM allows detailed visualization of where structures bend or twist, and indicates the
distribution of stresses and displacements. FEM software provides a wide range of
simulation options for controlling the complexity of both modeling and analysis of a
system. Similarly, the desired level of accuracy required and associated computational
time requirements can be managed simultaneously to address most engineering
applications. FEM allows entire designs to be constructed, refined, and optimized before
the design is manufactured.
We will illustrate the finite element method using two sample problems from
which the general method can be extrapolated. It is assumed that the reader is familiar
with calculus and linear algebra.
P1 is a one-dimensional problem
where f is given, u is an unknown function of x, and u'' is the second derivative of u with
respect to x.
where Ω is a connected open region in the (x,y) plane whose boundary is "nice"
(e.g., a smooth manifold or a polygon), and uxx and uyy denote the second derivatives with
respect to x and y, respectively.
26
The problem P1 can be solved "directly" by computing antiderivatives. However,
this method of solving the boundary value problem works only when there is only one
spatial dimension and does not generalize to higher-dimensional problems or to problems
like u + u'' = f. For this reason, we will develop the finite element method for P1 and
outline its generalization to P2.
Our explanation will proceed in two steps, which mirror two essential steps one must
take to solve a boundary value problem (BVP) using the FEM.
In the first step, one rephrases the original BVP in its weak form. Little to no
computation is usually required for this step. The transformation is done by hand
on paper.
The second step is the discretization, where the weak form is discretized in a finite
dimensional space.
After this second step, we have concrete formulae for a large but finite dimensional
linear problem whose solution will approximately solve the original BVP. This finite
dimensional problem is then implemented on a computer.
The first step is to convert P1 and P2 into their equivalents weak formulation. If u solves
P1, then for any smooth function v that satisfies the displacement boundary conditions,
i.e. v = 0 at x = 0 and x = 1,we have
(1)
Conversely, if u with u(0) = u(1) = 0 satisfies (1) for every smooth function v(x) then one
may show that this u will solve P1. The proof is easier for twice continuously
differentiable u (mean value theorem), but may be proved in a distributional sense as
well.
27
(2)
differentiable" and it turns out that the symmetric bilinear map then defines an inner
product which turns into a Hilbert space (a detailed proof is nontrivial.) On the
other hand, the left-hand-side is also an inner product, this time on the Lp
space L2(0,1). An application of the Riesz representation theorem for Hilbert spaces
shows that there is a unique u solving (2) and therefore P1. This solution is a-priori only a
member of , but using elliptic regularity, will be smooth if f is.
where denotes the gradient and denotes the dot product in the two-dimensional
plane. Once more can be turned into an inner product on a suitable space of
"once differentiable" functions of Ω that are zero on . We have also assumed that
(see Sobolev spaces). Existence and uniqueness of the solution can also be
shown.
28
2.2.6 Matrix form of the problem
If we denote by and the column vectors (u1,...,un)t and (f1,...,fn)t, and if we let
. (5)
, (6)
As we have discussed before, most of the entries of L and M are zero because the
basis functions vk have small support. So we now have to solve a linear system in the
unknown where most of the entries of the matrix L, which we need to invert, are zero.
Such matrices are known as sparse matrices, and there are efficient solvers for
such problems (much more efficient than actually inverting the matrix.) In addition, L is
symmetric and positive definite, so a technique such as the conjugate gradient method is
29
favored. For problems that are not too large, sparse LU decompositions and Cholesky
decompositions still work well. For instance, Matlab's backslash operator (which uses
sparse LU, sparse Cholesky, and other factorization methods) can be sufficient for meshes
with a hundred thousand vertices.
The matrix L is usually referred to as the stiffness matrix, while the matrix M is
dubbed the mass matrix.
One chooses a grid for Ω. In the preceding treatment, the grid consisted of
triangles, but one can also use squares or curvilinear polygons.
Then, one chooses basis functions. In our discussion, we used piecewise linear
basis functions, but it is also common to use piecewise polynomial basis
functions.
A separate consideration is the smoothness of the basis functions. For second order
elliptic boundary value problems, piecewise polynomial basis function that are merely
continuous suffice (i.e., the derivatives are discontinuous.) For higher order partial
differential equations, one must use smoother basis functions. For instance, for a fourth
order problem such as uxxxx + uyyyy = f, one may use piecewise quadratic basis functions
that are C1.
Another consideration is the relation of the finite dimensional space V to its infinite
30
Typically, one has an algorithm for taking a given mesh and subdividing it. If the
main method for increasing precision is to subdivide the mesh, one has an h-method (h is
customarily the diameter of the largest element in the mesh.) In this manner, if one shows
that the error with a grid h is bounded above by Chp, for some and p > 0, then one
has an order p method. Under certain hypotheses (for instance, if the domain is convex), a
piecewise polynomial of order d method will have an error of order p = d + 1.
If instead of making h smaller, one increases the degree of the polynomials used in the
basis function, one has a p-method. If one combines these two refinement types, one
obtains an hp-method (hp-FEM). In the hp-FEM, the polynomial degrees can vary from
element to element. High order methods with large uniform p are called spectral finite
element methods (SFEM). These are not to be confused with spectral methods.
For vector partial differential equations, the basis functions may take values in .
31
Finite-difference methods approximate the solutions to differential equations by
replacing derivative expressions with approximately equivalent difference quotients. That
is, because the first derivative of a function f is, by definition,
for some small value of h. In fact, this is the forward difference equation for the
first derivative. Using this and similar formulae to replace derivative expressions in
differential equations, one can approximate their solutions without the need for calculus.
where n! denotes the factorial of n, and Rn(x) is a remainder term, denoting the
difference between the Taylor polynomial of degree n and the original function. Again
using the first derivative of the function f as an example, by Taylor's theorem,
32
2.3.3 Accuracy and order
Fig. 2.3 The finite difference method relies on discretizing a function on a grid.
33
the dominant term of the local truncation error can be discovered. For example,
again using the forward-difference formula for the first derivative, knowing that f(xi) =
f(x0 + ih),
and further noting that the quantity on the left is the approximation from the finite
difference method and that the quantity on the right is the exact quantity of interest plus a
remainder, clearly that remainder is the local truncation error. A final expression of this
example and its order is:
This means that, in this case, the local truncation error is proportional to the step
size.
The Euler method for solving this equation uses the finite difference quotient
to approximate the differential equation by first substituting in for u'(x) and applying a
little algebra to get
34
The last equation is a finite-difference equation, and solving this equation gives an
approximate solution to the differential equation.
( boundary condition)
( initial condition)
One way to numerically solve this equation is to approximate all the derivatives
by finite differences. We partition the domain in space using a mesh x0,...,xJ and in time
using a mesh t0,....,tN. We assume a uniform partition both in space and in time, so the
difference between two consecutive space points will be h and between two consecutive
time points will be k. The points
Fig. 2.4 The stencil for the most common explicit method for the heat equation.
Using a forward difference at time tn and a second-order central difference for the
space derivative at position xj ("FTCS") we get the recurrence equation:
35
This is an explicit method for solving the one-dimensional heat equation.
where r = k / h2.
So, with this recurrence relation, and knowing the values at time n, one can obtain
the corresponding values at time n+1. and must be replaced by the boundary
conditions, in this example they are both 0.
36
The scheme is always numerically stable and convergent but usually more
numerically intensive than the explicit method as it requires solving a system of
numerical equations on each time step. The errors are linear over the time step and
quadratic over the space step.
The scheme is always numerically stable and convergent but usually more
numerically intensive as it requires solving a system of numerical equations on each time
step. The errors are quadratic over the time step and formally are of the fourth degree
However, near the boundaries, the error is often O(h2) instead of O(h4).
Usually the Crank–Nicolson scheme is the most accurate scheme for small time
steps. The explicit scheme is the least accurate and can be unstable, but is also the easiest
37
to implement and the least numerically intensive. The implicit scheme works the best for
large time steps.
38
High-resolution schemes often use flux/slope limiters to limit the gradient around
shocks or discontinuities. A particularly successful high-resolution scheme is the MUSCL
scheme which uses state extrapolation and limiters to achieve good accuracy.
Chapter 3
Turbulence models[2]
In studying turbulent flows, the objective is to obtain a theory or a model that can
yield quantities of interest, such as velocities. For turbulent flow, the range of length
scales and complexity of phenomena make most approaches impossible. The primary
approach in this case is to create numerical models to calculate the properties of interest.
A selection of some commonly-used computational models for turbulent flows are
presented in this section.
The chief difficulty in modeling turbulent flows comes from the wide range of
length and time scales associated with turbulent flow. As a result, turbulence models can
be classified based on the range of these length and time scales that are modeled and the
range of length and time scales that are resolved. The more turbulent scales that are
resolved, the finer the resolution of the simulation, and therefore the higher the
computational cost. If a majority or all of the turbulent scales are modeled, the
computational cost is very low, but the tradeoff comes in the form of decreased accuracy.
39
3.1 Direct numerical simulation[4]
where ν is the kinematic viscosity and ε is the rate of kinetic energy dissipation.
On the other hand, the integral scale depends usually on the spatial scale of the boundary
conditions.
So that the integral scale is contained within the computational domain, and also
Since
Where u' is the root mean square (RMS) of the velocity, the previous relations imply that
a three-dimensional DNS requires a number of mesh points N3 satisfying
40
.
Hence, the memory storage requirement in a DNS grows very fast with the
Reynolds number. In addition, given the very large memory necessary, the integration of
the solution in time must be done by an explicit method. This means that in order to be
accurate, the integration must be done with a time step, Δt, small enough such that a fluid
particle moves only a fraction of the mesh spacing h in each step. That is,
(C is here the Courant number). The total time interval simulated is generally
proportional to the turbulence time scale τ given by
Combining these relations, and the fact that h must be of the order of η, the
number of time-integration steps must be proportional to L / (Cη). By other hand, from
the definitions for Re, η and L given above, it follows that
and consequently, the number of time steps grows also as a power law of the
Reynolds number.
Therefore, the computational cost of DNS is very high, even at low Reynolds
numbers. For the Reynolds numbers encountered in most industrial applications, the
computational resources required by a DNS would exceed the capacity of the most
powerful computers currently available. However, direct numerical simulation is a useful
tool in fundamental research in turbulence. Using DNS it is possible to perform
"numerical experiments", and extract from them information difficult or impossible to
41
obtain in the laboratory, allowing a better understanding of the physics of turbulence.
Also, direct numerical simulations are useful in the development of turbulence models for
practical applications, such as sub-grid scale models for Large eddy simulation (LES) and
models for methods that solve the Reynolds-averaged Navier-Stokes equations (RANS).
This is done by means of "a priori" tests, in which the input data for the model is taken
from a DNS simulation, or by "a posteriori" tests, in which the results produced by the
model are compared with those obtained by DNS. The biggest DNS in the world, up to
this date, used 40963 mesh points. It was carried out in the Japanese Earth Simulator
supercomputer in 2002.
42
solution. This reduces the computational cost of the simulation. The governing equations
are thus transformed, and the solution is a filtered velocity field. Which of the "small"
length and time scales to eliminate are selected according to turbulence theory and
available computational resources.
Large eddy simulation resolves large scales of the flow field solution, allowing
better fidelity than alternative approaches that do not resolve any scales of the solution
(such as Reynolds-averaged Navier-Stokes (RANS) methods). It also models the smallest
(and most expensive) scales of the solution, rather than resolving them. This makes the
computational cost for practical engineering systems with complex geometry or flow
configurations, such as turbulent jets, pumps, vehicles, and landing gear, attainable using
supercomputers. In contrast, direct numerical simulation, which resolves every scale of
the solution, is prohibitively expensive for nearly all systems with complex geometry or
flow configurations.
43
a common misconception that the RANS equations do not apply to flows with a time-
varying mean flow because these equations are 'time-averaged'. In fact, statistically
unsteady (or non-stationary) flows can equally be treated. This is sometimes referred to as
URANS. There is nothing inherent in Reynolds averaging to preclude this, but the
turbulence models used to close the equations are valid only as long as the time over
which these changes in the mean occur is large compared to the time scales of the
turbulent motion containing most of the energy.
Boussinesq hypothesis
This method involves using an algebraic equation for the Reynolds stresses which include
determining the turbulent viscosity, and depending on the level of sophistication of the
model, solving transport equations for determining the turbulent kinetic energy and
dissipation. Models include k-ε (Spaldin), Mixing Length Model (Prandtl) and Zero
Equation (Chen). The models available in this approach are often referred to by the
number of transport equations associated with the method. For example, the Mixing
Length model is a "Zero Equation" model because no transport equations are solved; the
k − ε is a "Two Equation" model because two transport equations (one for k and one for ε)
are solved.
Reynolds stress model (RSM)
This approach attempts to actually solve transport equations for the Reynolds stresses.
This means introduction of several transport equations for all the Reynolds stresses and
hence this approach is much more costly in CPU effort.
The coherent vortex simulation approach decomposes the turbulent flow field into
a coherent part, consisting of organized vortical motion, and the incoherent part, which is
the random background flow. This decomposition is done using wavelet filtering. The
approach has much in common with LES, since it uses decomposition and resolves only
the filtered portion, but different in that it does not use a linear, low-pass filter. Instead,
the filtering operation is based on wavelets, and the filter can be adapted as the flow field
evolves. Farge and Schneider tested the CVS method with two flow configurations and
showed that the coherent portion of the flow exhibited the energy spectrum exhibited by
44
the total flow, and corresponded to coherent structures (vortex tubes), while the
incoherent parts of the flow composed homogeneous background noise, which exhibited
no organized structures. Goldstein and Oleg applied the CVS model to large eddy
simulation, but did not assume that the wavelet filter completely eliminated all coherent
motions from the subfilter scales. By employing both LES and CVS filtering, they
showed that the SFS dissipation was dominated by the SFS flow field's coherent portion.
The vortex method is a grid-free technique for the simulation of turbulent flows. It
uses vortices as the computational elements, mimicking the physical structures in
turbulence. Vortex methods were developed as a grid-free methodology that would not be
limited by the fundamental smoothing effects associated with grid-based methods. To be
practical, however, vortex methods require means for rapidly computing velocities from
the vortex elements – in other words they require the solution to a particular form of the
N-body problem (in which the motion of N objects is tied to their mutual influences).
Software based on the vortex method offer a new means for solving tough fluid
dynamics problems with minimal user intervention. All that is required is specification of
45
problem geometry and setting of boundary and initial conditions. Among the significant
advantages of this modern technology;
Two-phase flow[2]
Solution algorithms
46
Discretization in space produces a system of ordinary differential equations for unsteady
problems and algebraic equations for steady problems. Implicit or semi-implicit methods
are generally used to integrate the ordinary differential equations, producing a system of
(usually) nonlinear algebraic equations. Applying a Newton or Picard iteration produces a
system of linear equations which is nonsymmetric in the presence of advection and
indefinite in the presence of incompressibility. Such systems, particularly in 3D, are
frequently too large for direct solvers, so iterative methods are used, either stationary
methods such as successive overrelaxation or Krylov subspace methods. Krylov methods
such as GMRES, typically used with preconditioning, operate by minimizing the residual
over successive subspaces generated by the preconditioned operator.
47
Chapter 4
Conclusion
The attraction of the subject is twofold. Firstly, the desire to be able to model
physical fluid phenomena that cannot be easily simulated or measured with a physical
experiment, for example weather systems or hypersonic aerospace vehicles. Secondly, the
desire to be able to investigate physical fluid systems more cost effectively and more
rapidly than with experimental procedures.
By use of the CFD softwares we are able to simulate the very difficult problems of
fluid flow very effectively that is not possible by conventional methods of solving
problem of fluid flow. This branch of fluid mechanics will also find the solutions and
simulation techniques for two phase flow in near future which will be big achievement for
all of us.
48
Bibliography
1. Patankar, Suhas (1980), Numerical Heat Transfer and Fluid Flow, Hemisphere
Series on Computational Methods in Mechanics and Thermal Science, Taylor &
Francis, ISBN 08911652239.
2. www.wikipedia.org
3. Anderson, John D. (1995), Computational Fluid Dynamics: The Basics With
Applications, McGraw-Hill Science, ISBN 0070016852
4. www.cfd-online.com
5. Sayma, Abdulnaser, (2009), Computational Fluid Dynamics, Vntus Publishing,
ISBN 9788776814304.
49
Contents
50
1.2.2.3. CONSERVATION AND VECTOR FORM 14
1.2.2.4. SHOCK WAVES 16
1.2.2.5. THE EQUATION OF ONE SPATIAL DIMENSION 16
1.3. POTENTIAL FLOW 17
1.3.1. CHARACTERISTICS AND APPLICATIONS 17
1.3.1.1. DESCRIPTION AND CHARACTERISTICS 17
A. INCOMPRESSIBLE FLOW 18
B. STEADY FLOW 19
1.3.1.2. DERIVATION OF FULL POTENTIAL EQUATION 20
A. SOUND WAVES 20
1.3.1.3 APPLICABILITY AND LIMITATIONS 20
2. DISCRETIZATION METHODS
METHODOLOGY 21
DISCRETIZATION METHODS 21
2.1.1 1D EXAMPLE 22
2.2.1 APPLICATION 25
51
2.2.8 VARIOUS TYPE OF FINITE ELEMENT METHODS 31
3. TURBULENCE MODELS
52
SOLUTION ALGORITHMS 46
4. CONCLUSION 48
5. BIBLIOGRAPHY 49
LIST OF FIGURE
1.1 A computer simulation of high velocity air flow around the Space Shuttle during re
entry. 1
1.4 Streamlines for the incompressible potential flow around a circular cylinder in a
uniform on flow. 22
2.4 The stencil for the most common explicit method for the heat equation. 35
53
ACKNOWLEDGEMENT
Any mission can never conclude without cooperation from surrounding. It is a great
pleasure for me to make use of this opportunity to express my thanks those person who
help me to bring out my seminar a successful venture.
First of all, I express my deep sense of gratitude and sincere thanks to my seminar guide,
“Mr. D P Sharma”, for encouraging me to deliver my seminar in the topic of my interest
and also given me the constant invaluable guidance, in the absence of which my seminar
presentation would have been incomplete.
I would also like to express my sincere thanks to “Dr. V K Gorana”, and “Mr. N K
Gupta”, for kindly providing me an opportunity to present the seminar.
Last but not the least, I thank all of my colleagues and friends for motivating me
throughout the completion of my seminar report.
Naresh Kumar,
07/391
Final Year, Mech.
UCE, Kota.
54
A
Seminar Report
On
“Computational Fluid Dynamics”
55
CERTIFICATE
Seminar Guide
Mr. D P Sharma
Asst. professor
Deptt. of Mechanical
Engg.,UCE, Kota
56
ABSTRACT
Fluid (gas and liquid) flows are governed by partial differential equations which
represent conservation laws for the mass, momentum, and energy.
Computational Fluid Dynamics (CFD) is the art of replacing such PDE systems
by a set of algebraic equations which can be solved using digital computers.
Fluid flows encountered in everyday life include meteorological phenomena (rain, wind,
hurricanes, floods, fires), environmental hazards (air pollution, transport of
contaminants), heating, ventilation and air conditioning of buildings, cars etc.,
combustion in automobile engines and other propulsion systems, interaction of various
objects with the surrounding air/water, complex flows in furnaces, heat exchangers,
chemical reactors etc., processes in human body (blood flow, breathing, drinking . . . )
and so on and so forth.
So we need various calculations to be performed, testing of flow widh the help of wind
tunnel or anything simulated environment for exact solution of flow problems. These
problems can be solved by using the branch of fluid mechanics which use numerical
methods, qualitative predictions of fluid flow.Nowdays these calculations and
computation is done by CFD softwares.
57
(i.e. computer simulations) in a ‘virtual flow laboratory’
58