Aspen Custom Modeler Equations of The Flash Model PDF
Aspen Custom Modeler Equations of The Flash Model PDF
Aspen Custom Modeler Equations of The Flash Model PDF
One problem to consider is to develop a model of index zero or one. Using total content
of the vessel as state variables (instead of content of each phase separately) is the key in
avoiding higher index.
Equations are written only for one feed and two outlets, one vapor and one liquid.
Extension to multiport is quite straightforward.
VAPOR F v
T, P, hv ,
y, rho v
Energy, E,Q
Temperature, T
Pressure, P
Volume, V
Mole Holdup, Mc
Equilibrium constant,
FEED F K
Tf , Pf, h f,
z, rho f
LIQUID Fl
T, P, h l,
x, rho l
Feed conditions
n
zi = 1
i
hf = f(Tf, Pf, z)
RHO f = f(Tf,Pf,z)
dp = Pf - P
dMci
= F.zi - FV.yi - FL.xi
dt
Mci = Mv .yi + Ml.xi
Ener gy balance
dE
= F.hf - FV.hv - FL.hl + Q
dt
E = Mv .hv + Ml.hl - P.V
hv = f(T, P, y)
hl = f(T, P, x)
L V Equilibrium
Ml = Vl.RHO l
Mv = Vv .RHO v
V = Vl + Vv
RHOl = f(T, P, x)
RHOv = f(T, P, y)
Implementation
As we want to use Properties PLUS physical properties procedures for the property
evaluation (density, enthalpy and K values), we need to adopt the library conventions and
variable types.
The table gives the list of variables and the variable types used.
The same approach could be used for feed streams. However, using a flash procedure for
feed stream is efficient (i.e., fast) and robust (i.e., converges with poor initial values),
while for a dynamic flash, the procedure approach would be less efficient (i.e., slower).
Code of the flash model is given below. Again, this code could be improved in many
ways.
MODEL LVflash
p_in as INPUT LVPort;
liq as OUTPUT LVPort;
vap as OUTPUT LVPort;
T as temperature;
p as pressure;
rhol as dens_mol;
rhov as dens_mol;
hl as enth_mol;
hv as enth_mol;
x(componentlist) as molefraction;
y(componentlist) as molefraction;
dp_in as press_diff;
// pressure inlet
p - p_in.p = dp_in;
// Material balance
$Mc = p_in.F*p_in.z- liq.F*x - vap.F*y;
Mc = Ml*x + Mv*y;
// Energy balance
$E = p_in.F*p_in.h - liq.F*hl - vap.F*hv + Q;
E = Ml*hl + Mv*hv - 1e-4*p*V;
call (hl) = pEnth_mol_liq (T, p, x);
call (hv) = pEnth_mol_vap (T, p, y);
// LV equilibrium
y = K*x;
call (K) = pKvalues (T, p, x, y);
SIGMA(x) = 1;
SIGMA(y) = 1;
// Geometry
Ml = rhol*Vl;
Mv = rhov*Vv;
V = Vl + Vv;
call (rhol) = pDens_mol_liq (T, p, x);
call (rhov) = pDens_mol_vap (T, p, y);
// Stream properties
liq.T = T;
liq.p = p;
liq.h = hl;
liq.vf = 0;
liq.rho = rhol;
liq.z = x;
vap.T = T;
vap.p = p;
vap.h = hv;
vap.vf = 1;
vap.rho = rhov;
vap.z = y;
END