You are on page 1of 40

MMME3093

Computer Modelling
Techniques

Lecture 1
Introduction to CFD and
Navier-Stokes Equations

Dr Cheng Xinwei
xinwei.cheng@nottingham.edu.my
MMME3093 Computer Modelling Techniques 1
MMME3093 Computer Modelling Techniques

Learning Outcomes
• Introduction to CFD
• Review the governing equations for thermo-fluids
• Understand boundary and initial conditions
• Understand numerical schemes (spatial)
• Pressure-velocity coupling
• Viscous models

Reading List
1. Versteeg, H. K., and W. Malalasekera. An introduction to
computional fluid dynamics: The Finite Volume Method.
Pearson.
2. Ferziger, Joel H., and Milovan Peric. Computational
methods for fluid dynamics. Springer.
MMME3093 Computer Modelling Techniques 2
MMME3093 Computer Modelling Techniques

Topics covered
• Governing equations
• Boundary conditions
• Meshing
• Discretisation schemes
• Finite volume method
• Diffusive, convective-diffusive flows
• Pressure-velocity coupling
• Viscous modelling

MMME3093 Computer Modelling Techniques 3


MMME3093 Computer Modelling Techniques

Recall fluid mechanics


• Continuity equations
• Navier-Stokes equations

A B C

Initial properties Final properties


pi, Ti, Vi, ui pf, Tf, Vf, uf

MMME3093 Computer Modelling Techniques 4


MMME3093 Computer Modelling Techniques

Navier-stokes equations
• A set of equations to describe mathematically how
velocity, pressure, temperature and density of a moving
fluid are related and including the effects of viscosity on
the flow.
• This is a maths problem but can be used to describe
such as
• Water flowing from a smaller to a larger pipe
• An airplane flying faster than the speed of sound
• Air flows in lungs
• Solution depends on the fluid properties i.e. viscosity,
density and also the boundary conditions of the domain.
MMME3093 Computer Modelling Techniques 5
MMME3093 Computer Modelling Techniques

What is CFD?
• CFD stands for Computational Fluid Dynamics.
• Relies on modelling of fluid mechanic equations of
motion i.e. fluid flow, heat transfer and associated
phenomena like chemical reactions.
• The computational aspect comes into it from finding a
numerical method to solve the equations.
• The equations involved are complex, inhomogeneous
partial differential equations (PDE) in 4 dimensions i.e.
3 space and 1 time.

MMME3093 Computer Modelling Techniques 6


MMME3093 Computer Modelling Techniques

Why CFD?
• Provides an insight of flow patterns that are
expensive or difficult to be studied using
experiment
• Cheaper, faster, parallel, multi-purpose
• However, CFD simulation cannot be 100%
reliable
WHY??
• Input data involve guessing
• Accuracy of results depends on computing power
• Mathematical model is inadequate

MMME3093 Computer Modelling Techniques 7


MMME3093 Computer Modelling Techniques

CFD software

MMME3093 Computer Modelling Techniques 8


MMME3093 Computer Modelling Techniques

CFD applications

MMME3093 Computer Modelling Techniques 9


MMME3093 Computer Modelling Techniques

CFD processes

Differential Differential
Physical Numerical
/algebraic /algebraic
processes results
equations equations

Modelling Numerical
Computers
techniques techniques

MMME3093 Computer Modelling Techniques 10


MMME3093 Computer Modelling Techniques

Numerical solution

• The conservation laws produce a group of partial differential


equations (PDEs). Usually there is no analytical solution to
such PDEs, so we have to rely on numerical techniques to
find approximate solutions.
• User has to translate complex mathematical calculations
into these “simple” algebraic operations for the computer to
execute, either by using commercial programs or
developing user source code.

MMME3093 Computer Modelling Techniques 11


MMME3093 Computer Modelling Techniques

Mathematical notations
Gradient (𝛻): A vector pointing in the direction of the greatest
rate of increment (to the greatest increasing direction).
𝜕𝑓 𝜕𝑓 𝜕𝑓
𝛻𝑓 = ∙ 𝑖Ԧ + ∙ 𝑗Ԧ + ∙ 𝑘 = 𝑔𝑟𝑎𝑑 (𝑓)
𝜕𝑥 𝜕𝑦 𝜕𝑧

Divergence (𝛻): Measures how the vectors are converging


or diverging at a given location (volume density of the
outward flux of a vector field from an infinitesimal volume
around a given point).
𝜕𝐹𝑥 𝜕𝐹𝑦 𝜕𝐹𝑧
𝛻∙𝐹 = + + = 𝑑𝑖𝑣 𝐹
𝜕𝑥 𝜕𝑦 𝜕𝑧

MMME3093 Computer Modelling Techniques 12


MMME3093 Computer Modelling Techniques

Governing principles
Like any physical system, the thermo-fluid system obeys
the 3 famous laws of conservation:
• Conservation of mass
• Conservation of momentum
• Conservation of energy

MMME3093 Computer Modelling Techniques 13


MMME3093 Computer Modelling Techniques

Conservation of mass

Rate of increase of mass = Net rate of flow of mass into


in fluid element fluid element
(mass flow in – mass flow out)
𝑑𝑚
= ෍ 𝑚ሶ 𝑖𝑛 − 𝑚ሶ 𝑜𝑢𝑡
𝑑𝑡
MMME3093 Computer Modelling Techniques 14
MMME3093 Computer Modelling Techniques

Conservation of mass
𝜕(𝜌𝑤)
𝜕(𝜌𝑣) 𝜌𝑤 + 𝑑𝑧
𝜌𝑣 + 𝑑𝑦 𝜕𝑧
𝜕𝑦
𝜕(𝜌𝑢)
𝜌𝑢 + 𝑑𝑥
𝜕𝑥
𝜌𝑢

𝜌𝑣
𝜌𝑤

𝜕𝜌 𝜕(𝜌𝑢)
𝑑𝑥𝑑𝑦𝑑𝑧 = 𝜌𝑢𝑑𝑦𝑑𝑧 − 𝜌𝑢 + 𝑑𝑥 𝑑𝑦𝑑𝑧
𝜕𝑡 𝜕𝑥
𝜕(𝜌𝑣)
+ 𝜌𝑣𝑑𝑥𝑑𝑧 − 𝜌𝑣 + 𝑑𝑦 𝑑𝑥𝑑𝑧
𝜕𝑦
𝜕(𝜌𝑤)
+ 𝜌𝑤𝑑𝑥𝑑𝑦 − 𝜌𝑤 + 𝑑𝑧 𝑑𝑥𝑑𝑦
𝜕𝑧
MMME3093 Computer Modelling Techniques 15
MMME3093 Computer Modelling Techniques

Conservation of mass
𝜕𝜌 𝜕(𝜌𝑢) 𝜕(𝜌𝑣) 𝜕(𝜌𝑤)
∴ + + + =0
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕𝜌
Or + 𝛻 ∙ (𝜌𝒖) = 0
𝜕𝑡
Given that 𝒖 = 𝑢𝒊 + 𝑣𝒋 + 𝑤𝒌
If the flow is incompressible, i.e. 𝜌= constant
𝜕𝑢 𝜕𝑣 𝜕𝑤
∴ + + =0
𝜕𝑥 𝜕𝑦 𝜕𝑧

The above equation can be expressed as


𝛻∙𝒖 =0
MMME3093 Computer Modelling Techniques 16
MMME3093 Computer Modelling Techniques

Conservation of momentum
Rate of increase of Net rate of
= Sum of forces for a
momentum in a + momentum flow in a
control volume
control volume control volume

𝐷𝑈
𝑚 = ෍ 𝐹Ԧ
𝐷𝑡
𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙

𝑑(𝑚𝑢)
+ ෍ 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑜𝑚𝑒𝑛𝑡𝑢𝑚𝑜𝑢𝑡 − 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑜𝑚𝑒𝑛𝑡𝑢𝑚𝑖𝑛 = ෍ 𝐹Ԧ
𝑑𝑡
𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙

MMME3093 Computer Modelling Techniques 17


MMME3093 Computer Modelling Techniques

Conservation of momentum
𝑑(𝑚𝑢)
+ ෍ 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑜𝑚𝑒𝑛𝑡𝑢𝑚𝑜𝑢𝑡 − 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑜𝑚𝑒𝑛𝑡𝑢𝑚𝑖𝑛 = ෍ 𝐹Ԧ
𝑑𝑡
𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙
𝜕𝜌𝑢𝑤
𝜌𝑢𝑤 + 𝑑𝑧 𝑑𝑥𝑑𝑦
𝜕𝑧
𝜕𝜌𝑢𝑣
𝜌𝑢𝑣 + 𝑑y 𝑑𝑦𝑑𝑧
𝜕𝑦

𝜌𝑢𝑢 𝑑𝑦𝑑𝑧 𝜕𝜌𝑢𝑢


𝜌𝑢𝑢 + 𝑑x 𝑑𝑦𝑑𝑧
𝜕𝑥

𝜌𝑢𝑣 𝑑𝑦𝑑𝑧
𝜌𝑢𝑤 𝑑𝑥𝑑𝑦
𝑑(𝑚𝑢)
+ ෍ 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑜𝑚𝑒𝑛𝑡𝑢𝑚𝑜𝑢𝑡 − 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑜𝑚𝑒𝑛𝑡𝑢𝑚𝑖𝑛
𝑑𝑡
𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑢𝑤)
= + + + 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
MMME3093 Computer Modelling Techniques 18
MMME3093 Computer Modelling Techniques

Conservation of momentum
Using the definition of Divergence (𝛻), we can rewrite the continuity and
convective terms in the Navier-Stokes equation in the following way:

Velocity vector: 𝒖 = 𝑢𝒊 + 𝑣𝒋 + 𝑤𝒌
(u )  (v ) (w)
+ + 𝛻 ∙ (𝜌𝒖)
x y z
𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑢𝑤) 𝜕(𝜌𝑢)
+ + + 𝑑𝑥𝑑𝑦𝑑𝑧 = + 𝛻 ∙ 𝜌𝑢𝒖 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡

𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑢𝑤) 𝜕(𝜌𝑢)


x-momentum + + + + 𝛻 ∙ (𝜌𝑢𝒖)
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡
𝜕(𝜌𝑣) 𝜕(𝜌𝑣𝑢) 𝜕(𝜌𝑣𝑣) 𝜕(𝜌𝑣𝑤) 𝜕(𝜌𝑣)
y-momentum + + + + 𝛻 ∙ (𝜌𝑣𝒖)
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡
𝜕(𝜌𝑤) 𝜕(𝜌𝑤𝑢) 𝜕(𝜌𝑤𝑣) 𝜕(𝜌𝑤𝑤) 𝜕(𝜌𝑤)
z-momentum + + + + 𝛻 ∙ (𝜌𝑤𝒖)
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡
MMME3093 Computer Modelling Techniques 19
MMME3093 Computer Modelling Techniques

Conservation of momentum
Rate of increase of Net rate of
Sum of forces for a
momentum in a + momentum flow in a = control volume
control volume control volume

2 types of forces

Surface force Body force


• Force acting on the • External force acting on
surface of the CV i.e. the entire mass within the
hydrostatic pressure, element i.e. gravity,
viscous stresses centrifugal force
• Separate terms in the • Source term in the
momentum equation momentum equation
MMME3093 Computer Modelling Techniques 20
MMME3093 Computer Modelling Techniques

Conservation of momentum
As an example, the net force in the x-direction is the sum of the
force components on every surface acting in that direction.

𝜕τ𝑧𝑥 Pressure (or normal stress)


τ𝑧𝑥 + 𝑑𝑧
𝜕τ𝑦𝑥 𝜕𝑧
τ𝑦𝑥 + 𝑑𝑦 τ𝑦𝑥 and viscous stresses are
𝜕𝑦 denoted by p and 𝝉𝒊𝒋 ,
𝜕𝑝 respectively
𝑝 𝑝+ 𝑑𝑥
𝜕𝑥
τ𝑥𝑥 Suffices i and j in τij
𝜕τ𝑥𝑥
τ𝑥𝑥 + 𝑑𝑥 indicate stress component
𝜕𝑥
acts in the j-direction
τ𝑧𝑥 normal to the i-direction.

𝜕(−𝑝+τ𝑥𝑥 ) 𝜕τ𝑦𝑥 𝜕τ𝑧𝑥


∴ Net force in x-direction: 𝜕𝑥
+ 𝜕𝑦 + 𝜕𝑧

MMME3093 Computer Modelling Techniques 21


MMME3093 Computer Modelling Techniques

Conservation of momentum
Equating this equation to the rate of increase of momentum in
the x-direction derived earlier
Rate of increase of Net rate of
Sum of forces for a
momentum in a + momentum flow in a =
control volume
control volume control volume

𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑢𝑤)


+ + + 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧

𝜕(−𝑝) 𝜕(𝜏𝑥𝑥 ) 𝜕𝜏𝑦𝑥 𝜕𝜏𝑧𝑥


= + + + + 𝑆𝑥 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧

Where 𝑆𝑥 is source term of x-momentum for body forces


(per unit volume per unit time)
MMME3093 Computer Modelling Techniques 22
MMME3093 Computer Modelling Techniques

Navier-Stokes equations
For Newtonian fluids, viscous stresses are proportional to the
both linear deformation rate and volumetric deformation rate.
𝜕𝑢 𝜕𝑢 𝜕𝑢
𝜏𝑥𝑥 = 𝜇 + + λ 𝛻 ∙ 𝒖 = 2𝜇 +λ𝛻∙𝒖 𝜕𝑢 𝜕𝑣
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜏𝑥𝑦 = 𝜏𝑦𝑥 = 𝜇 +
𝜕𝑦 𝜕𝑥
𝜕𝑣 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑤
𝜏𝑦𝑦 =𝜇 + + λ 𝛻 ∙ 𝒖 = 2𝜇 +λ𝛻∙𝒖 𝜏𝑥𝑧 = 𝜏𝑧𝑥 = 𝜇 +
𝜕𝑧 𝜕𝑥
𝜕𝑦 𝜕𝑦 𝜕𝑦
𝜕𝑣 𝜕𝑤
𝜕𝑤 𝜕𝑤 𝜕𝑤 𝜏𝑦𝑧 = 𝜏𝑧𝑦 = 𝜇 +
𝜕𝑧 𝜕𝑦
𝜏𝑧𝑧 = 𝜇 + + λ 𝛻 ∙ 𝒖 = 2𝜇 +λ𝛻∙𝒖
𝜕𝑧 𝜕𝑧 𝜕𝑧

The net forces in the momentum acting in the x-direction becomes

𝜕τ𝑥𝑥 𝜕τ𝑦𝑥 𝜕τ𝑧𝑥 𝜕2𝑢 𝜕2𝑢 𝜕2𝑣 𝜕2𝑢 𝜕2𝑤 𝜕


+ + =𝜇 2 2+ 2+ + 2+ + (λ 𝛻 ∙ 𝒖 )
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑥𝜕𝑦 𝜕𝑧 𝜕𝑥𝜕𝑧 𝜕𝑥

MMME3093 Computer Modelling Techniques 23


MMME3093 Computer Modelling Techniques

Navier-Stokes equations
For compressible Newtonian flow
𝜕𝜌 𝜕(𝜌𝑢) 𝜕(𝜌𝑣) 𝜕(𝜌𝑤)
Continuity equation: + + + =0
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
Navier-Stokes equations:
𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑢𝑤)
𝜕𝑡
+
𝜕𝑥
+
𝜕𝑦
+
𝜕𝑧
=
𝜕𝑝 𝜕2𝑢 𝜕2 𝑢 𝜕2𝑢 𝜕 𝜕𝑢 𝜕𝑣 𝜕𝑤
− +𝜇 + + + + + + 𝑆𝑀𝑥
𝜕𝑥 𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕(𝜌𝑣) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑣𝑣) 𝜕(𝜌𝑣𝑤)
𝜕𝑡
+
𝜕𝑥
+
𝜕𝑦
+
𝜕𝑧
=
𝜕𝑝 𝜕 2 𝑣 𝜕 2 𝑣 𝜕 2 𝑣 𝜕 𝜕𝑢 𝜕𝑣 𝜕𝑤
− +𝜇 + + + + + + 𝑆𝑀𝑦
𝜕𝑦 𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕(𝜌𝑤) 𝜕(𝜌𝑢𝑤) 𝜕(𝜌𝑣𝑤) 𝜕(𝜌𝑤𝑤)
+ + + =
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕𝑝 𝜕 2 𝑤 𝜕 2 𝑤 𝜕 2 𝑤 𝜕 𝜕𝑢 𝜕𝑣 𝜕𝑤
− +𝜇 + + + + + + 𝑆𝑀𝑧
𝜕𝑧 𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
MMME3093 Computer Modelling Techniques 24
MMME3093 Computer Modelling Techniques

Navier-Stokes equations
For incompressible flow
𝜕𝑢 𝜕𝑣 𝜕𝑤
Continuity equation: + + =0
𝜕𝑥 𝜕𝑦 𝜕𝑧

For incompressible Newtonian fluid

𝜕τ𝑥𝑥 𝜕τ𝑦𝑥 𝜕τ𝑧𝑥 𝜕2𝑢 𝜕2𝑢 𝜕2𝑢


+ + =𝜇 2
+ 2+ 2
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜇 ∙ 𝛻2𝑢
𝜕τ𝑥𝑦 𝜕τ𝑦𝑦 𝜕τ𝑧𝑦 𝜕2𝑣 𝜕2𝑣 𝜕2𝑣
+ + =𝜇 + + ൞ 𝜇 ∙ 𝛻2𝑣
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2
𝜇 ∙ 𝛻2𝑤
𝜕τ𝑥𝑧 𝜕τ𝑦𝑧 𝜕τ𝑧𝑧 𝜕2𝑤 𝜕2𝑤 𝜕2𝑤
+ + =𝜇 2
+ 2
+ 2
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧

MMME3093 Computer Modelling Techniques 25


MMME3093 Computer Modelling Techniques

Energy equation
•The Navier-Stokes energy equation can be derived
using similar concept to that of momentum equation.
•It is based on the First of Law of Thermodynamics
(Conservation of Energy).

Rate of increase Net rate of heat Net rate of work


of energy of fluid = added to fluid + done on fluid
particle particle particle

MMME3093 Computer Modelling Techniques 26


MMME3093 Computer Modelling Techniques

Energy equation
Rate of increase Net rate of heat Net rate of work
of energy of fluid = added to fluid + done on fluid
particle particle particle

𝐷𝐸
𝜌 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝐷𝑡

The energy of a fluid is the sum of internal (thermal) energy, kinetic


energy and potential energy.
1 2
𝐸 = 𝑖 + 𝑢 + 𝑣 2 + 𝑤 2 + 𝑔𝑧
2

MMME3093 Computer Modelling Techniques 27


MMME3093 Computer Modelling Techniques

Work done by surface forces


Rate of increase Net rate of heat Net rate of work
of energy of fluid = added to fluid + done on fluid
particle particle particle

It is the product of force as derived earlier and velocity component in


the direction of the force.
For example, the x-direction
𝜕(τ𝑧𝑥 𝑢)
τ𝑧𝑥 𝑢 + 𝑑𝑧
𝜕(τ𝑦𝑥 𝑢) 𝜕𝑧
τ𝑦𝑥 𝑢 + 𝑑𝑦 τ𝑦𝑥 𝑢
𝜕𝑦

𝑝𝑢 𝜕(𝑝𝑢)
𝑝𝑢 + 𝑑𝑥
τ𝑥𝑥 𝑢 𝜕𝑥
𝜕(τ𝑥𝑥 𝑢)
τ𝑥𝑥 𝑢 + 𝑑𝑥
𝜕𝑥

τ𝑧𝑥 𝑢
MMME3093 Computer Modelling Techniques 28
MMME3093 Computer Modelling Techniques

Work done by surface forces


∴ Net work done in the x-direction

𝜕𝑢(−𝑝 + τ𝑥𝑥 ) 𝜕(𝑢τ𝑦𝑥 ) 𝜕(𝑢τ𝑧𝑥 )


+ + 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

Similarly, net work done in the y-direction is


𝜕𝑣(τ𝑥𝑦 ) 𝜕𝑣(−𝑝 + τ𝑦𝑦 ) 𝜕(𝑣τ𝑧𝑦 )
+ + 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑦 𝜕𝑦 𝜕𝑧

Net work done in the z-direction is

𝜕𝑤(τ𝑥𝑧 ) 𝜕(𝑤τ𝑦𝑧 ) 𝜕𝑤(−𝑝 + τ𝑧𝑧 )


+ + 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

MMME3093 Computer Modelling Techniques 29


MMME3093 Computer Modelling Techniques

Work done by surface forces


Summing all the work resulted by surface forces yields the total work
done per unit volume acting on the fluid element.

𝜕𝑢(τ𝑥𝑥 ) 𝜕(𝑢τ𝑦𝑥 ) 𝜕(𝑢τ𝑧𝑥 )


−𝑑𝑖𝑣 (𝜌𝒖) + [ 𝜕𝑥
+ 𝜕𝑦
+ 𝜕𝑧

𝜕(𝑣τ𝑥𝑦 ) 𝜕(𝑣τ𝑦𝑦 ) 𝜕(𝑣τ𝑧𝑦 ) 𝜕(𝑤τ𝑥𝑧 ) 𝜕(𝑤τ𝑦𝑧 ) 𝜕(𝑤τ𝑧𝑧 )


+ + + + + + ]
𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧

Where
𝜕(𝑢𝑝) 𝜕(𝑣𝑝) 𝜕(𝑤𝑝)
−𝑑𝑖𝑣 (𝜌𝒖) = − − −
𝜕𝑥 𝜕𝑦 𝜕𝑧

MMME3093 Computer Modelling Techniques 30


MMME3093 Computer Modelling Techniques

Energy flux due to heat conduction


Rate of increase Net rate of heat Net rate of work
of energy of fluid = added to fluid + done on fluid
particle particle particle

Net rate of heat transfer to the fluid particle due to heat flow in the x-
direction is given by
𝜕(𝑞𝑧 )
𝑞𝑧 + 𝑑𝑧
𝜕𝑧
𝜕(𝑞𝑦 )
𝑞𝑦 + 𝑑y
𝜕𝑦

𝑞𝑥 𝜕(𝑞𝑥 )
𝑞𝑥 + 𝑑𝑥
𝜕𝑥

𝑞𝑦
MMME3093 Computer Modelling Techniques
𝑞𝑧 31
MMME3093 Computer Modelling Techniques

Energy flux due to heat conduction


Therefore, the net rate of heat transfer in the x-direction becomes
𝜕(𝑞𝑥 ) 𝜕(𝑞𝑥 )
𝑞𝑥 − 𝑞𝑥 + 𝑑𝑥 𝑑𝑦 𝑑𝑧 = − 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑥 𝜕𝑥

Similarly, in the y-direction and z-direction


𝜕(𝑞𝑦 ) 𝜕(𝑞𝑧 )
− 𝑑𝑥𝑑𝑦𝑑𝑧 − 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑦 𝜕𝑧

Sum of these per unit volume gives the total rate of heat added to
the fluid particle.

𝜕(𝑞𝑥 ) 𝜕(𝑞𝑦 ) 𝜕(𝑞𝑧 )


− − − = -div q
𝜕𝑥 𝜕𝑦 𝜕𝑧

MMME3093 Computer Modelling Techniques 32


MMME3093 Computer Modelling Techniques

Energy flux due to heat conduction


Applying Fourier’s law of heat conduction,

q = - k grad T

Thus, the rate of heat addition to the fluid particle per unit volume
due to heat conduction across element boundaries becomes

- div q = div (k grad T)

MMME3093 Computer Modelling Techniques 33


MMME3093 Computer Modelling Techniques

Energy equation
The energy equation per unit volume thus becomes
𝐷𝐸 𝜕𝑢 τ𝑥𝑥 𝜕(𝑢𝜏𝑦𝑥 ) 𝜕(𝑢𝜏𝑧𝑥 )
𝜌 = − 𝑑𝑖𝑣 𝑝𝒖 + [ + +
𝐷𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕(𝑣τ𝑥𝑦 ) 𝜕(𝑣τ𝑦𝑦 ) 𝜕(𝑣τ𝑧𝑦 ) 𝜕𝑤(τ𝑥𝑧 ) 𝜕(𝑤τ𝑦𝑧 ) 𝜕(𝑤τ𝑧𝑧 )
+ + + + + + ]
𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
+ div (k grad T) + 𝑆𝐸

The kinetic energy equation per unit volume is the multiplication of


momentum equation and velocity component.

𝐷𝐾 𝜕τ𝑥𝑥 𝜕τ𝑦𝑥 𝜕τ𝑧𝑥


𝜌 = − 𝒖 . 𝑔𝑟𝑎𝑑 𝑝 + u + +
𝐷𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕 τ𝑥𝑦 𝜕τ𝑦𝑦 𝜕τ𝑧𝑦 𝜕τ𝑥𝑧 𝜕τ𝑦𝑧 𝜕τ𝑧𝑧
+𝑣 + + +𝑤 + + + 𝒖 . 𝑺𝑴
𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
MMME3093 Computer Modelling Techniques 34
MMME3093 Computer Modelling Techniques

Energy equation
The change between energy equation and kinetic energy equation
yields the equation for internal energy.
𝐷𝑖 𝜕𝑢 𝜕𝑢 𝜕𝑢
𝜌 = − 𝑝 𝑑𝑖𝑣 𝒖+ div (k grad T) + 𝜏𝑥𝑥 + 𝜏𝑦𝑥 + 𝜏𝑧𝑥
𝐷𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧

𝜕𝑣 𝜕𝑣 𝜕𝑣 𝜕𝑤 𝜕𝑤 𝜕𝑤
+ 𝜏𝑥𝑦 + 𝜏𝑦𝑦 + 𝜏𝑧𝑦 + 𝜏𝑥𝑧 + 𝜏𝑦𝑧 + 𝜏𝑧𝑧 + 𝑆𝑖
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧

For incompressible fluid, where 𝑖 = 𝑐𝑇, 𝑐 is the specific heat and


𝑑𝑖𝑣 𝒖 = 0
𝐷𝑇 𝜕𝑢 𝜕𝑢 𝜕𝑢
𝜌𝑐 = div (k grad T)+ 𝜏𝑥𝑥 + 𝜏𝑦𝑥 + 𝜏𝑧𝑥
𝐷𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕𝑣 𝜕𝑣 𝜕𝑣 𝜕𝑤 𝜕𝑤 𝜕𝑤
+ 𝜏𝑥𝑦 + 𝜏𝑦𝑦 + 𝜏𝑧𝑦 + 𝜏𝑥𝑧 + 𝜏𝑦𝑧 + 𝜏𝑧𝑧 + 𝑆𝑖
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧

MMME3093 Computer Modelling Techniques 35


MMME3093 Computer Modelling Techniques

Governing equations
Mass
𝜕𝜌
+ 𝛻 ∙ 𝜌𝒖 = 0
𝜕𝑡

Momentum (x, y, z directions)


𝜕𝜌𝑢 𝜕𝑝
+ 𝛻 ∙ 𝜌𝑢𝒖 = − + 𝛻 ∙ 𝜇𝛻𝑢 + 𝑆𝑀𝑥
𝜕𝑡 𝜕𝑥
𝜕𝜌𝑣 𝜕𝑝
+ 𝛻 ∙ 𝜌𝑣𝒖 = − + 𝛻 ∙ 𝜇𝛻𝑣 + 𝑆𝑀𝑦
𝜕𝑡 𝜕𝑦

𝜕𝜌𝑤 𝜕𝑝
+ 𝛻 ∙ 𝜌𝑤𝒖 = − + 𝛻 ∙ 𝜇𝛻𝑤 + 𝑆𝑀𝑧
𝜕𝑡 𝜕𝑧

MMME3093 Computer Modelling Techniques 36


MMME3093 Computer Modelling Techniques

Governing equations
Energy
𝜕𝜌𝑖
+ 𝛻 ∙ 𝜌𝑖𝒖 = −𝑝𝛻𝑢 + 𝛻 ∙ 𝑘𝛻𝑇 + Φ + 𝑆𝑖
𝜕𝑡

Equation of state
𝑝 = 𝑝 𝜌, 𝑇 𝑎𝑛𝑑 𝑖 = 𝑖 𝜌, 𝑇

We have 5 flow equations, 2 further algebraic equations and


Newtonian viscosity model. In total, 7 unknowns need to be
determined.
The system is mathematically closed, provided that auxiliary, initial
and boundary conditions are given.

MMME3093 Computer Modelling Techniques 37


MMME3093 Computer Modelling Techniques

General scalar
The conservation laws can be represented in a uniform
format.
Rate change Convective

𝜕(𝜌𝜑)
+ 𝛻 ∙ 𝜌𝜑𝒖 = 𝛻∙ 𝛤𝛻𝜑 + 𝑆𝜑
𝜕𝑡
Diffusive Source term

MMME3093 Computer Modelling Techniques 38


MMME3093 Computer Modelling Techniques

Conclusions
This section covers the following aspects of numerical
modelling technique:
• General procedure of numerical modelling
• Derivation of transport equations
• Meshing and related properties
• Spatial discretisation with examples

MMME3093 Computer Modelling Techniques 39


MMME3093 Computer Modelling Techniques

References
• Lecture notes from UK Campus
• Versteeg, H.K. and Malalasekera W. An introduction to
computation fluid dynamics: the finite volume method.
Pearson, 2007

MMME3093 Computer Modelling Techniques 40

You might also like