You are on page 1of 53

COMPUTATIONAL FLUID

DYNAMICS (MKM411)
Prof. M. Sharifpur
mohsen.sharifpur@up.ac.za

March 2nd
Department of Mechanical and Aeronautical Engineering
University of Pretoria
2023
Questions
If the fluid is water and the level of
water in the tank stay the same all
the time

1) Where is the Maximum Pressure between 1 to 7?


a) Point 7 b) Point 5 c) Point 1  d) Point 2 e) Non of them
2) Where is the Maximum Pressure between 2 to 7 ?
a) Point 7 b) Point 5 c) Point 1 d) Point 2  e) Non of them
Questions
If the fluid is water and the level of
water in the tank stay the same all
the time

1) Where is the Maximum Pressure between 1 to 7?


a) Point 7 b) Point 5 c) Point 1  d) Point 2 e) Non of them
2) Where is the Maximum Pressure between 2 to 7 ?
a) Point 7 b) Point 5 c) Point 1 d) Point 2  e) Non of them
Now think about these cases (the tanks are the same),
the pipe are the same but different length

V1 = V2 = V3 = V4

P1≌P5 P4=P6
But V6  V4

V5 = V6
Example;
Consider a velocity field given by :
  
v = a( x y + y )i + (bxy + z ) j + (cxy )k
2 3 2 2

Where a , b and c are constants.


Find a, b and c in which this flow field will be incompressible.

           
 = i+ j+ k . = ( i + j + k ).
x y z x y z
Solution;
  
v = a ( x y + y )i + (bxy + z ) j + (
2 3 2 2
cxy )k
 
vx vy vz

Incompressible .v = 0
vx v y vz
+ + =0
x y z

a ( x 2 y + y 3 )  (bxy 2 + z 2 )  (cxy )
.v = 0  + + =0
x y z
2axy + 2bxy = 0  a = −b , and any c
Test yourself: Question 3 [5 Marks]
Explain under what assumption(s) the Continuity Equation for
Cartesian coordinates and cylindrical coordinates could be the same for
an unsteady and compressible flow, and then write that equation.

  ( vx ) ( v y ) ( vz )
+ .( v) = 0  + + + =0
t t x y z
1D assumption in z direction
  ( vz )
+ =0
t z
Engineering
Problem
Mathematics Review 

Finding;
Fluid Mech. Mass Eq. 
- Governing (Differential) Equations Momentum Eq.
- Initial & Boundary Conditions Energy Eq.
Heat Transfer

-Analytical Solution
-Numerical Solution (Programing)
- Using a Software
or
Momentum Equation

Simplified one;
Navier-Stokes Equation
Equation of Motion for Fluids

or

 = − pI + 
Moving Fluids
Moving Fluids

p  ji  vi  v 
− + + f i =   + vj i 
x j x j  t x 
 j 
In order to Simplify it, Working for incompressible , Newtonian fluid and constant properties

Viscous stress tensor for an incompressible Newtonian fluid with constant properties is;

u  vx
v  vy
w  vz
 = − pI + 
Therefore, the equation of motion for incompressible Newtonian
fluid with constant properties will be;


Dv
= −p + f +  v
2 Navier-Stokes Equation
Dt (Vector form)
And in any directions:
Dv x p
 =− + f x +  2 v x
Dt x
Dv y p
 =− + f y +  2 v y
Dt y
Dv z p
 =− + f z +  2 v z
Dt z
Dv
 = −p + f +  2 v Navier-Stokes Equation
Dt
Dv x p
x-direction  =− + f x +  2 v x
Dt x
 v x v x v x v x  p   2vx  2vx  2vx 
  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

Dv y p
y-direction  =− + f y +  2 v y
Dt y
 v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x 
 t x y z  y  y z 

Dvz p
z-direction  = − + f z +  2 vz
Dt z
 vz vz vz vz  p   2vz  2vz  2vz 
  + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Navier-Stokes Equation (Momentum Eq.)
Dv incompressible
 = −p + f +  v Newtonian fluid
2

Dt constant properties
Dvx p
 = − + f x +  2 vx
Dt x
Dv y p
 = − + f y +  2 v y
Dt y
Dv p
 z = − + f z +  2vz
Dt z
Continuity equation for Incompressible flow
.v = 0
v x v y v z
+ + =0
x y z
How many unknowns do we usually have when we considering
Momentum and Continuity equations? v x , v y , v z and p
Navier-Stokes Equation
Dv v
 =  ( + v.v ) = −p + f +  2 v
Dt  t 
   
f = f xi + f y j + f z k v = ui + vj + wk
Du p
x-direction  =− + f x +  2u
Dt x
 u u u u  p   2u  2u  2u 
  + u + v + w  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 
Dv p
y-direction  =− + f y +  2 v
Dt y
 v v v v  p   2v  2v  2v 
  + u + v + w  = − + f y +   2 + 2 + 2 
 t x y z  y  x y z 
Dw p
z-direction  =− + f z +  2 w
Dt z
 w w w w  p  2w 2w 2w 
  +u +v +w  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Navier-Stokes Equation-in the case of Steady State
Dv v
 =  ( + v.v ) = −p + f +  2 v
Dt t
x-direction
uu u u u uu  pp   22uu 2u2u  u 
2 2
= − ++f f x++ 2 ++ 2 ++ 2 u
 u + u+ v + v + w+ w  = −  
 t x x y y z z  xx x  xx 2 yy 2 zz2 
 

y-direction
vv v v v vv  p p  22vv  v v 
v v  2
2 2 2
  u + u+ v + v + w+ w  = =− − ++ffyy +   22++ 2 2+ + 2 2 
 t x x y y zz  y y  xx yy zz 

z-direction
  ww  ww w  w  w  pp   

22
ww 
22
w w  w w 
2 2

ut + u+ vx + v+yw+ w z= −= − z++f zf z++ x 22 ++ y 2 2+ +z 2 2 


 x y z   z  x y z 
Navier-Stokes Equation in case of steady

Dv
 = −p + f +  2 v
Dt
v
 ( + v.v ) = −p + f +  2 v
t
 ( v.v ) = −p + f +  2 v
Continuity equation

.v = 0
vx v y vz
+ + =0
x y z
Example:
Simplify Navier-Stokes and continuity Equations for a
fluid which is Steady, 2D (x and y) and no body force

 v x v x v x v x  p   2vx  2vx  2vx 


  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

 v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x 
 t x y z  y  y z 

 vz vz vz vz  p   2vz  2vz  2vz 


  + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Simplify Navier-Stokes and continuity Equations for;
Steady, 2D (x and y) and no body force
x-direction
 v x v x v x v x  p   2vx  2vx  2vx 
  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 
 v x v x  p   2vx  2vx 
  v x + vy  = − +   2 + 2 
 x y  x  x y 
y-direction
 v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x 
 t x y z  y  y z 
 v y v y  p   2v y  2v y 
  v x + vy  = − +  2 + 2 
 x 
 x y  y   y 

Continuity equation
v x v y
.v = 0 + =0
x y
Test yourself
Allowance Time 3 minutes

Simplify the Navier-Stokes Equations JUST in z direction


for; 2D (y and z) and no body force

 vx vx vx vx  p   2vx  2vx  2vx 


  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

 v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x 
 t x y z  y  y z 

 vz vz vz vz  p   2vz  2vz  2vz 


  + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Simplify the Navier-Stokes Equations JUST in z direction
for; 2D (y and z) and no body force

 vz vz vz vz  p   2vz  2vz  2vz 


  + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 

 vz vz vz  p   2 vz  2 vz 


 + vy + vz = − + 2 + 2 
 t y z  z  y z 
Example
Consider a Steady, Two-dimensional (x ,y) and incompressible flow
With Velocity field of:
   
v = (u , v ) = ui + vj = ( ax + b)i + ( − ay + cx) j

Find the pressure field function of x and y


Assume the gravity does not act in x or y directions.

First we must check if the given velocity field can satisfy the
continuity equation:

If the velocity field cannot satisfy continuity equation, we would


stop our analysis
   
v = (u , v ) = ui + vj = ( ax + b)i + ( − ay + cx ) j

 v v v v  p   2v  2v  2v 
  + u + v + w  = − + g y +   2 + 2 + 2 
 t x y z  y  x y z 

u = ax + b , v = − ay + cx and w = 0
   
v = (u , v ) = ui + vj = ( ax + b)i + ( − ay + cx ) j

 u u u u  p   2u  2u  2u 
  + u + v + w  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

u = ax + b , v = − ay + cx and w = 0

 u u u u  p   2u  2u  2u 
  + u + v + w  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 
0 0 0 0 0 0 0
(ax + b)(a )
Checking if it is physically correct for a continuous function

It is important to know that

Now, how to find P ?


Partially integrate from one of them, and from the result find the
other one.
and we know that

P g ( x)
=
x x

g ( x) dg ( x)
=  (− a 2 x − ab) =  (− a 2 x − ab)
x dx
We can find C1 from boundary condition
Dv Navier-Stokes Equation
 = −p + f +  2 v
Dt
Dv x p
x-direction  =− + f x +  2 v x
Dt x
 v x v x v x v x  p   2vx  2vx  2vx 
  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

Dv y p
y-direction  =− + f y +  2 v y
Dt y
 v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x 
 t x y z  y  y z 

Dvz p
z-direction  = − + f z +  2 vz
Dt z
 vz vz vz vz  p   2vz  2vz  2vz 
  + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Navier-Stokes Equation (Momentum Eq.)
Dv incompressible
 = −p + f +  v
2
Newtonian fluid
Dt constant property
Dvx p
 = − + f x +  2 vx
Dt x
Dv y p
 = − + f y +  2 v y
Dt y
Dv p
 z = − + f z +  2vz
Dt z
Continuity equation for Incompressible flow
.v = 0
vx v y vz
+ + =0
x y z
How many unknowns do we usually have when we considering
Momentum and Continuity equations? vx , v y , vz & P
Example:
Simplify y direction of Navier-Stokes Equation in the
case of; Steady, 2D (y and z) and body force is just
gravity (g) in the -y direction and if velocity field is:
v = 3 zj − 2 yk
 v x v x v x v x  p   2vx  2vx  2vx 
  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

 v y v y v y v y  p   2
v  2
v  2
vy 
  + vx + vy + vz  = − + f y +   y
+ 2 + 2
y

 
 t x y z  y  x y z
2

 vz vz vz vz  p   2vz  2vz  2vz 
  + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Solution;
Simplify y direction of Navier-Stokes Equation in the
case of; Steady, 2D (y and z) and body force is just
gravity (g) in the -y direction and if velocity field is:
v = 3 zj − 2 yk  v y = 3 z and vz = −2 y
 v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x 
 t x y z  y  y z 
 v y v y  p   2
v  2
vy 
  vy + vz =− − g +   2 + 2
y

 y
 y z  y  z 

  (3 z )  (3 z )  p   2 (3 z )  2 (3 z ) 
  (3 z ) + (−2 y ) =− − g +   + 
 y  z  y   y 2
 z 2

p
 ( −6 y ) = − −  g
y
Therefore, the governing equations for incompressible fluids
u v w
(and constant properties) up to now + + =0
x y z

 u u u u  p   2u  2u  2u 
  + u + v + w  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 

 v v v v  p   2v  2v  2v 
  + u + v + w  = − + f y +   2 + 2 + 2 
 t x y z  y  x y z 

 w w w w  p  2w 2w 2w 


  +u +v +w  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 

How many unknowns ? u , v, w and p


Conservation of Energy
or

Energy Equation
D
(K + U ) = W + H
Dt
D
(K + U ) = W + H
Dt
General form of Energy equation for Viscous Fluids
An other form

Mass Eq. = 0
Simplification for Incompressible flow

Have you seen this


equation before?

Let us to  T    T    T  
Change  = T  = g and q =  − k i +  − k  j +  − k k
 x   y   z 

DT    T    T    T 
c =  +  k  +  k  +  k  + g
Dt  x  x  y  y  z  z 
Energy Equation For
Incompressible Flow
For Incompressible flow

DT    T    T    T 
c =  +  k  +  k  +  k  + g
Dt  x  x  y  y  z  z 
For constant properties (constant k)
DT  2T  2T  2T
c =  + k 2 + k 2 + k 2 + g
Dt x y z

DT
c =  + k 2T + g
Dt
DT T T T T T
= + v.T = + vx + vy + vz
Dt t t x y z
Viscous (heat) dissipation function ?
Viscous dissipation function for a Newtonian fluid with viscosity µ

Viscous dissipation function for Incompressible flow .v = 0

DT
c =  + k 2T + g
Dt For constant k
Viscous dissipation function for a Newtonian fluid with viscosity µ

For Incompressible flow and 2D (x , y)

DT
c =  + k 2T + g For constant k
Dt
For incompressible and constant properties
Continuity Eq.: .v = 0 vx v y vz
+ + =0
x y z
Dv
Momentum Eq.:  = −p + f +  2 v
Dt
x-dir.  vx vx vx vx  p   2vx  2vx  2vx 
  + vx + vy + vz  = − + f x +   2 + 2 + 2 
 t x y z  x  x y z 
y-dir.  v y v y v y v y  p   2v y  2v y  2v y 
  + vx + vy + vz  = − + f y +   2 + 2 + 2 
 x z 
 t x y z  y  y
 vz vz vz vz  p   2vz  2vz  2vz 
z-dir.   + vx + vy + vz  = − + f z +   2 + 2 + 2 
 t x y z  z  x y z 
Energy Eq.: DT
c =  + k 2T + g
Dt
 T T T T    2T  2T  2T 
c + u +v + w  =  + k  2 + 2 + 2  + g
 t x y z   x y z 
 u  2  v  2  w  2   v u 
2
 w v 
2
 u w 
2

 = 2    +  +  z   +   x + y  +   y + z  +   z + x 
 y 
 x            
 
Example
Parallel flow of an oil between two large plates is considered.
The upper plate has constant velocity of 12 m/s
Body forces such as gravity are negligible and
P / x = 0 T / x = 0
Find:
a) The velocity and temperature distributions?
b) The maximum temperature?
Assumptions 1) Steady operating conditions exist. 2) Oil is an incompressible substance with
constant properties (k, µ…=constant).
3) The plates are large so that there is no variation in z direction (2D)
A Prediction Test ) Max Temp. is about ; a) 30 b ) 40 c) 60 d) 100 e) 150
Analysis

The properties of oil at the average temperature of (40+25)/2 = 32.5C are (From Table):
k = 0.145 W/m-K and  = 0.580 kg/m-s = 0.580 N-s/m2

This is parallel flow between two plates, and thus v = 0


u v u
Continuity: + =0 =0 ⎯→ u = u(y)
x y x
x-momentum:
 u u u u  p   2u  2u  2u 
  + u + v + w  = − + g x +   2 + 2 + 2 
 t x y z  x  x y z 
0 0 0
Continuity 0
0 - 2D Assumption 0 0- 2D
0 Of the problem Continuity
Parallel flow
u
Continuity: = 0  u = f ( y)
x
 2u d 2u
 2 =0  2 =0
y dy

u ( y ) = C1 y + C2
The boundary conditions are:
1) u(y=0) = 0
2) u(y=L) = V

C2 = ? and C1 = ?

C2 = 0 and C1 = 17142 .85


Energy equation for constant k & Incompressible flow
DT DT T T T T
c =  + k 2T + g = +u +v +w
Dt Dt t x y z

 T T T T    2T  2T  2T 
c + u + v + w  =  + k  2 + 2 + 2  + g
 t x y z   x y z 

 u  2  v  2   v u 
2

 = 2    +    +   + 
 x   y    x y 

 T T T T   u  2  v  2   v u 
2
  2T  2T  2T 
c + u + v + w  = 2   +    +   +  + k  2 + 2 + 2  + g

t x

y z 
   x   y    x y  x

y
 
z 


DT   2T
Dt
Energy equation for constant k & Incompressible flow
 T T T T   u  2  v  2   v u 
2
  2T  2T  2T 
c + u +v + w  = 2    +    +   +  + k  2 + 2 + 2  + g
 t x y z   x   y    x y   x y z 

0 0 0 0
0 Assumption Parallel 0 V 0
u( y) = y Parallel Assumption
Of the problem L Of the problem 0- 2D
0 - 2D
V
u( y) = y
L 2
 T
2
 u 
0 = k 2 +  
y  y  u / y = V / L

V
2 2
d T
=−  
dy 2
k L

2
 y 
T ( y) = −  V  + C3 y + C 4
2k L 
2
 y 
T ( y) = −  V  + C3 y + C 4
2k L 

The boundary conditions are:


1) T(y=0) = T1= 25 ºC
2) T(y=L) = T2 = 40 ºC

T2 − T1 V 2  y y2 
T ( y) = y + T1 +  − 
L 2k  L L2 
 

b) The maximum temperature?


dT
=0  y =?
dy
T2 − T1 V 2  y y2 
T ( y) = y + T1 +  − 
L 2k  L L2 
 
b) The maximum temperature?
dT T2 − T1 V 2  y  T2 − T1 1 
= + 1 − 2  = 0 y = L k + 
 V 2 2 
dy L 2kL  L 

 T −T 1   (40 − 25)C 1
y Tmax = L k 2 2 1 +  = (0.0007 m) (0.145 W/m.C) + 
 V 2   ( 0 . 580 N.s/m 2
)(12 m/s) 2
2 
= 0.0003804 m = 0.3804 mm

T2 − T1 V 2  y y 2 
Tmax = T (0.0003804) = y + T1 +  − 
L 2k  L L2 
(40 − 25)C (0.58 N  s/m 2 )(12 m/s) 2  0.0003804 m (0.0003804 m) 2 
= (0.0003804 m) + 25C +  − 
0.0007 m 2(0.145 W/m  C)  0.0007 m (0.0007 m) 2 

A Prediction Test ) Max Temp. is about ; a) 30 b ) 40 c) 50 d) 60 e) 100

Tmax = 100.042C
What is the Physically meaning?

DT
c =  + k 2T + g
Dt
Checking Our assumption:
We used the properties of oil at the average temperature of (40+25)/2 = 32.5C
(From Table): k = 0.145 W/m-K and  = 0.580 kg/m-s = 0.580 N-s/m²

T2 − T1 V 2  y y2 
T ( y) = y + T1 +  − 
L 2k  L L2 
 
What must do now? 1 L
T =  T ( y )dy
L 0
With new average temperature, we must find new  and k,
and then the average Temp. & maximum temperature
1 L
Assuming T   , k  T ( y ) = ...  T =  T ( y )dy
L 0
1 L
T = ...   , k  T ( y ) = ...  T =  T ( y )dy
L 0

You might also like