Aspen Plus自动化

作者 叶师兄 · 版本 3.8.0 · 更新于 2026-10-19 15:11 ·507.7 KB

通过 Python 原生 COM 接口驱动 Aspen Plus V11/V14,自动化搭建、修改、运行并诊断化工流程模拟,覆盖组分与物性方法、精馏塔、换热与流体设备、反应器、收敛策略及参数拟合等场景。

化工模拟流程模拟COM自动化AspenPlusPython
将提示词发送给你的 AI,即可安装该 Skill
请根据 https://skillhub.cn/install/skillhub.md,安装 @user_6eed38f8/aspen-plus-automation。

✓已通过基础校验

名称、分类、版本与作者信息完整,安装包与文档齐备。

✓可直接使用

提供 Markdown 文档与配置示例,下载后按文档说明使用即可。

Skill 详情

Aspen Plus Automation (V11 / V14 native COM recipes)

Aspen Plus 自动化(V11 / V14 原生 COM 配方)

v3.8.0 — case-library refresh (2026-10-10): both shipped end-to-end RadFrac cases now run a methanol–water duty (feed 50 wt% methanol, 10 000 kg/h → top ≥99.5 wt%), replacing ethanol–water in the main Design-Spec case v11_fast_radfrac_designspec.py and in case17_binary_param_fit.py (case2/7/12/16 keep ethanol–water only as a working medium). Running the new duty falsified two statements the recipes had been carrying: (1) for a near-total-recovery target the manipulated variable must be MOLE-RR, not MOLE-D — measured w_D moved 1.0e-5 over D 150→156 kmol/h but 6.3e-3 over RR 1.2→3.2, and MOLE-RR converged first try (BLKSTAT=0, PER_ERROR=0); §9's "prefer MOLE-D / MOLE-RR can crash" advice is now scoped to targets sitting mid-range, not to this class. (2) Design-Spec\DS-1\Output\FINAL_VAL is a LIST node — its parent .Value is the row counter 1, the answers are FINAL_VAL\1 (MANIPULATED) and \2 (target expression); and the converged value is not written back to Input\BASIS_RR (read Blocks\<b>\Output\RR). Also fixed: the main case had been writing 25 K into a MET (K/atm/kmol/h) document since it was written — §1.6 filed that lesson but the reference case never applied it. Verified live: w_METHANOL,D = 0.995015836, recovery 0.990886, D+B = 10 000.07 kg/h. Details: CHANGELOG.md.
v3.8.0 — 案例库刷新(2026-10-10):两个已交付的端到端 RadFrac 案例现在都运行甲醇–水工况(进料 50 wt% 甲醇,10 000 kg/h → 塔顶 ≥99.5 wt%),取代了主 Design-Spec 案例 v11_fast_radfrac_designspec.py 和 case17_binary_param_fit.py 中的乙醇–水(case2/7/12/16 仅将乙醇–水保留为工作介质)。运行新工况证伪了配方一直沿用的两条陈述:(1) 对于接近全回收的目标,操纵变量必须是 MOLE-RR,而非 MOLE-D——实测 w_D 在 D 从 150→156 kmol/h 时仅变化 1.0e-5,但在 RR 从 1.2→3.2 时变化 6.3e-3,且 MOLE-RR 首次尝试即收敛(BLKSTAT=0,PER_ERROR=0);§9 中“优先用 MOLE-D / MOLE-RR 可能崩溃”的建议现在仅适用于处于中间范围的目标,不适用于此类。(2) Design-Spec\DS-1\Output\FINAL_VAL 是一个 LIST 节点——其父节点 .Value 是行计数器 1,答案是 FINAL_VAL\1(MANIPULATED)和 \2(目标表达式);且收敛值不会写回 Input\BASIS_RR(应读取 Blocks\<b>\Output\RR)。另已修复:主案例自编写以来一直将 25 K 写入 MET(K/atm/kmol/h)文档——§1.6 记录了这一教训,但参考案例从未应用。实测验证:w_METHANOL,D = 0.995015836,回收率 0.990886,D+B = 10 000.07 kg/h。详情见 CHANGELOG.md。
Do not re-inflate this file: release notes go to CHANGELOG.md, recipe detail goes to references/. Keep only the current release note here (the audit gate fails the build if a second > v… block appears).
不要重新膨胀此文件:发布说明写入 CHANGELOG.md,配方细节写入 references/。此处仅保留当前发布说明(若出现第二个 > v… 块,审计门禁将使构建失败)。

⚡ Default working policy (since v3.1.0; takes precedence over the older flow)

⚡ 默认工作策略(自 v3.1.0 起;优先于旧流程)

  1. Model Analysis Tools are opt-in: Design-Spec (§9), Sensitivity (§25), Optimization and Constraint are created only when the user explicitly asks for them. The default way to hit a target is direct RadFrac simulation + same-session parameter tuning (§35: change BASIS_D/BASIS_RR/NSTAGE → app.Reinit() → Run2, with a Python-side bisection/secant search; usually 2–4 iterations to converge). DSTWU shortcut estimation (§26) is not a Model Analysis Tool — use it freely when you need stage count / feed-stage starting values.
  2. Fast path (cuts skill-call and coding time): before writing code read only the recipe sections directly relevant to the task (the base chain §1–§8 plus the one task-matching section), and copy the nearest verified template whole, then change its parameters — do not read the references end to end or check section by section; run everything in one script and one COM session (each connect+Quit cycle costs ≈13 s) and do repeated iterations inside that session per §35; always reuse common_aspen.py helper functions instead of rewriting them.
  3. Lean output (cuts result and reporting time): by default report only "target-hit verdict + key stream table + convergence status (BLKSTAT/CVSTAT/PER_ERROR) + material-balance check", and deliver it as a four-part in-chat table (task / method / result / verification) — do not generate long report files. HTML/PDF/long-document reports are written only when the user explicitly asks.

⚡ Preferred path: read com_recipes.md, reuse verified templates

⚡ 首选路径:阅读 com_recipes.md,复用已验证模板

Before writing any automation code, read references/com_recipes.md — the core native COM recipe, verified node-by-node on real Aspen Plus V11.0 and covering the everyday chain before any run; its head carries a §→file index. Deep-dive topics live in 7 companion volumes (references/com_recipes_*.md, listed in the tree below) — open one only when the task needs it. Before writing any dimensional value, read references/unit_systems.md — it is the authority for which unit a COM node / .bkp code uses (base sets SI/ENG/MET, named sets, <type> <index> codes, per-node units, conversion):

在编写任何自动化代码之前,请阅读 references/com_recipes.md——这是核心原生 COM 配方,已在真实 Aspen Plus V11.0 上逐节点验证,涵盖任何运行前的日常链条;其开头带有 §→文件索引。深入专题位于 7 个配套卷(references/com_recipes_*.md,见下方目录树)——仅在任务需要时打开。在写入任何量纲数值之前,请阅读 references/unit_systems.md——它是 COM 节点 / .bkp 代码使用何种单位的权威依据(基本单位集 SI/ENG/MET、命名集、<type> <index> 代码、逐节点单位、换算):

  • Connect/init (§1), multi-version adaptation (§1.1: ProgID major.minor↔version map + list_aspen_versions()/connect_aspen() auto-detect/explicit version), unit system & property method (§2), component 2-D table add (§3: InsertRow/SetLabel writing, dedup/error list)
  • 连接/初始化(§1)、多版本适配(§1.1:ProgID major.minor↔版本映射 + list_aspen_versions()/connect_aspen() 自动检测/显式版本)、单位制与物性方法(§2)、组分二维表添加(§3:InsertRow/SetLabel 写入、去重/错误列表)
  • Stream create (§4.1: "name!MATERIAL" format), block create (§4.2: "name!model" + common model-name list), port connect (§4.3), Mixer (§4.4/§14: Mixer port F(IN)/P(OUT) + the fatal must-set Input\PRES)
  • 流股创建(§4.1:"name!MATERIAL" 格式)、模块创建(§4.2:"name!model" + 常用模型名列表)、端口连接(§4.3)、Mixer(§4.4/§14:Mixer 端口 F(IN)/P(OUT) + 致命的必设项 Input\PRES)
  • RadFrac full params (§5), composition input (§6: TEMP/PRES/per-component FLOW three essentials + mass→mole flow conversion)
  • RadFrac 完整参数(§5)、组成输入(§6:TEMP/PRES/逐组分 FLOW 三要素 + 质量→摩尔流量换算)
  • Run & wait (§7), result read (§8: MET temperature read in K)
  • 运行与等待(§7)、结果读取(§8:MET 温度以 K 读取)
  • Design Spec (§9: full config + three target-achievement strategies + dual-purity pin-D recipe; opt-in since v3.1.0 — default target path is §35 in-session parameter tuning)
  • Design Spec(§9:完整配置 + 三种目标达成策略 + 双纯度 pin-D 配方;自 v3.1.0 起为可选启用——默认目标路径为 §35 会话内参数调优)
  • Save/export/bkp·his diagnosis (§10), local help (§11), speed-up list (§12)
  • 保存/导出/bkp·his 诊断(§10)、本地帮助(§11)、加速清单(§12)
  • Pressure-changing equipment (§13: Pump full chain verified; Compr/Valve input validation, run-warning root cause & COM instance hygiene), fluid-handling units (§23: Pump turbine mode, Compr SEFF default 0.72, MCompr multi-stage full recipe with list writing/cooler propagation/equal-pressure-ratio limit, liquid volumetric flow two-step conversion RES_VOLFLOW=L/min)
  • 变压设备(§13:Pump 全链已验证;Compr/Valve 输入校验、运行警告根因与 COM 实例卫生)、流体输送单元(§23:Pump 透平模式、Compr SEFF 默认 0.72、MCompr 多级完整配方含列表写入/冷却器传播/等压比限制、液体体积流量两步换算 RES_VOLFLOW=L/min)
  • Heat+flash pressure-reduction (§16), crystallizer+solid components+salt balance (§17: CISOLID solid substream + Chemistry salt balance + dual STOIC + solubility table, 7-block full recycle converged measured), simple separators & stream-manipulation blocks (§22: Flash3/Decanter/Sep/FSplit/Mult/Dupl port & input-path enumeration; Dupl 0x40 access-bit trap; Flash3 heat-stream→adiabatic trap; Sep/FSplit split-table structure; bkp text-structure notes)
  • 加热+闪蒸降压(§16)、结晶器+固体组分+盐平衡(§17:CISOLID 固体子流股 + Chemistry 盐平衡 + 双 STOIC + 溶解度表,7 模块全循环已收敛实测)、简单分离器与流股操纵模块(§22:Flash3/Decanter/Sep/FSplit/Mult/Dupl 端口与输入路径枚举;Dupl 0x40 访问位陷阱;Flash3 热流股→绝热陷阱;Sep/FSplit 分割表结构;bkp 文本结构说明)
  • Heat-transfer units (§24: Heater+utility STEAM hookup, HeatX counter-current DUTY/outlet-T spec, IAPWS95 enum trial), process tools (§25: S-1 sensitivity full recipe with native-unit iron rule & readback refresh trigger, Calculator, DS's VARYSENTENCE two values), column design (§26: DSTWU shortcut→RadFrac rigorous→COL-SPECS VARY), column internals hydraulics (§27: Tray Sizing/Rating mixed prefix, Pack Sizing enum re-submit), reactor bkp line-folding surgery (§28: swallow root cause=single line too long, fold iron rules, RSTOIC/RYIELD/REQUIL/RGIBBS native sentence forms, unit traps, five-step surgery recipe, §28.7 kinetic RCSTR/RPLUG from-scratch + global unit-code table + four traps)
  • 传热单元(§24:Heater+公用工程 STEAM 接入、HeatX 逆流 DUTY/出口-T 规格、IAPWS95 枚举试探)、过程工具(§25:S-1 灵敏度完整配方含原生单位铁律与回读刷新触发、Calculator、DS 的 VARYSENTENCE 两个值)、塔设计(§26:DSTWU 简捷→RadFrac 严格→COL-SPECS VARY)、塔内件水力学(§27:Tray Sizing/Rating 混合前缀、Pack Sizing 枚举重新提交)、反应器 bkp 折行手术(§28:吞行根因=单行过长、折行铁律、RSTOIC/RYIELD/REQUIL/RGIBBS 原生语句形式、单位陷阱、五步手术配方、§28.7 动力学 RCSTR/RPLUG 从零构建 + 全局单位代码表 + 四个陷阱)
  • Temperature-unit & enthalpy-basis traps (§18), multi-block full-flowsheet troubleshooting methodology (§19: single-block isolate → compare → matrix → cross-validate)
  • 温度单位与焓基准陷阱(§18)、多模块全流程排障方法论(§19:单模块隔离 → 对比 → 矩阵 → 交叉验证)
  • HYSYS → Aspen Plus flowsheet reproduction map (§29: 11-type unit correspondence table, partial-condenser iron rule "PARTIAL-V only yields vapor distillate → total condenser + same-T-same-P Flash2", RadFrac two-end pressure use only PRES1, Extract→N-stage Mixer+Decanter cascade, RStoic CONVEX stoichiometry iron rule & design-spec sampling feed stream fatal trap, Python manual tear iteration, RPlug three iron rules, sharp-split draw mass-balance pinning, reproduction quality checklist)
  • HYSYS → Aspen Plus 流程图复现映射(§29:11 类单元对应表、部分冷凝器铁律“PARTIAL-V 仅产生气相馏出物 → 全凝器 + 同温同压 Flash2”、RadFrac 两端压力仅用 PRES1、Extract→N 级 Mixer+Decanter 级联、RStoic CONVEX 化学计量铁律与 design-spec 采样进料流股致命陷阱、Python 手动撕裂迭代、RPlug 三条铁律、锐分割抽出物料平衡钉定、复现质量检查清单)
  • Reactor automation (§20: pure COM cannot attach reaction set to RCSTR/RPlug → official base-subtraction surgery; POWERLAW injection paradigm §20.4; RPlug COUNTER-COOL §20.5)
  • 反应器自动化(§20:纯 COM 无法将反应集附加到 RCSTR/RPlug → 官方基类减法手术;POWERLAW 注入范式 §20.4;RPlug COUNTER-COOL §20.5)
  • V11 diagnostic toolbox & API differences (§21: chained-call iron rule / doc unit system / NextIncomplete / AttributeValue / no COMPSTATUS / gen_py fix)
  • V11 诊断工具箱与 API 差异(§21:链式调用铁律 / 文档单位制 / NextIncomplete / AttributeValue / 无 COMPSTATUS / gen_py 修复)
  • Electrolyte absorption column full-flowsheet reproduction (§31: global GHEN/GCHEMISTRY/GTRUE_COMPS is the only correct hook for electrolyte chemistry, block-level TRUE-COMPS=YES deadlocks the engine, stage-efficiency STAGE_EFF text surgery, ABSORBER=YES ordering rule & VD(OUT), Mixer/Heater/FSplit default pressure 0, bkp 72-column fold & regex anchor, ENG→METCHEM direct write deadlock & result-comparison conversion, recycle-flowsheet reproduction checklist)
  • 电解质吸收塔全流程复现(§31:全局 GHEN/GCHEMISTRY/GTRUE_COMPS 是电解质化学的唯一正确挂钩,模块级 TRUE-COMPS=YES 会使引擎死锁,级效率 STAGE_EFF 文本手术,ABSORBER=YES 顺序规则与 VD(OUT),Mixer/Heater/FSplit 默认压力 0,bkp 72 列折行与正则锚点,ENG→METCHEM 直接写入死锁与结果对比换算,循环流程复现检查清单)
  • **Solids Modelin
  • **固体建模
下载后解压即可使用

文件

文件名
66eef986972e69296bcb5ef50ecca600.zip
包大小
507.7 KB
SHA256
e90aac78aae47abb0ab66730fd8c60c125ad2737b55eb60d2ffab62a4241a3e2
来源
本地
存储
COS

评论

暂无评分,欢迎发表第一条评价

还没有评论,来抢沙发吧

    版本历史

    1. v3.8.0最新2026-10-19
    梦马论坛-以梦为马,不负韶华

    化工人的交流乐园

    联系我们

    • 投诉建议 相关侵权、举报、投诉及建议等,请发 E-mail:admin@meng.horse
    返回顶部