Professional Documents
Culture Documents
How To Write You Own User Kinetics Fortran Routine 06 UserKinetics PDF
How To Write You Own User Kinetics Fortran Routine 06 UserKinetics PDF
User Kinetics
Objective:
How to write you own User Kinetics Fortran
routine
Aspen Plus References: User Models Reference Manual , Chapter 11. User Kinetics Subroutines
• Have access to
– Aspen Plus physical property system through the physical
property monitors
– Pure component physical property parameters
– Parameters specific to a reactor
Note:
Rates per unit volume are multiplied by the volume
occupied by the reacting phase
Note:
Rates per unit volume are multiplied by the cross-
sectional area covered by the reacting phase
Passing Parameters
• User constants and variables are available to kinetics
routine in the real and integer vectors
• They can be defined in two places
– Reactions Reactions Subroutine sheet
• Global variables
• Vector names in subroutine REALR and INTR
– The User Subroutine Kinetics sheet, for the RCSTR, RBatch
and RPlug reactors
• Local to that reactor
• Vector names in subroutine REAL and INT
Size = NC
Size = NCOMP Stream Liquid
Order Components.Main Mole Fractions
X IDX 1 Water 0.3
0.3 1 2 Ethanol 0.3
0.3 2 3 Methanol 0
0.4 4 4 Benzene 0.4
5 Nitrogen 0
MW Molecular weight(kg/kgmole)
XMW(I) = LMW + I
– Define XMW as an integer
INTEGER XMW
SUM=0
DO 10 I=1,NC
SUM=SUM+B(XMW(I))
10 CONTINUE
3
RBTC_VOLRB Reactor volume (m )
3
RXN_RCSTRR Reactor volume (m ),
Reactor volume fraction
• Alternatively
– Write a Dynamic Linking Options (DLOPT) file which specifies
the objects to use
Fortran Compiler
• To develop user kinetics routines on the PC you require
a Digital Visual Fortran 5.0 compiler
• End users do not required a compiler, distribute file as as
shared library
– Create shared libraries with the command:
asplink
DUPL
FEED FEEDPL PRODUCT
FEEDUK
CSTR-UK
PRODUK
Filename: WK7-USERKIN.BKP
• Reaction
Acetone + Allyl Alcohol → N-Propyl Propionate
r = K*EXP(-E/RT)*CACB0.5
Where
CA = Concentration of Allyl-Alcohol, in kmol/m3
CB = Concentration of Acetone, in kmol/m3