skmm3023 201320142 Project2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

FACULTY OF MECHANICAL ENGINEERING

UNIVERSITI TEKNOLOGI MALAYSIA


SKMM3023 Applied Numerical Methods Semester 2 Session 2013/2014
Project 2 Deadline: 05 June 2014
ProblemStatement
Consider a parabolic partial differential equation representing one-dimensional diffusion u(x, t):
u
t
=
2

2
u
x
2
, 0 < x < 4, 0 < t; (E1)
where = 2/ and Eq. (E1) is subject to the initial and boundary conditions, respectively:
u(0, t) = u(4, t) = 0, 0 < t;
u(x, 0) = sin

4
x(1 +2 cos

4
x), 0 x 4.
For x = 0.2 and t = 0.04, use the following methods:
forward-difference,
backward-difference,
Crank-Nicolson, and
Richardson
to approximate the solution over a time span of 1, and compare your results at t = 0.4 to the actual solution
u(x, t) = e
t
sin

2
x + e
t/4
sin

4
x. (E2)
1. For each of the approximation methods,
(a) develop suitable algorithm, incorporating the stability factor ,
=
2
(t)
(x)
2
(E3)
for solution by MATLAB programming, and . . .
(b) use the programso developed in (a) to tabulate the solution in columns of coordinate x, approximated
solution u
a
, actual solution u
t
(using Eq. (E2)), and error , for each time step t.
2. Plot all the approximated solutions together with the actual solution on the same graph. Compare and
comment on the accuracy of each method.
3. Discuss the effect of on the stability of each method.
Report
(a) Solution to this project must be presented in the standard technical report format.
(b) Reports are expected to be type-written and printed on A4-sized papers.
(c) Source codes of the computer programs developed for the project must also be handed in, copied either
to a diskette or CD and attached to the report.

You might also like