Write a MATLAB program that uses centered finite differences to solve the onedimensional diffusion equation for a
Question:
Write a MATLAB program that uses centered finite differences to solve the onedimensional diffusion equation
for a spatially dependent diffusion coefficient D(x) = D0(1 − ax) and the boundary conditions c(0) = 1 and c(1) = 0. Compute the solution for a = 0, 0.2, 0.4, 0.6, and 0.8 using 11 nodes. Plot the concentration profiles versus position for each value of a on a single plot.
Step by Step Answer:
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Question Posted: