Computational Fluid Dynamics : February 28
Computational Fluid Dynamics : February 28
Computational Fluid Dynamics : February 28
DYNAMICS (MKM411)
Prof. M. Sharifpur
[email protected]
February 28th
Department of Mechanical and Aeronautical Engineering
University of Pretoria
2019
Thursday Mach 7 th
Finding;
- Governing (Differential) Equations
- Initial & Boundary Conditions
Discretization of the Domain
Changing Differential Eqs. to Algebraic Eqs.
T T T 2T 2T 2T
c u v w k 2 2 2 egen
x y z x y 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
x y z x y z
Discretization of the Domain
h, T
Tm ,n T2,1
df x f x x f x
dx x
In the case of 3D
f ( x, y, z ) f ( x x, y, z ) f ( x, y, z )
x x
f ( x, y, z ) f ( x, y, z ) f ( x, y, z z ) f ( x, y, z )
?
z z z
d 2T ( x)
2
? for 1D
dx
dT ( x) 1 2 d 2T ( x)
T ( x x) T ( x) x x 2
...
dx 2 dx
2 Add together
dT ( x) 1 2 d T ( x)
T ( x x) T ( x) x x 2
...
dx 2 dx
d 2T ( x) T ( x x) 2T ( x) T ( x x)
dx 2
x 2
And in general
d 2Ti Ti 1 2Ti Ti 1
or
dx 2
(x) 2
One-Dimensional Steady Heat Conduction
Steady one-dimensional heat
conduction in a plane wall of
thickness L with heat generation.
e
and constant k
d 2T e
2
0
dx k
d 2T e
2
0
dx k
T0=10 C T10=100 C
e1
node11
node 10 T1022TT1 TT2 1 00
10 4
4
e
kk
0 1 2
e2
node 2 10 T1 2T2 T3 0
4
k
node 6 10 4 T5 2T6 T7 6 0
e
k
e8
node 8 10 T7 2T8 T9 0
4
k
ee99
node 9 10 T8 2T9 100
4
T10 00
kk
Therefore, if we need
more nodal temperature
we should make ⍙x
smaller.
One-Dimensional Steady Heat Conduction
Steady one-dimensional heat
conduction in a plane wall of
thickness L with heat generation.
e
and constant k
d 2T e
2
0
dx k
d 2T e
2
0
dx k
Q Egen,element 0
egen V
All sides
Boundary Conditions Steady One-Dimensional
Heat Conduction in a Plane Wall
1. Specified temperature boundary conditions
• T(0)=T0=Specified value
• T(L)=TM=Specified value
• No need to write an energy balance
If L=10 cm and we divide the domain to 5
Therefore, Δx=2 cm and if k=2 and e 500 W/m
3
d 2T e
How many internal nodes do we have? 4 2
0
dx k
44 e1
node11
node
10
10
10 T022TT1 1TT2 2 25000
44 k
10 4
node 2 T1 2T2 T3 250 0
4
10 4
node 3 T2 2T3 T4 250 0
4
1044
node44
node
10
TT33 22TT44 100
T5
250
25000
44
10 4 10 4
node1 10 2T1 T2 250 0 node 3 T2 2T3 T4 250 0
4 4
10 4 10 4
node 2 T1 2T2 T3 250 0 node 4 T3 2T4 100 250 0
4 4
T1 28.2 C , T2 46.3 C ,
T3 64.3 C and T4 82.2
T1 28.2 C , T2 46.3 C , T3 64.3 C and T4 82.2 From
FDM
Now, analytical exact solution:
d 2T e d 2T
2
0 2
250
dx k dx
250 2
T ( x) x C1 x C2
2
T (0) 10 , T (0.1) 100
C1 915.5, C2 10
250 2
T ( x) x 912.5 x 10
2
T (0.02) 28.2
The width of the volume element: x/2
In General at boundary
• An energy balance on the
volume element at that boundary:
All sides
Q Egen,element 0
T1 28.2 C , T2 46.3 C ,
T3 64.3 C and T4 82.2
With new boundary conditions
Internal nodes= ? 4
How many unknown T= ? 5
For Internal nodes:
All sides
Q Egen,element 0
T1 T0
Qleft surface kA e0 Ax / 2 0
x
Q q A
500(0.02)
100 100(T1 T0 ) 0
2
100(T1 T0 ) 105 0
node 0 100(T1 T0 ) 105 0
Differential Eqs.
Diff. Eqs. to
Algebraic Eqs.
Boundary Nodes
Boundary
Conditions
All sides
Q Egen,element 0
The width of the volume element: x/2
In General at boundary
• An energy balance on the
volume element at that boundary:
All sides
Q Egen,element 0
Boundary Conditions
• Specified Temperature Boundary Condition
• Specified Heat Flux Boundary Condition
• Convection Boundary Condition
• Radiation Boundary Condition
• Interface Boundary Conditions
• Generalized Boundary Conditions
• Insulated Boundary Condition 31
T1 T0
Q Egen,element 0 Qleft surface kA e0 Ax / 2 0
All sides x
2T egen d 2T egen
0 0
x 2
k dx 2
k
2- The general algebraic equation for
internal nodes and then equation for the
second node.
.
The general algebraic equation for internal nodes
All sides
Q Egen,element 0
3- The algebraic equation for boundary nodes.
All sides
Q Egen,element 0
Q left hA(T T0 )
3
10
h(T T0 ) 103 k (T1 T0 ) 5000( )0
2
h(T T0 ) 103 k (T1 T0 ) 2.5 0
3-2- For right side of the wall
All sides
Q Egen,element 0
Q left qA
3
10
q 103 k (T99 T100 ) 5000( )0
2
3
10
h(T T0 ) 103 k (T1 T0 ) 5000( )0
2
T1 T0
Q Egen,element 0 Qleft surface kA e0 Ax / 2 0
All sides x
Boundary Conditions
• Specified Temperature Boundary Condition
• Specified Heat Flux Boundary Condition
• Convection Boundary Condition
• Radiation Boundary Condition
• Interface Boundary Conditions
• Generalized Boundary Conditions
• Insulated Boundary Condition 40
Insulated boundary condition
.
.
.
Node M aM TM 1 bM TM S M
[A][T] [C]
Finite Differences Solution
• Usually a system of N algebraic equations in N unknown
nodal temperatures that need to be solved simultaneously.
– direct methods
• Solve in a systematic manner following a
series of well-defined steps
– iterative methods
• Start with an initial guess for the solution,
and iterate until solution converges
direct methods
Solve in a systematic manner following a
series of well-defined steps
.
.
.
Node M aM TM 1 bM TM S M
1
[A][T] [C] [T] [A] [C]
[T] [C] /[ A]
Iterative method;
S 0 b0T1
Node 0 a0T0 b0T1 S 0 T0
a0
[4] uv vw w kT 10
Nonlinear equations
1- Whenever, one of the unknown parameters(variables)
has a power more than one
2 2
T or u
2- If there is a multiplication of two unknowns (variables)
vT or uT
3- If There is a multiplication of an unknown parameters to a
differential of an unknown parameter, like u u
u or v
x y
4- A differential of an unknown parameters has a power more
2
u v
2
than one
or
x y
Now let’s back to previous question;
Nonlinear equations
1- Whenever, one of the unknown parameters has a power
more than one
2- If there is a multiplication of two unknowns
Obtain if the following Eqs. are linear or nonlinear?
If only u , v, w and T are the unknow variables
T T 50 T
[1] ( c p vT ) ( c p v T ) k ( ) 0 NL
x y
uv vw
[2] 0 L
x y
[3] u 2 v w kT 100 NL
[4] uv vw w kT 10 NL
Do not mix power with order, please
Whenever, one of the unknown parameters has a power more than one
Or
There is a multiplication of two unknown parameters
Or
There is a multiplication of an unknown parameters to a differential of an
unknown parameters, the equation is NON-LINEAR
vT or uT
3- If There is a multiplication of an unknown parameters to a
differential of an unknown parameters, or u u
u or v
x y
4- A differential of an unknown parameters has a power more
2
u v
2
than one
or
x y
Unannounced QUIZ 5
Allowance Time, 4 minutes
Obtain if the following Eqs. is linear or nonlinear?
If it is nonlinear, explain why (which term(s) make it
nonlinear) If only 𝑢, 𝑣, 𝑤, 𝑝 and 𝑇 are the unknown variables
If the last digit of your Student number is an
odd number use A , else use B
2
𝜕𝑇 𝜕𝑣 𝜕2𝑇 𝜕2𝑣 𝜕𝑢
A 𝜌𝑐𝑣 = 2𝜇 +𝑘 2
+ 2
+ + 𝑔2
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑇 𝜕𝑢 𝜕2𝑇 𝜕2𝑢 𝜕𝑝
B 𝜌𝑐 = 𝜇𝑤 + 𝑘𝑢 2
+ 2
+ +𝑔2
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑥
Unannounced QUIZ 5- Solution
Allowance Time, 4 minutes
If only u, v, w and T are the unknow variables
2
𝜕𝑇 𝜕𝑣 𝜕2𝑇 𝜕2𝑣 𝜕𝑢
A 𝜌𝑐𝑣 = 2𝜇 +𝑘 2
+ 2
+ + 𝑔2
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑥
𝜕𝑇 𝜕𝑢 𝜕2𝑇 𝜕2𝑢 𝜕𝑝
B 𝜌𝑐 = 𝜇𝑤 + 𝑘𝑢 2
+ 2
+ +𝑔2
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑥
Linear and nonlinear equations
For example, the governing equations for incompressible, steady and
constant properties (µ, Cp, k);
Conservation of Mass u v w
0
x y z
Conservation of Momentum
X-direction
u u u p 2u 2u 2u
u v w f x 2 2 2
x y z x x y z
Energy Eq.:
T T T T 2T 2T 2T
c (u v w ) k 2 2 2 egen
t x y z x y 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
For steady two-dimensional heat conduction with heat
generation and constant thermal conductivity
For x y l
em,nl 2
Tm1,n Tm1,n Tm,n 1 Tm,n 1 4Tm,n 0
k
Boundary Nodes
Is similar to the
development in the
one-dimensional case.
All sides
Q eVelement 0
How many axis of symmetry does it have?
T2, , h2
T2, , h2
How many axis of symmetry does it have?
T2, , h2
T2, , h2 T2, , h2
T1, , h1
T2, , h2
What is the meaning of Insulation ?
T2, , h2
T2, , h2
The problem reduced to:
T2, , h2
T1, , h1
T1, , h1
How many axis of symmetry does this one have?
T3
Only 2
T3
The problem reduced to:
T3
T2, , h2
T1, , h1
T3
Only 1
T4
T2, , h1 T2, , h1
T3 T3
Only 1
Finite Difference Method (FDM)
Computational Solution
Finding;
- Governing (Differential) Equations
- Initial & Boundary Conditions
Internal Nodes
Changing Differential Eqs. and
to Algebraic Eqs. Boundary Nodes