This document is from an MIT OpenCourseWare course on computational science and engineering. It provides the details of homework on convection-diffusion, an important partial differential equation. The homework involves graphing the exact solution to the convection-diffusion equation for given parameters, approximating the diffusion and convection terms using finite differences, solving the resulting system of equations, and graphing and analyzing the solutions to determine the best finite difference methods.
This document is from an MIT OpenCourseWare course on computational science and engineering. It provides the details of homework on convection-diffusion, an important partial differential equation. The homework involves graphing the exact solution to the convection-diffusion equation for given parameters, approximating the diffusion and convection terms using finite differences, solving the resulting system of equations, and graphing and analyzing the solutions to determine the best finite difference methods.
This document is from an MIT OpenCourseWare course on computational science and engineering. It provides the details of homework on convection-diffusion, an important partial differential equation. The homework involves graphing the exact solution to the convection-diffusion equation for given parameters, approximating the diffusion and convection terms using finite differences, solving the resulting system of equations, and graphing and analyzing the solutions to determine the best finite difference methods.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.085 MATLAB 1
This homework is about convection-diffusion, an important equation. There
will be a boundary layer of rapid change at one endpoint when the conditions are u(0) = u(1) = 0 and the u� convection term dominates. The exact solution to −Du�� + u� = 1 is u = x − (exp(x/D) − 1)/(exp(1/D) − 1).
1) Graph that exact solution for D = 1/25
2) Approximate −Du�� as usual by DK/h2 (try 3 different values of h)
3) Approximate u� by centered and forward and backward differences (same h)
4) With f = ones(n,1) solve the matrix equations and label graphs of u
5) Write a SHORT conclusion from your tests—which method(s) to use ?