Professional Documents
Culture Documents
au xx 2bu xy cu yy F x , y ,u ,u x ,u y
u is the dependent variable. This equation is said to be of;
1 1
u x ( x, y )
2h
u ( x h , y ) u ( x h, y ) u x i, j
2h
ui1, j ui1, j
Similarly
1 1
u y ( x, y )
2k
u ( x, y k ) u ( x, y k ) uy
i, j
2k
ui, j 1 ui , j 1
(x,y+k)
i, j+1
k k
h h h h
(x−h,y) (x+h,y)
(x,y) i−1, j i, j i+1, j
k k
i, j−1
(x,y−k)
1
u yy ( x , y ) u ( x k , y ) 2u ( x , y ) u ( x k , y )
k2
1
u yy ui , j 1 2ui , j ui , j 1 (5)
i, j k2
Substitute eqs. (4) &(5) into Laplace equation;
40
1 1
u
2 i 1, j
2u i , j u i 1, j 2 u i , j 1 2u i , j u i , j 1 0
h k
* If h = k
u i 1, j u i 1, j u i , j 1 u i , j 1 4u i , j 0
u i 1, j u i 1, j u i , j 1 u i , j 1
u i , j
4
Note:
i, j+1 1
k (Called Stencil, pattern,
1 4 1 molecule, or star)
h
i-1, j i+1, j
i, j
1
i, j-1
1
1 4 1 u 0
1
Example:
The four sides of a square plate of side 12 cm made of homogeneous material are
kept at constant temperature 0 ºC and 100 ºC as shown figure. Using a grid mesh of 4
cm. Find the (steady state) temperature at the mesh point.
y
0ºC 1,3 2,3
0,3 3,3
12
Boundary Condition
u1,0 u 2,0 100 0C
u1,3 u 2,3 0 oC
At point (1,1)
4u1,1 u 2,1 u 0,1 u1,2 u1,0 4u1,1 u 2,1 100 u1,2 100
4u 2,1 u 3,1 u1,1 u 2,2 u 2,0 4u 2,1 100 u1,1 u 2,2 100
42
From eqs. (1) and (4)
From eqs. (7) and (8): u12 375 / 6 62.5 u11 350 / 4 87.5
y
0ºC 1,3 3,2
0,3 3,3
12
u1,1 u1,1
uy 0 u1,1 u1,1 ...(a )
1,0 2k
u2,1 u2,1
uy 0 u2,1 u2,1 ...(b)
2,0 2k
At point (1,0)
4u1,0 u 2,0 u 0,0 u1,1 u1, 1 4u1,0 u 2,0 100 u1,1 u1,1
43
4u1,0 u 2,0 2u1,1 100 (1)
At point (2,0)
4u 2,0 u 3,0 u1,0 u 2,1 u 2,1 4u 2,0 100 u1,0 u 2,1 u 2, 1
4u 2,0 u1,0 2u 2,1 100 (2)
The other points same the above example
At point (1,1)
4u1,1 u2,1 u0,1 u1,2 u1,0 4u1,1 u2,1 100 u1,2 u1,0
4u2,1 u3,1 u1,1 u2,2 u2,0 4u 2,1 100 u1,1 u2,2 u2,0
44
7.2 Solution of Parabolic Equation (1-D Diffuse equation)
In this section we explain the numerical solution of the prototype of parabolic
equation, the one dimensional heat equation;
1
ut u xx (1)
m2
x : space 0 x L , t :time t 0 : thermal diffusivity
s
The initial condition u ( x ,0) f x (given) and boundary condition at x=0 and x =
k
where r
h2
45
i, j+1
t k
....
....
h
i-1, j i, j i+1, j
0,3 3,2 j=3
1,3 3,3
1 k 1
r 2
2 h 2
2
h
k time step
2
46
Ex. A bar is initially at 100 ºC, it's ends are attached to a constant temperature body
at 0 ºC. Find the temperature distribution assuming = 0.1, Take x=h=0.25.
....
....
....
0.252
k k 0.3125
2 0.1 0,3 4,3
1,3 3,2 3,3
Take k 0.25
0,2 1,2 2,2 3,2 4,2
k 0.1 0.25
r 2
0.4
h 0.252 0,1
1,1 3,1 4,1
2,1
t k
h
x 0,0
1,0
u i , j 1 1 2r u i , j r u i 1, j u i 1, j 2,0 3,0 4,0
At t = 0.25, j =1
47
At t = 0.5, j =2
At t = 0.75, j = 3
Continue the procedure for until the steady state condition that is not change the
value of u at increase the time t.
48
c 2k 2
u i , j 1 2 u i 1, j 2u i , j u i 1, j 2u i , j u i , j 1
h
ck
where r
h
i, j+1
k
h
t i-1, j i, j i+1, j
....
.... i, j-1
0,3 j=3
1,3 3,2 3,3
0,1 j=1
1,1 2,1 3,1 1
k 2
t =0
h
r 2 1 r 2 r2
0,0 1,0 2,0 3,0 .... x
1
1,-1 2,-1 3,-1
ck h
1 r 0
2
r 1
h
1 k
c
u i ,0 u i ,1
v x i ut i ,0
Using Backward difference
k
u i ,1 u i ,0 kv x i
49
Example:
For the string shown, find the motion using x = 0.25, speed c = 1 m/s.
L=1
2 0.25 x 0.75
v x
0 otherwise 1 f(x)
Sol. h = x = 0.25
0,3 1,3 3,2 3,3
h
r 1 k
c 0,2 1,2 2,2 3,2
k 0.25 take k 0.2
0,1
ck 1*0.2 1,1 2,1 3,1
r 0.8 k
h 0.25 t =0
h
0,0 1,0 2,0 3,0 4,0
r 2 0.64
1,-1 2,-1 3,-1
u i , j 1 2(1 r 2 )u i , j r 2 u i 1, j u i 1, j u i , j 1
Figure; Grid and mesh points
u i , j 1 0.72u i , j 0.64 u i 1, j u i 1, j u i , j 1
* Boundary conditions;
At t = 0 , j = 0
Initial conditions:
50
u i ,1 u i ,0 kv ih
u1,1 u1,0 kv 0.25 0.5 0.2 * 2 0.1
u 2,1 u 2,0 kv 0.5 1 0.2 * 2 0.6
u 3,1 u 3,0 kv 0.75 0.5 0.2 * 2 0.1
u1,1 0.72u1,0 0.64 u2,0 u0,0 u1,1 0.72 0.5 0.64(1 0) 0.1 0.9
u2,1 0.72u2,0 0.64 u3,0 u1,0 u2,1 0.72 1 0.64 0.5 0.5 0.6 0.76
u3,1 0.72u3,0 0.64 u4,0 u2,0 u3,1 0.72 0.5 0.64 0 1 0.1 0.9
At t = 0.2, j =2
u1,2 0.72u1,1 0.64 u2,1 u0,1 u1,0 0.72 0.9 0.64(0.76 0) 0.5 0.6344
u2,2 0.72u2,1 0.64 u3,1 u1,1 u2,0 0.72 0.76 0.64 0.9 0.9 1 0.6992
u3,2 0.72u3,1 0.64 u4,1 u2,1 u3,0 0.72 0.9 0.64 0 0.76 0.5 0.6344
At t = 0.4, j = 3
51