0% found this document useful (0 votes)
86 views9 pages

Lecture1 PDF

The document describes the explicit method for solving the one-dimensional heat conduction parabolic partial differential equation (PDE). 1) It discretizes the spatial and temporal domains into grids with spacing Δx and Δt. 2) It approximates the PDE using finite differences on the grid, yielding an explicit formula to compute the solution at the next time step from the current time step. 3) The explicit method is conditionally stable and requires Δt < (1/2)(Δx)2 for stability. 4) It provides an example solving the heat equation using the explicit method and comparing to the exact solution.

Uploaded by

abdulqader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views9 pages

Lecture1 PDF

The document describes the explicit method for solving the one-dimensional heat conduction parabolic partial differential equation (PDE). 1) It discretizes the spatial and temporal domains into grids with spacing Δx and Δt. 2) It approximates the PDE using finite differences on the grid, yielding an explicit formula to compute the solution at the next time step from the current time step. 3) The explicit method is conditionally stable and requires Δt < (1/2)(Δx)2 for stability. 4) It provides an example solving the heat equation using the explicit method and comparing to the exact solution.

Uploaded by

abdulqader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Explicit Method for Solving Parabolic PDE

One of the simplest second order Parabolic Differential Equation in one-dimension is the
Heat Conduction Equation, written as:

u 2u
c2 2 where 0 x L, t 0 (1.1)
t x
which arises in many real problems.

The appropriate, but most simple conditions are:


Initial condition: u x,0 u0 x
and two Boundary Conditions namely: u0, t u1 t and uL, t u2 t .
Note that the analytical solution of equation (1.1) is usually a trigonometric series, which may
create problem in convergence.

The first Finite Difference method is the Explicit Method.

For this, let us discuss first step, which is common to all methods i.e. discretization.

The domain of the solution is 0 x L, t 0 , as shown in fig(1).

t
x=L
x=0 x x

fig(1)
It is to be discretized by drawing vertical and horizontal lines at equal distance say x and t
respectively. Let i , j be
defined dummy variables along x & t axis so that;

xi ix, t j jt & u xi , t j ui , j ix, jt .


Let the domain from x = 0 to x = L be subdivided into N sub-parts so that x = 0 corresponds to i
= 0 and x = L corresponds to i = N with t = 0 corresponds to j = 0.

(1.2)
The initial condition then can be written as: u x,0 u 0 x u i , 0 u 0 ix

u 0, t u1 t u 0, j u1 jt
The boundary condition will be converted to: (1.3)
u L, t u 2 t u N , j u 2 jt

Step 2: Replacing the derivatives by corresponding Finite Difference representation in


equation (1.1) which reduces to:

ui , j 1 ui , j ui 1, j 2ui , j ui 1, j
c2 (1.4)
t (x) 2

Thetruncationerroris: ot ox 2
Equation (1.4) thus can be rewritten as:

ui , j 1 c 2 ru i 1, j (1 2c 2 r )ui , j c 2 ru i 1, j with, r t ( x ) 2 (1.5)

Equation (1.5) is called the Explicit Scheme.


The computational molecule for scheme (1.5) can be shown as in fig (2)

ui,j+1

1 (j+1)thlevel

r 1 r jth level

ui1,j ui,j ui+1,j

fig(2)

Equation (1.5) is now solved at first time level for j = 0; for all values of i =1,2,---,(N-1).
Similarly solution at second,third time level is obtained correspondingly for j =1, 2 ---. It
is very important to note that this scheme is not unconditionally stable.

The value of r has to be < 1/2 i.e. t < (1/2)(x)2 which makes t to be sufficiently small. Thus
it requires large no. of computations at intermediate time level ;even for a small time ,as x is
itself very small (Since the Finite Difference Method for approximating the derivatives is based
on Taylors expansion hence both t and x are small) .This is one of the great drawback of this
method.

Though the truncation error tends to 0 as t 0 and x 0 but the detail discussion about it
will be discussed in module 3,lecture 1.The main advantage of this scheme is that it is
computationally simple as the computations proceed pointwise, thus even manually
manageable.

u 2 u
Example 1:- Solve the Heat Conduction Equation 0 x 1 ,t 0
t t 2

u
subject to B.C: u = 0 at x = 0 and 0 at x = 1 ,for all t
x

3x
and, I.C: u ( x,0) sin
2

Using the Explicit Method ,choosing x = 0.1 and t = 0.0025 so that r = 1/4, obtain the solution
for one time level and compare with the exact solution.
9 2t
3x
The exact solution is u x, t e 4
sin
2

Solution-

At a general point (i,j) the given pde is -

u 2u
2
t i , j x i , j

The Explicit Finite-Difference representation of this equation is:

ui , j 1 ui , j ui 1, j 2ui , j ui 1, j

t x
2

ui , j 1 rui 1, j (1 2r )ui , j rui 1. j (1)


or

t
where, r
x
2

(2)
3x
Initial condition is: u ( x,0) sin
2

u
Boundary conditions are: u0, j 0 and 0 ; N 10
x N , j

Replacing L.H.S of the above boundary condition by Backward Difference,

u N 1, j u N , j
0 u N 1, j u N , j u10 j u9, j (3)
x

Substituting r = 1/4 and j = 0 in equation (1)

ui ,1
1
4
ui1,0 2ui,0 ui1,0 (4)

Substituting i =1,2------,9 in equation (4) ,we get values at the first time level .These values are
used for the solution at the second time level for j=1.These values are shown below:

i=0 i=1 i=2 i=3 i=4 i=5 i=6 i=7 i=8 i=9 i = 10

X= 0. X=0.1 X=0.2 X=0.3 X=0.4 X=0.5 X=0.6 X=0.7 X=0.8 X=0.9 X=1.0

j=0 0 .0082 .0164 .0247 .0329 .0411 .0493 .0575 .0657 .0740 .0740

j=1 0 .0082 .0164 .0247 .0329 .0411 .0493 .0574 .0656 .0739 .0739

The Exact solution is :

9 2t
3x
u x, t e 4
sin
2 (here t=0.0025)

Comparison between Explicit and Exact solution:

X 0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

Explicit 0 .0082 .0164 .0247 .0329 .0411 .0493 .0575 .0656 .0739 .0739

Exact 0 .0078 .0156 .0233 .0311 .0389 .0467 .0543 .0622 .0699 .0777
0.08

0.07 Explicit
Exact
0.06

0.05
u(x,t)

0.04

0.03

0.02

0.01

0
0 0.2 0.4 0.6 0.8 1
x

u 2u
Example 2 : Consider the PDE : x 2 ;0 x 1, t 0 (1)
t x
u 1
B.Cs (i) u=0 at x=0, t>0 (ii) u; x 1, t 0
x 2

I.C is u = x(1-x) when t=0 & 0 x 1

Solve this equation by an explicit method , employing central-difference for the boundary
conditions. Take x h 0.1 & r =0.25 and 0.7 and compare the result.

Solution:

The explicit approximation is

ui , j 1 ui , j ih ui 1, j 2ui , j ui 1, j

k h2
ui , j 1 irhui 1, j 1 2irh ui , j irhui 1, j ; i 1, 2,..., N 1 (2) with r k h 2

Now applying central difference formula to Second B.C. , we get

ui 1, j ui 1, j 1
ui , j ui 1, j ui 1, j hui , j
2h 2

At x=1 i .e. i=10


u11, j u9, j hu10, j u11, j u9, j hu10, j u9, j .1u10, j (3)

(i) r=0.25

Putting i=10 , h=0.1 in equation (2);

1 1 1
u10, j 1 u9, j u10, j u11, j
4 2 4 (4)
Eliminating u11,j from eqn.(3) & eqn.(4),we get

1 19
u10, j 1 u9, j u10, j
2 40 (5)

The other B.C. is u=0 at x=0 & t>0

u 0,1 u 0, 2 u 0,3 .......... ..........u 0,n 0

And I.C is: u(x,0)=x(1-x); 0 x 1

u0,0 u (0, 0) 0, u1,0 u (.1, 0) 0.09, u2,0 u (.2, 0) 0.16


u3,0 u (.3, 0) 0.21, u4,0 u (.4, 0) 0.24, u5,0 u (.5, 0) 0.25, u6,0 0.24,
u7,0 0.21, u8,0 0.16, u9,0 0.09, u10,0 0
Now putting r=0.25 & h=0.1 in (2)

ui , j 1 0.025iui 1, j (1 0.05i )ui , j 0.025iui 1, j (6)

Ist time level: Putting i=1,2,3.9 ,j=0 in eqn.(6)

u1,1 .025u0,0 (1 .05)u1,0 .025u2,0 0.0895


u2,1 .05u1,0 0.9u2,0 .05u3,0 0.1590
u3,1 .075u2,0 .85u3,0 .075u4,0 0.2085
u4,1 0.1u3,0 0.8u4,0 0.1u5,0 0.2380
u5,1 0.2475, u6,1 0.2370, u7,1 0.2065
u8,1 0.1560, u9,1 0.0855

Putting j=0 in equation (5)

1 19 1
u10,1 u9,0 u10,0 u9,0 0.0450
2 40 2
Now, Second time level: Putting i=1,2,3.9 ,j=1 in equation (6)
u1,2 0.025u0,1 (1 0.05)u1,1 0.025u2,1 .0890
u2,2 0.05u1,1 0.9u2,1 0.05u3,1 0.1580
u3,2 0.075u2,1 0.85u3,1 0.075u4,1 0.2070
u4,2 0.1u3,1 0.8u4,1 0.1u5,1 0.2360
u5,2 0.2450, u6,2 0.2340, u7,2 0.2030
u8,2 0.1520, u9,2 0.0922

Putting j =1 in equation (5)

1 19
u10,1 u9,1 u10,1 0.0641
2 40

(ii) r=0.7

Put i =10,r=0.7,h=0.1 in equation(2)

u10, j 1 0.7u9, j 0.4u10, j 0.7u11, j (7)

Eliminate u11, j from equation (3) and equation (7); we get

u10, j 1 1.4u9, j .47u10, j (8)

Put r=0.7 & h=0.1 in equation (2)

ui , j 1 0.07iui 1, j (1 0.14i )ui , j 0.07iui 1, j (9)

Ist time level

Putting i=1,2,3.9 , and j=0 in (9)

u1,1 .07u0,0 (1 .14)u1,0 .07u2,0 0.0886


u2,1 0.14u1,0 .72u2,0 .14u3,0 0.1572
u3,1 0.21u2,0 .58u3,0 .21u4,0 0.2058
u4,1 0.28u3,0 .44u4,0 .28u5,0 0.2344
u5,1 0.2430, u6,1 0.2316, u7,1 0.2002
u8,1 0.1488, u9,1 0.0774

Putting j=0 in (8)

u10,1 1.4u9,0 .47u10,0 .126

Second time level


Putting i=1,2,3.9 , and j=1 in (9)

u1,12 0.07u0,1 (1 0.14)u1,1 0.07u2,1 0.0872


u2,2 0.14u1,1 0.72u2,1 0.14u3,1 0.1544
u3,2 0.21u2,1 0.58u3,1 0.21u4,1 0.2016
u4,2 0.28u3,1 0.44u4,1 0.28u5,1 0.2288
u5,2 0.2360, u6,2 0.2232, u7,2 0.1904
u8,2 0.1376, u9,2 0.1530

Putting j=1 in (8)

u10 , 2 1.4u9,1 47u10 ,1 0.0491

The results are written in Tabular Form:

For first time level For second time level

r=.7 Difference r=.25 r=.7 Difference


r=.25
I=1 .0895 .0009 .089 .0872 .0018
.0886
I=2 .159 .00180 .158 .1544 .0036
.1572
I=3 .2085 .2058 .0027 .207 .2016 .0054

I=4 .238 .2344 .0036 .236 .2288 .0072

I=5 .2475 .243 .0045 .245 .236 .0090

I=6 .237 .2316 .0054 .234 .2232 .0108

I=7 .2065 .2002 .0063 .203 .1904 .0396

I=8 .156 .1488 .0072 .152 .1376 .0144

I=9 .0855 .0774 .0081 .0923 .153 -.0608

I=10 .045 .036 .009 .064 .095 -.0308

ComparisonfordifferentvaluesofrinExplicitMethod:
0.25 0.25
r=0.25 r=0.25
r=0.70 r=0.70
0.2 0.2

0.15 0.15
u(x,t)

u(x,t)
0.1 0.1

0.05 0.05

0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x x



FirstTimeLevel SecondTimeLevel

You might also like