通过 Python 调用 Aspen Custom Modeler 的 COM 接口,自动化运行 Aspen Adsorption 变压吸附模拟,可修改进料压力、步骤时长和床层几何等参数,并提取氢气纯度与回收率等性能指标。
✓已通过基础校验
名称、分类、版本与作者信息完整,安装包与文档齐备。
✓可直接使用
提供 Markdown 文档与配置示例,下载后按文档说明使用即可。
Author: Mohammad Yazdani
Email: mohamad.yazdani7990@gmail.com
Year: 2026
作者:Mohammad Yazdani
邮箱:mohamad.yazdani7990@gmail.com
年份:2026
This repository demonstrates how to automate and extract data from Aspen Adsorption using Python through the Aspen Custom Modeler (ACM) COM interface.
本仓库演示了如何通过 Aspen Custom Modeler(ACM)COM 接口,使用 Python 对 Aspen Adsorption 进行自动化操作和数据提取。
Aspen Adsorption operates within the Aspen Custom Modeler environment, allowing users to access, modify, and control process simulations programmatically.
Aspen Adsorption 运行于 Aspen Custom Modeler 环境之中,允许用户以编程方式访问、修改和控制过程模拟。
The example focuses on a Pressure Swing Adsorption (PSA) process for hydrogen purification, serving as a foundation for automation in other cyclic adsorption processes such as VSA, TVSA, and DAC systems.
本示例聚焦于用于氢气提纯的变压吸附(PSA)过程,为其他循环吸附过程(如 VSA、TVSA 和 DAC 系统)的自动化奠定基础。
This project is intended for master's students, researchers, and engineers in Chemical and Process Engineering who are interested in integrating process modeling with Python-based automation and optimization workflows.
本项目面向化学与过程工程领域的硕士研究生、研究人员和工程师,适合对将过程建模与基于 Python 的自动化和优化工作流相集成感兴趣的人士。
Aspen-Adsorption-Automation/
│
├── H2PSA.ada (Aspen Adsorption simulation file)
├── H2PSA.py (Python automation script)
├── *.f (User-defined Fortran subprocedure files)
└── README.md (Documentation)
All simulation and subroutine files (.ada and .f) must be located in the same directory.
所有模拟文件和子程序文件(.ada 和 .f)必须位于同一目录中。
This ensures that Aspen Adsorption can properly locate and compile user-defined subroutines during model execution.
这确保 Aspen Adsorption 在模型执行期间能够正确找到并编译用户自定义子程序。
This script can also work with older Aspen Adsorption versions (v9–v13).
本脚本也可用于较旧的 Aspen Adsorption 版本(v9–v13)。
For older versions, ensure that the Aspen Custom Modeler COM server is properly registered.
对于较旧版本,请确保 Aspen Custom Modeler COM 服务器已正确注册。
You can do this by running the following command in an Administrator Command Prompt (adjusting for your version path):
您可以在管理员命令提示符中运行以下命令来完成注册(请根据您的版本路径进行调整):
"C:\Program Files\AspenTech\AMSystem V10.0\Bin\AspenModeler.exe" /regserver
To install the required Python dependency:
安装所需的 Python 依赖项:
pip install comtypes
git clone https://github.com/mohammadyazdani/Aspen-Adsorption-Automation.git
cd Aspen-Adsorption-Automation
ASPEN_PATH = r"C:\Program Files\AspenTech\AMSystem V14.0\Bin\AspenModeler.exe"
ADA_FILE = r"C:\Path\To\Your\Simulation\H2PSA.ada"
python H2PSA.py
Mohammad Yazdani
MSc Candidate in Chemical Engineering
Process Systems Engineering Enthusiast
Email: mohamad.yazdani7990@gmail.com
Mohammad Yazdani
化学工程硕士研究生
过程系统工程爱好者
邮箱:mohamad.yazdani7990@gmail.com
Released for academic and research purposes.
面向学术和研究目的发布。
Please credit the author when using or adapting this work.
使用或改编本作品时,请注明作者。
© 2026 Mohammad Yazdani. All rights reserved.
© 2026 Mohammad Yazdani。保留所有权利。