Part B

Extend the results from (a) to describe the diffusion in a nonisothermal film

> restart;

> T:=r->T1*(r/r1)^n; equation 17.2-16

[Maple Math]

> DAB:=T->DAB1*(T/T1)^(3/2); equation 17.2-17

[Maple Math]

> DAB(T(r)); Use equations 17.2-16 and 17.2-17 to achieve equation 17.2-22. Equation 17.2-22 illustrates the variation of diffusivity with position.

[Maple Math]

> c:=T->p/(R*T);

[Maple Math]

> cDAB(r):=c(T(r))*DAB(T(r)); cDAB is replaced in equation 17.2-19. cDAB now depends on r.

[Maple Math]

The steps that follow are very similar to part A. Define molar flux.

> NAr:=r->NAr1*r1^2/r^2;

[Maple Math]

> eqn162_2:=NAr(r)=xA(r)*NAr(r)-cDAB(r)*diff(xA(r),r); Use Fick's first law in terms of NA, the molar flux of a species A. This is equation 16.2-2 modified to for the specifics of this problem. This equation is also a variation of equation 17.0-1.

[Maple Math]
[Maple Math]

> assume(r>0, r1>0, r2>r1);

> assume(n, real);

The assumptions above are necessary so that Maple can read the variable correctly in order to achieve an answer in its most simplified form. Don't believe it? Try taking out the assumptions above!!! :)

You will see many colons in the next several lines of code. When a colon is placed instead of a semicolon, the output does not show. The output is rather lengthy, and is not of much importance until the end of this solution after simplification.

> soln:=dsolve({eqn162_2,xA(r1)=xA1},xA(r)):

>

> assign(soln);xA:=unapply(xA(r),r):

> eqn:=xA2=xA(r2): lengthy output

> NAr1:=solve(eqn, NAr1); Very similar to part A. Solve for NAr1 with xA at r2.

[Maple Math]

> xA1:=1-xB1;xA2:=1-xB2; Define the relationships between xA1 and xB1 and xA2 and xB2.

[Maple Math]

[Maple Math]

Now NAr1 is simplified enough to show the output.

> simplify(NAr1);

[Maple Math]

> W_A:=4*Pi*r1^2*NAr1: To obtain the molar flow of A across a spherical surface, multiply the area of a sphere by NAr1.

> simplify (W_A); Now show the output with simplification.

[Maple Math]

> BSLform:=4*Pi*(p*DAB1/R/T1)*(1+n/2)*ln(xB2/xB1)/((r1^(-1-n/2)-r2^(-1-n/2))*r1^(n/2)); This equation should look like equation 17.2-24.

[Maple Math]

> final_ans:=simplify(W_A-BSLform);

[Maple Math]

Thus, the two equations agree, and part B of example 17.2-2 is solved.

Back to Main Page of Example 17.2-2