没有合适的资源?快使用搜索试试~ 我知道了~
Aspen user models
需积分: 16 9 下载量 162 浏览量
2018-01-23
13:14:47
上传
评论 1
收藏 1.48MB PDF 举报
温馨提示
试读
339页
Aspen与excel 、fortran等建立外接,可以使用aspen plus user model
资源推荐
资源详情
资源评论
User Models
Aspen Plus
Version Number: V7.3
March 2011
Copyright (c) 1981-2011 by Aspen Technology, Inc. All rights reserved.
Aspen Plus, aspenONE, the aspen leaf logo and Plantelligence and Enterprise Optimization are trademarks or
registered trademarks of Aspen Technology, Inc., Burlington, MA.
All other brand and product names are trademarks or registered trademarks of their respective companies.
This document is intended as a guide to using AspenTech's software. This documentation contains AspenTech
proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use of
the software and the application of the results obtained.
Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software
may be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO
WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENTATION,
ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Aspen Technology, Inc.
200 Wheeler Road
Burlington, MA 01803-5501
USA
Phone: (1) (781) 221-6400
Toll Free: (1) (888) 996-7100
URL: http://www.aspentech.com
Contents iii
Contents
Who Should Read this Guide ...................................................................................1
Introducing Aspen Plus ...........................................................................................2
Related Documentation .....................................................................................3
Technical Support ............................................................................................4
1 Writing and Using User Models............................................................................5
Fortran User Models .........................................................................................6
Moving to the Intel Fortran Compiler ........................................................7
Configuring Aspen Plus for Your Fortran Compiler.......................................7
Compiler-Compatible Write Statements.....................................................8
Writing Fortran User Models ....................................................................9
Dynamic Linking Overview .................................................................... 10
Compiling Fortran User Models............................................................... 11
Supplying Fortran User Models to Aspen Plus............................................ 11
Creating Fortran Shared Libraries Using Asplink ....................................... 12
Writing DLOPT Files .............................................................................. 12
Specifying DLOPT Files for Aspen Plus Runs ............................................. 13
Modifying Asplink ................................................................................. 14
Using the IMSL Library with Aspen Plus................................................... 14
2 Calling the Flash Utility .....................................................................................19
Flash Utility FLSH_FLASH ................................................................................ 19
NBOPST .............................................................................................. 22
Flash Types ......................................................................................... 22
RETN .................................................................................................. 22
IRETN ................................................................................................. 23
Flash Results Stored in COMMON ..................................................................... 23
3 Calling Physical Property Monitors ....................................................................25
Calling Sequences for Thermodynamic Property Monitors .................................... 26
Calling Sequences for Transport Property Monitors ............................................. 28
Calling Sequences for Nonconventional Property Monitors ................................... 29
Calling Sequences for Thermodynamic and Transport Property Monitors with
Derivatives .................................................................................................... 29
Argument Descriptions for Physical Property Monitors ......................................... 30
IDX .................................................................................................... 32
IDXNC ................................................................................................ 33
Y, X, X1, X2, Z, CS ............................................................................... 33
CAT .................................................................................................... 33
NBOPST .............................................................................................. 33
KDIAG ................................................................................................ 34
iv Contents
Calculation Codes................................................................................. 34
Phases ................................................................................................ 34
CALPRP Results.................................................................................... 34
Derivatives .......................................................................................... 35
Calling Sequences for PROP-SET Property Monitors ............................................ 36
Argument Descriptions for PROP-SET Property Monitors ...................................... 37
PROPS ................................................................................................ 38
PHASES .............................................................................................. 38
KWDBS ............................................................................................... 38
XPCLV................................................................................................. 38
KULAB ................................................................................................ 39
CALUPP Results.................................................................................... 39
Example of Calling CALUPP Multiple Times to Retrieve Multiple Properties.............. 40
4 Calling Utility Subroutines.................................................................................44
Packing Utilities ............................................................................................. 44
Report Header Utility ...................................................................................... 45
ISECT ................................................................................................. 46
Aspen Plus Error Handler................................................................................. 46
Terminal File Writer Utility ............................................................................... 48
Utilities to Determine Component Index ............................................................ 49
Component Index Example.................................................................... 50
Plex Offset Utility ........................................................................................... 50
CAS Number Utility......................................................................................... 52
Other Utility................................................................................................... 52
The Fortran WRITE Statement ......................................................................... 52
5 User Unit Operation Models...............................................................................55
User and User2 Fortran Models ........................................................................ 55
Stream Structure and Calculation Sequence ............................................ 58
NBOPST .............................................................................................. 59
Size.................................................................................................... 59
Integer and Real Parameters ................................................................. 59
Local Work Arrays ................................................................................ 60
Simulation Control Guidelines ................................................................ 60
History File.......................................................................................... 62
Terminal File........................................................................................ 62
Report File .......................................................................................... 62
Control Panel ....................................................................................... 62
Incorporating Excel Worksheets into User2........................................................ 63
Extending the User2 Concept................................................................. 63
Excel File Name ................................................................................... 63
Fortran Routine.................................................................................... 63
The Excel Template .............................................................................. 64
Tables................................................................................................. 64
The Helper Functions ............................................................................ 66
The Hook Functions .............................................................................. 68
The Sample Workbook .......................................................................... 69
Creating or Converting Your Own Excel Models ........................................ 70
Converting an Existing Excel Model......................................................... 71
Customizing the Fortran Code ................................................................ 72
Accessing User2 Parameters ............................................................................ 76
Contents v
Accessing parameters by position........................................................... 76
Accessing parameters by name .............................................................. 77
Other Helper Functions ......................................................................... 79
User3 Fortran Models...................................................................................... 80
Stream Structure and Calculation Sequence ............................................ 84
NBOPST .............................................................................................. 84
USER3 Data Classifications .................................................................... 84
Size.................................................................................................... 86
Variable Types and Mapping Concepts .................................................... 86
Scaling and Units Conversion in USER3 ................................................... 88
K Codes .............................................................................................. 89
Sparsity Example ................................................................................. 91
Creating a USER3 Model........................................................................ 92
Additional User3 Subroutines ................................................................. 94
Physical Property Call Primitives........................................................... 101
Low-Level Physical Property Subroutines............................................... 104
Other Useful USER3 Utilities ................................................................ 106
Component Object Models (COM) ................................................................... 106
6 User Physical Property Models ........................................................................107
User Models for Conventional Properties.......................................................... 108
Principal User Model Subroutines for Conventional Properties............................. 112
IDX .................................................................................................. 118
Partial Component Index Vectors ......................................................... 118
X, Y, Z .............................................................................................. 119
Real and Integer Work Areas ............................................................... 119
KOP.................................................................................................. 120
KDIAG .............................................................................................. 120
Calculation Codes............................................................................... 120
Range of Applicability ......................................................................... 120
Units of Measurement ......................................................................... 121
Global Physical Property Constants ....................................................... 121
User K-Value ..................................................................................... 121
Electrolyte Calculations ....................................................................... 121
Model-Specific Parameters for Conventional Properties ..................................... 121
Universal Constant Names and Definitions............................................. 122
Naming Model-Specific Parameters....................................................... 122
Multiple Data Sets .............................................................................. 123
Parameter Retrieval...................................................................................... 124
User Models for Nonconventional Properties..................................................... 125
Using Component Attributes .......................................................................... 126
Principal User Model Subroutines for Nonconventional Properties........................ 126
IDXNC .............................................................................................. 127
Real and Integer Work Areas ............................................................... 128
KOP.................................................................................................. 128
KDIAG .............................................................................................. 128
Range of Applicability ......................................................................... 128
Model-Specific Parameters for Nonconventional Properties ................................ 129
Naming Model-Specific Parameters....................................................... 129
Accessing Component Attributes .................................................................... 129
剩余338页未读,继续阅读
资源评论
qq_30686637
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功