CAPE-OPEN标准化工单元模块是实现基于CAPE—OPEN标准的化工模拟软件的重要组成部分,开发完成的单元模块可以作为软件的一部分被系统识别调用,不仅实现了软件间的集成,而且单元模块的调用是通过动态链接库文件的形式完成的,很好地保护了开发者的知识产权。本文采用C++语言与COM组件技术,根据CAPE-OPEN标准开发了支持单相流和两相流压降求解的管路单元模块。对其数学模型、求解算法和用户界面分别用不同的类进行描述,通过实例将管路单元模块的计算结果同国际通用的过程模拟软件AspenPlusV7.2对比,结果表明开发的单元模块管路准确性高,具有较强的理论和实际应用价值。
The development of chemical unit module based on CAPE-OPEN standard is the fundamental of the development of chemical simulation software based on CAPE-OPEN standard. The unit module which based on CAPE-OPEN standard developed in this paper can be a part of the chemical simulation system software. Not only achieves the soitware integration and module call in the form of dynamic link library file, but also a good way to protect the intellectual property rights of developers. The author developed the unit module of pipe, using object oriented method and VC++ language and COM component technology. According to the above unit module, the mathematical model of the module is built and the solution algorithm is completed. The user interface of the unit module is completed by compiling the corresponding dynamic link library file. In the end, the loading and the invoking of the module is successfully realized in Aspen Plus V7.2 software environment, and by comparing all of the functions in the unit module, the result shows that the calculation result of the unit modules are accurate and reliable, which has strong theoretical and practical application value.