Professional Documents
Culture Documents
Homework IV
Mehmet Fatih Reyhan
ID : 110170002
Problem
Solving the given 2D time-dependent heat equation for given initial conditions. Equation and
∂T ∂2T
= 0.01 2
∂t ∂x
Initial conditions:
Solution
Crank-Nicholson method is used for the problem solution.∆x is chosen as 0.1 cm so there are eleven
temperature values all over the plate and two of them are known. For Crank-Nicholson method
k+1
Li Ti−1 + Di Tik+1 + Ui Tik+1 = Ri i = 1, 2, ...9
In these equation system we can write the known values by the following expression:
L1 = 0, Li = −r, (i = 2, 3, ...9)
U9 = 0, Ui = −r (i = 1, 2, ...8)
k
Ri = rTi−1 + 2(1 − r)Tik + rTi+1
k
k+1
R9 = rT8k + 2(1 − r)T9k + rT10
k
+ rT10
∆t
r = 0.01 2
(∆x)
Moreover, equation system can be written in matrix form and solved by the following.
k+1
2(1 + r) −r 1 R1
T
−r 2(1 + r) −r T k+1 R
2 2
.. ..
.. .. ..
. . . . .
. = .
. .. ..
.. . .
. .
. .
k+1
−r 2(1 + r) −r T8
R8
−r 2(1 + r) T9k+1 R9
| {z } | {z }
A B
T k+1 = A\B
Results
In the solution ∆t is not chosen constant. Time step determined for the given exact solution times.
The following tables show the exact solution,numerical solution and the percentage error.
Numerical and exact solution values for t = 0.5 s and t = 50 s is given by the following figure.
From the figure and the error table, as the time step increases error increases significantly Which
is expected.