Section 17.4 of BS&L: Diffusion with Homogeneous Chemical Reaction

> restart;

The area for transport is constant: call it S as BS&L do.

> WA:=z->NAz(z)*S; Mass flow at z

[Maple Math]

> eq:=WA(z)-WA(z+dz)+R(z)*S*dz; Mass balance where R is the rate of production of A by chemical reaction: mols/(time*volume)

[Maple Math]

> R:=z->-kppp*cA(z);

[Maple Math]

> deq:=-limit(eq/(S*dz),dz=0)=0; eq. 17.4-2

[Maple Math]

> NAz:=z->-DAB*D(cA)(z); eq. 17.4-3 for c constant and NBz=0.

[Maple Math]

> s:=dsolve({deq,cA(0)=cA0,D(cA)(L)=0},cA(z)):

> assign(s);

> cA:=unapply(cA(z),z);

[Maple Math]
[Maple Math]

> kppp:=b1^2*DAB/L^2; replacing kppp with b1

[Maple Math]

> C1:=z->cA(z)/cA0:

> simplify(convert(C1(z),trig));

[Maple Math]
[Maple Math]

> C2:=z->cosh(b1*(1-z/L))/cosh(b1); eq. 17.4-7

[Maple Math]

> assume(DAB>0,b1>0,L>0,z>0);

> dif:=C2(z)-C1(z):

> simplify(dif);

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

> simplify(convert(dif,trig)); Almost there

[Maple Math]
[Maple Math]

> simplify(convert(dif,exp)); Finally

[Maple Math]

> int(C1(z),z=0...L)/L;

[Maple Math]

> %-tanh(b1)/b1: Subtracting off 17.4-8

> simplify(convert(%,exp)); We've done this before

[Maple Math]

> NAz(0);

[Maple Math]

> simplify(%);

[Maple Math]

> simplify(%-DAB*cA0*b1*tanh(b1)/L);

[Maple Math]

> simplify(convert(%,exp)); One more time.

[Maple Math]

>