Professional Documents
Culture Documents
The continuum equations for these can be expressed mathematically in many different ways.
In this Section we shall show that they can be written as equivalent:
• integral (i.e. control-volume) equations;
• differential equations;
In addition, the differential equations may be either conservative or non-conservative.
The focus will be the integral equations because they are physically more fundamental and
form the basis of the finite-volume method. However, the equivalent differential equations
are often easier to write down, manipulate and, in some cases, solve analytically.
In addition we shall demonstrate that, although there are different fluid variables, most of
them satisfy the same generic equation, which can be solved computationally by the same
subroutine. This is called the scalar-transport or advection-diffusion equation.
The rate of change of some quantity within an arbitrary control volume is determined by:
• the net rate of transport across the bounding surface (“flux”);
• the net rate of production within that control volume (“source”).
RATE OF CHANGE + FLUX = SOURCE
inside V
out of boundary inside V
(1) V
The flux across the bounding surface can be divided into:
• advection: transport with the flow;
• diffusion: net transport by molecular or turbulent fluctuations.
(Some authors – but not this one – prefer the term convection to advection.)
d
(mass ) + net outward mass flux = 0
dt
d
dt
( V)+ ∑
faces
u• A = 0 (3)
d( V )
+ ( uA) e − ( uA) w + ( vA) n − ( vA) s + ( wA) t − ( wA) b = 0
dt3 1444444444442444444444443
12 net outward mass flux
rate of change of mass
where values of density and velocity are assumed to be averages over volume or cell face.
This analysis is analogous to the finite-volume procedure, except that in the latter the control
volume does not shrink to zero; i.e. it is a finite-volume not infinitesimal-volume approach.
For a fixed volume, take d/dt under the integral sign and apply the divergence theorem to the
surface integral:
⌠ ∂
∂t + ∇ • ( u) dV = 0
⌡V
The total rate of change of momentum for fluid passing through a control volume consists of:
• time rate of change of total momentum inside the control volume; plus
• net momentum flux (difference between rate at which momentum leaves and enters).
u
For a cell with volume V and a typical face with area A:
momentum in cell = mass × u = ( V )u V un
momentum flux = mass flux × u = ( u • A)u A
d
(momentum) + net outward momentum flux = force
dt 44444444
1 42444444444 3
total rate of change of momentum
d
dt
(mass × u) + ∑ (mass
faces
flux × u) = F (7)
(Note that momentum, velocity and force are vectors; u and F have 3 components).
Fluid Forces
(i) Surface forces are usually expressed in terms of stress (= force per unit area):
force
stress = or force = stress × area
area
τ
• viscous stresses : frictional forces arising from relative motion. For a τ
simple shear flow there is only one non-zero stress component:
∂u
≡ 12 =
∂y U
but, in general, is a symmetric tensor with a more complex τ22
expression for its components. In incompressible flow: τ12
∂u i ∂u j y τ21
ij = ( + ) τ x τ11
∂x j ∂xi
11
τ 21
(For constant-density fluids pressure and weight can be combined in the governing
equations as a piezometric pressure p* = p + gz)
u
Coriolis force:
− 2 ∧u Ω
d
( Vu ) + ( uA) e u e − ( uA) w u w + ( vA) n u n − ( vA) s u s + ( wA) t u t − ( wA) b u b
t 24
d4 1444444444444442444444444444443
1 3 net outward momentum flux
rate of change of momentum
Dividing by the volume, x y z (and changing the order of pe and pw for convenience):
d( u ) ( uu ) e − ( uu ) w ( vu ) n − ( vu ) s ( wu ) t − ( wu ) b ( p − pw )
+ + + =− e
dt x y z x
+ viscous and other forces
∂ ( u ) ∂ ( uu ) ∂ ( vu ) ∂ ( wu ) ∂p
+ + + = − + ∇ 2 u + other forces (8)
∂t ∂x ∂y ∂z ∂x
Notes.
(1) The viscous term is given without proof (but MSc students read the notes below). ∇2 is
∂2 ∂2 ∂2
the Laplacian operator 2 + 2 + 2 .
∂x ∂y ∂z
(2) The pressure force per unit volume in the x direction is given by (minus) the pressure
gradient in that direction.
(3) You should be able to derive the y and z-momentum equations by inspection / pattern-
matching.
Separating surface forces (determined by a stress tensor ij) and body forces (fi per unit
volume), the control-volume equation for the i component of momentum may be written
d⌠ ⌠ ⌠ ⌠
u i dV + u i u j dA j = ij dA j + f i dV (9)
dt ⌡V ⌡∂V ⌡∂V ⌡V
where the stress tensor has pressure and viscous parts:
∂u i ∂u j 2 ∂u k
ij = − p ij + ij , ij = ( + − ) (10)
∂x j ∂x i 3 ∂x k
ij
For a fixed volume, take d/dt under the integral sign and apply the divergence theorem to the
surface integrals:
⌠ ∂ ( u i ) ∂ ( u i u j ) ∂ ij
+ − − f i dV = 0
∂t ∂x j ∂x j
⌡V
Since V is arbitrary, the integrand must vanish identically. Hence, for arbitrary surface and
body forces:
∂ ( u i ) ∂ ( u i u j ) ∂ ij
+ = + fi (11)
∂t ∂x j ∂x j
Splitting the stress tensor into pressure and viscous terms:
∂( ui ) ∂( ui u j ) ∂p ∂ ij
+ =− + + fi (12)
∂t ∂x j ∂xi ∂x j
If the fluid is incompressible and viscosity is uniform then the viscous term simplifies to give
∂( ui ) ∂( u i u j ) ∂p
+ =− + ∇ 2ui + f i
∂t ∂x j ∂xi
A similar equation may be derived for any physical quantity that is advected or diffused by a
fluid flow. For each such quantity an equation is solved for the concentration (i.e. amount per
unit mass) φ: for example, the concentration of salt, sediment or chemical constituent.
Diffusion occurs when concentration varies with position. It typically involves transport from
regions of high concentration to regions of low concentration, at a rate proportional to area
and concentration gradient. For many scalars it may be quantified by Fick’s diffusion law:
rate of diffusion = − diffusivity × gradient × area
∂φ
=− A
∂n
This is often referred to as gradient diffusion. A common example is heat conduction.
Balancing the rate of change against the net flux through the boundary and rate of production
yields the scalar-transport or (advection-diffusion) equation:
d ∂φ
dt
( V φ) + ∑ (C φ
faces
−
∂n
A) = S V (13)
∂ ( φ) ∂ ∂φ ∂ ∂φ ∂ ∂φ
+ ( uφ − ) + ( vφ − ) + ( wφ − )=S (14)
∂t ∂x ∂x ∂y ∂y ∂z ∂z
For a fixed control volume, taking the time derivative under the integral sign and using
Gauss’s divergence theorem as before gives a corresponding differential equation
∂ ( φ)
+ ∇ • ( uφ − ∇φ) = S (16)
∂t
In the momentum equation, if the viscous force A = (∂u / ∂y ) A is transferred to the LHS it
looks like a diffusive flux: e.g. for the x-component of momentum:
d ∂u
( Vu ) + ∑ (Cu − A) = S ′
dt faces ∂ n
The viscous force has been simplified a bit(!) – see 2.2.5 below – but the essence is correct.
Computationally, the same subroutine may be used to solve the general scalar-transport
equation for each variable (but with different diffusivities and source density S).
The simplified analysis above assumes that non-advective flux is simple gradient diffusion:
∂φ
− A
∂n
Actually, the real situation is a little more complex. For example, in the u-momentum
equation the full expression for the 1-component of viscous stress through the 2-face is
∂u ∂v
12 = ∂y + ∂x
For the u equation the u/ y part can be treated as gradient diffusion of u, but the v/ y term
can not. In general, we must include non-advective fluxes F ′ that can’t be represented by
gradient diffusion. These are discretised conservatively (i.e. worked out on cell faces) but are
transferred to the RHS as a source term:
d ∂φ
( V φ ) + ∑ [C φ − A + F ′] = S
dt faces ∂n
The control-volume equations are equally applicable to moving control volumes, provided
the normal velocity component un is taken relative to the mesh; i.e.
u n = (u − u mesh ) • n
This enables the finite-volume method to be used for calculating flows with moving
boundaries: for example, surface waves or internal combustion engines.
Two equivalent differential forms of the flow equations may be derived from the control-
volume equations in the limit as the control volume shrinks to a point:
• from fixed control volumes (Eulerian approach) we obtain the conservative
equations as above;
• using control volumes moving with the fluid (Lagrangian approach) we obtain non-
conservative equations.
However, either can be obtained by mathematical manipulation of the other.
For the conservative differential equations derived earlier all terms involving derivatives of
dependent variables have differential operators “on the outside”. Hence, they can be
integrated directly to give an equivalent integral form. For example, in one dimension:
x2
df ⌠
= g ( x) f ( x 2 ) − f ( x1 ) = g ( x) dx
dx ⌡x1
(differential form) (integral form)
The three-dimensional version uses partial derivatives and the divergence theorem to change
the differentials to surface integrals.
As an example of how essentially the same equation can appear in conservative and non-
conservative forms consider a simple 1-d example:
d 2
( y ) = e x (conservative form – can be integrated directly)
dx
dy
2y = ex (equivalent non-conservative form)
dx
Non-conservative (or Lagrangian) forms of the fluid-flow equations describe how a fixed
mass of fluid changes as it moves with the flow. For this we need a material derivative.
Material Derivatives
The rate of change of some property in a fluid element moving with the flow is called the
material (or substantive) derivative. It is denoted by Dφ/Dt and worked out as follows.
The material derivative is the total derivative taken along the particular path following the
flow (i.e. dx/dt = u, etc.):
Dφ ∂φ ∂φ ∂φ ∂φ
≡ +u +v +w (17)
Dt ∂t ∂x ∂y ∂z
Using this definition, it is possible to write a non-conservative but more compact form of the
governing equations. For a general scalar φ the sum of time-derivative and advective terms in
its transport equation is
∂ ( φ) ∂ ( uφ) ∂ ( vφ) ∂ ( wφ)
+ + +
∂t ∂x ∂y ∂z
∂ ∂φ ∂ ( u ) ∂φ ∂ ( v) ∂φ ∂ ( w) ∂φ
= φ+ + φ+ u + φ+ v + φ+ w
∂t ∂t ∂x ∂x ∂y ∂y ∂z ∂z
(by the product rule)
∂ ∂ ( u ) ∂ ( v) ∂ ( w) ∂φ ∂φ ∂φ ∂φ
= + + + φ + +u +v +w
∂4
1
t ∂x
44442444443
∂y ∂z 1∂4
t ∂x ∂y
444244443
∂z
= 0 by continuity = Dφ / Dt by definition
For example, the material derivative of velocity, i.e. Du/Dt, is acceleration and the
momentum equation can be written
Du ∂p
= − + ∇ 2 u + other forces (18)
D
123 t ∂x
mass× acceleration
This form is shorter and quicker to write and is used both for notational convenience and to
derive theoretical results in special cases (see Examples). However, in the finite-volume
method it is the conservative form which is actually approximated directly.
The basic fluid-mechanical principles can be written down mathematically in many ways.
The above conservative and non-conservative differential equations are for primitive
variables (i.e. those which can be measured, like velocity or pressure). Sometimes it is more
convenient to use derived variables. Important examples are the velocity potential φ or stream
function .
Velocity Potential, φ
In inviscid flow it may be shown1 that the velocity components can be written as the gradient
of a single scalar variable, the velocity potential φ:
∂φ ∂φ ∂φ
u= , v= , w= or u = ∇φ
∂x ∂y ∂z
Substituting these into the continuity equation for incompressible flow
∂u ∂v ∂w
+ + =0
∂x ∂y ∂z
gives
∂ 2φ ∂ 2φ ∂ 2φ
+ + =0
∂x 2 ∂y 2 ∂z 2
which is often abbreviated as
∇2φ = 0 (19)
Stream Function,
In 2-d incompressible flow we will see in Section 9 that there exists a function called the
stream function such that
∂ ∂
u= , v=−
∂y ∂x
If the flow is also inviscid then it may be shown that (MSc – see the footnote) that
∂u ∂v
− =0
∂y ∂x
Substituting the expressions for u and v into this gives an equation for
∇2 = 0 (20)
Both (19) and (20) are Laplace’s equation, which is ubiquitous in mathematical physics (e.g
electrostatics, heat conduction, gravitation, optics, ...). Consequently, there are many good
solvers around that can be used “off-the shelf”. Methods for solving this equation numerically
can be found in the Computational Mechanics course.
1
*** MSc only *** This is because inviscid flow is irrotational, i.e. ∇ ∧ u = 0 , and so the velocity field can be
written as the gradient of a scalar function.
Liquid flows can usually be treated as incompressible and this is also a good approximation
in gases at speeds much less than that of sound (Ma « 1). Most environmental and civil-
engineering flows can be regarded as incompressible.
Density variations can occur for other reasons, notably from salinity variations (oceans) and
temperature variations (atmosphere). These lead to buoyancy forces (see Section 3). Because
the density variations are not due to flow-induced pressure or temperature changes these can
still be treated as incompressible, even though the density varies from place to place. Thus,
“incompressible” does not necessarily mean “uniform density”.
Mass conservation provides a transport equation for , whilst pressure is derived from an
equation of state; e.g. the ideal-gas law:
p = RT
Formally,
• mass equation ;
• energy equation T;
• equation of state (e.g., ideal gas law) p.
For incompressible flows pressure changes (by definition) cause negligible changes to
density. Temperature is not involved and so a separate energy equation is not necessary.
Pressure is not derived from a thermodynamic relation but from the requirement that
solutions of the momentum equation be mass-consistent. In Section 5 we shall see that this
leads to the continuity equation being rephrased as a pressure equation.
Formally,
• incompressibility is constant along a streamline, or volume is conserved;
• requiring solutions of momentum equation to be mass-consistent equation for p.
Although it is possible to work entirely in dimensional quantities, there are good theoretical
reasons for working in non-dimensional variables. These include the following.
• All dynamically-similar problems (same Re, Fr etc.) can be solved with a single
computation.
• The number of relevant parameters (and hence the number of graphs) is reduced.
• It indicates the relative size of different terms in the governing equations and, in
particular, which might conveniently be neglected.
• Computational variables are of O(1), yielding better numerical accuracy.
Adopting reference scales U0, L0 and 0 for velocity, length and density, respectively, and
derived scales L0/U0 for time and 0U 02 for pressure, each fluid quantity can be written as a
product of a dimensional scale and a non-dimensional variable (indicated by an asterisk *):
L
x = L0 x * , t = 0 t*, u = U 0u* , = 0 *, p − p0 = ( 0U 02 ) p * , etc.
U0
(Note: In incompressible flow it is differences in pressure that are important, not absolute
values. Since these differences are usually much smaller than the absolute pressure it is
numerically more accurate to work in terms of the difference from a reference pressure p0).
Substituting these into mass and momentum equations, (21) and (22), yields:
∂u * ∂v * ∂w*
+ + =0 (23)
∂x * ∂y * ∂z *
Du * ∂p *
1 *2 * U L
* =− +
∇ u where Re = 0 0 0 (24)
Dt * ∂x * Re
From this, it is seen that the key dimensionless group is the Reynolds number Re. If Re is
large then viscous forces would be expected to be negligible in much of the flow.
Having derived the non-dimensional equations it is usual to drop the asterisks and simply
declare that you are “working in non-dimensional variables”.
If other types of fluid force are included then each introduces another non-dimensional group.
For example, gravitational forces lead to a Froude number (Fr) and Coriolis forces to a
Rossby number (Ro). Some of the most important dimensionless groups are given below.
UL UL
Re ≡ ≡ Reynolds number (viscous flow; = dynamic viscosity)
U
Fr ≡ Froude number (open-channel flow; g = gravity)
gL
U
Ma ≡ Mach number (compressible flow; c = speed of sound)
c
U
Ro ≡ Rossby number (rotating flows; = angular rotation rate)
ΩL
• Differential forms of the flow equations may be conservative (i.e. can be integrated
directly to give something of the form “fluxout – fluxin = source”) or non-conservative.
• There are really just two canonical equations to discretise and solve:
mass conservation (continuity):
d
( V ) + ∑C = 0 (C = u•A is outward mass flux)
dt faces
and an equation for pressure is derived from the requirement that solutions of the
momentum equation be mass-consistent.
d⌠ ⌠ ⌠
φ dV + ( Uφ − ∇φ + F′) • dA = S dV
dt ⌡V ⌡∂V ⌡V
let volume 0
or use divergence theorem
Differential forms
∂
( φ) + ∇ • ( Uφ − ∇φ + F′) = S (conservative)
∂t
∂
combine with continuity, + ∇ • ( u) = 0
∂t
Dφ
= ∇ • ( ∇φ − F′) + S (non-conservative)
Dt
Q1.
The continuity and x-momentum equations can be written for 2-d flow in conservative form
(and with compressibility neglected in the viscous forces) as
∂ ∂ ∂
+ ( u ) + ( v) = 0
∂t ∂x ∂y
∂ ∂ ∂ ∂p
( u ) + ( uu ) + ( vu ) = − + ∇ 2 u
∂t ∂x ∂y ∂x
respectively.
(a) By expanding derivatives of products show that these can be written in the equivalent
non-conservative forms:
D ∂u ∂v
+ ( + )=0
Dt ∂x ∂y
Du ∂p
=− + ∇ 2u
Dt ∂x
D ∂ ∂ ∂
where the material derivative is given (in 2 dimensions) by = +u +v .
Dt ∂t ∂x ∂y
(b) Define what is meant by the statement that a flow is incompressible. To what does the
continuity equation reduce in incompressible flow?
(c) Write down conservative forms of the 3-d equations for mass and x-momentum.
(e) Show that, for constant-density flows, pressure and gravity can be combined in the
momentum equations as the piezometric pressure p + gz.
**** Remaining parts of this question for MSc course only ****)
(f) Write the conservative mass and momentum equations in vector notation.
(g) Write the conservative mass and momentum equations in suffix notation using the
summation convention.
(h) In a rotating reference frame there are additional apparent forces (per unit volume):
centrifugal force: − ∧ ( ∧ r ) or 2
R
Ω
Coriolis force: −2 ∧u R 2
R
Q3.
By resolving forces along a streamline, the steady-state momentum equation for an inviscid
fluid can be written
∂U ∂p s
U =− − g sin
∂s ∂s U
where U is the velocity magnitude, s the distance along a streamline and α
the angle between local velocity and the horizontal. Derive Bernoulli’s
equation.
Q5.
In each of the following cases, state which of (i), (ii), (iii) is a valid dimensionless number.
Carry out research to find the name and physical significance of these numbers.
(L = length scale; U = velocity scale; z = height; P = pressure; = density; = dynamic
viscosity; = kinematic viscosity; g = gravitational acceleration; = angular velocity).
P − P0 P − P0
(a) (i) ; (ii) 2
; (iii) U 2 ( P − P0 )
U 1
2 U
UL UL
(b) (i) ; (ii) ; (iii) UL
1/ 2
gd
−
dz U P − P0
(c) (i) ; (ii) ; (iii)
dU gL g
dz
U gL U
(d) (i) ; (ii) ; (iii)
L U L
(c) Show how Equation (*) can be written in non-dimensional form in terms of a
Reynolds number Re and Rossby number Ro (both of which should be defined).
(d) Define the terms conservative and non-conservative when applied to the differential
equations describing fluid flow.
(e) Define the material derivative operator D/Dt. Then, noting that the continuity
equation can be written
∂ ∂ ( u ) ∂ ( v) ∂ ( w)
+ + + = 0,
∂t ∂x ∂y ∂z
show that the x-momentum equation can be written in an equivalent conservative
form.
(f) If the x-momentum equation were to be regarded as a special case of the general
scalar-transport (or advection-diffusion) equation, identify the quantities representing:
(i) concentration;
(ii) diffusivity;
(iii) source.
(h) Explain (briefly) how pressure can be derived in a CFD simulation of:
(i) high-speed compressible gas flow;
(ii) incompressible flow.
∂ ∂ ∂ ∂
(c) Mass: + ( u ) + ( v) + ( w) = 0
∂t ∂x ∂y ∂z
∂ ∂ ∂ ∂ ∂p
Momentum: ( u ) + ( uu ) + ( vu ) + ( wu ) = − + ∇ 2 u
∂t ∂x ∂y ∂z ∂x
∂ ∂ ∂ ∂ ∂p
(d) ( w) + ( uw) + ( vw) + ( ww) = − − g + ∇ 2 w
∂t ∂x ∂y ∂z ∂z
Dw
(The LHS can also be written in non-conservative form as ).
Dt
∂
(f) Mass: + ∇ • ( u) = 0
∂t
∂
Momentum: ( u) + ∇ • ( u ⊗ u) = −∇p + ∇ 2u
∂t
∂ ∂
(g) Mass: + ( uj) = 0
∂t ∂x j
∂ ∂ ∂p ∂ 2ui
Momentum: ( ui ) + ( ui u j ) = − +
∂t ∂x j ∂xi ∂x j ∂x j
(h) Centrifugal force: 2
R = ∇( 12 2
R2 ),
Use modified pressure: p → p − 12 2
R2
2 v
Coriolis force: − 2 ∧u = − 2 u
0
G dp
Q2. (a) u= y (h − y ) (G = − = constant, h = distance between walls)
2 dx
U y
(b) u= 0 (U0 = speed of upper wall, h = distance between walls)
h
∂
Q4. ( φ) + ∇ • ( uφ − ∇φ) = S (conservative form)
∂t
Dφ
− ∇ • ( ∇φ) = S (non-conservative form)
Dt