You are on page 1of 35

COMPUTATIONAL FLUID

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

February 7th
Department of Mechanical and Aeronautical Engineering
University of Pretoria

2019
Engineering
Problems

Mathematics Review
Finding; Continuum Mechanics
- Governing (Differential) Equations
Fluid Mechanics
- Initial & Boundary Conditions Heat Transfer

-Analytical Solution: Exact (if simple)or Approximation


-Numerical Solution : Programing
or Using a Software
Therefore, we must find the Governing Differential Equations,
After that, Simplifying them regarding the physics of the problem
and also choosing the right Initial & Boundary Conditions
Mathematics Review
How many Derivatives do we have?
Partial Derivative  U 
 
 t 
Material Derivative
Lagrangian Derivative  DU 
 ?
Eulerian Derivative  Dt   DU   dU 
or   
 Dt   dt 
Substantial Derivative  dU 
 ?
 dt 
Total Derivative
Particle Derivative
3
What are the differences between them?
Mathematics Review
3
T ( x , y, z , t )  ax  bxy  cy  xyz  t
2 2

dT T
? ?
dx x
dT  ?
dT
? T
?
dt t

4
In Partial Derivative;
All independent variables will be assumed
to be constant except the one which we are
taking the Derivative partially respect to it
3
T ( x, y, t )  ax  bxy  cy  t
2 2

T T
?  2ax  by
x x
T T
?  bx  3cy  4
y
y
T T
? 0
z z
T ( x, y, t )  ax  bxy  cy  t
2 3 2

T T
?  2t
t t

y z
 0, x y z
x x   0
y x t t t
 0 ,
z z t t t
z x   0

y y
 0. x y z
Mathematics Review
T(x , y ,z , t)  ax  bxy  cy  xyz  t
2 3 2

T T T T
dT  ? dT  dx  dy  dz  dt
x y z t

dT dT T dx T dy T dz T
?    
dt dt x dt y dt z dt t
Can we simplify it?
vx vy vz
dT dT T T dy T dz T dt
?    
dx dx x y dx z dx t dx

1/vx
Mathematics Review
U(x , y ,z , t)  ax  bxy  cy  xyz  t
2 3 2

dU dU U dx U dy U dz U
?    
dt dt x dt y dt z dt t
Is there any other ways to find dU ?
dt dU d
Another Way to find is to apply
dt dt as an operator;
dU dx dx dy 2 dy dx dy dz
 2ax  (by  bx )  3cy  ( yz  xz  xy )  2t
dt dt dt dt dt dt dt dt
After Rearranging
dU dx dy dz
 (2ax  by  yz )  (bx  3cy  xz )  xy  2t
2

dt dt dt dt
U U U U
 2ax  by  yz  bx  3cy 2  xz  xy  2t
x y z t
dU U dx U dy U dz U
    Partial Derivative 8
dt x dt y dt z dt t Derivative
Mathematics Review

 U   U   U 
dU    dx    dy    dz
 x  y , z  y  x , z  z  x , y

U ( x, y, z )  ax  bxy  cy  xyz
2 3

9
Question;

When this equality is valid?


dT T

dx x
Whenever we only have one variable (1D + Steady)
T ( x)  2ax  bx  c
2

T dT T
dT  dx 
x dx x
dT T
  4ax  b
dx x
 ( x, y, z, t )
d  dx  dy  dz 
   
dt x dt y dt z dt t

If you forget the equation, you can use:


 ( x, y, z, t )
   
d ( x, y, z , t )  dx  dy  dz  dt
x y z t

d  dx  dy  dz 
   
dt x dt y dt z dt t
Any questions?
Unannounced Quiz 1
General Regulations for Quizzes;
1- Write your name and surname , students number, date and the
quiz number , plus your signature on the top of a blank paper.
2- When the quiz starts, do not talk, walk, speak and look around
…up to the end of collection.

3- If you finished your writing before the collection time, turn


your paper and just wait until collection please.

4- When the time is up, do not write any more, turn your paper
and the first person on the right hand side (on each row), pass
his/her paper to the left hand side… I will collect them at the last
left ones from each row.

5- I will not accept any delayed papers!


6- After the quiz the class will be continued
Unannounced Quiz 1
Time: 5 Minutes
DP
Find ?
Dt
If the last digit of your Student number is an
odd number use A , else use B

A) P( x, y , z, t )  ax  bx 2 y 1  cy 3t  hxy 2 z 2  t 3  7

B) P( x, y , z, t )  ax 2  cx 3 y 1  dy 3  kx 1 yz 2t  t 2  7
Unannounced Quiz 1
Time: 5 Minutes
DP
Find ?
Dt
If the last digit of your Student number is an
odd number use A , else use B

A) P( x, y , z, t )  ax  bx 2 y 1  cy 3t  hxy 2 z 2  t 3  7

B) P( x, y , z, t )  ax 2  cx 3 y 1  dy 3  kx 1 yz 2t  t 2  7
Unannounced Quiz 1 - The solution
A) P( x, y , z, t )  ax  bx 2 y 1  cy 3t  hxy 2 z 2  t 3  7
dP P Pdx
DP P PdyP PPdz P
dP dx  dy  dz  dt
dt Dt x x dt
y y dt
z ztdt t
P P
 a  2bx 3 y 1  hy 2 z 2  bx 2 y 2  3cy 4t  2hxyz 2
x y
PP 22 23 P
 23hxy z  cy 3  3t 2
zz t

DP dx dy dz
bx43yy21  hy 22z 32 )v x ( (bx
 (a  32bx 2 32 3
2bx y y  3cycy4t2t22hxyz
hxyz23 ))v y ((23hxy
hxy22zz34)v) z  (cycy3132t t2 )
Dt dt dt dt
B) P( x, y , z, t )  ax 2  cx 3 y 1  dy 3  kx 1 yz 2t  t 2  7

DP P dx P dy P dz P
   
Dt x dt y dt z dt t
P P
 2ax  3cx 4 y 1  kx 2 yz 2t   cx 3 y 2  3dy 2  kx 1 z 2t
x y

P P
 2kx 1 yz 3t  kx 1 yz 2  2t
z t
DP 4 1 2 2 dx 3 2 1 2 dy
 (2ax  3cx y  kx yz t )  ( cx y  3dy  kx z t )
2

Dt dt dt
1 3 dz
 ( 2kx yz t )  (kx 1 yz 2  2t )
dt
We know;
dT T

dx x

Whenever we only have one variable (steady 1D)


T ( x)  2ax  bx  c
2

T dT T
dT  dx 
x dx x
dT T
  4ax  b
dx x
Question;
T ( x, y , z )
T T
if  2x 1  ( x ) dx  ?
x

T
Is it T   ( ) dx  x 2  x  C NO
x

T
 x
( ) dx  T ( x, y , z )  x 2
 x  F ( y, z ) 
For example:
T
T ( x, y, z )  x  x  y  z  yz  5
2
 2x 1
x
Three different notation
in Cartesian coordinate
Position Velocity components Unit vectors

1) x1 , x2 , x3 v1 , v2 , v3 e1 , e2 , e3

2) x, y, z vx , v y , vz ex , e y , ez

3) x, y, z u , v, w i, j , k

We usually use 3 or 2 in fluid flow


and heat transfer (as well as CFD)
ρ(x , y ,z , t)
D d  dx  dy  dz 
    
Dt dt x dt y dt z dt t
D d    
   vx  vy  vz
Dt dt t x y z
D 
  v.
Dt t
  
v  vx i  v y j  vz w
     
  i j w
x y z
 ()   ()   () 
()  i j k Del operator
x y z (vector)
     
  i j k
x y z

     
.  ( i  j  k ). div
x y z (vector)
  
v ( x, y , z , t )  v x i  v y j  v z k

vx v y vz
.v  ? .v    (scalar)
x y z
1) BC=1, I=1 Boundary and Initial
3) BC=2, I=0 Conditions
4) BC=2, I=1 A)
5) BC=3, I=0  2T T  2T T egen T
a b 2   c
x 2
x y z k t
6) BC=3, I=1
7) BC=4, I=0
8) BC=4, I=1
9) BC=5, I=0
10) BC=5, I=1
11) BC=6, I=0
12) BC=6, I=1
22
Is there any rules for the number of
Boundary and Initial Conditions which
we must looking for?
 2T T  2T T egen T
a b 2   c Not Power
x 2
x y z k t

In each directions, the number of BC is equal to the highest order of the

For example, in x direction;  T
2
2 BC in x direction we need
x 2
Therefore, we need 5 BC at all (2 in x, 2 in y and 1 in z directions)

For Initial Condition, the highest order of the
t 1 IC we need
1) BC=1, I=1 Boundary and Initial
3) BC=2, I=0 Conditions
4) BC=2, I=1 A)
5) BC=3, I=0  2T T  2T T egen T
a b 2   c
x 2
x y z k t
6) BC=3, I=1
7) BC=4, I=0 B)
8) BC=4, I=1   T  T T
k c d  egen  0
9) BC=5, I=0 x  x  y z
10) BC=5, I=1 k  Const.
11) BC=6, I=1 T 2
T T
k 2 c d  egen  0
12) BC=6, I=1 x y z
24
Boundary and Initial Conditions
1) BC=1, I=1 (Mathematically we call them Conditions)
3) BC=2, I=0
4) BC=2, I=1 T
2
T T egen T
a b  c
5) BC=3, I=0 x 2
x y k t
6) BC=3, I=1
BC=4, I=0   k T   c  T2  d  T   egen  0
2 2
7)
8) BC=4, I=1 x k Const
x
.
y  z 
9) BC=5, I=0
T T  T 
2 2 2

10) BC=5, I=1 k 2  c 2  d   egen  0


x y  z 
11) BC=6, I=0
12) BC=6, I=1 25
Why? (let me offer an example)

If we are working on one-D heat conduction in steady state


and without heat generation, what will be our DE?
The General Equation for heat conduction;
  T    T    T  T
k    k    k   egen  c
x  x  y  y  z  z  t

 2T  2T  2T T
k ( 2  2  2 )  egen  c
x y z t
one-D (x-direction) ,in steady state ,and no heat generation;

 2T d 2T T ( x)  C1 x  C2
0 0
x 2
dx 2
d 2T
2
0
dx

T ( x)  C1 x  C2
BC 1) 
BC 2) 

BC 1)  C2  150
80
BC 2)  C1  
L

80
T ( x)   x  150
L
Boundary and Initial Conditions
Mechanically
 T  T egen 1 T
2 2
 2   B=4, I=1
x 2
y k  t
h, T

h, T

Insulated

28
Boundary and Initial Conditions
 2T T egen
  0 BC=3, I=0
x 2
y k
 T T T
2
egen 1 T
  T   BC=4, I=1
x 2
y z k  t
 T  T  T egen 1 T
2 2 2
 2  2   BC=6, I=1
x 2
y z k  t
 2T  2T
a 2 BC=2, I=2
x 2
t 29
Unannounced QUIZ 2
Allowance Time 3 minutes
For solving following partial differential equation
analytically, How many Initial and Boundary
Conditions do we need? Specify how many at all ,
and how many in each direction?
If the last digit of your Student number is an
odd number use A , else use B
2
T
2
 T  T 1 T
egen T 2
A) c 2  b   d T   a 2
x  y  z k  t z
 T  T T 1 T T
2 2 2
e
 c 2 d T   b 2
gen
B) a 
 z  x y k  t y
Initial and Boundary Conditions:
2
T
2
 T  T egen 1 T  2T
A) c 2  b   d T   a 2
x  y  z k  t z

Initial Condition: 1
Boundary Conditions:
x- direction: 2
y- direction: 1 BC = 5 at all
z- direction: 2
We must look for 5 BC & 1 IC
Initial and Boundary Conditions:
 T  T T 1 T T
2 2 2
egen
B) a   c 2 d T   b 2
 z  x y k  t y

Initial Condition: 1
Boundary Conditions:
x- direction: 2
y- direction: 2 BC = 5 at all
z- direction: 1
We must look for 5 BC & 1 IC
An Example for better understanding of the Conservation of Mass
ρ = 1000 kg/ m³

t=0 CV=0.1 m³

Mass Flow rate at the inlet of the pipe= 0 kg/s , Total water inside the CV= 0 kg ,
Mass Flow rate comes into the CV= 0 kg/s , Goes out of the CV = 0 kg/s

t = t1 CV

Mass Flow rate at the inlet of the pipe= 2kg/s , Total water inside the CV= 0 kg ,
Comes into the CV= 0 kg/s , Goes out of the CV = 0 kg/s

t = t2 CV

Mass Flow rate at the inlet of the pipe= 2kg/s , Total water inside the CV= 20kg ,
Comes into the CV= 1 kg/s , Goes out of the CV = 0 kg/s
ρ = 1000 kg/ m³
t = t2 CV=0.1 m³

Unsteady for the CV

Mass Flow rate at the inlet of the pipe= 2kg/s , Total water inside the CV= 20kg ,
Comes into the CV= 1 kg/s , Goes out of the CV = 0 kg/s

t = t3 CV

Unsteady for the CV

Mass Flow rate at the inlet of the pipe= 2kg/s , Total water inside the CV= 80kg ,
Comes into the CV= 2 kg/s , Goes out of the CV = 1.5 kg/s

t = t4 In to CV= Out from CV

CV Steady
Mass Flow rate at the inlet of the pipe= 2kg/s , Total water inside the CV= 100kg ,
Comes into the CV= 2 kg/s , Goes out of the CV = 2 kg/s
Physical meaning of Steady-State

A
B

All parameters (V, P , T, ...) will be the same for the


same point all the time.
But two different points may have different values

You might also like