Question: Code for pore diffusion with CHEBFUN is shown below. Note how compact the code is compared with BVP4C. The backslash operator is used as an
Code for pore diffusion with CHEBFUN is shown below. Note how compact the code is compared with BVP4C. The backslash operator is used as an overloaded operator here.

Test the code which is applicable for diffusion with a second-order reaction in a porous catalyst. Then use the code to develop a model for concentration of two species reacting with each other in a porous catalyst.
k1 0.05; De 1e-10; R = 1.0e-03/3.; C_As = 10; % system parameters Thiele R (k1 * C_As/De) 0.5; % Thiele modulus (second order) N = u chebop (0,1); % defines an operator chebfun ('u'); % defines solution as function rate = Thiele 2 u.^2; % rate function N.op N. lbc = @(x,u) diff(u,2) Thiele 2u.^2; % defines the problem @(u) diff(u, 1); % left boundary condition N.rbc = 1 % right boundary condition u = N\0% solution using the backslash operator. s sum (u. 2) % average rate (effectiveness factor) plot (u) % plots the solution;
Step by Step Solution
3.53 Rating (153 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
