User-added Unit Operation - Technical Information
The PRO/II User-added Unit Operation capability enables users to add their own Fortran subroutines to simulate any type of unit operation or to perform calculations on flowsheet parameters. The subroutine must first be linked into the PRO/II program. It then is accessed in the same way as any other unit operation. Creating and linking user-added subroutines to PRO/II is fully described in the PRO/II Data Transfer System and User-Added Subroutine Users’ Guide. Contact your local SimSci representative for more complete information.
User-added Unit Operations have access to the PRO/II physical property data. Also, they may call the PRO/II flash and property calculation subroutines. Other information, such as input and output dimensional units, also is available. When transport properties are required in a User-added Unit Operation, a suitable method must be selected in the Thermodynamics - Transport Properties Window.
Calculation Method
User-added Unit Operations may consist of two separate Fortran subroutines. The first routine is a "calculation" routine that executes during flowsheet convergence (i.e., at "calculation time"). The other routine is an "output" routine that executes during output data generation (i.e., after the flowsheet has solved, at "output time"). A User-added Unit Operation may use either or both of these subroutines.
If the User-added Unit Operation supplies information to another unit operation, it must perform its calculations flowsheet convergence. The information may be packaged as a product stream that feeds another unit. Alternatively, it may be transferred to a controller, or by using the Define system. Results of the "calculation" routine may be stored for use by a companion "output" subroutine. Output subroutines can be constructed to perform further calculations, as well as produce output reports.
Sometimes it is desirable to perform calculations only at "output time", after all flowsheet convergence calculations are complete. This situation often occurs when the desired calculations are not necessary to converge the flowsheet, and only require converged flowsheet information. In such a case, the calculations may be implemented in an "output" routine called only at output time. An advantage of this approach is that a separate "calculation time" subroutine is not required.
A User-added Unit Operation may use a VLE or VLLE method for flash calculations. See VLE Model and VLLE Model for more details. It is up to the developer to ensure that the phases are handled correctly.
Feeds and Products
Each User-added Unit Operation supports up to 25 feed streams (prior to version 5.5, this limit was 10). The subroutine can retrieve each feed separately. If feeds are to be mixed and flashed, this must be done by the subroutine itself. User-added Unit Operations executed during flowsheet convergence must have at least one feed stream. Those executed only at output time need not have any feeds.
User-added Unit Operations executed during flowsheet convergence may have up to 25 product streams (prior to version 5.5, this limit was 10). Each product may have any combination of phases. User-added Unit Operations calculated only at output time cannot have any product streams.
Other Types of User Added Subroutines
PRO/II supports a variety of user-added subroutines besides unit operations models. These include thermodynamic property generators (UKHSxx routines), transport property generators (UTRANx routines), reaction kinetics calculators (USKINx routines, and pipe pressure drop predictors (PIPUSx routines). Discussion of these types of user-added routines is beyond the current scope of the help system. Please refer to the PRO/II Data Transfer and User-Added Subroutine User’s Guide for more information.