dsh-abaqus: A DeepSeek Harness Plugin for Driving Abaqus/CalculiX Modeling

Preface

In the plugin ecosystem of DeepSeek Harness (DSH), controlling CAE software is often a critical step in building automated workflows. Traditional finite element analysis (FEA) often relies on graphical interface operations or manually writing input files, which is not only tedious but also difficult for AI agents to standardize.

The dsh-abaqus plugin aims to solve this problem. It allows for the definition of models via declarative JSON specifications, thereby driving Abaqus or CalculiX to perform modeling, solving, and result extraction.

Plugin Introduction

This is a DSH Host plugin whose core value lies in abstracting the complex CAE modeling process into a single data structure (JSON Spec). It supports two backends: Abaqus CAE and CalculiX. Through this plugin, agents can complete the entire workflow from model construction, meshing, and solver submission to result reading.

  • Maintainer: feihong-li
  • License: MIT

Core Features

The plugin provides a toolset covering the full cycle from modeling to analysis:

  • Declarative Modeling: Define geometry, materials, boundary conditions, and loads via JSON Spec.
  • Dual Backend Support:
    • Abaqus CAE: Supports CAE kernel geometry, CAE meshing, and .odb result reading (requires commercial license).
    • CalculiX: Supports built-in geometries (box/cylinder), structured meshes (hex/wedge core), direct generation of .inp files, and solving via ccx. Results are parsed from .frd files (verified working).
  • Toolchain:
    • abaqus_env: Detect environment configuration.
    • abaqus_spec: Provide DSL references and examples.
    • abaqus_build: Compile Spec into solver input files or CAE scripts.
    • abaqus_run: Submit jobs, run scripts or commands.
    • abaqus_status: Query job status, errors, warnings, and increment information.
    • abaqus_results: Read .frd files, extract data such as displacement and stress, and export to CSV.

Installation and Configuration

Before use, ensure the environment meets the requirement: Node.js >= 20.

Installation

Execute the following command in the command line to install the plugin:

dsh plugin --profile <profile> add <this-repo-url>

Restart DSH after installation; the toolchain will load at startup.

Configuration

The plugin relies on solver paths and supports automatic detection or manual configuration. In the DSH configuration file, you can set the config field as follows:

- insert:
    - id: dsh-abaqus
      name: '@local/dsh-abaqus'
      config:
        abaqusCommand: 'C:\SIMULIA\Commands\abq2023.bat'  # Optional, for Abaqus
        ccxPath: 'F:\tools\calculix\bin\ccx.exe'          # Optional, for CalculiX
        pythonPath: 'D:\Python39\python.exe'              # Optional, for syntax checking

Solver discovery order:
* Abaqus: Configured path -> ABAQUS_COMMAND env variable -> ABAQUS_HOME directory -> where abaqus -> Registry -> Common directories.
* CalculiX: Configured path -> CCX_PATH env variable -> where ccx -> Common installation root directories.

Typical Usage

A typical analysis workflow is as follows:

abaqus_env                                       # Check installed solvers and tools
abaqus_spec                                      # Refer to DSL syntax specifications
abaqus_build   { spec: {...}, backend: "both" }   # Generate .inp files and CAE scripts
abaqus_run     { caseDir: "...", backend: "calculix" }
abaqus_status  { caseDir: "..." }
abaqus_results { caseDir: "...", set: "beam_xmax", writeCsv: true }

Spec Example (Defining a cantilever beam):

{
  "name": "cantilever",
  "materials": { "steel": { "E": 210000, "nu": 0.3, "rho": 7.85e-9 } },
  "parts": [{ "name": "beam", "material": "steel",
              "geometry": { "kind": "box", "size": [100, 10, 10] },
              "section": { "type": "solid" } }],
  "steps": [{ "name": "Load", "type": "static",
              "increments": { "initial": 0.1, "period": 1, "min": 1e-5, "max": 0.1 } }],
  "boundaries": [{ "name": "FIX", "step": "Load", "region": { "plane": "x=min" }, "dof": [1, 2, 3] }],
  "loads": [{ "name": "TIP", "step": "Load", "type": "concentrated",
              "region": { "plane": "x=max" }, "vector": [0, -100, 0], "total": true }],
  "mesh": { "size": 2.5, "element": "C3D8" },
  "output": { "fields": ["S", "U"] }
}

Notes

  1. Backend Availability:
    • The CalculiX backend has been verified and is currently the only available free open-source backend (GPL protocol).
    • The Abaqus CAE backend code exists, but according to the project description, it has never been executed in a real environment (due to lack of Abaqus installation or licenses). It is currently not recommended for production use.
  2. Naming Set Consistency: The node/element sets generated by the built-in mesh generator are fully consistent with the naming sets (*NSET / *ELSET) in the solver input file. The abaqus_results tool supports direct referencing of these sets via simple plane definitions (e.g., {"plane": "x=max"}).
  3. Permission Check: The plugin runs in the DSH process context. Please ensure you check the source code and license before installation, and confirm read/write permissions for the solver directory and output directory.

Conclusion

dsh-abaqus provides a standardized pathway for converting structured data into finite element analysis workflows. For the development of DeepSeek Harness agents requiring CAE capabilities, it offers a verifiable, JSON-centric starting point. Please refer to the project repository for source code and detailed documentation.

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

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

Xiaoye