Professional Documents
Culture Documents
for the advection equation ut + cux = 0 with u(x, 0) = f (x) and c > 0. Verify that
the CFL condition for this method is also c ≤ ρ. Is this scheme stable?
(c) Show that the finite difference approximation
c c
ui,j+1 = − ui+1,j + ui,j + ui−1,j
2ρ 2ρ
for the advection equation ut + cux = 0 with u(x, 0) = f (x) and c > 0 is consistent.
2. Let u(x, t) be a function of x and t, and F (u) is a function of u. How do you write the
forward and backward difference scheme for ∂F∂x(u) ? Using the scheme for ∂F∂x(u) , write a
finite difference scheme for
ut + (F (u))x = 0.
ut + (u + 1)ux = 0.
Let the initial data be f (x) = x/(1 + x2 ). Find cmax , and hence determine the restriction
on δx and δt which satisfies the CFL condition.
4. Using the centred or central difference scheme in x and y directions, find the finite difference
scheme for the mixed partial derivative uxy of u. Show that the resulting is scheme is of
second order.
∂u ∂2u
= in (0, 1),
∂t ∂x2
subject to the initial condition u(x, 0) = x + 2 and the boundary conditions u(0, t) =
u(1, t) = 0. We want to use the explicit numerical scheme with k = 1:
k 2 δt
δt 2 δt
ui,j+1 = k 2 2
ui+1,j + 1 − 2k 2
ui,j + ui−1,j .
(δx) (δx) (δx)2
(a) Consider the above numerical scheme with the time step δt = 0.1 and the spatial step
δx = 0.2. Does this scheme satisfy the stability condition?
(b) Find the numerical solution of the heat equation at the grid points 0.2, 0.4, 0.6, 0.8 at
time t = 0.02 using the time step δt = 0.01 and spatial step δx = 0.2.
(c) Now apply the Crank-Nicolson scheme
ui,j+1 − ui,j 2 ui+1,j − 2ui,j + ui−1,j ui+1,j+1 − 2ui,j+1 + ui−1,j+1
=k w + (1 − w) ,
δt (δx)2 (δx)2
where w = 1/2 and k = 1 to compute the solution at the grid points 0.2, 0.4, 0.6, 0.8
at time t = 0.02 using the time step δt = 0.01 and spatial step δx = 0.2.
7. Consider the Poisson problem −∆u = x + y in the domain Ω = (0, 1) × (0, 1) with the
boundary condition u = 0 on the boundary of the domain. Using 4 equidistant points
in x and y direction as given in the picture below and using five-point stencil write the
linear system of equations for the discrete solution at 4 inner points (filled circles) of the
domain Ω. The grid points are displayed in the picture below, where interior mesh points
are indicated by filled circles. Solve the linear system using matlab or any other software
and write solutions at these 4 grid points. Include at least four digits after the decimal
point.
(0,1) (1,1)
(0,0) (1,0)
8. Consider the Burger’s equation ut + uux = 0 in R × R+ with the initial condition u(x, 0) =
f (x). Using the forward difference scheme for the time and spatial derivatives, write a
finite difference for the equation. Let the magnitude of the solution be bounded by 1.
(a) Find the CFL condition for the scheme. Is the scheme upwind if u is always positive?
If not, change the difference scheme for the spatial derivative and check if the new
scheme is an upwind scheme.
(b) What happens if u is always negative?
9. Consider the viscous Burger’s equation ut +uux = νuxx in R×R+ with the initial condition
u(x, 0) = f (x). Write a simple numerical scheme for this equation.
MATH3700 Practice Questions Sem 2, 2021