0% found this document useful (0 votes)
11 views8 pages

Extract Page 13

The document outlines the parameters and usage of user-defined subroutines in Aspen Plus for calculating heat transfer and mass transfer coefficients in distillation processes. It details the required input and output variables for various subroutines, including local work arrays and equipment specification arrays. Additionally, it provides guidance on how to initialize and retain integer and real parameters across calls within the software.

Uploaded by

GoKwo Wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views8 pages

Extract Page 13

The document outlines the parameters and usage of user-defined subroutines in Aspen Plus for calculating heat transfer and mass transfer coefficients in distillation processes. It details the required input and output variables for various subroutines, including local work arrays and equipment specification arrays. Additionally, it provides guidance on how to initialize and retain integer and real parameters across calls within the software.

Uploaded by

GoKwo Wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

IWORK I INTEGER NIWORK Integer work vector

NWORK I INTEGER — Length of real work vector (see Local Work


Arrays)
WORK I REAL*8 NWORK Real work vector
IEQSP I INTEGER 9 Integer array of equipment specs (see
Equipment Specification Arrays)
ICFLW I INTEGER 6 Integer array of crossflow data (see Equipment
Specification Arrays)
UAVG I REAL*8 — Average heat transfer coefficient (W/m2K)
AREA I REAL*8 — Heat transfer area (m2)
FMTD O REAL*8 — LMTD correction factor
† I = Input to subroutine, O = Output from subroutine

NBOPST
NBOPST is used when calling FLSH_FLASH or a property monitor.

Integer and Real Parameters


You can use integer and real retention parameters by specifying the number
on the HeatX | User Subroutines | LMTD sheet. You can initialize these
parameters by assigning values on the same sheet. The default values are
USER_RUMISS for real parameters and USER_IUMISS for integer parameters.
Aspen Plus retains these parameters from one call to the next. The variables
USER_IUMISS and USER_RUMISS are located in labeled common
PPEXEC_USER (see Appendix A).

Local Work Arrays


You can use local work arrays by specifying the array length on the HeatX
User Subroutines LMTD sheet. Aspen Plus does not retain these arrays from
one call to the next.

19 User LMTD Correction Factor Subroutine for HeatX 221


Equipment Specification Arrays
The following table explains the usage of the equipment specification arrays:
Array Entry Sheet Description

IEQSP 1 Setup | Flow direction


Specifications = 0 Counter-current
= 1 Co-current
= 2 Crossflow
2 (Future use)
3 (Future use)
4 (Future use)
5 Geometry | Shell Number of tube passes
6 Geometry | Shell TEMA shell type
= 0 TEMA E shell
= 1 TEMA F shell
= 2 TEMA G shell
= 3 TEMA H shell
= 4 TEMA J shell
= 5 TEMA X shell
7 Geometry | Baffles Baffle type
= 0 No baffles
= 1 Segmental baffles
= 2 Rod baffles
8 Geometry | Shell Exchanger Orientation
= 0 Horizontal
= 1 Vertical
9 Geometry | Shell Direction of tubeside flow
= 0 Up flow
= 1 Down flow
ICFLW 1 (Future use)
2 (Future use)
3 Geometry | Shell Crossflow tubeside mixing = 0 Unmixed
= 1 Between passes
= 2 Throughout
4 (Future use)
5 Geometry | Shell Crossflow shellside mixing = 0 Unmixed
= 1 Between passes
= 2 Throughout
6 (Future use)

222 19 User LMTD Correction Factor Subroutine for HeatX


20 User Subroutines for
Rate-Based Distillation

The Aspen Rate-Based Distillation1 feature in RadFrac can use Fortran


subroutines you supply to calculate:
 Binary mass transfer coefficients for vapor and liquid phases
 Heat transfer coefficients for vapor and liquid phases
 Interfacial area
 Holdup for liquid and vapor phases
This chapter provides argument lists and values you need for user
subroutines that perform all of these calculations. Use these sheets to specify
the subroutines in Aspen Plus:
To calculate Use sheet

Binary mass transfer coefficients RadFrac | User Transfer Subroutines | Mass


Transfer
Heat transfer coefficients RadFrac | User Transfer Subroutines | Heat
Transfer
Interfacial area RadFrac | User Transfer Subroutines | Interfacial
Area
Liquid and vapor holdup RadFrac | User Transfer Subroutines | Holdup

RadFrac can also use subroutines to calculate KLL, tray or packing


sizing/rating calculations, and reaction kinetics. These capabilities are not
limited to rate-based mode. See chapters 11, 16, and 21 for details on these
subroutines.
Rate-Based Distillation expects you to provide values for both vapor and
liquid phases whenever you supply Fortran subroutines for:
 Binary mass transfer coefficients.
 Heat transfer coefficients.
 Interfacial area.
 Holdup.

1 Aspen Rate-Based Distillation requires a separate license, and can be used only by customers
who have licensed it through a specific license agreement with Aspen Technology, Inc.

20 User Subroutines for Rate-Based Distillation 223


Rate-Based Binary Mass
Transfer Coefficient Subroutine
Calling Sequence for Binary Mass Transfer Coefficients

SUBROUTINE usrmtrfc (KSTG, NCOMPS, IDX, NBOPST, KPDIAG, XCOMPB,
FRATEL, YCOMPB, FRATEV, PRESS, TLIQ, TVAP,
AVMWLI, AVMWVA, VISCML, DENMXL, SIGMAL,
VISCMV, DENMXV, AREAIF, PREK, EXPKD, COLTYP,
USRCOR, TWRARA, COLDIA, HTPACK, PACSIZ,
SPAREA, CSIGMA, PFACT, PKPRMS, VOIDFR,
IPAKAR, IPTYPE, IVENDR, IPMAT, IPSIZE,
WEIRHT, DCAREA, ARAACT, FLOPTH, NPASS,
WEIRL, IFMETH, SYSFAC, HOLEAR, ITTYPE,
TRASPC, PITCH, IPHASE, NINT, INT, NREAL,
REAL)
Subroutine name you entered on the RadFrac | User Transfer

Subroutines | Mass Transfer sheet.

Argument List for Binary Mass Transfer Coefficients


Variable I/O† Type Dimension Description and Range

KSTG I INTEGER — Stage number


NCOMPS I INTEGER — Number of components
IDX I INTEGER NCOMPS Component index vector
NBOPST I INTEGER 6 Physical property option set vector
KPDIAG I INTEGER — Physical property diagnostic code
XCOMPB I REAL*8 NCOMPS Bulk liquid mole fraction
FRATEL I REAL*8 — Flow of liquid (kgmole/s)
YCOMPB I REAL*8 NCOMPS Bulk vapor mole fraction
FRATEV I REAL*8 — Flow of vapor (kgmole/s)
PRESS I REAL*8 — Pressure (N/m2)
TLIQ I REAL*8 — Liquid temperature (K)
TVAP I REAL*8 — Vapor temperature (K)
AVMWLI I REAL*8 — Average molecular weight of liquid mixture
(kg/kgmole)
AVMWVA I REAL*8 — Average molecular weight of vapor mixture
(kg/kgmole)
VISCML I REAL*8 — Viscosity of liquid (N-s/m2)
DENMXL I REAL*8 — Density of liquid mixture (kgmole/m3)
SIGMAL I REAL*8 — Surface tension of liquid (N/m)
VISCMV I REAL*8 — Viscosity of vapor (N-s/m2)
DENMXV I REAL*8 — Density of vapor mixture (kgmole/m3)

224 20 User Subroutines for Rate-Based Distillation


Variable I/O† Type Dimension Description and Range

AREAIF I REAL*8 — Interfacial area


When COLTYP = 1, AREAIF has units m2/m3
of packing volume
When COLTYP = 2, AREAIF has units m2/m2
of active tray area
PREK O REAL*8 — Mass transfer coefficient factor. See note.
††

EXPKD O REAL*8 — Mass transfer coefficient exponent. See note.


††

COLTYP I INTEGER — Type of column: 1 = Packed, 2 = Tray


USRCOR I INTEGER — Choice of user correlation
TWRARA I REAL*8 — Cross-sectional area of tower (m2)
COLDIA I REAL*8 — Column diameter (m)
HTPACK I REAL*8 — Height of packing in the section (m)
PACSIZ I REAL*8 — Size of packing (m)
SPAREA I REAL*8 — Specific surface area of packing (m2/m3)
CSIGMA I REAL*8 — Critical surface tension of packing material
(N/m)
PFACT I REAL*8 — Packing factor (1/m)
PKPRMS I INTEGER 20 Packing parameters (see Packing Parameters)
VOIDFR I INTEGER — Void fraction of packing
IPAKAR I INTEGER — Packing arrangement: 1 = Random, 2 =
Structured
IPTYPE I INTEGER — Packing Type (See Packing Type Specification)
IVENDR I INTEGER — Packing vendor code (See Packing Vendor
Specification)
IPMAT I INTEGER — Packing material code (See Packing Material
Specification)
IPSIZE I INTEGER — Packing size code (See Packing Size
Specification)
WEIRHT I REAL*8 — Height of exit weir (m)
DCAREA I REAL*8 — Area of downcomer (m2)
ARAACT I REAL*8 — Active area available on tray (m2)
FLOPTH I REAL*8 — Flowpath length (m)
NPASS I INTEGER — Number of tray passes
WEIRL I REAL*8 — Length of exit weir (m)
IFMETH I INTEGER — Flooding calculation method, required for
sieve tray
SYSFAC I REAL*8 — System factor, required for sieve tray
HOLEAR I REAL*8 — Ratio of total hole area to active area,
required for sieve tray
ITTYPE I INTEGER — Tray type: 1 = bubble cap, 2 = sieve, 3 =
Glitsch Ballast, 4 = Koch Flexitray, 5 =
Nutter Float Valve
TRASPC I REAL*8 — Tray spacing (m)
PITCH I REAL*8 — Sieve hole pitch (m), required for sieve trays
IPHASE I INTEGER — IPHASE: 0 = Liquid, 1 = Vapor

20 User Subroutines for Rate-Based Distillation 225


Variable I/O† Type Dimension Description and Range

NINT I INTEGER — Number of integer parameters (see Integer


and Real Parameters)
INT I INTEGER NINT Vector of integer parameters (see Integer and
Real Parameters)
NREAL I INTEGER — Number of real parameters (see Integer and
Real Parameters)
REAL I REAL*8 NREAL Vector of real parameters (see Integer and
Real Parameters)
† I = Input to subroutine, O = Output from subroutine
†† BINMTP  PREK  DIFFUSIVIT Y
EXPKD
, where BINMTP is the binary mass
transfer coefficients with molar density and interfacial area included, in the units of
kgmole/s

Integer and Real Parameters


You can use integer and real retention parameters by specifying the number
on the RadFrac | User Transfer Subroutines | Mass Transfer sheet. You
can initialize these parameters by assigning values on the same sheet. The
default values are USER_RUMISS for real parameters and USER_IUMISS for
integer parameters. Aspen Plus retains these parameters from one call to the
next. The variables USER_IUMISS and USER_RUMISS are located in labeled
common PPEXEC_USER (see Appendix A).

Example: Binary Mass Transfer Coefficients Routine


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, NPASS, IFMETH,
+ ITTYPE, NINT, INT(NINT), IPHASE, NREAL
REAL*8 XCOMPB(NCOMPS), FRATEL, YCOMPB(NCOMPS), FRATEV,
+ PRESS, TLIQ, TVAP, AVMWLI, AVMWVA, VISCML, DENMXL,
+ SIGMAL, VISCMV, DENMXV, AREAIF, PREK, EXPKD,
+ TWRARA, COLDIA, HTPACK, PACSIZ, SPAREA, CSIGMA,
+ PFACT, PKPRMS(20), VOIDFR, WEIRHT, DCAREA, ARAACT,
+ FLOPTH, WEIRL, SYSFAC, HOLEAR, TRASPC, PITCH,
+ REAL(NREAL)
C Declare local variables used in the user correlations
C
REAL*8 RS_BennettHL
REAL*8 RS_BennettA
REAL*8 RS_BennettC
REAL*8 ScLB, ScVB, rhoLms, rhoVms, ReLPrm,
+ dTemp, uL, uV, Fs, QL,
+ C, alphae, hL, ShLB, ReV
C
C Instead of computing BINMTP from diffusivity as in RATEFRAC
C compute PREK and EXPKD for Rate-Based Distillation
C

226 20 User Subroutines for Rate-Based Distillation


IF (COLTYP .EQ. 1) THEN
C
C**** PACKED COLUMN
C
IF (USRCOR .EQ. 1) THEN
C user subroutine example for packed column: Onda 68
C
C Onda, K., Takeuchi, H. and Okumoto, Y., "Mass Transfer
C Coefficients between Gas and Liquid Phases in Packed
C Columns", J. Chem. Eng. Jap., 1, (1968) P56
C
IF (IPHASE.EQ.0) THEN
C
C Liquid phase
C
rhoLms = DENMXL * AVMWLI
uL = FRATEL / TWRARA / DENMXL
ReLPrm = rhoLms * uL / VISCML / AREAIF
dTemp = (rhoLms/9.81D0/VISCML)**(0.33333333D0)
dTemp = 0.0051D0 * (ReLPrm**(0.66666667D0))
+ *((SPAREA*PACSIZ)**(0.4D0)) / dTemp
C
C CONVERT K FROM M/S TO KMOL/S
dTemp = dTemp * TWRARA * HTPACK * AREAIF * DENMXL
C
C COMPOSITION INDEPENDENT PART OF SCHMIDT NUMBER
ScLB = VISCML / rhoLms
C
PREK = dTemp / DSQRT(ScLB)
EXPKD = 0.5D0
C
ELSE
C
C Vapor phase
C
rhoVms = DENMXV * AVMWVA
uV = FRATEV / TWRARA / DENMXV
ReV = rhoVms * uV / VISCMV / SPAREA
dTemp = SPAREA*PACSIZ
dTemp = dTemp * dTemp
IF (PACSIZ .GE. 0.015D0) THEN
dTemp = 5.23D0 / dTemp
ELSE
dTemp = 2.0D0 / dTemp
END IF
dTemp = dTemp * (ReV**(0.7D0)) * SPAREA
C
C CONVERT K FROM M/S TO KMOL/S
dTemp = dTemp * TWRARA * HTPACK * AREAIF * DENMXV
C
C COMPOSITION INDEPENDENT PART OF SCHMIDT NUMBER
ScVB = VISCMV / rhoVms
C
PREK = dTemp * ScVB ** 0.33333333D0
EXPKD = 0.66666667D0
END IF
C END OF IF (IPHASE)

20 User Subroutines for Rate-Based Distillation 227


C
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: AIChE 58
C
C AIChE, Bubble Tray Design Manual: Prediction of
C Fractionation Efficiency, New York, 1958
C
C For bubble cap, valve, and sieve trays
C
IF (IPHASE.EQ.0) THEN
C
C Liquid phase
C
rhoVms = DENMXV * AVMWVA
rhoLms = DENMXL * AVMWLI
uV = FRATEV /DENMXV /ARAACT
Fs = uV * DSQRT(rhoVms)
C = RS_BennettC(WEIRHT)
QL = FRATEL/DENMXL
alphae = RS_BennettA(uV, rhoLms, rhoVms)
hL =RS_BennettHL (alphae, WEIRHT, C, QL, WEIRL)
dTemp = 19700.0D0 *(0.4D0*Fs+0.17D0) * hL
+ * ARAACT * DENMXL
C
PREK = dTemp
EXPKD = 0.5D0
C
ELSE
C Vapor phase
rhoVms = DENMXV * AVMWVA
uV = FRATEV /DENMXV /ARAACT
Fs = uV * DSQRT(rhoVms)
QL = FRATEL/DENMXL
dTemp = 0.776 + 4.57*WEIRHT - 0.238*Fs
+ + 104.8*QL/WEIRL
dTemp = dTemp * uV * ARAACT * DENMXV
C
C COMPOSITION INDEPENDENT PART OF SCHMIDT NUMBER
ScVB = VISCMV / rhoVms
C
PREK = dTemp /DSQRT(ScVB)
EXPKD = 0.5D0
END IF
C END OF IF (IPHASE)
END IF
C END OF IF (USRCOR)
END IF
C END OF IF (COLTYP)
RETURN
END

228 20 User Subroutines for Rate-Based Distillation

You might also like