Description
Given the 1D heat conduction problem:
ut = αuxx (1)
where u = u(x,t) and α = 1, with initial conditions (ICs):
if 0 ≤ x ≤ 0.5
(2)
if 0.5 < x ≤ 1.0
and boundary conditions (BCs):
u(x = 0,t) = u(x = 1,t) = 0 (3)
in the interval 0 ≤ x ≤ 1, do the following:
1.1 Derive the analytical solution of the problem stated above.
1.2 Write a computer program (and on paper the numerical algorithm) to find the numerical solution of the 1D heat conduction problem using the following schemes:
- one-step forward in time and 2nd-order central difference in space (explicit);
- one-step backward in time and 2nd-order central difference in space (implicit);
- Compute the numerical solution for ∆x = 0.05, and for ∆t = 0.0012 and ∆t = 0.0013, and plot the numerical solution along with the analytical solution at t = 0, ∆t, 10∆t, 50∆t.
- Discuss your solutions, and if your code does not work explain why.
- Advanced (Bonus Points): Extend the 1D heat conduction problem to 2D, formulate the problem in 2D and solve 1.1 to 1.4 above in the 2D case.
1
Problem 2:
Given the 1D linear convection problem:
ut + aux = 0 (4)
where u = u(x,t) and a = 0.5, with initial conditions (ICs):
1 if −7 ≤ x ≤−5
( = 0) = (5)
0 if x < −7,x > −5
and boundary conditions (BCs):
u(x = −10,t) = 0 (6)
in the interval −10 ≤ x ≤ 10, do the following:
2.1 Write a computer program (and on paper the numerical algorithm) to find the numerical solution of the 1D linear convection problem using the following schemes: 1. one-step forward in time (explicit) and first-order upwind in space;
- Lax-Wendroff scheme.
- an implicit scheme of your choice.
- Compute the numerical solution for different CFL numbers, CFL = 0.6 and 1.2, and plot the numerical solutions along with the analytical solution [ u(x,t) = u(x − at) ] at t = tmax/2 where tmax is the time at which the square wave reaches the right boundary x = 10.
- Discuss your solutions, and if your code does not work explain why.
- Derive and plot the dispersion and diffusion errors of the three numerical schemes above at two different CFL numbers of your choice.
- Advanced (Bonus Points): Extend the 1D linear convection problem to 2D, formulate the problem in 2D, and solve 2.1 to 2.3 above in the 2D case


