Example 18.2-3 Part a: Diffusion through a Spherical Film See also the web pages on this example by Matt Hayenga: http://www.owlnet.rice.edu/~ceng402/ed1projects/bonus98/mhayenga.html for part b. > restart; > A:=r->4*Pi*r^2; Transfer area in a sphere > WAr:=r->A(r)*NAr(r); Mass transport rate at position r > eq:=WAr(r)-WAr(r+dr); Mass Balance > deq1:=limit(eq/(dr*A(r)),dr=0); > s:=dsolve({deq1,NAr(r1)=NAr1},NAr(r)); > assign(s); NAr:=unapply(NAr(r),r); > deq:=NAr(r)=-c*DAB*D(xA)(r)+xA(r)*NAr(r); eq. 18.0-1 with NBr=0 > s:=dsolve({deq,xA(r1)=xA1},xA(r)); > assign(s); > xA:=unapply(xA(r),r); > eq:=xA(r2)=xA2; > NAr1:=solve(eq,NAr1); > xA1:=1-xB1; xA2:=1-xB2; > WAr(r1);
> WAmaybe:=4*Pi*c*DAB*ln(xB2/xB1)/((1/r1)-(1/r2)); > WAr(r1)-WAmaybe; Comparing to eq. 18.2-27 > dif:=simplify(%,assume=positive); We agree with the eq. given for WA.