Example 3.2.6  Diffusion with Second Order Reaction 

Example 3.2.1 is solved here using Maple's 'dsolve' command.  The boundary condition at the surface, x = 1 is taken as: 

 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mo( 

 

Example 3.2.1 is solved below in Maple with a modified boundary condition: 

> restart:
 

> with(plots):
 

Enter the governing equation: 

> Eq:=diff(c(x),x$2)=Phi^2*c(x)^2;
 

diff(diff(c(x), x), x) = `*`(`^`(Phi, 2), `*`(`^`(c(x), 2))) (1)
 

The value of the parameter is substituted here: 

> eq:=subs(Phi=1,Eq);
 

diff(diff(c(x), x), x) = `*`(`^`(c(x), 2)) (2)
 

The boundary conditions are entered here: 

> BCs:=(D(c)(0),D(c)(1)=100*(1-c(1)));
 

(D(c))(0), (D(c))(1) = `+`(100, `-`(`*`(100, `*`(c(1))))) (3)
 

The numerical solution is obtained here: 

> sol:=dsolve({eq,BCs},{c(x)},numeric);
 

proc (x_bvp) local res, data, solnproc, ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; `:=`(_EnvDSNumericSaveDigits, Digits); `:=`(Digits, 14); if _EnvInF... (4)
 

The concentration profile obtained is plotted here: 

> odeplot(sol,[x,c(x)],0..1,thickness=4,title="Figure Exp. 3.2.10.",axes=boxed,color=gold);
 

Plot_2d
 

Next, the problem is solved for a higher value of Φ: 

> eq:=subs(Phi=10,Eq);
 

diff(diff(c(x), x), x) = `+`(`*`(100, `*`(`^`(c(x), 2)))) (5)
 

> BCs:=(D(c)(0),D(c)(1)=100*(1-c(1)));
 

(D(c))(0), (D(c))(1) = `+`(100, `-`(`*`(100, `*`(c(1))))) (6)
 

> sol:=dsolve({eq,BCs},{c(x)},numeric);
 

proc (x_bvp) local res, data, solnproc, ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; `:=`(_EnvDSNumericSaveDigits, Digits); `:=`(Digits, 14); if _EnvInF... (7)
 

> odeplot(sol,[x,c(x)],0..1,thickness=4,title="Figure Exp. 3.2.11.",axes=boxed,color=brown);
 

Plot_2d
 

We observe that as Φ increases, the profile becomes steeper and the time taken to solve the problem also increases. 

>