Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Code for pore diffusion with CHEBFUN is shown below

Code for pore diffusion with CHEBFUN is shown below

Management

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. 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 = chebop(0,1); % defines an operator u = chebfun (’u’); % defines solution as function rate = Thiele^2 * u.^2; % rate function N.op = @(x,u) diff(u,2) - Thiele^2 * u.^2 ; % defines the problem N.lbc = @(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; 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.

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions