Question: Anyone doing any dynamic non-ideal distillation?

Hello all!

I'm am trying to replicate a Berkeley MADONNA problem in MAPLE, and I'm having problems. For those with the great book "Chemical Engineering Dynamics" by Ingham, Dunn, Heinzle, Prevosil, Snape, it's the BUBBLE program.

The problem is a non-ideal batch distillation with methanol and water, which has ODE's for mass balances for each stage. However, since the system is non-ideal, I need to solve an equation at each time point for the flash calculation, and I'm not sure how to specify the solving within MAPLE. For example, the equation for mass balance on a given stage is given by the ODE:

diff(X1(t),t) = (L*X0(t)-X1(t)+V*(Y2(t)-Y1(t))/M;

where X1 is the methanol liquid mole fraction at stage 1, L and V are liquid and vapor molar flow rates respectively, and M is the stage molar holdup. At each stage, activity coefficients are used to determine the flash compositions. In the flash calculation, the cumulative partial pressure contributions must be set equal to the system pressure by solving for the vapor mol fraction and temperature. The set of equations for each stage are similar to these (in MADONNA format for explanation)

XW1=1-X1    (Binary system, XW1 is the molar concentration of water, so XW1=1-X1)

GAMM1=exp(A*XW1^2/((XW1+A*X1/B)^2))   (activity coefficient for methanol)
GAMW1=exp(B*X1^2 /((X1+B*XW1/A)^2))    (activity coefficient for water)
PPM1 =exp(CM+DM/(T1+273))     (pure vapor pressure for methanol)
PPW1 =exp(CW+DW/(T1+273))    (pure vapor pressure for water)
PCALC1=XW1*PPW1*GAMW1+X1*PPM1*GAMM1  (calculated pressure)
Pdiff = Pbar - PCALC1  (difference between the pressure specified Pbar and calculated pressure)

The program would make Pdiff=0 (or some small specified difference) by adjusting T1 at each time point. My fundamental question is how to have this temperature/flash calculation solve at each time point as I numerically solve the ODE sets. I'm simply not sure how it should be specified.

Any help appreciated, esp. if you've done dynamic distillations in MAPLE before. It's such a sweet tool, if I can just get over this hump!

Thanks in advance,

Fred Moesler

Please Wait...