Sunteți pe pagina 1din 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.

FEED F T f , P f , h f , z, rho f

Feed conditions

n

å z i = 1

i

h f = f(T f , P f , z)

RHO f = f(T f ,P f ,z)

dp = P f - P

Material balance

dMc i

dt

Mc i = M v .y i + M l .x i

= F.z i - F V .y i - F L .x i

Energy balance

dE

dt

= F.h f - F V .h v - F L .h l + Q

E = M v .h v + M l .h l - P.V

h v = f(T, P, y) h l = f(T, P, x)

P, h v , rho v

v = f(T, P, y) h l = f(T, P, x) P, h v , rho

VAPOR F v

T,

y,

Energy, E,Q

Energy, E,Q Temperature, T Pressure, P Volume, V Mole Holdup, Mc Equilibrium constant, K

Temperature, T

Pressure, P

Volume, V

Mole Holdup, Mc Equilibrium constant,

K

LIQUID F l T, P, h l , x, rho l

constant, K LIQUID F l T, P, h l , x, rho l ©2004 AspenTech. All

Introduction to Aspen Custom Modeler

Workshops

LV Equilibrium

y i = K i .x i

This is the fugacity equality

n

å

i = 1

x

i

n

å

i = 1

y

i

K

= f(T, P, x, y)

Geometric constraints

M

l = V l .RHO l

M

v = V v .RHO v

V

= V l + V v

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 ne ed to adopt the library conventions and variable types.

The table gives the list of variables and the variable types used.

Symbol

Variable type

Description

dp

press_diff

feed and flash pressure difference

E

holdup_heat

flash internal energy (state)

F

flow_mol

feed flowrate

F

L

flowrate

flash liquid outlet flowrate

F

V

flowrate

flash vapor outlet flowrate

h

f

enth_mol

feed enthalpy

h

l

enth_mol_liq

flash liquid enthalpy

h

v

enth_mol_vap

flash vapor enthalpy

K

i

k_value

liquid vapor equilibrium coefficie nts

Mc

i

holdup_mol

components global holdups (state)

M

l

holdup_mol

flash liquid molar holdup

M

v

holdup_mol

flash vapor molar holdup

P

pressure

flash pressure

P

f

pressure

feed pressure

Q

enthflow

heat duty on the flash

Introduction to Aspen Custom Modeler

Workshops

rho f

dens_mol

feed density

rho l

dens_mol_liq

flash liquid density

rho v

dens_mol_vap

flash vapor density

T

temperature

flash temperature

T

f

temperature

feed temperature

V

volume

flash volume

V

l

volume

flash liquid volume

V

v

volume

flash vapor volume

x molefraction

 

flash liquid composition

y molefraction

 

flash vapor composition

z molefraction

 

feed composition

Introduction to Aspen Custom Modeler

Workshops

Thermodynamic properties calculations

We will use the following procedures:

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