Consider the solution to the reaction diffusion equation with boundary conditions c(0) = 1 and c(L) =

Question:

Consider the solution to the reaction diffusion equationDdc dx = kc

with boundary conditions c(0) = 1 and c(L) = 0. Write a MATLAB program that uses centered finite differences to solve this equation for Da = kL2/D values of 0.01, 0.1, 1, 10, 100, 1000. Your program should be written so that you specify an arbitrary number of nodes. This problem has an exact solution that you can find analytically. Figure out how the error in your solution, defined aserr = ||Cnumerical - Cexact || ||Cexact ||

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: