You are on page 1of 1

INDIAN INSTITUTE OF TECHNOLOGY GUWAHATI

DEPARTMENT OF MATHEMATICS

MA 573: Numerics of Partial Differential Equations


Semester–II, Academic Year 2023-24
Labs – 9

1. Solve the linear advection equation


∂u ∂u
+a = 0, 0 < x < L, t > 0
∂t ∂x
subject to
u(x, 0) = f (x), 0 ≤ x ≤ L,
where a ∈ R, f (x) is a continuous function using

(a) Forward time centered space method,


(b) Lax method,
(c) Lax-Wendroff method,
(d) MacCormac method,
(e) Richtmyer method,
(f) first and second order upwind methods.

Your MATLAB script should be written such that f (x) and a will be provided as input
parameters and the output will be the solution of the linear advection equation.

You might also like