Uploaded by Prangon Ghose

03 Characteristics-of-Governing-PDEs-lec-1

advertisement
Characteristics of Governing
Partial Differential Equation (PDE)
•
•
Ordinary Differential Equations have only one independent variable:
𝑑𝑦
3 + 5𝑦 2 = 3𝑒 −π‘₯ ,
𝑦 0 =5
𝑑π‘₯
Partial Differential Equations have more than one independent variable:
πœ•2𝑒
πœ•2𝑒
+ 2π‘₯𝑦 2 + 𝑒 = 1
πœ•π‘₯ 2
πœ•π‘¦
πœ•3𝑒
πœ•2𝑒
+ π‘₯ 2 + 8𝑒 = 5𝑦
πœ•π‘₯ 2 πœ•π‘¦
πœ•π‘¦
πœ•2𝑒
πœ•π‘’
+
π‘₯𝑒
=π‘₯
πœ•π‘₯ 2
πœ•π‘¦
πœ•2𝑒
πœ•π‘₯ 2
3
πœ•3𝑒
+6
=π‘₯
πœ•π‘₯πœ•π‘¦ 2
here u is the dependent variable, and x and y the independent variables.
The order of a PDE is that of the highest-order partial derivative appearing in the
equation. The two PDEs at the top are of 2nd order and two PDEs at the bottom are
of 3rd order.
A PDE is linear if it is linear in the unknown function and all its derivatives (no
exponent), with coefficients not functions of u, but can be functions of the
independent variables. The two PDEs on the left are linear and the two PDEs on the
right are non-linear ones.
Classification of 2nd Order Linear PDE’s in 2D
πœ•2𝑒
πœ•2𝑒
πœ•2𝑒
πœ•π‘’
πœ•π‘’
𝐴 2+𝐡
+𝐢 2+𝐷
+𝐸
+𝐹 =0
πœ•π‘₯
πœ•π‘₯πœ•π‘¦
πœ•π‘¦
πœ•π‘₯
πœ•π‘¦
where 𝐴 , 𝐡, 𝐢, 𝐷 and 𝐸 are functions of π‘₯ and 𝑦.
𝐹 is a function of π‘₯, 𝑦 and 𝑒.
PDEs can be:
•
Elliptic
⇒ ⇒ ⇒ if 𝐡2 − 4𝐴𝐢 < 0
•
Parabolic ⇒ ⇒ ⇒ if 𝐡2 − 4𝐴𝐢 = 0
•
Hyperbolic ⇒ ⇒ ⇒ if 𝐡2 − 4𝐴𝐢 > 0
•This classification is useful because each category relates to specific and distinct
engineering problem contexts that demand special solution techniques. Before
embarking on a quantitative analysis of a partial differential equation, it is important
to have an idea of the qualitative nature of the solution. Much of this qualitative
understanding of the solution can be obtained by this classification scheme.
Examples
Elliptic PDE
β–ͺ Describes physical processes that have
Example : Laplace Equation already reached steady-state, hence are
time-independent.
πœ•2𝑇 πœ•2𝑇
+ 2=0
2
πœ•π‘₯
πœ•π‘¦
Here, 𝐴 = 1, 𝐡 = 0, 𝐢 = 1
So, 𝐡2 − 4𝐴𝐢 = 0 − 4(1)(1) = −4 < 0
Parabolic PDE
β–ͺ Describes
time-dependent,
dissipative
Example : Heat Conduction
physical processes, such as diffusion, that
are evolving toward steady-state.
Equation
2
πœ• 𝑇 πœ•π‘‡
𝛼 2=
πœ•π‘₯
πœ•π‘‘
Hyperbolic PDE
Example : Wave Equation
πœ•2𝑦
1 πœ•2𝑦
= 2 2
2
πœ•π‘₯
𝑐 πœ•π‘‘
Here, 𝐴 = 𝛼, 𝐡 = 0, 𝐢 = 0
So, 𝐡2 − 4𝐴𝐢 = 0 − 4(0)(𝛼) = 0
β–ͺ Describes time-dependent, conservative
physical processes, such as convection, that
are NOT evolving toward steady-state.
Here, 𝐴 = 1, 𝐡 = 0, 𝐢 = −1/𝑐 2
1
So, 𝐡2 − 4𝐴𝐢 = 0 − 4 1 − 2 =
𝑐
4
𝑐2
>0
Features of Different Class of PDEs
•Elliptic equations generally arise from a physical problem that involves a diffusion
process that has reached equilibrium. Elliptic equations in engineering are typically used
to characterize steady-state, boundary value problems (BVP). As in the Laplace equation,
this is indicated by the absence of a time derivative. Thus, elliptic equations are typically
employed to determine the steady-state distribution of an unknown in two spatial
dimensions, e.g., a steady state temperature distribution in a rectangular slab in 2D. By
analogy, the same approach can be employed to tackle other problems such as seepage of
water under a dam or the distribution of an electric field.
•In contrast to the elliptic category, parabolic equations determine how an unknown varies
in both space and time (IBVP). This is manifested by the presence of both spatial and
temporal derivatives in the heat conduction equation. Such cases are referred to as
propagation problems because the solution “propagates,’’ or changes, in time (solution is
obtained by ‘marching on time’). Physically, parabolic PDEs tend to arise in time
dependent diffusion problems, such as the transient flow of heat in accordance with
Fourier's law of heat conduction.
•Hyperbolic equations also deal with propagation problems (IBVP). An important
distinction manifested by the wave equation is that the unknown is characterized by a
second derivative with respect to time. As a consequence, the solution oscillates. These
are able to support solutions with discontinuities, for example a shock wave. A variety of
engineering systems such as vibrations of rods and beams, convection driven fluid
transport problems, waves, and transmission of sound and electrical signals can be
characterized by this model.
Initial and Boundary Condition for PDEs
β—Ό There are many possibilities to specify boundary conditions for PDEs:
πœ•2𝑒
πœ•π‘’
+ π‘₯𝑒
=π‘₯
2
πœ•π‘₯
πœ•π‘¦
β—Ό
Dirichlet boundary condition
The solution of the function at the boundary point is specified (𝑒 = 𝐢)
β—Ό
Von Neumann boundary condition
πœ•π‘’
The derivative of the function at the boundary point is specified ( πœ•π‘₯ = 𝐢)
β—Ό
Robin boundary condition
A combination of the solution and derivative values of the function
at the boundary point is specified (𝐴𝑒 + 𝐡
πœ•π‘’
πœ•π‘₯
= 𝐢)
Solution Domain of PDEs
Solution Domain of PDEs
Solution Domain of PDEs
Physical Examples of Elliptic PDEs
Three steady-state distribution problems that can be characterized
by elliptic PDEs.
Temperature distribution on
a heated plate,
Seepage of water under a
dam
Electric field near the
point of a conductor
Physical Examples of Parabolic PDEs
A long, thin rod that is insulated
everywhere but at its end. The
dynamics of the one-dimensional
distribution of temperature along the
rod’s length can be described by a
parabolic PDE.
The solution consisting of
distributions corresponding to the
state of the rod at various times.
Physical Examples of Hyperbolic PDEs
In the steady subsonic
region,
the
Euler
equations exhibit a
behavior
that
is
associated with elliptic
PDE, whereas in the
steady
supersonic
region,
the
mathematical behavior
is totally different,
namely
that
of
hyperbolic PDEs..
Schematic of the flow-field over a
supersonic blunt-nosed body
Physical Example of an Elliptic PDE
y
Tt
W
Tl
Tr
x
Tb
L
Schematic diagram of a plate with specified temperature boundary conditions
The Laplace equation governs the temperature:
πœ•2𝑇 πœ•2𝑇
πœ•π‘₯ 2
+
πœ•π‘¦ 2
=0
Discretizing the Elliptic PDE
y
Tt
(0, n)
L
x =
m
W
y =
n
x
y
Tl
Tr
(i − 1, j )
(i, j )
x
(0,0)
Tb
y
(i, j + 1)
x
(i, j )
(i + 1, j )
(i, j − 1)
(m,0)
ο‚ΆT
T ( x + x, y ) − 2T ( x, y ) + T ( x − x, y )
( x, y ) 
2
ο‚Άx
(x )2
2
ο‚ΆT
T ( x, y + y ) − 2T ( x, y ) + T ( x, y − y )
( x, y ) 
2
2
ο‚Άy
(y )
2
Discretizing the Elliptic PDE
y
Tt
(0, n)
x
y
Tl
(i, j + 1)
x
y
Tr
(i − 1, j )
(i, j )
(i, j )
(i, j − 1)
x
(0,0)
Tb
(i + 1, j )
(m,0)
ο‚Ά 2T
T ( x + x, y ) − 2T ( x, y ) + T ( x − x, y )
(
x
,
y
)

ο‚Άx 2
(x )2
ο‚Ά 2T
ο‚Άx 2

i, j
Ti +1, j − 2Ti , j + Ti −1, j
(x )2
Discretizing the Elliptic PDE
y
Tt
(0, n)
x
y
Tl
(i, j + 1)
x
y
Tr
(i − 1, j )
(i, j )
(i, j )
(i, j − 1)
x
(0,0)
Tb
(i + 1, j )
(m,0)
ο‚Ά 2T
T ( x + x, y ) − 2T ( x, y ) + T ( x − x, y )
(
x
,
y
)

ο‚Άx 2
(x )2
ο‚Ά 2T
T ( x, y + y ) − 2T ( x, y ) + T ( x, y − y )
(
x
,
y
)

ο‚Άy 2
(y )2
ο‚Ά 2T
ο‚Άx 2
ο‚Ά 2T
ο‚Άy 2

Ti +1, j − 2Ti , j + Ti −1, j
i, j

i, j
(x )2
Ti , j +1 − 2Ti , j + Ti , j −1
(y )2
Discretizing the Elliptic PDE
ο‚Ά 2T
ο‚Ά 2T
+
=0
2
2
ο‚Άx
ο‚Άy
Substituting these approximations into the Laplace
equation yields:
Ti +1, j − 2Ti , j + Ti −1, j
(x)
2
if,
+
Ti , j +1 − 2Ti , j + Ti , j −1
(y )
2
=0
x = y
the Laplace equation can be rewritten as
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0
Discretizing the Elliptic PDE
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0
Once the governing equation has been discretized there are
several numerical methods that can be used to solve the
problem, e.g.,
•Direct Method (TDMA method)
•Gauss-Seidel Method (Iterative method)
•Relaxation Method
The Gauss-Seidel Method
• Recall the discretized equation
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0
• This can be rewritten as
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1
Ti , j =
4
• For the Gauss-Seidel Method, this equation is
solved iteratively for all interior nodes until a
pre-specified tolerance is met.
Example 1: Gauss-Seidel Method
Consider a plate 2.4 m ο‚΄ 3.0 m that is subjected to the boundary
conditions shown below. Find the temperature at the interior nodes
using a square grid with a length of 0.6 m using the Gauss-Seidel
method. Assume the initial temperature at all interior nodes to be 0 ο‚°C
.
y
300 ο‚°C
75 ο‚°C
3.0 m
100 ο‚°C
50 ο‚°C
2.4 m
x
Example 1: Gauss-Seidel Method
We can discretize the plate by taking
x = y = 0.6m
Example 1: Gauss-Seidel Method
The nodal temperatures at the boundary nodes are given by:
300 ο‚°C
y
T 0,5
T0, 4
75 ο‚°C
T0,3
T0, 2
T0 ,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T0, j = 75, j = 1,2,3,4
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
100 ο‚°C
Ti ,0 = 50, i = 1,2,3
Ti ,5 = 300, i = 1,2,3
x
T1, 0
T2, 0
50 ο‚°C
T3, 0
T4, 0
T4, j = 100, j = 1,2,3,4
Example 1: Gauss-Seidel Method
•Now we can begin to solve for the temperature at each interior
node using
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1
Ti , j =
4
•Assume all internal nodes to have an initial temperature of zero.
Iteration #1
T2,1 + T0,1 + T1, 2 + T1,0
i = 1 and j = 1 T1,1 =
4
=
0 + 75 + 0 + 50
4
= 31.2500 ο‚°C
i = 1 and j = 2
T1, 2 =
=
T2, 2 + T0, 2 + T1,3 + T1,1
4
0 + 75 + 0 + 31.2500
4
= 26.5625ο‚°C
Example 1: Gauss-Seidel Method
After the first iteration, the temperatures are as follows. These will
now be used as the nodal temperatures for the second iteration.
y
300 ο‚°C
75 ο‚°C
100
102
135
25
9 .3
37
27
12
39
31
20
43
50 ο‚°C
100 ο‚°C
x
Example 1: Gauss-Seidel Method
Iteration #2
i = 1 and j = 1
T1,1 =
T2,1 + T0,1 + T1, 2 + T1,0
4
20.3125 + 75 + 26.5625 + 50
=
4
= 42.9688ο‚°C
previous
T1,present
−
T
ο₯ a 1,1 = 1 present1,1
ο‚΄100
T1,1
42.9688 − 31.2500
ο‚΄100
42.9688
= 27.27%
=
Example 1: Gauss-Seidel Method
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations:
Temperature
Distribution
y
y
300
75
75
300
300
133
156
161
100
25 %
34%
16%
56
56
87
100
54%
83%
58%
39
29
56
100
31%
62 %
32%
43
37
56
100
27 %
45 %
24 %
75
75
Absolute Relative
Approximate
Error Distribution
x
50
50
50
x
Example 1: Gauss-Seidel Method
Temperature Distribution in the Plate (°C)
Node
Number of Iterations
1
2
10
T1,1
31.2500
42.9688
73.0239
T1, 2
T1,3
26.5625
38.7695
91.9585
25.3906
55.7861
119.0976
T1, 4
100.0977
133.2825
172.9755
T2,1
20.3125
36.8164
76.6127
T2, 2
T2,3
11.7188
30.8594
102.1577
9.2773
56.4880
137.3802
T2, 4
102.3438
156.1493
198.1055
T3,1
T3, 2
42.5781
56.3477
82.4837
38.5742
56.0425
103.7757
T3,3
T3, 4
36.9629
86.8393
130.8056
134.8267
160.7471
182.2278
Exact
The Relaxation Method
• Recall the equation used in the Gauss-Seidel Method,
Ti , j =
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1
4
• Because the Gauss-Seidel Method is guaranteed to converge,
we can accelerate/decelerate the process by using under / overrelaxation. In this case,
new
old
Ti,relaxed
=

T
+
(
1
−

)
T
j
i, j
i, j
πœ† is called relaxation parameter.
If πœ† ≤ 1, it is called under-relaxation parameter.
When πœ† > 1, it is called over-relaxation parameter.
Example 2: Relaxation Method
Consider a plate 2.4 m ο‚΄ 3.0 m that is subjected to the boundary
conditions shown below. Find the temperature at the interior nodes
using a square grid with a length of 0.6 m . Use a relaxation
parameter of 1.4. Assume the initial temperature at all interior
nodes to be
. 0 ο‚°C
y
300 ο‚°C
75 ο‚°C
3.0 m
100 ο‚°C
50 ο‚°C
2.4 m
x
Example 2: Relaxation Method
We can discretize the plate by taking
x = y = 0.6m
Example 2: Relaxation Method
We can also develop equations for the boundary conditions to
define the temperature of the exterior nodes.
300 ο‚°C
y
T 0,5
T0, 4
75 ο‚°C
T0,3
T0, 2
T0 ,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T0, j = 75, j = 1,2,3,4
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
100 ο‚°C
Ti ,0 = 50, i = 1,2,3
Ti ,5 = 300, i = 1,2,3
x
T1, 0
T2, 0
50 ο‚°C
T3, 0
T4, 0
T4, j = 100, j = 1,2,3,4
Example 2: Relaxation Method
•Now we can begin to solve for the temperature at each interior
node using the rewritten Laplace equation from the Gauss-Seidel
method.
•Once we have the temperature value for each node we will apply
the Relaxation equation.
•Assume all internal nodes to have an initial temperature of zero.
Iteration #2
Iteration #1
T +T +T +T
T +T +T +T
i=1 and j=1
T1,1 =
2,1
0,1
1, 2
1, 0
4
0 + 75 + 0 + 50
=
4
= 31.2500 ο‚°C
relaxed
1,1
T
= T
new
1,1
+ (1 −  )T
old
1,1
= 1.4(31.2500) + (1 − 1.4)0
= 43.7500ο‚°C
i=1 and j=2
T1, 2 =
=
2, 2
0, 2
1, 3
1,1
4
0 + 75 + 0 + 43.75
4
= 29.6875ο‚°C
T1,1relaxed = T1,1new + (1 −  )T1,1old
= 1.4(29.6875) + (1 − 1.4)0
= 41.5625ο‚°C
Example 2: Relaxation Method
After the first iteration the temperatures are as follows. These will
be used as the initial nodal temperatures during the second
iteration.
y
300 ο‚°C
75 ο‚°C
146
164
221
41
23
66
42
26
67
44
33
64
50 ο‚°C
100 ο‚°C
x
Example 2: Relaxation Method
Iteration #2
i = 1 and j = 1
T1,1 =
T2,1 + T0,1 + T1, 2 + T1,0
4
32.8125 + 75 + 41.5625 + 50
=
4
= 49.8438ο‚°C
T1,1relaxed = T1,1new + (1 −  )T1,1old
= 1.4(49.8438) + (1 − 1.4)43.75
= 52.2813ο‚°C
ο₯ a 1,1 =
previous
T1,present
−
T
1
1,1
present
1,1
T
ο‚΄100
52.2813 − 43.7500
=
ο‚΄100
52.2813
= 16.32%
In iteration 1 we calculated new values of internal
nodes from Gauss Seidel method. Then we used the
new values to calculate relaxed values.
Again those relaxed values are now used as the
previous values in Gauss Seidel method to calculate
new values then these new values are used to
calculate new relaxed values.
Example 2: Relaxation Method
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations:
y
Temperature
Distribution
300
75
75
300
y
300
161
216
181
100
9 .6 %
24 %
22 %
87
122
155
100
53%
81%
57%
51
58
76
100
19%
55%
13%
52
54
69
100
16%
39%
7 .5 %
75
75
Absolute Relative
Approximate
Error Distribution
x
50
50
50
x
Example 2: Relaxation Method
Temperature Distribution in the Plate (°C)
Node
Number of Iterations
1
2
9
T1,1
43.7500
52.2813
73.7832
T1, 2
T1,3
41.5625
51.3133
92.9758
40.7969
87.0125
119.9378
T1, 4
145.5289
160.9353
173.3937
T2,1
32.8125
54.1789
77.5449
T2, 2
T2,3
26.0313
57.9731
103.3285
23.3898
122.0937
138.3236
T2, 4
164.1216
215.6582
198.5498
T3,1
T3, 2
63.9844
69.1458
82.9805
66.5055
76.1516
104.3815
T3,3
T3, 4
66.4634
155.0472
131.2525
220.7047
181.4650
182.4230
Exact
Alternative Boundary Conditions
•
•
In Examples 1-2, the boundary conditions on the plate had a specified
temperature on each edge. What if the conditions are different ? For example,
what if one of the edges of the plate is insulated.
In this case, the boundary condition would be the derivative of the temperature
temperature at the boundary is set at a fixed value (Neumann boundary
condition). Because if the right edge of the plate is insulated, then the
temperatures on the right edge nodes also become unknowns.
y
300 ο‚°C
75 ο‚°C
Insulated
3.0 m
50 ο‚°C
2.4 m
x
Alternative Boundary Conditions
•
The finite difference equation in this case for the right edge for the nodes
for (m, j )
j = 2,3,..n −1
Tm +1, j + Tm −1, j + Tm, j −1 + Tm, j +1 − 4Tm, j = 0
•
However the node (m + 1, j ) is not inside the plate. The derivative
boundary condition needs to be used to account for these additional
unknown nodal temperatures on the right edge. This is done by
approximating the derivative at the edge node as (m, j )
y
ο‚ΆT
ο‚Άx

m, j
300 ο‚°C
Tm+1, j − Tm−1, j
2(x)
75 ο‚°C
Insulated
3.0 m
50 ο‚°C
2.4 m
x
Alternative Boundary Conditions
•
Rearranging this approximation gives us,
Tm +1, j = Tm −1, j + 2(x)
•
ο‚ΆT
ο‚Άx
m, j
We can then substitute this into the original equation gives us,
2Tm −1, j + 2(x)
ο‚ΆT
ο‚Άx
+ Tm, j −1 + Tm, j +1 − 4Tm, j = 0
m, j
•
Recall that is the edge is insulated then,
•
ο‚ΆT
=0
ο‚Άx m, j
Substituting this again yields,
2Tm −1, j + Tm, j −1 + Tm, j +1 − 4Tm , j = 0
Example 3: Alternative Boundary Conditions
A plate 2.4 m ο‚΄ 3.0 m is subjected to the temperatures and
insulated boundary conditions as shown in Fig. 12. Use a
square grid length of 0.6 m . Assume the initial temperatures
at all of the interior nodes to be 0 ο‚°C . Find the temperatures
at the interior nodes using the direct method.
y
300 ο‚°C
75 ο‚°C
Insulated
3.0 m
50 ο‚°C
2.4 m
x
Example 3: Alternative Boundary Conditions
We can discretize the plate taking,
x = y = 0.6m
Example 3: Alternative Boundary Conditions
We can also develop equations for the boundary conditions to
define the temperature of the exterior nodes.
300 ο‚°C
y
T 0,5
T0, 4
75 ο‚°C
T0,3
T0, 2
T0 ,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
T0, j = 75; j = 1,2,3,4
Ti ,0 = 50; i = 1,2,3,4
Insulated
x
T1, 0
T2, 0
50 ο‚°C
T3, 0
T4, 0
Ti ,5 = 300; i = 1,2,3,4
ο‚ΆT
ο‚Άx
= 0; j = 1,2,3,4
4, j
Example 3: Alternative Boundary Conditions
y
T 0,5
T0, 4
T0,3
T0, 2
T0 ,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
x
T1, 0
T2, 0
T3, 0
T4, 0
Here we develop the equation for the temperature at the node
(4,3), to show the effects of the alternative boundary condition.
i=4 and j=3
2T3,3 + T4, 2 + T4, 4 − 4T4,3 = 0
2T3,3 + T4, 2 − 4T4,3 + T4, 4 = 0
Example 3: Alternative Boundary Conditions
The addition of the equations for the boundary conditions gives us
a system of 16 equations with 16 unknowns.
Solving yields:
 T1,1 οƒΉ 76.8254 οƒΉ
οƒͺT οƒΊ οƒͺ
οƒΊ
οƒͺ 1, 2 οƒΊ οƒͺ99.4444 οƒΊ
οƒͺ T1,3 οƒΊ οƒͺ128.617 οƒΊ
οƒͺ οƒΊ οƒͺ
οƒΊ
οƒͺT1, 4 οƒΊ οƒͺ180.410 οƒΊ
οƒͺT2,1 οƒΊ οƒͺ 82.8571οƒΊ
οƒͺ οƒΊ οƒͺ
οƒΊ
οƒͺT2, 2 οƒΊ οƒͺ117.335 οƒΊ
οƒͺT οƒΊ οƒͺ159.614 οƒΊ
οƒͺ 2,3 οƒΊ οƒͺ
οƒΊ
οƒͺT2, 4 οƒΊ οƒͺ 218.021οƒΊ
οƒͺT οƒΊ = οƒͺ
οƒΊ ο‚°C
87
.
2678
οƒͺ 3,1 οƒΊ οƒͺ
οƒΊ
οƒͺT3, 2 οƒΊ οƒͺ127.426 οƒΊ
οƒͺ οƒΊ οƒͺ
οƒΊ
οƒͺT3,3 οƒΊ οƒͺ174.483 οƒΊ
οƒͺT3, 4 οƒΊ οƒͺ232.060οƒΊ
οƒͺ οƒΊ οƒͺ
οƒΊ
οƒͺT4,1 οƒΊ οƒͺ88.7882 οƒΊ
οƒͺT οƒΊ οƒͺ130.617 οƒΊ
οƒͺ 4, 2 οƒΊ οƒͺ
οƒΊ
οƒͺT4,3 οƒΊ οƒͺ178.830 οƒΊ
οƒͺ οƒΊ οƒͺ
οƒΊ
οƒͺT4, 4  232.738
y
300
75
75
300
300
180
218
232
233
129
160
174
179
99
117
127
131
77
83
87
89
75
75
x
50
50
50
Secondary Variables
In Laplace equation that is used for heated plate, temperature is the primary
variable. Secondary variables such as heat flux can also be found using
appropriate relations (Fourier’s law in this case).
y
Tt
(0, n)
x
y
Tl
y
Tr
(i − 1, j )
(i, j )
(i, j )
Tb
(i + 1, j )
(i, j − 1)
x
(0,0)
(i, j + 1)
x
(m,0)
Heat flux in the x-direction, π‘žπ‘₯ 𝑖,𝑗 = −π‘˜
Heat flux in the y-direction, π‘žπ‘¦
𝑖,𝑗
= −π‘˜
πœ•π‘‡
πœ•π‘₯ 𝑖,𝑗
πœ•π‘‡
πœ•π‘¦ 𝑖,𝑗
Resultant heat flux in the node (i, j), π‘žπ‘–,𝑗 =
≈ −π‘˜
≈ −π‘˜
𝑇𝑖+1,𝑗 −𝑇𝑖−1,𝑗
2Δπ‘₯
𝑇𝑖,𝑗+1 −𝑇𝑖,𝑗−1
2Δy
π‘žπ‘₯ 2𝑖,𝑗 + π‘žπ‘¦ 2
𝑖,𝑗
Exercise-1
Consider a square heated plate of 4π‘š × 4π‘š that is subjected to the boundary
conditions shown below. Find the temperature and heat fluxes at the interior
nodes using a square grid with a length of 1π‘š . Use a relaxation parameter
of 1.2. Assume the initial temperature at all interior nodes to be 0°πΆ. The
accuracy of the solution should be πœ–π‘  = 1%.
y
100°πΆ
75 ο‚°C
50°πΆ
x
0°πΆ
Exercise-2
Consider a square heated plate of 4π‘š × 4π‘š that is subjected to the boundary
conditions shown below. Find the temperature at the interior nodes using a
square grid with a length of 1π‘š. Use a relaxation parameter of 1.2. Assume
the initial temperature at all interior nodes to be 0°πΆ. The accuracy of the
solution should be πœ–π‘  = 1%.
y
150°πΆ
50°πΆ
Insulated
x
0°πΆ
Physical Example of an Parabolic PDE
The internal temperature of a metal rod exposed to two
different temperatures at each end can be found using the
heat conduction equation.
𝝏𝟐 𝑻 𝝏𝑻
𝜢 𝟐=
𝝏𝒙
𝝏𝒕
The heat conduction equation requires approximations for
the second derivative in space and the first derivative in
time.
Node Patterns for Elliptic vs Parabolic PDEs
Grid used for the FDM solution of
elliptic PDEs in two independent
variables such as the Laplace equation
Grid used for the FDM solution of
parabolic PDEs in two independent
variables such as the heat-conduction
equation.
Note that the grid is bounded in all
dimensions
Note that the grid is open-ended in the
temporal dimension
Discretizing the Parabolic PDE
x
x
x
i −1
i
i +1
Schematic diagram showing interior nodes
For a rod of length 𝐿 divided into 𝑛 + 1 nodes, i.e., π›₯π‘₯ =
The time is similarly broken into time steps of π›₯𝑑,
Hence 𝑇𝑖𝑛
corresponds to the temperature at node 𝑖,
π‘₯ = 𝑖 π›₯π‘₯ and 𝑑 = (𝑛)(π›₯𝑑)
𝐿
𝑛
The Explicit Method
x
x
x
i −1
i
i +1
𝐿
𝑛
If we define π›₯π‘₯ = , we can then write the finite central divided
difference approximation of the left-hand side at a general interior
node (𝑖) as
πœ•2𝑇
πœ•π‘₯ 2
𝑖,𝑛
𝑛
𝑛
𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
≈
Δπ‘₯ 2
where (n ) is the node number along the time.
The Explicit Method
x
x
x
i −1
i
i +1
The time derivative on the right-hand side is approximated by
the forward divided difference method as,
πœ•π‘‡
πœ•π‘‘
𝑖,𝑛
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛
≈
Δ𝑑
The Explicit Method
Substituting these approximations into the governing equation yields
𝑛
𝑛
𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛
𝛼
=
2
Δπ‘₯
Δ𝑑
Solving for the temp at the time node, n + 1 gives
𝑇𝑖𝑛+1 = 𝑇𝑖𝑛 + 𝛼
choosing, πœ† =
Δ𝑑
Δπ‘₯ 2
𝑛
𝑛
𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
𝛼Δ𝑑
Δπ‘₯ 2
we can write the equation as,
𝑛
𝑛
𝑇𝑖𝑛+1 = 𝑇𝑖𝑛 + πœ† 𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
The Explicit Method
𝑛
𝑛
𝑇𝑖𝑛+1 = 𝑇𝑖𝑛 + πœ† 𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
•This equation can be solved explicitly because it can be written
for each internal location node of the rod for time node n + 1 in
terms of the temperature at time node n .
•In other words, if we know the temperature of a spatial node 𝑖 at
time node n = 0, and the boundary temperatures (other spatial
nodes), we can find the temperature of the node 𝑖 at the next time
step (node).
•Therefore, starting from the given initial condition n = 0, we
continue the process by first finding the temperature at all spatial
nodes at n = 1, and using these to find the temperature at the next
time node, n = 2. This process continues until we reach the time
at which we are interested in finding the temperature.
Convergence and Stability of Explicit Method
•Convergence means that as Δπ‘₯ and Δ𝑑 approach zero, the results of the finite-difference
technique approach the true solution.
•Stability means that errors at any stage of the computation are not amplified but are
attenuated as the computation progresses.
•For the explicit method to be both convergent and stable if πœ† ≤ 1/2 or
Δ𝑑 ≤
1 Δπ‘₯ 2
2 𝛼
•However, πœ† ≤ 1/2 ensures convergence, but the solution oscillates.
•πœ† ≤ 1/4 ensures that the solution does not oscillate. Further πœ† ≤ 1/6 minimizes
truncation error.
•Thus the value of πœ† places a strong limitation on the explicit method. For example, if Δπ‘₯
is halved, Δ𝑑 must be quartered, to maintain the same value of πœ†.
•Consequently, halving Δπ‘₯ results in eightfold increase in the number of calculations in
1D. [In 2D and 3D the number of calculation increases 16 times and 24 times]
•Thus the computational burden becomes large to attain acceptable accuracy in the
solution.
The Implicit Method
•Using the explicit method, we were able to find the temperature at each node,
one equation at a time. However the stability problem and convergence
criterion places a limitation on the minimum number of the time steps.
•Moreover, in explicit method, the temperature at a specific node was only
dependent on the temperature of the neighboring nodes from the previous
time step. This is contrary to what we expect from the physical problem.
•The implicit method allows us to solve this and other problems by
developing a system of simultaneous linear equations for the temperature at
all interior nodes at a particular time.
•The implicit method is unconditionally stable and convergent.
The Implicit Method
πœ• 2 𝑇 πœ•π‘‡
𝛼 2=
πœ•π‘₯
πœ•π‘‘
The second derivative on the left-hand side of the equation is approximated
by the CDD scheme at time level l + 1 at node ( i ) as
πœ•2𝑇
ΰΈ­
2
πœ•π‘₯
𝑖,𝑛+1
𝑛+1
𝑛+1
𝑇𝑖+1
− 2𝑇𝑖𝑛+1 + 𝑇𝑖−1
≈
Δπ‘₯ 2
The first derivative on the right hand side of the equation is approximated by
the BDD scheme at time level l + 1 at node (i ) as
πœ•π‘‡
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛
ቀ
≈
πœ•π‘‘ 𝑖,𝑛+1
Δ𝑑
The Implicit Method
πœ• 2 𝑇 πœ•π‘‡
𝛼 2=
πœ•π‘₯
πœ•π‘‘
Substituting these approximations into the heat conduction equation yields
𝑛+1
𝑛+1
𝑇𝑖+1
− 2𝑇𝑖𝑛+1 + 𝑇𝑖−1
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛
𝛼
=
2
Δπ‘₯
Δ𝑑
Rearranging yields
given that,
 =
𝑛+1
𝑛+1
−πœ†π‘‡π‘–−1
+ (1 + 2πœ†)𝑇𝑖𝑛+1 − πœ†π‘‡π‘–+1
= 𝑇𝑖𝑛
t
(x )2
The rearranged equation can be written for every node during each time step.
These equations can then be solved as a simultaneous system of linear equations
to find the nodal temperatures at a particular time.
The Explicit vs Implicit Method
𝑛
𝑛
𝑇𝑖𝑛+1 = 𝑇𝑖𝑛 + πœ† 𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
𝑑
(𝑖, 𝑛)
The explicit method approximation
of node (𝑖, 𝑛). The shaded nodes
have an influence on (𝑖, 𝑛), whereas
the unshaded nodes which affect
(𝑖, 𝑛) are excluded.
π‘₯
Computational nodes
demonstrating the
fundamental differences
between (a) Explicit and
(b) Implicit methods.
𝑛+1
𝑛+1
−πœ†π‘‡π‘–−1
+ (1 + 2πœ†)𝑇𝑖𝑛+1 − πœ†π‘‡π‘–+1
= 𝑇𝑖𝑛
𝑛+1
𝑛+1
𝑛
𝑛
The Crank-Nicolson Method
πœ• 2 𝑇 πœ•π‘‡
𝛼 2=
πœ•π‘₯
πœ•π‘‘
Using the implicit method our approximation of
ο‚ΆT
ο‚Ά 2T
ο‚Άx 2
was of O(x) 2 accuracy,
while our approximation of ο‚Άt was of O(t ) accuracy.
One can achieve similar orders of accuracy by approximating the second
derivative, on the left-hand side of the heat equation, at the midpoint of
the time step. Doing so yields
πœ•2𝑇
ΰΈ­
πœ•π‘₯ 2
𝑖,𝑛
𝑛
𝑛
𝑛+1
𝑛+1
𝛼 𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
𝑇𝑖+1
− 2𝑇𝑖𝑛+1 + 𝑇𝑖−1
≈
+
2
Δπ‘₯ 2
Δπ‘₯ 2
The first derivative, on the right-hand side of the heat equation, is
approximated using the forward divided difference method at time level, 𝒏 + 𝟏
πœ•π‘‡
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛
ቀ ≈
πœ•π‘‘ 𝑖,𝑛
Δ𝑑
The Simple Implicit vs Crank-Nicolson Method
π‘Ίπ’Šπ’Žπ’‘π’π’† π‘°π’Žπ’‘π’π’Šπ’„π’Šπ’• 𝑴𝒆𝒕𝒉𝒐𝒅:
𝑛+1
𝑛+1
−πœ†π‘‡π‘–−1
+ (1 + 2πœ†)𝑇𝑖𝑛+1 − πœ†π‘‡π‘–+1
= 𝑇𝑖𝑛
𝑑 𝑛+1
𝑑 𝑛+1
𝑑
𝑑𝑛
A computational molecule for the
simple implicit method
𝑛+
1
2
𝑑𝑛
A computational molecule for the
Crank-Nicolson method
π‘ͺπ’“π’‚π’π’Œ − π‘΅π’Šπ’„π’π’π’”π’π’ 𝑴𝒆𝒕𝒉𝒐𝒅:
𝑛+1
𝑛+1
𝑛
𝑛
−πœ†π‘‡π‘–−1
+ 2(1 + πœ†)𝑇𝑖𝑛+1 − πœ†π‘‡π‘–+1
= πœ†π‘‡π‘–−1
+ 2(1 − πœ†)𝑇𝑖𝑛 + πœ†π‘‡π‘–+1
The Crank-Nicolson Method
•Substituting these approximations into the governing equation for heat
conductance yields
𝑛
𝑛
𝑛+1
𝑛+1
𝛼 𝑇𝑖+1
− 2𝑇𝑖𝑛 + 𝑇𝑖−1
𝑇𝑖+1
− 2𝑇𝑖𝑛+1 + 𝑇𝑖−1
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛
+
=
2
2
2
Δπ‘₯
Δπ‘₯
Δ𝑑
giving
𝑛+1
𝑛+1
𝑛
𝑛
−πœ†π‘‡π‘–−1
+ 2(1 + πœ†)𝑇𝑖𝑛+1 − πœ†π‘‡π‘–+1
= πœ†π‘‡π‘–−1
+ 2(1 − πœ†)𝑇𝑖𝑛 + πœ†π‘‡π‘–+1
where
Δ𝑑
πœ†=𝛼
Δπ‘₯ 2
•Having rewritten the equation in this form allows us to discretize the physical
problem. We then solve a system of simultaneous linear equations to find the
temperature at every node at any point in time.
Internal Temperatures at 9 sec.
The table below allows you to compare the results from all three methods
discussed in juxtaposition with the analytical solution.
Node
Explicit
Implicit
CrankNicolson
Analytical
T13
T23
T33
T43
65.953
39.132
27.266
22.872
59.043
36.292
26.809
24.243
62.604
37.613
26.562
24.042
62.510
37.084
25.844
23.610
Parabolic Equations in Two Spatial Dimensions
The heat-conduction equation in two spatial dimensions are:
πœ•π‘‡
πœ•2𝑇 πœ•2𝑇
=𝛼
+ 2
2
πœ•π‘‘
πœ•π‘₯
πœ•π‘¦
This equation models the temperature distribution on the face of a heated
plate. However, rather than characterizing its steady-state distribution, as
was the case with elliptic form, it provides the plate’s temperature
distribution as changes with time, i.e., it characterizes the transient
temperature distribution.
Standard Explicit and Implicit Schemes
For 2D Explicit Scheme: Δ𝑑 ≤
1 (Δπ‘₯ 2 )+(Δy2 )
8
𝛼
Thus for a uniform grid Δπ‘₯ = Δ𝑦 , πœ† = 𝛼Δ𝑑/ Δπ‘₯ 2 must be less than or
equal to 1/4. Consequently, halving the step-size results in a fourfold
increase in the number of nodes and a 16-fold increase in computational
effort.
Further Crank-Nicolson scheme leads to an exorbitantly large system of
simultaneous equations.
Alternating Direction Implicit (ADI) Scheme
ADI scheme facilitates using TDMA algorithm to be used in 2D/3D problems.
The node-values are updated in one dimension at a time, keeping the values of
the other dimensions unchanged. The ADI method results in tri-diagonal
equations along the dimension that is implicit.
For example, in 2D, first traversing is done for row-wise nodes, considering
the nodes above and below the row to be constant.
After all the nodes are updated with new values, second traversing is done for
the column nodes, again assuming the nodes on the left and right side to be
constant.
Alternating Direction Implicit (ADI) Scheme
Laplace Equation (Columnwise Traverse):
if Δπ‘₯ = Δ𝑦, results TDM
Column Traverse
Row-wise Traverse
Download