Computational Mechanics: Lecture May 20
Computational Mechanics: Lecture May 20
Computational Mechanics: Lecture May 20
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 egen
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 ) 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
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
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).
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
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
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 )xy
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 )xy
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 2x)
dx 2 (x) 2
T ( x) 2T ( x x) T ( x 2x) 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
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) 2x 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) 2x x
x 3 dx 3
In Upwind we used the
information of two nodes ,but
choosing one of them
Upwind
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 fV
Ae Aw y An As x
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 xvnTn vs Ts fV
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 fxy
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 fV
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.