ASE 211 - Homework 10 Due April 16

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

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

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-ﬁle which solves numerically the two-point boundary value “convection-diﬀusion” problem cu (x) − κu (x) = f (x), 0 < x < 1, with the boundary conditions u(0) = u(1) = 0. Use the ﬁnite diﬀerence method discussed in class with n = 1/h. The coeﬃcients c ≥ 0 and κ ≥ 0 are constants speciﬁed 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-ﬁles. Label each plot. 1 ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online