ASE 211 - Homework 10 Due April 16

ASE 211 - Homework 10 Due April 16 - ASE 211 Homework 10...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ASE 211 Homework 10 Due: In class, Wednesday, April 16. 1. Write a matlab m-file which solves numerically the two-point boundary value “convection-diffusion” problem cu (x) − κu (x) = f (x), 0 < x < 1, with the boundary conditions u(0) = u(1) = 0. Use the finite difference method discussed in class with n = 1/h. The coefficients c ≥ 0 and κ ≥ 0 are constants specified by the user. Test your code on the following cases: • f (x) = 2, c = 0, κ = 1, n = 20 and n = 40 (the true solution for this case is u(x) = x(1 − x)). • f (x) = 10x, c = 1, κ = 1, n = 20 and n = 40 • f (x) = 10x, c = 10, κ = 1, n = 20 and n = 40 For each case, plot the numerical solution. Hand in your plots and your m-files. Label each plot. 1 ...
View Full Document

Ask a homework question - tutors are online