Documente Academic
Documente Profesional
Documente Cultură
Practical Work 2
1 Dimensional Heat Equation
Mayur Srivatsav V S
Jerol Soibam
October 2015
Introduction
@T
@
+
(
@t
@x
@T
)
@x
(1)
(2)
Figure 1:
Time and spatial variable x will be uniformly discretised:
2
2.1
t and
x = 1/(n + 1)
(3)
LetTjk = T (tk , xj )
2.2
k
2c)Tjk + cTjk + cTj+1
where c =
+ (1
T
x2
(4)
To obtain the Time derivative, we use the First derivative approximation of the Forward dierence,
y(t + h) y(t)
h
0
y(t + t) y(t)
y (t) =
t
@T
T (t + t) T (t)
=
@t
t
0
y (t) =
Tjk+1 Tjk
@Tj
=
@t
t
To obtain the Space derivative, we use the Second derivative approximation of the Centered
dierence,
y(x + h) 2y(x) + y(x h)
y (x) =
h2
1
(5)
@2T
T (x + h)
=
@x2
@2T
T (x +
=
@x2
2T (x) + T (x
h2
x)
h)
2T (x) + T (x
x2
x)
k
c(Tj+1
2Tjk + Tjk 1 )
@2T
=
, where x2 =
2
@x
t
Using the eqn(3) we equate the equations (5) and (6) to obtain,
Tjk+1
Tjk
t
k
c(Tj+1
k
Tjk+1 = cTj+1
+ (1
t
c
=1
(6)
2Tjk + Tjk 1 )
t
2c)Tjk + cTjk
(7)
Boundary Conditions
T (0, x) = 0.5
T (t, 0) = 0
T (t, 1) = 1
On assuming values less than 2 for j, we see that the equation(7) tends to give a negative result,
and hence we take the values of j to be between 2 and (n-1), i.e. 2 < j < (n 1).
At j = 2 ,
At j = 3 ,
.
.
At j = (n-1) ,
T2k+1 = cT3k + (1
T3k+1 = cT4k + (1
2c)T2k + cT1k
2c)T3k + cT2k
Tnk+11 = cTnk + (1
2c)Tnk
+ cTnk
(8.1)
(8.2)
(8.3)
Applying the boundary condition on the equation (7), we obtained numerous results for dierent
values of j. In order to represent all the results in a simplified manner, we depict it in a matrix
form:
T~ k+1 = AT~ k + ~b
System of Equations
5.1
Results
6.1
It is seen from the above graphs that when CF L = 0.45, the Temperature at time step with respect
to Space coordinate is a smooth curve, and is stable in nature until CF L = 0.5. When CFl is
varied beyond 0.5, the temperature evolution curve is highly irregular.
= 50
k
Tj+1
= 100 x + Tjk
(9)
k
Now, putting the value of Tj+1
in equation (7), we get,
2cTjk 1
+ (1
2c)Tjk
2c)Tjk + cTjk
+ (100 c
x)
(10)
For executing the program to satisfy the Von Neumann condition, certain changes are required in
the code used to solve the 1 dimensional heat equation, as shown below:
7.1
Results
4c(sin2 )
2
(11)
Conclusion
From the graphs, it is seen that the curves depicting temperature evolution are smooth and stable
for both the conditions (i.e. Drichlet and Von Neumann Condition) for a given value of CF L < 0.5.
However, when the value of CFL is slightly increased beyond 0.5, the temperature evolution curve
becomes unstable, and hence the 1-D Heat equation is valid as long as the value of CF L < 0.5.
Also, it is observed that as long as the CF L < 0.5, the Heat equation is more stable when the Von
Neumann condition is applied when compared to the Drichlet Heat equation.