Solve the convection-diffusion equation on the unit square (square.m)
with homogeneous Neumann
boundary conditions, ,
, initial condition
, and
, using a time step of size
.
Let the source term (the right-hand side) be given by
![]() |
(4) |
To solve the problem, look at your solver for the heat equation from computer session E2, or try yourself without looking.
Plot the solution using the pdesurf command in each time step. Remember to write pause after each plot.
Check your answer: Your solution should increase close to
every whole second (including
). It should then drift off in
the direction of the convection to the left, and be gradually
flattened out by the diffusion, until a new drop is added at the next
whole second.