The Flash Operation Contains Links to scripts and models to solve Flash, Dew-
and Bubble Point Calculations using ASCEND IV
Consider a simple phase separation problem. The discussion
you see here follows closely the discussion given in
Systematic Methods of Chemical Process Design
by Lorenz T. Beigler, Ignacia E. Grossman and
Arthur W. Westerberg, page 217, a book published by
Prentice Hall, ISBN-0-13-492422-3 (TP155.7.B47.1997).
You have a
feed stream (molar flow rate, F) with a known
composition (zi).
Let there be C components in the
feed stream. Assume for a moment that this feed stream
phase separates, into a liquid stream (with a molar
flow rate, L and a composition xi) and a vapor
stream (with a molar flow rate V and a composition
yi).
Let us write down as many equations as we can to
describe this system. Where necessary, I have provided
comments on what the equations are and why we are writing
them.
F = L + V
(1)
fi = F zi li = L xi vi = V yi
(2)
F zi = L xi + V yiorwrittenas fi = li + vi
(3)
xi =
li
å
li
yi =
vi
å
vi
(4)
Equations 1, 2,
3 are what we
call Mass Balance Equations, with
equation 4 defining mole fractions
in terms of the individual component flows and the total
molar flow rates.
gi fio xi = fi P yi
(5)
F Hf + Q = V Hv + L Hl
(6)
In the Equilibrium relationship written as
equation 5, the activity coefficient (gi)
will in general be a function of
the composition of the liquid
phase, Temperature and Pressure, the
fugacity coefficient (fi) will be a function of
the composition of the vapor
phase, Temperature and Pressure, while fio which is the
pure component fugacity can often be approximated
as the pure component vapor pressure (Pi*) which is often
approximated as a function
of Temperature.
Now let us count the number of equations and the number of
variables we have to deal with. Equation 3 is written
for each i component (so we have C equations), the
equilibrium relationship, equation 5 is
written for each i component (we have C more equations)
and we have the Enthalpy Equation written as equation 6.
This gives us a total of 2C + 1 equations. Number of variables
to solve for? We need to determine each of the xi's, the
yi's (that is 2C variables). The other variables include:
Temperature (T), Pressure (P) and Heat (Q, if the flash
operation is done adiabatically then Q will be zero, else
Q will be have some non-zero value). Thus we have
2C + 3 variables. Thus (2C + 3) - (2C + 1) = 2 or
we have two degrees of freedom, meaning we must specify
two of the variables to get a solution.
The manner we have written the equations will fail however if
one of the phases disappears during the flash operation,
for example when you are doing a Bubble-Point or a Dew-Point
calculation. So let's try writing the equations in a manner where
we will not have trouble no matter what the conditions are expected
to be.
Let's keep equations 3 (C equations)
and 6 (1 equation) like before and then
these equations
yi = Ki xi
(7)
Ki =
gi fio
fi P
(8)
If we now consider equations 7 and 8
we get additional 2C equations and together with
equations 3 and 6 we have
a total of 3C + 1 equations. Let's add the
number of variables, 3C (xi, yi and zi)
add Temperature (T),
Pressure (P), F, L and V and you get a grand total
of 3C + 5 variables. But since neither the xi or the
yi's are specified, we can include the
overall mass balance equation 1. But we have to
be careful here since we have said nothing about the fact
that the molefractions xi and yi must add upto one. This
can lead to strange solutions if we are not careful.
If the temperature and the pressure are specified, we can solve
the mass balance equations without using the enthalpy balance
equation. We can then write
xi =
zi
1.0 + (Ki - 1.0)
V
F
(9)
yi =
Ki zi
1.0 + (Ki - 1.0)
V
F
(10)
We can require that either åxi = 1.0 or
åyi = 1.0 to give us a model that we can solve with
2 degrees of freedom (count the number of equations and
variables).
å
xi =
å
F zi
F + (Ki - 1.0)V
= 1.0
(11)
å
yi =
å
F Ki zi
F + (Ki - 1.0)V
= 1.0
(12)
The problem with equations 11 and 12 is that
both of these equations are trivially satisfied for every
Flash Problem if you set the xi's or the yi's to the
feed composition, zi. The alternative is to write
the specification as the difference in the sum of the xi's and
the yi's and set that to zero
å
yi -
å
xi =
å
é ë
F
æ è
Ki - 1
ö ø
zi
F +
æ è
Ki - 1
ö ø
V
ù û
= 0.0
(13)
The Flash Model can then be given by Equations 3,
7, 8, 1,
13 and 6 with two degrees of freedom.
So How can one solve the equations?
Once you have
downloaded both the SCRIPT files (these have the
*.a4s extension ... for example the script for a simple
PT flash is called ptflash.a4s) and the MODEL files
(the model for the PT flash is in the ptflash.a4c file)
you are ready.
An ASCEND Script and an ASCEND model that details a simple
PT-Flash Calculation for an ideal gas, ideal liquid are given
below. You will need to save the script file as say
ptflash.a4s and the model file as say ptflash.a4c.
If you are using NETSCAPE, click the right mouse button
on the link and do a SAVE the LINK AS.
In the ASCEND script window, you will then read in the
script file, select ALL the statements and execute the file.
In the BROWSER, you will see the results of the calculations.
Make a print out of both ptflash.a4s AND ptflash.a4c, read these
files. Look for example the variables I have declared to be
TRUE (means, we know them, do not solve for them!) and those
that are FALSE (means, please find these for me!).
You can easily modify these scripts, models and use them for
your own Dew Point, Bubble Point and Flash Calculations. By
studying how these simple models are written and solved,
perhaps you can/will use them for other calculations
you may have to do. Watch these pages for more examples,
and models.
Script for the PT Flash Model for the PT Flash
File translated from
TEX
by
TTH,
version 3.70. On 16 Jan 2006, 21:16.