Vous êtes sur la page 1sur 5

# Introduction to Aspen Custom Modeler Workshops

## Equations of the flash model

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

## M ater ial balance

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)

Introduction to Aspen Custom Modeler Workshops

L V Equilibrium

## yi = Ki.xi This is the fugacity equality

n
xi = 1
i
n
yi = 1
i
K = f(T, P, x, y)

## Geometr ic constr aints

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.

## Symbol Var iable type Descr iption

dp press_diff feed and flash pressure difference
E holdup_heat flash internal energy (state)
F flow_mol feed flowrate
FL flowrate flash liquid outlet flowrate
FV flowrate flash vapor outlet flowrate
hf enth_mol feed enthalpy
hl enth_mol_liq flash liquid enthalpy
hv enth_mol_vap flash vapor enthalpy
Ki k_value liquid vapor equilibrium coefficie nts
Mci holdup_mol components global holdups (state)
Ml holdup_mol flash liquid molar holdup
Mv holdup_mol flash vapor molar holdup
P pressure flash pressure
Pf pressure feed pressure
Q enthflow heat duty on the flash

Introduction to Aspen Custom Modeler Workshops

## rhof dens_mol feed density

rhol dens_mol_liq flash liquid density
rhov dens_mol_vap flash vapor density
T temperature flash temperature
Tf temperature feed temperature
V volume flash volume
Vl volume flash liquid volume
Vv volume flash vapor volume
x molefraction flash liquid composition
y molefraction flash vapor composition
z molefraction feed composition

Introduction to Aspen Custom Modeler Workshops

## call (hl) = pEnth_Mol_Liq (T, p, x);

call (hv) = pEnth_Mol_vap (T, p, y);

## call (Rhol) = pDens_Mol_Liq (T, p, x);

call (Rhov) = pDens_Mol_Vap (T, p, y);

## call (K) = pKValues (T, p, x, y);

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;

## Mc(componentlist) as holdup_mol (initial);

Ml as holdup_mol;
Mv as holdup_mol;
E as holdup_heat (initial);
Vl as volume;
Vv as volume;
V as volume (fixed);
K(componentlist) as k_value;
Q as INPUT enthflow (fixed);

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);

Introduction to Aspen Custom Modeler Workshops

// 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