2021 - Test 1 - Solution

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

COMPUTATIONAL FLUID

DYNAMICS (MKM411)
Prof. M. Sharifpur
[email protected]

April 29 th
Department of Mechanical and Aeronautical Engineering
University of Pretoria
Test1- The solution
10 Marks
15 Marks
If also solved three equations and find a solution 25 Marks

+10 Marks if you find the right answers


15 Marks

If also solved three equations and


find a solution 25 Marks
+10 Marks if you find the right answers
15 Marks

If also solved three equations and


find a solution 25 Marks
+10 Marks if you find the right answers
15 Marks

If also solved three equations and


find a solution 25 Marks
+10 Marks if you find the right answers
Boundary Nodes in FDM
• A boundary node does not have a neighboring node
on at least one side.
• We need to obtain the finite difference equations of
boundary nodes separately in most cases.
• (specified temperature boundary conditions is an
exception).

• Energy balance on the volume elements of boundary


nodes will be apply.

 Q  Egen,element  0
egen 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 e1
node11
node
10
 10
10 T022TT1 1TT2 2 25000
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
25000
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

node1 1010  2T1  T2   1  0

node 2  10T1  2T2  T3   1  0


node 3  10T2  2T3  T4   1  0
node 4  10T3  2T4  100  1  0

Four equations and four unknowns

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

• The finite difference formulation


at the node m=0 can be expressed as:
T1  T0
Qleft surface  kA  e0  Ax / 2   0 (1)
x

• The finite difference form of various boundary


conditions can be obtained from Eq. (1)by replacing
Qleft surface
left surface by a suitable expression.
Let’s get back to the previous example and changing one
of the boundary conditions
node1 1010  2T1  T2   1  0 node 3  10T2  2T3  T4   1  0

node 2  10T1  2T2  T3   1  0 node 4  10T3  2T4  100  1  0

Four equations and four unknowns

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:

node 1  10T0  2T1  T2   1  0

node 2  10T1  2T2  T3   1  0

node 3  10T2  2T3  T4   1  0

node 4  10T3  2T4  100  1  0


For boundary the node:
Δx=2 cm and k=2 e  500 W/m 3


All sides
Q  Egen,element  0

T1  T0
Qleft surface  kA  e0  Ax / 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

node1 10T0  2T1  T2   1  0

node 2  10T1  2T2  T3   1  0


node 3  10T2  2T3  T4   1  0

node 4  10T3  2T4  100  1  0

T0  106.3 T1  105.2 T2  104.1 T3  102.8 T4  101.5


Numerical Result:
T0  106.3 T1  105.2 T2  104.1
T3  102.8 T4  101.5
Analytical Result:
250 2 dT (0)
T ( x)   x  C1 x  C2 k  100 , T (0.1)  100
2 dx

BC1)  (2)( 250(0)  C1 )  100 C1  50


250 C2  106.25
BC 2)  (0.1) 2  ( 50)(0.1)  C2  100
2
T ( x)  125 x 2  50 x  106.25
T0  T (0)  106.25 T1  T (0.02)  105.2 T2  T (0.04)  104.1
T3  T (0.06)  102.8 T4  T (0.08)  101.5 T5  T (0.1)  100
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

• The finite difference formulation


at the node m=0 can be expressed as:
T1  T0
Qleft surface  kA  e0  Ax / 2   0 (1)
x

• The finite difference form of various boundary


conditions can be obtained from Eq. (1)by replacing
Qleft surface
left surface by a suitable expression.
d 2T e
2
 0
dx k

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 33
 Q  Egen,element  0 Qleft surface  kA
T1  T0
 e0  Ax / 2   0
All sides x

2. Specified Heat Flux Boundary Condition


T1  T0
q0 A  kA  e0  Ax / 2   0
x
3. Convection Boundary Condition
T1  T0
hA T  T0   kA  e0  Ax / 2   0
x

4. Radiation Boundary Condition


T1  T0
 A T 4
T 4
  kA  e0  Ax / 2   0
x
surr 0

5. Combined Convection and Radiation


T1  T0
hA(T  T0 )   A T  4
surr T 0
4
  kA
x
 e0  Ax / 2   0
Example
Consider heat conduction in a plain wall in the case of steady
state and constant properties. Inside the wall there is a
uniform heat generation of 5000 W/m³. The wall thickness is
10 cm ,assume Δx =1mm for domain discretization
Specify: k  20 W/m o C.
1- The governing differential
equation for this wall
2- The general algebraic equation
for internal nodes and then equation
for the second node.
3- The algebraic equation for
boundary nodes.
 T T T T    2T  2T  2T 
c  (u v  w )     k  2  2  2   egen
 t x y z   x y z 

Heat conduction in a plain wall (1D) in the case of


steady state and constant properties, with heat
generation, L=10 cm, Δx=1mm.
1- The governing differential
equation for this wall

 2T egen d 2T egen
 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

x  1 mm  10 3 , egen  5000 W/m3 , k  20 W/m o C

106 (Tm 1  2Tm  Tm 1 )  250  0

For the second node; m 1


106 (T0  2T1  T2 )  250  0

3- The algebraic equation for


boundary nodes.


All sides
Q  Egen,element  0
3- The algebraic equation for boundary nodes.

All sides
Q  Egen,element  0

3-1- For left side of the wall


T1  T0
Qleft surface  kA  e0  Ax / 2   0
x
A  11  1m 2 , x  10 3

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  qA

A  11  1m2 , x  103

3
10
q  103 k (T99  T100 )  5000( )0
2

q  103 k (T99  T100 )  2.5  0


Keep in your mind about the boundary node.

3
10
h(T  T0 )  103 k (T1  T0 )  5000( )0
2
 Q  Egen,element  0 Qleft surface  kA
T1  T0
 e0  Ax / 2   0
All sides x

Convection Boundary Condition


T1  T0
hA T  T0   kA  e0  Ax / 2   0
x
Radiation Boundary Condition
T1  T0
 A T 4
T4
  kA  e0  Ax / 2   0
x
surr 0

Combined Convection and Radiation


T1  T0
hA(T  T0 )   A T  4
surr T
0
4
  kA
x
 e0  Ax / 2   0
d 2T e
2
 0
dx k

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 42
Insulated boundary condition

Insulated boundary can be


treated as “zero” heat flux
0 T1  T0
Qleft surface  kA  e0  Ax / 2   0
x
The Mirror Image Concept (Thermal symmetry)
Insulated boundary can be
treated as “zero” heat flux
0 T1  T0
Qleft surface  kA  e0  Ax / 2   0
x
Another and more practical way is to
assume the node on an insulated boundary
as an interior node.
By replacing the insulation on the boundary by a mirror
(Thermal symmetry)and considering the reflection of the
medium as its extension
M+1 algebraic equations and M+1 unknown
Node 0  a0T0  b0T1  S 0
Node 1  a1T0  b1T1  c1T2  S1
Node 2  a2T1  b2T2  c2T3  S 2

.
.
.
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.

• There are numerous systematic approaches available which


are broadly classified as

– 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 0  a0T0  b0T1  S 0

Node 1  a1T0  b1T1  c1T2  S1


Node 2  a2T1  b2T2  c2T3  S 2

.
.
.
Node M  aM TM 1  bM TM  S M

1 1
[A][T]  [C] T]][[A
[[T C]][A
[C
]]
[T]  [C] /[ A]
Iterative method;

S 0  b0T1
Node 0  a0T0  b0T1  S 0 T0 
a0

Node 1  a1T0  b1T1  c1T2  S1 T1  F (T2 )

Node 2  a2T1  b2T2  c2T3  S 2 T2  F (T3 )


.
.
TM 1  F (TM )
.
Node M  aM TM 1  bM TM  S M TM  ...
Finite Differences Solution
• The direct methods usually require a large amount of
computer memory and computation time.

• The computer memory requirements for iterative methods


are minimal.

• The convergence of iterative methods to the desired


solution, however, may pose a problem.

The direct methods can not solve nonlinear problems


For solving the system of equations it is important
to know if they are Linear or nonlinear equations

Linear and nonlinear equations


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 vT )  ( c p v T )  k (    )  0
 x   y 
uv vw
[2]  0
x y
[3] u 2  v  w  kT  100

[4] uv  vw  w  kT  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 vT )  ( c p v T )  k (    )  0 NL
 x   y 
uv vw
[2]  0 L
x y
[3] u 2  v  w  kT  100 NL

[4] uv  vw  w  kT  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

Which of them can be applicable here?


v y ( x, y)
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 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 

You might also like