Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

COMPUTATIONAL

MECHANICS MKM411
Dr. M. Sharifpur
mohsen.sharifpur@up.ac.za
Lecture May 20th
Department of Mechanical and Aeronautical Engineering
University of Pretoria

2014
The final date for submission of
Semester Project
Friday June 6th 2014
(CD + Report)
before 15:00
Submit to Mr Samson A. Aasa
(Eng.3 CDIO Lab) -
aasagangan@yahoo.com
Test 2
The Solution and Common mistakes
Question 1 [8 Marks]
Consider an incompressible viscous fluid with constant properties
1-1 [4 Marks]
Simplify the energy equation as much as possible in the case of steady,
2D (x and y), no heat generation, no velocity in x direction (u  0) .
1-2 [4 Marks]
Using the finite difference method in order to find the algebraic
equations for the simplified equation in the section 1-1. Assume x  y
The Solution:
T T T T    T    T    T 
c( u v  w )     k    k    k   egen
t x y z  x  x  y  y  z  z 
 u  2  v  2  w  2   v u 
2
 w v 
2
 u w 
2

  2                       
 x   y   z    x y   y z   z x 

T    T    T   v  2   v 
2

c(v )      k    k    2       


y  x  x  y  y   y    x 
2
T  v   v   2T  2T
2

c(v )  2        k 2  k 2
y  y   x  x y

(u  0)
But from continuity equation:
u v v
 0 and u  0 therefore 0
x y y

T  v   2T  2T
2

c(v )      k 2  k 2
y  x  x y
1-2 [4 Marks]
Using the finite difference method in order to find the algebraic
equations for the simplified equation in the section 1-1. Assume
x  y

T   
2
 
2 2
v T T
c(v )      k 2  k 2
y  x  x y

T ( x, y  y )  T ( x, y )  v( x  x, y )  v( x, y ) 
2

c(v( x, y ) )   
y  x 
T ( x  x, y )  2T ( x, y )  T ( x  x, y ) T ( x, y  y )  2T ( x, y )  T ( x, y  y )
k  k
x 2 y 2

FDM not FVM!


Question 2 [22 Marks]
Consider an incompressible viscous fluid with constant properties is flowing over an insulated
plate in the indicated direction, as it is shown in the figure 1.

Figure 1- Insulated Plate


We are going to investigate the temperature distribution near the plate; therefore, we
divided the domain into equal control volumes as it is shown in the figure 2 (assumed 2D
domain). Consider the velocity and temperature of the fluid before the discretised domain
are v  6m / s and T  50 oC respectively (in the indicated direction).

If the energy equation is:

   T      T  

 u v 
 c puT  k      c p vT  k     2    (u  v) 
x   x   y   y    x y 
Figure 2- Insulated Plate with CVs
Assume x  y , therefore;
2-1 ) [4 Marks]
By using the finite volume method find the general equation which works for all nodes
(internal and boundary)
2-2 ) [6 Marks]
By using the general equation (which you find in 2-1), and Upwind Scheme find the
algebraic equation for node (1, 1).
2-3 ) [6 Marks]
By using the general equation (which you find in 2-1), and Flux-Blending Technique
(Scheme) find the algebraic equation for node (2, 3).   0.5
2-4 ) [6 Marks]
By using the general equation (which you find in 2-1) , and Central Difference Scheme for
temperature and Upwind Scheme for velocities find the algebraic equation for node (1, 3).
The Solution:
2-1 ) [4 Marks]
By using the finite volume method find the general equation which works for all nodes
(internal and boundary)

   T      T  

 u v 
 c p uT  k      c p vT  k     2     (u  v) 
x   x   y   y    x y 

It is possible to simplify the equation

u v
 0
x y

 
mass equation for incompressible and 2D

Finally;

   T      T  
 c p uT  k      c p vT  k     2  u  v 
x   x   y   y  
However, the simplification did not asked in the test, therefore,
following answer is acceptable as well;

   T      T  

 u v 
 c p uT  k      c p vT  k     2     (u  v) 
x   x   y   y    x y 
   T      T    u v 
 x  c puT  k  x    y  c p vT  k  y  dV   2  x  y  (u  v) dV

  T     T     T  
Ae  c p uT  k     Aw  c p uT  k     An  c p vT  k   
  x   e   x   w   y   n
  T  
 As  c p vT  k     2   Aeue  Awu w  An vn  As vs  (u P  vP )V 
  y   s
  T     T     T  
Ae  c p uT  k    A 
w c uT  k    A 
n c vT  k   
 x   e  x   w  y   n
p p
  
  T  

 As  c p vT  k     2   Aeue  Awu w  An vn  As vs  (u P  vP )V 
  y   s

  T     T     T  
Ae  c p ueTe  k     Aw  c p u wTw  k     An  c p vnTn  k   

  x  e    x  w    y  n 
  T  
 As  c p vsTs  k     2   Aeue  Awu w  An vn  As vs  (u P  vP )V 
 
  y  s 
The general equation which works for all nodes
2-2 ) [6 Marks]
By using the general equation (which you find in 2-1), and
Upwind Scheme find the algebraic equation for node (1, 1).

Node (1,1) Upwind

Tw  50o C , u w  6 cos 45 m / s
 T 
, vs  0 ,    0
 y  s

  T     T     T  
Ae  c p ueTe  k     Aw  c p u wTw  k     An  c p vnTn  k   

  x  e    x  w    y  n

  T  

 As c p vsTs  k     2  Aeue  Awu w  An vn  As vs  (u P  vP )V 
 
  y  s 
Node (1,1) cont.
Tw  50o C , u w  6 cos 45 m / s
 T 
,    0 , vs  0
 y  s
  T     T     T  
Ae  Aw  y Ae  c p ueTe  k      A 
w c u T  k      A 
n c v T  k   
 x  e   x  w  
 y  n 
p w w p n n
An  As  x   
  T  

 As c p vsTs  k     2   Aeue  Awu w  An vn  As vs  (u P  vP )V 
 
  y  s 
Upwind ueTe  u PTP  u1,1T1,1 u wTw  (6 cos 45)(50)  300 cos 45
vnTn  v N TN  v1, 2T1, 2 vsTs  0

 T2,1  T1,1    T1,1  50     T1, 2  T1,1  


y c p u1,1T1,1  k 
  y c p (6 cos 45)(50)  k   
   x c p v1, 2T1, 2  k   
 x    x / 2     y  
 2  yu1,1  y 6 cos 45  xv1, 2  (u1,1  v1,1 )xy 
2-3 ) [6 Marks]
By using the general equation (which you find in 2-1), and
Flux-Blending Technique (Scheme)Assume   0.5
find the algebraic equation for node (2, 3).

Node (2,3) Flux-Blending Technique (Scheme)

Tn  50o C , vn   6 sin 45 m / s

  T     T     T  
Ae  c p ueTe  k     Aw  c p u wTw  k     An  c p vnTn  k   

  x  e    x  w    y  n

  T  

 As c p vsTs  k     2  Aeue  Awu w  An vn  As vs  (u P  vP )V 
 
  y  s 
Node (2,3) Cont.
Ae  Aw  y
Tn  50 C , vn   6 sin 45 m / s
o
An  As  x

  T     T     T  
Ae  c p ueTe  k     Aw  c p u wTw  k     An  c p vnTn  k   
 x  e   x  w   
    y  n 
  T  
 As c p vsTs  k     2  Aeue  Awu w  An vn  As vs  (u P  vP )V 

 
  y  s 
Flux-Blending Technique (Scheme)   0.5
eFBT  eUDS   (eCDS  eUDS ) ,   0.5
uE  uP
u FBT
e  u UDS
e  0.5(u CDS
e u UDS
e )   u  0.5( UDS
P  u UDS
p )
2
ueFBT  0.75u P  0.25u E  TeFBT  0.75TP  0.25TE
u wFBT  0.75uW  0.25u P  TwFBT  0.75TW  0.25TP
vsFBT  0.75vP  0.25vS  TsFBT  0.75TP  0.25TS
and vnTn  (6 sin 45)(50)  300 sin 45
Node (2,3) Cont.
Ae  Aw  y
Tn  Tair  50 C , vn  6 sin 45 m / s
o
An  As  x

ueFBT  0.75u P  0.25u E  TeFBT  0.75TP  0.25TE


u wFBT  0.75uW  0.25u P  TwFBT  0.75TW  0.25TP

vsFBT  0.75vP  0.25vS  TsFBT  0.75TP  0.25TS


and vnTn  (6 sin 45)(50)  300 sin 45
  T T  T T
   
 
y c p 0.75u P  0.25u E 0.75TP  0.25TE  k  E P    y c p 0.75uW  0.25u P 0.75TW  0.25TP  k P W  

  x    x 
 50  TP   T T 
x c p (6 sin 45)(50)  k   
  x c p 0.75vP  0.25vS 0.75TP  0.25TS  k P N  
y / 2  y 
 
      
2 y 0.75u P  0.25u E  y 0.75uW  0.25u P  x(6 sin 45)  x 0.75vP  0.25vS  (u P  vP )xy 
  T T   T T 
     
y c p 0.75u2,3  0.25u3,3 0.75T2,3  0.25T3,3  k  3,3 2,3    y c p 0.75u1,3  0.25u2,3 0.75T1,3  0.25T2,3  k 2,3 1,3  
  x    x 
 50  T2,3   T T 
x c p (6 sin 45)(50)  k
y / 2 
  
  x c p 0.75v2,3  0.25v2, 2 0.75T2,3  0.25T2, 2  k 2,3 2, 2  
y 
 
      
2 y 0.75u2,3  0.25u3,3  y 0.75u1,3  0.25u2,3  x(6 sin 45)  x 0.75v2,3  0.25v2, 2  (u2,3  v2,3 )xy 
2-4 ) [6 Marks]
By using the general equation (which you find in 2-
1) , and Central Difference Scheme for
temperature and Upwind Scheme for velocities
find the algebraic equation for nodes (1, 3).

Node (1, 3) Central Difference Scheme for temperature and Upwind Scheme for velocities

Tw  50o C , u w  6 cos 45 m / s ,
Tn  50o C , vn  6 Sin 45 m / s

  T     T     T  
Ae  c p ueTe  k     Aw  c p u wTw  k  
   An  c p vnTn  k   
 x  e   x  w  
    y  n 
  T  
 As  c p vsTs  k     2  Aeue  Awu w  An vn  As vs  (u P  vP )V 
 
  y  s 
Node (1, 3) Cont.
Tw  50o C , u w  6 cos 45 m / s ,
Tn  50o C , vn  6 Sin 45 m / s

  T     T     T  
Ae  c pueTe  k     Aw  c p uwTw  k     An  c p vnTn  k   
 x e   x  w   
    y  n 
  T  
 As  c p vsTs  k     2  Aeue  Awuw  An vn  As vs  (u P  vP )V 
 
  y  s 

  T  T   T T    T  50     50  TP  
y c p u P  P E   k  E P    y c p 6 cos 45 50  k  P    x c p  6Sin 45(50)  k   
  2   x    x / 2    y / 2 
  TP  TS   TP  TS  

 x c p vP    k     2 yu P  y 6 cos 45  x 6Sin 45  xvP  (u1,3  v1,3 )xy 
  2   y 

  T  T   T T    T  50     50  T1,3  
y c p u1,3  1,3 2,3   k  2,3 1,3    y c p 6 cos 45 50  k  1,3    x c p  6Sin 45(50)  k   
  2   x     x / 2    y / 2 
  T  T   T T 
 x c p v1,3  1,3 1, 2   k  1,3 1, 2    2 yu1,3  y 6 cos 45  x 6Sin 45  xv1,3  (u1,3  v1,3 )xy 
  2   y  
Question 3 [5 Marks]
Assume Δx is small and in the case of one dimensional (in order to use in finite difference
method), find an algebraic equivalent (in term of nodal values and Δx) for: 3
d T
?
The Solution: df  x  f f  x  x   f  x  dx 3
 lim  lim
dx x 0 x x 0 x
d 2T ( x  x) d 2T ( x)

d 3T ( x) d  d 2T ( x)  dx 2
dx 2
   
dx 3
dx  dx 2
x
d 2T ( x) T ( x  x)  2T ( x)  T ( x  x)

d 2Ti Ti 1  2Ti  Ti 1 dx 2
(x) 2

dx 2
(x) 2 d 2T ( x  x) T ( x)  2T ( x  x)  T ( x  2x)

dx 2 (x) 2
T ( x)  2T ( x  x)  T ( x  2x) T ( x  x)  2T ( x)  T ( x  x)

d 3T ( x) d  d 2T ( x)  (x) 2
(x) 2
   
dx 3
dx  dx 2
x

d 3T ( x) 3T ( x)  3T ( x  x)  T ( x  2x)  T ( x  x)



dx 3
x 3
One of the wrong ways:

dT ( x) 1 2 d 2T ( x) 1 3 d 3T ( x)
T ( x  x)  T ( x)  x  x 2
 x 3
 ...
dx 2 dx 6 dx
dT ( x) 1 2 d 2T ( x) 1 3 d 3T ( x)
T ( x  x)  T ( x)  x  x 2
 x 3
 ...
dx 2 dx 6 dx
If considering the first four terms:

dT ( x) 2 3 d 3T ( x)
T ( x  x)  T ( x  x)  2x  x
dx 6 dx 3
Now it is not valid any more

dT ( x) T ( x  x)  T ( x)

dx x
T ( x  x)  T ( x) 1 3 d 3T ( x)
T ( x  x)  T ( x  x)  2x  x
x 3 dx 3
In Upwind we used the
information of two nodes ,but
choosing one of them
Upwind

In QUICK Scheme we will use the information of three nodes


for any unknown at the face
QUICK scheme

Using the information of


three nodes
( two before and one after-
regarding the velocity direction )

For e face;

ue  0

For w face;

uw  0
QUICK scheme

For e face; ue  0

For w face; uw  0
Example for QUICK scheme
Assume a viscous fluid and then for given equation;
 
c p  (uT )  c p  (vT )  f , f  constant
x y
Using FVM with QUICK scheme to find
the algebraic equation for node 3

if u  0 and v  0 everywhere
(except boundaries)
 
c p  (uT )  c p  (vT )  f , f  constant
x y
   
c p   (uT )  (vT )   f
 x y 
c p  ( AuT ) e  ( AuT ) w   ( AvT ) n  ( AvT ) s   fV

Ae  Aw  y An  As  x

c p  y  ueTe  u wTw   xvnTn  vs Ts   fV


ue  ? , Te  ?
u w  ? , Tw  ?
vn  ? , Tn  ?
vs  ? , Ts  ?
uw  0

6 3 1
uw  uW  u P  uWW
8 8 8
6 3 1
u w  u2  u3  u1
8 8 8
6 3 1
Tw  T2  T3  T1
8 8 8

ue  0
Te  10o C
if in General ue  0
Therefore;
6 3 1
n   N  P   NN vn  0
8 8 8
6 3 1
vn  v N  vP  v NN
8 8 8
6 3 1
vn  v6  v3  v9
8 8 8
6 3 1
Tn  T6  T3  T9
8 8 8

vs  0
c p  y  ueTe  u wTw   xvnTn  vs Ts   fV
Ae  Aw  y An  As  x
ue  0 Te  10o C vs  0
6 3 1 6 3 1
u w  u2  u3  u1 Tw  T2  T3  T1
8 8 8 8 8 8
6 3 1 6 3 1
vn  v6  v3  v9 Tn  T6  T3  T9
8 8 8 8 8 8

6 3 1  6 3 1 
 c p y u2  u3  u1  T2  T3  T1  
8 8 8  8 8 8 
6 3 1  6 3 1 
c p x v6  v3  v9  T6  T3  T9   fxy
8 8 8  8 8 8 
Let’s back to this example;
   T     T 
c p  (uT )  k    c p  (vT )  k    f
x x  x  y y  y 
for any unknowns at the face we can choose
one of;
1- Central Differencing Scheme (CDS) Using the information of
2- Upwind Differencing Scheme (UDS) two nodes
3- Flux- Blending Technique (FBT)
4- QUICK Differencing Scheme (QUICK) Using the information of
three nodes

  T   T  
c p   Ae (uT ) e  Aw (uT ) w   k  Ae    Aw    
  x  e  x  w 
  T   T  
c p   An (vT ) n  As (vT ) s   k  An    As     fV
  x  n  x  s 
 T  TE  TP
  
 x  e x
The Sick Test is scheduled for tomorrow
Wednesday May 21th
from 13:30 to 15:00
Eng 1, 1-7
The material will be from beginning up to the end of today.
You can collect your Test-2 script from paper hand-
out now.

The Perusal for Test-2 is on Friday May23rd


from 11:30 to 13:00
In my office (Eng.III 6-85)

I am going to post the semester marks on clickUP


by tomorrow. Please check all your marks.

You might also like