Example 3.2.5  Multiple Steady States in a Catalyst Pellet 

The catalyst pellet problem solved in example 3.2.2 is solved here using the shooting technique.  The Maple program is given below: 

> restart:
 

> with(plots):
 

The governing equation is entered here (after substituting the parameter values): 

> eq:=diff(y(x),x$2)-0.04*y(x)*exp(16*(1-y(x))/(1+0.8*(1-y(x))));
 

`+`(diff(diff(y(x), x), x), `-`(`*`(0.4e-1, `*`(y(x), `*`(exp(`+`(`/`(`*`(16, `*`(`+`(1, `-`(y(x))))), `*`(`+`(1.8, `-`(`*`(.8, `*`(y(x)))))))))))))) (1)
 

> eqalpha:=subs(y(x)=Y(x,alpha),eq):
 

> eqalpha:=diff(eqalpha,alpha):
 

> eqalpha:=subs(diff(Y(x,alpha),alpha)=y2(x),eqalpha):
 

The sensitivity equation is: 

> eqalpha:=subs(Y(x,alpha)=y(x),eqalpha);
 

`+`(diff(diff(y2(x), x), x), `-`(`*`(0.4e-1, `*`(y2(x), `*`(exp(`+`(`/`(`*`(16, `*`(`+`(1, `-`(y(x))))), `*`(`+`(1.8, `-`(`*`(.8, `*`(y(x))))))))))))), `-`(`*`(0.4e-1, `*`(y(x), `*`(`+`(`-`(`/`(`*`(16...
`+`(diff(diff(y2(x), x), x), `-`(`*`(0.4e-1, `*`(y2(x), `*`(exp(`+`(`/`(`*`(16, `*`(`+`(1, `-`(y(x))))), `*`(`+`(1.8, `-`(`*`(.8, `*`(y(x))))))))))))), `-`(`*`(0.4e-1, `*`(y(x), `*`(`+`(`-`(`/`(`*`(16...
(2)
 

The variables are stored in vars: 

> vars:=(y(x),y2(x));
 

y(x), y2(x) (3)
 

The governing equations are stored in eqs: 

> eqs:=(eq,eqalpha);
 

`+`(diff(diff(y(x), x), x), `-`(`*`(0.4e-1, `*`(y(x), `*`(exp(`+`(`/`(`*`(16, `*`(`+`(1, `-`(y(x))))), `*`(`+`(1.8, `-`(`*`(.8, `*`(y(x)))))))))))))), `+`(diff(diff(y2(x), x), x), `-`(`*`(0.4e-1, `*`(...
`+`(diff(diff(y(x), x), x), `-`(`*`(0.4e-1, `*`(y(x), `*`(exp(`+`(`/`(`*`(16, `*`(`+`(1, `-`(y(x))))), `*`(`+`(1.8, `-`(`*`(.8, `*`(y(x)))))))))))))), `+`(diff(diff(y2(x), x), x), `-`(`*`(0.4e-1, `*`(...
(4)
 

The boundary value problem has multiple solutions.  The solution obtained depends on the initial guess provided for α.  An initial guess of 0.9 is given: 

> alpha0:=0.9;
 

.9 (5)
 

> ICs:=(y(0)=alpha0,D(y)(0)=0,y2(0)=1,D(y2)(0)=0);
 

y(0) = .9, (D(y))(0) = 0, y2(0) = 1, (D(y2))(0) = 0 (6)
 

> sol:=dsolve({eqs,ICs},{vars},type=numeric,abserr=1e-10);
 

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

> sol(1);
 

[x = 1., y(x) = .968526696660516496, diff(y(x), x) = .119738543547597192, y2(x) = .230740415090328915, diff(y2(x), x) = -1.20071140540140586]
[x = 1., y(x) = .968526696660516496, diff(y(x), x) = .119738543547597192, y2(x) = .230740415090328915, diff(y2(x), x) = -1.20071140540140586]
(8)
 

> ypred:=rhs(sol(1)[2]);
 

.968526696660516496 (9)
 

> y2pred:=rhs(sol(1)[4]);
 

.230740415090328915 (10)
 

The new value of α is obtained as: 

> alpha1:=alpha0+(1-ypred)/y2pred;
 

1.036401346 (11)
 

For this example, the error is calculated based on the boundary condition at x = 1. 

> err:=abs(1-ypred);
 

0.314733033e-1 (12)
 

> alpha0:=alpha1;
 

1.036401346 (13)
 

> k:=1;
 

1 (14)
 

The iteration is performed until the error becomes less than the tolerance limit 1e - 10. 

> tol:=1e-10;
 

0.1e-9 (15)
 

> while err> tol do
 

> ICs:=(y(0)=alpha0,D(y)(0)=0,y2(0)=1,D(y2)(0)=0);
 

> sol:=dsolve({eqs,ICs},{vars},type=numeric);
 

> ypred:=rhs(sol(1)[2]);
 

> y2pred:=rhs(sol(1)[4]);
 

> alpha1:=alpha0+(1-ypred)/y2pred;
 

> err:=abs(1-ypred);
 

> alpha0:=alpha1;k:=k+1;
 

> end:
 

> k;
 

6 (16)
 

The problem has converged after six iterations.  The concentration at the center of the particle (x = 0) is given by: 

> alpha1;
 

.9717223372 (17)
 

The error obtained is: 

> err;
 

0. (18)
 

Next, the solution obtained is plotted and stored in p1. 

> p1:=odeplot(sol,[x,y(x)],0..1,axes=boxed,thickness=3,color=blue):
 

The same steps are performed for a different initial guess of 0.5.  The solution obtained is stored in p2. 

> alpha0:=0.5;
 

.5 (19)
 

> ICs:=(y(0)=alpha0,D(y)(0)=0,y2(0)=1,D(y2)(0)=0);
 

y(0) = .5, (D(y))(0) = 0, y2(0) = 1, (D(y2))(0) = 0 (20)
 

> sol:=dsolve({eqs,ICs},{vars},type=numeric,abserr=1e-10);
 

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

> sol(1);
 

[x = 1., y(x) = 1.58640607813000578, diff(y(x), x) = 1.25197150063613450, y2(x) = -3.60417190050730118, diff(y2(x), x) = -4.84304330565780372]
[x = 1., y(x) = 1.58640607813000578, diff(y(x), x) = 1.25197150063613450, y2(x) = -3.60417190050730118, diff(y2(x), x) = -4.84304330565780372]
(22)
 

> ypred:=rhs(sol(1)[2]);
 

1.58640607813000578 (23)
 

> y2pred:=rhs(sol(1)[4]);
 

-3.60417190050730118 (24)
 

> alpha1:=alpha0+(1-ypred)/y2pred;
 

.6627020281 (25)
 

> err:=abs(1-ypred);
 

.586406078 (26)
 

> alpha0:=alpha1;
 

.6627020281 (27)
 

> k:=1;
 

1 (28)
 

> while err> tol do
 

> ICs:=(y(0)=alpha0,D(y)(0)=0,y2(0)=1,D(y2)(0)=0);
 

> sol:=dsolve({eqs,ICs},{vars},type=numeric);
 

> ypred:=rhs(sol(1)[2]);
 

> y2pred:=rhs(sol(1)[4]);
 

> alpha1:=alpha0+(1-ypred)/y2pred;
 

> err:=abs(1-ypred);
 

> alpha0:=alpha1;k:=k+1;
 

> end:
 

> k;
 

8 (29)
 

The problem has converged after eight iterations.  The concentration at the center of the particle (x = 0) is given by: 

> alpha1;
 

.7733977427 (30)
 

> err;
 

0. (31)
 

> p2:=odeplot(sol,[x,y(x)],0..1,axes=boxed,thickness=3,color=green):
 

Next, an initial guess of 1e - 4 is used.  For this case the updated α becomes a negative.  Hence, a scaling factor of ρ=0.2 is used:  

> alpha0:=1e-4;
 

0.1e-3 (32)
 

> ICs:=(y(0)=alpha0,D(y)(0)=0,y2(0)=1,D(y2)(0)=0);
 

y(0) = 0.1e-3, (D(y))(0) = 0, y2(0) = 1, (D(y2))(0) = 0 (33)
 

> sol:=dsolve({eqs,ICs},{vars},type=numeric,abserr=1e-10);
 

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

> sol(1);
 

[x = 1., y(x) = 2.05172720318686918, diff(y(x), x) = 3.91761302634986297, y2(x) = 2299.96672316761942, diff(y2(x), x) = -0.636497432250418376e-2]
[x = 1., y(x) = 2.05172720318686918, diff(y(x), x) = 3.91761302634986297, y2(x) = 2299.96672316761942, diff(y2(x), x) = -0.636497432250418376e-2]
(35)
 

> ypred:=rhs(sol(1)[2]);
 

2.05172720318686918 (36)
 

> y2pred:=rhs(sol(1)[4]);
 

2299.96672316761942 (37)
 

> alpha1:=alpha0+(1-ypred)/y2pred;
 

-0.3572793130e-3 (38)
 

> rho:=0.2;
 

.2 (39)
 

> alpha1:=alpha0+rho*(1-ypred)/y2pred;
 

0.854413740e-5 (40)
 

> err:=abs(1-ypred);
 

1.051727203 (41)
 

> alpha0:=alpha1;
 

0.854413740e-5 (42)
 

> k:=1;
 

1 (43)
 

> while err> tol do
 

> ICs:=(y(0)=alpha0,D(y)(0)=0,y2(0)=1,D(y2)(0)=0);
 

> sol:=dsolve({eqs,ICs},{vars},type=numeric);
 

> ypred:=rhs(sol(1)[2]);
 

> y2pred:=rhs(sol(1)[4]);
 

> alpha1:=alpha0+rho*(1-ypred)/y2pred;
 

> err:=abs(1-ypred);
 

> alpha0:=alpha1;k:=k+1;
 

> end:
 

The problem has converged after 93 iterations.  The concentration at the center particle (x = 0) is given by: 

> k;
 

93 (44)
 

> alpha1;
 

0.1033486796e-5 (45)
 

> err;
 

0. (46)
 

> p3:=odeplot(sol,[x,y(x)],0..1,title="Figure Exp. 3.2.9",axes=boxed,thickness=4,color=brown):
 

> display({p1},{p2},{p3});
 

Plot_2d
 

>
 

>
 

Hence, we observe that the shooting technique can predict three multiple states in a catalyst pellet.  The number of iterations required to obtain a converged solution depends on the initial guess and the scaling factor ρ. 

>