Extract Page 14
Extract Page 14
You can use the following code as a template to create your own subroutine.
In addition, Aspen Plus provides the template for this user subroutine online
(see Appendix B).
IMPLICIT NONE
INTEGER KSTG, NCOMPS, IDX(NCOMPS), NBOPST(6), KPDIAG,
+ COLTYP, USRCOR, IPAKAR, IPTYPE, ITTYPE, IPHASE,
+ NINT, INT(NINT), NREAL
REAL*8 XCOMPB(NCOMPS), FRATEL, YCOMPB(NCOMPS), FRATEV,
+ PRESS, TLIQ, TVAP, AVMWP, VISCMP, DENMXP, CPMIXP,
+ THRMCP, PREH, EXPHK, EXPHD, COLDIA, REAL(NREAL)
AREAIF = SPAREA*dTemp
END IF
C END OF IF (USRCOR)
C
ELSE IF (COLTYP .EQ. 2) THEN
C
C**** TRAY COLUMN
C
IF (USRCOR .EQ. 1) THEN
C user subroutine example for tray column: Scheffe-
Weiland 87
C
C Scheffe, R.D. and Weiland, R.H., "Mass Transfer
C Characteristics of Valve Trays." Ind. Eng. Chem. Res.
C 26, (1987) p. 228
C
C The original paper only mentioned valve tray.
C It is also used for bubble-cap tray and sieve tray.
C
C CHARACTERISTIC LENGTH IS ALWAYS 1 METER.
d = 1.0D0
rhoLms = DENMXL * AVMWLI
rhoVms = DENMXV * AVMWVA
uL = FRATEL / TWRARA / DENMXL
uV = FRATEV / TWRARA / DENMXV
ReL = rhoLms * uL * d / VISCML
ReV = rhoVms * uV * d / VISCMV
Wprime = WEIRHT / d
AREAIF = 0.27D0 * ReV**0.375D0 * ReL**0.247D0
AREAIF = AREAIF * Wprime**0.515
END IF
C END OF IF (USRCOR)
C
END IF
C END OF IF (COLTYP)
C
RETURN
END