Beruflich Dokumente
Kultur Dokumente
Workshops
VAPOR F v
T, P, hv ,
y, rho v
FEED F
Tf , Pf, h f,
z, rho f
Energy, E,Q
Temperature, T
Pressure, P
Volume, V
Mole Holdup, Mc
Equilibrium constant,
K
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)
133
Workshops
L V Equilibrium
yi = Ki.xi
n
xi = 1
i
n
yi = 1
i
K = f(T, P, x, 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
dp
E
F
FL
FV
hf
hl
hv
Ki
Mci
Ml
Mv
P
Pf
Q
Descr iption
feed and flash pressure difference
flash internal energy (state)
feed flowrate
flash liquid outlet flowrate
flash vapor outlet flowrate
feed enthalpy
flash liquid enthalpy
flash vapor enthalpy
liquid vapor equilibrium coefficie nts
components global holdups (state)
flash liquid molar holdup
flash vapor molar holdup
flash pressure
feed pressure
heat duty on the flash
134
rhof
rhol
rhov
T
Tf
V
Vl
Vv
x
y
z
dens_mol
dens_mol_liq
dens_mol_vap
temperature
temperature
volume
volume
volume
molefraction
molefraction
molefraction
Workshops
feed density
flash liquid density
flash vapor density
flash temperature
feed temperature
flash volume
flash liquid volume
flash vapor volume
flash liquid composition
flash vapor composition
feed composition
135
Workshops
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
liq
vap
as INPUT LVPort;
as OUTPUT LVPort;
as OUTPUT LVPort;
Mc(componentlist)
Ml
Mv
E
Vl
Vv
V
K(componentlist)
Q
as
as
as
as
as
as
as
as
as
holdup_mol (initial);
holdup_mol;
holdup_mol;
holdup_heat (initial);
volume;
volume;
volume (fixed);
k_value;
INPUT enthflow (fixed);
T
p
rhol
rhov
hl
hv
x(componentlist)
y(componentlist)
dp_in
as
as
as
as
as
as
as
as
as
temperature;
pressure;
dens_mol;
dens_mol;
enth_mol;
enth_mol;
molefraction;
molefraction;
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);
136
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
vap.p
vap.h
vap.vf
vap.rho
vap.z
END
=
=
=
=
=
=
T;
p;
hv;
1;
rhov;
y;
137