This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ASE 211 Homework 10
Due: In class, Wednesday, April 16.
1. Write a matlab mﬁle which solves numerically the twopoint boundary
value “convectiondiﬀ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
 Spring '08
 N/A

Click to edit the document details