Aspen EDR Automation: Using Python COM to Drive Heat Exchanger Design Verification

Introduction

In the process industry, Aspen EDR (Exchanger Design & Rating) handles the design and rating of shell-and-tube, air coolers, plate, fired heaters, and other types of heat exchangers. Manually changing operating conditions, running cases, and copying area margins and pressure drops on the interface results in heavy repetitive labor when batch scanning parameters. If self-written scripts lack COM call sequences and variable names verified on real machines, they often encounter pitfalls in connection, unit systems, or Run return codes. Below is the introduction to the community Skill “Aspen EDR Automation” on SkillHub: wrapping pywin32-driven EDR, cross-module read/write, and batch acceptance into reusable knowledge and script guides, targeting those already doing automation in the V11.0 environment.

What is This

Aspen EDR Automation is a set of Agent-facing SKILL format skill packages, located at @user_6eed38f8/aspen-edr-automation, current version 1.4.0, classified as professional, source community, publisher user_6eed38f8 (credited as “Brother Ye” on the SkillHub page). It does not replace Aspen official software, but helps you, under the premise of Windows + Aspen EDR installed, complete opening or creating .edr files, modifying inputs, running, reading results, and batch exporting using Python + COM (pywin32, ProgID BJACWIN.BJACApp); the core reference documentation comes from V11.0 (37.0.0.380) full-link verification on real machines.

Core Features

COM Recipes and Variable Quick Reference

The three types of reference assets inside the Skill are marked as real-machine tested or survey:

  1. references/com_recipes.md: Native COM recipes, covering connection, file, application object, data access, enumeration, unit system, run, process hygiene, error codes, and other step-by-step procedures.
  2. references/tasc_variables.md: TASC shell-and-tube key variable name list.
  3. references/multimodule_variables.md: Multi-module variable quick reference for air coolers, plate, fired heaters, plate-fin, mechanical design, etc.

Scope of Automation Capabilities

Within the scope of verified materials, the Skill is applicable to:

  • Opening or creating .edr files, executing run after modifying inputs (expecting Run returns 0).
  • Reading result fields, including but not limited to: area, margin, LMTD, pressure drop, velocity, outlet temperature, tube bundle vibration, fan power, fuel efficiency, heat flux, stress, etc. (varies by module).
  • Batch parameter scanning, exporting results to CSV / JSON.

Cross-Module Engine and Cases (v1.3.0)

v1.3.0 adds a general cross-module engine edr_run_any.py and an 11-case batch runner case4, officially stated as all real-machine PASS, covering examples including: Tasc condenser/reboiler/hydrocarbon, Acol air cooler x2, Aple plate x2, Fire fired heater x2, PlateFin plate-fin, Teams mechanical design.

Covered modules (listed in materials): Tasc, Teams, Acol/Aerotran, Aple, PlateFin, Fire(FiredHeater), Hetran/Muse/Fran.

Area Margin Acceptance Bands (v1.4.0)

Starting with v1.4.0, area margin acceptance is extended to all modules, and MARGIN_FAIL can still be judged based on margin bands even when physical calculations are qualified:

Module Default Criterion Variable Description
Tasc / Acol ExcessSurfDirty Percentage
Aple AreaRatio Ratio, auto-converted
PlateFin ExchCalc_AreaRatio Ratio
Fire / Teams — No criterion, marked as N/A

Command-line side supports user specification:

  • --margin-low / --margin-high: Default 10–30%
  • --margin-metric: Can override default criterion variable

Design mode and rating mode related trigger concepts appear in the introduction: TascProgMode, Design, Rating, Simulation (specific values refer to COM recipes inside the Skill).

Installation and Activation

The SkillHub page requires reading the installation instructions before installing this Skill. The general process is as follows.

  1. Confirm that SkillHub CLI is installed on the local machine (you can run the one-click script according to the official install documentation if not installed):
command -v skillhub && skillhub --version
  1. When installing, you must use --dir to point to the current skills directory the Agent is using, otherwise the default ./skills/ may not be recognized. For example, Cursor often uses:
skillhub install user_6eed38f8/aspen-edr-automation --dir ~/.cursor/skills/

Other environment directories (excerpt, refer to SkillHub Installation Documentation): Claude Code ~/.claude/skills/; Codex ~/.codex/skills/ or .agents/skills/ in the project, etc.

  1. The tag requires_api_key=false, you do not need an extra API Key to install the skill package itself; running EDR automation still relies on local Aspen EDR license and Windows COM environment.

After installation, use trigger words in the introduction (such as “Aspen EDR”, “EDR Automation”, “TASC”, “ACOL”, “BJACApp”, etc.) in the conversation to guide the Agent to load this Skill.

Typical Usage

Official materials do not provide a complete shell example that can be run by copying line by line, but paths and script names can be used to organize the workflow:

  1. Let the Agent establish a BJACWIN.BJACApp connection according to references/com_recipes.md and open the target .edr.
  2. Consult tasc_variables.md or multimodule_variables.md according to the module, and write operating conditions or modes (Design / Rating, etc.).
  3. Call the run logic, and read the output variables after confirming that Run returns 0.
  4. For batch scenarios, use the edr_run_any.py and case4 covering 11 types of cases as a reference; when unified acceptance is needed, add the v1.4.0 margin parameters, for example in a conceptual form:
python edr_run_any.py --margin-low 10 --margin-high 30
# When needed: --margin-metric <variable_name>
  1. Export the scan results to CSV or JSON (capability declared in the Skill introduction, specific field names refer to the variable tables for each module).

Suitable Scenarios and Notes

Who is it for

  • Process/Design engineers and integration developers who have deployed Aspen EDR on Windows (verified version in materials is V11.0 / 37.0.0.380) and wish to use Python for verification, parameter scanning, or batch processing.
  • Teams that need unified read/write and acceptance logic for multiple modules (Tasc, Acol, Aple, Fire, etc.), rather than exploring COM for each module separately.

Limitations and Prerequisites

  • COM and pywin32 are bound to Windows; BJACApp cannot be directly driven on Linux/macOS.
  • The Skill provides recipes and variable tables organized from real machines, and does not guarantee complete consistency with behavior of unverified EDR minor versions; you should re-verify Run and key variables after upgrading Aspen.
  • Fire / Teams are N/A for margin acceptance; do not rigidly apply shell-and-tube percentage rules.
  • SkillHub statistics (as of page scrape): Rating 100,000, downloads approx. 1248; installation count displayed as 0 only reflects the platform’s counting method, please refer to your local skillhub install result.

Conclusion

Aspen EDR Automation converges EDR’s COM call sequences, multi-module variable names, and v1.4.0 full-module margin acceptance into a set of Agent Skills, reducing trial and error on the BJACWIN interface and TASC/ACOL variable naming. When installation or instructions are needed, use the official entry points:

  • API: https://api.skillhub.cn/user_6eed38f8/aspen-edr-automation
  • SkillHub: https://www.skillhub.cn/skills/user_6eed38f8/aspen-edr-automation

Installation coordinate: @user_6eed38f8/aspen-edr-automation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye