EX. 18.5-1


Project by Roberto Berloni and Dana Pilaski
2000


The purpose of this project is to show how to do example 18.5-1 from the text, with the calculations done in Maple. The problem consists of a hot condensable vapor, A, diffusing through a stagnant film of noncondensible gas B, to a cold surface at z=0, where gas A condenses into liquid A. The system is shown in the figure below. Both a concentration and a temperature profile of gas A were found as functions of z in Maple and the equations in the book were verified.

Figure: Condensation of hot vapor A on a cold surface in the presence of a noncondensable gas B

> restart;

Starting with equation 18.3-10 (continuity) we can set d(NAz) to zero because it is not dependent on temperature.

> eq1:=D(NAz)(z)=0; Eq. 18.5-1

[Maple Math]

Now, we meed an equation for the mass flux of diffusion of A through the gas B . So, starting with Equation 17.0-1 , we can solve for NAz as a function of z.

> NAz:=z->-c*DAB*D(xA)(z)/(1-xA(z)); Eq. 18.5-3

[Maple Math]

This is where Maple becomes useful. We can insert Eq. 18.5-3 back into Eq. 18.5-1 and solve for the concentration files because we know that at z=0, xA=xAo and at z=delta (the far end of the boundary), xA=xAdel.

> s:=simplify(dsolve({eq1,xA(0)=xAo,xA(delta)=xAdel},xA(z)));

[Maple Math]

> assign(s); xA:=unapply(xA(z),z);

[Maple Math]

Now that Maple has solved for xA as a function of z (or so it would seem.. the result is hard to match up at this point to eq. 18.5-4!), we can solve for the mass flux as a function of z. If we have done the work right so far, NAz will be a constant and will not depend on z. Before we do that though, it may be convenient to try to match our concentration profile (xA(z)) with the book's concentration profile.

> check:=(1-xA(z))/(1-xAo)-((1-xAdel)/(1-xAo))^(z/delta): This is Eq. 18.5-4 from the book.

> expand(simplify(check));

[Maple Math]

This shows that our equation for xA as a function of z does correspond to the answer in the text (which would also imply that the book didn't mess up either)!

> simplify(NAz(z)); Turns out to be the same as Equation 18.5-4 despite the fact that the numerator and denominator in the log function both negative of what is written in the book. The result is the same however and NAz IS constant and does not depend on z.

[Maple Math]

The next part of this problem is to solve for the temperature profile of the system as a function of z. This will be done by starting with Eq. 18.3-10 the energy balance around the system.

> restart;

> eq:=D(eZ)(z)=0; Eq. 18.5-2.

[Maple Math]

Now we must define the energy flux using Equation 18.4-6 (we can do this because it was stated in the problem that A and B behave as ideal gases).

> eZ:=z->-k*D(T)(z)+Naz*molCpA*(T(z)-To); Eq. 18.5-7. This equation is valid because NAB in the original version cancels out and the heat can be rewritten as the molar heat capacity of gas A times the change in its original heat.

[Maple Math]

Now, as we did above, we can use Maple to insert Eq. 18.5-7 into Eq. 18.5-2 to solve for the temperature profile of the gas. We use the boundary conditions T(0)=To and T(delta)=Tdel.

> s:=dsolve({eq,T(0)=To,T(delta)=Tdel},T(z)):

[Maple Math]

Take the answer that Maple supplies for Temperature as a function of z and actually make a function T(z) that Maple will recognize and be able to put back into the equations above,

> assign(s); T:=unapply(T(z),z);

[Maple Math]

Now we want to use our function, T(z), to check Equation 18.5-8.

> check:=(T(z)-To)/(Tdel-To)-(1-exp(Naz*molCpA*z/k))/(1-exp(Naz*molCpA*delta/k)); Eq. 18.5-8 .

[Maple Math]
[Maple Math]

> expand(check):

> simplify(%,assume=positive);

[Maple Math]

Therefore, we have proven Eq. 18.5-8 since it goes to zero using our T(z) function! Our next step is to prove Equation 18.5-9 . This can be done given the fact that the heat transfer at the wall will be a function of the mass flux and heat flux is by definition : q=-k*(dT/dz). Therefore, we can define a function q at the wall as qz=-k*(dT/dz) where z=0. Then, we can divide it by the limit of itself as the mass flux goes to zero (which is what would happen at the wall).

> qz:=Naz->-k*D(T)(0);

[Maple Math]

> qz(Naz)/limit(qz(Naz),Naz=0);

[Maple Math]

This proves to be identical to Eq. 18-5.9 and so everything in this example has now been verified.





Sample Problem


We are now going to go through Problem 18.A.

> restart;

The first thing we're going to do is go through and solve for xA as a function of z and NAz, which is what we already did above.

> eq1:=D(NAz)(z)=0; Eq. 18.5-1

[Maple Math]

> NAz:=z->-c(Tavg)*DAB*D(xA)(z)/(1-xA(z)); Eq. 18.5-3

[Maple Math]

> s:=dsolve({eq1,xA(0)=xAo,xA(delta)=xAdel},xA(z)); assign(s); xA:=unapply(xA(z),z); NAz:=simplify(NAz(z),assume=positive);

[Maple Math]
[Maple Math]

[Maple Math]

[Maple Math]

Now we will do the same thing with all the energy balances from the problem.

> eq2:=D(eZ)(z)=0; eZ:=z->-k*D(T)(z)+NAz*molCpa*(T(z)-T0); s:=dsolve({eq2,T(0)=T0,T(delta)=Tdel},T(z)): assign(s); T:=simplify(unapply(T(z),z));

[Maple Math]

[Maple Math]

[Maple Math]
[Maple Math]

> qz:=-k*D(T)(0);

[Maple Math]

> ratio:=qz/limit(qz,DAB=0);

[Maple Math]

We must now solve for all the constants used in the problem.

> c:=T->p/(Rgas*T); This is the concentration from the ideal gas law : PV=nRT and c=n/V.

[Maple Math]

> Rgas:=82.057*cm^3*atm/(mol*K); This is the gas constant.

[Maple Math]

> p:=1*atm; This is the given pressure in the problem.

[Maple Math]

> Tavg:=((65-32)/(1.8)+273.15)*K; Convert the temperature from Fahrenheit to Kelvin.

[Maple Math]

> Ohm_AB:=1.319; From data at the back of BS&L.

[Maple Math]

> DAB:=0.0018583*10^(-2)*(sqrt(291.48333333^3*(1/18+1/28.97))/(1*(3.28585)^2*Ohm_AB))*m^2/sec; Equation 16.4-13.

[Maple Math]

> c(Tavg);

[Maple Math]

> m:=100*cm; Define meters in cm units.

[Maple Math]

> xAdel:=0.018; The concentration of A at the wall.

[Maple Math]

> k:=0.0246*W/(m*K);

[Maple Math]

> molCpa:=29.09*Joule/(mol*K); This is the molar heat capacity of water.

[Maple Math]

> xAo:=0.0122; This is the saturation concentration of water in the gas at the given conditions.

[Maple Math]

> W:=Joule/sec; Define Watts as a Joules/second.

[Maple Math]

> ratio; This should (hopefully) give the answer to part 18.A, a.

[Maple Math]

This is very close to the answer given in the book. Any differences can be attributed to different constants. Also, as predicted by Example 18.5-1 , the answer is very close to unity.

The next part of the problem is to solve for qc and qd at z=0. We know that q=-k*dT/dz from earlier chapters.

> eZ(0);

[Maple Math]

> T0:=283.15*K; Tdel:=299.82*K; These are the temperatures supplied in the question.

[Maple Math]

[Maple Math]

> eZ(0); ez(0) = qc + qd . So from here, we will be able to solve for the two unknowns.

[Maple Math]

> -k*D(T)(0); This is qc because it is the heat transfer at the wall (z=0).

[Maple Math]

> eZ(0)-(-k*D(T)(0));

[Maple Math]

Therefore, we can say that qd = 0. Or almost zero.