Skip to content

input_writer generates Foundation OpenFOAM v10 files with no indication — breaks on ESI OpenFOAM installations #25

@jasoncbraatz

Description

@jasoncbraatz

Summary

When using the input_writer MCP tool (or the underlying initial_write() function), the generated case files use Foundation OpenFOAM v10 naming conventions exclusively. This is undocumented at the tool level and causes immediate failures when users attempt to run cases on ESI OpenFOAM (e.g., v2312, v2406, v2512), which is widely used in industry via Homebrew, package managers, and compiled installations.

Environment

  • Foam-Agent: latest (Docker image foam-agent:latest)
  • Target OpenFOAM: ESI OpenFOAM v2512 (installed via Homebrew on macOS Apple Silicon)
  • MCP Client: Claude Desktop (stdio transport)

Reproduction Steps

  1. Use input_writer to generate a buoyancy-driven natural convection case (candle flame plume)
  2. Attempt to run the generated case on ESI OpenFOAM v2512

What Happens

The generated files use Foundation-specific names and dictionary keys that ESI OpenFOAM does not recognize:

Generated (Foundation v10) Required (ESI v2512) Error
constant/physicalProperties constant/thermophysicalProperties fileNotFound
constant/momentumTransport constant/turbulenceProperties fileNotFound
object momentumTransport object turbulenceProperties dictionary lookup failure
model kEpsilon (inside RAS dict) RASModel kEpsilon missing entry
solver buoyantFoam solver buoyantBoussinesqPimpleFoam or buoyantPimpleFoam command not found

Each of these required manual debugging and file renaming/editing to resolve.

Suggested Enhancement

Add an optional openfoam_version or openfoam_fork parameter to the input_writer tool (and plan tool) that accepts values like foundation-v10 (default) or esi-v2512. When set to an ESI target, the generated files should use ESI naming conventions.

At minimum, the tool's output or documentation should clearly state that generated files target Foundation OpenFOAM v10 specifically, so users with ESI installations know to expect naming differences.

Workaround

We worked around this by:

  1. Running the generated case inside the Foam-Agent Docker container (which bundles Foundation OpenFOAM v10)
  2. Manually renaming files and editing dictionary keys for ESI compatibility

Additional Context

The README does state "OpenFOAM v10" as a requirement, but when using Foam-Agent as an MCP server integrated into an AI coding assistant, users may not realize "v10" means specifically the Foundation fork. ESI's version numbering (v2512, etc.) makes this especially confusing since both are "OpenFOAM" but with divergent file conventions.

This is a quality-of-life enhancement that would save significant debugging time for users on ESI installations. Thank you for the excellent tool! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions