Table of Contents
Fetching ...

PhyNiKCE: A Neurosymbolic Agentic Framework for Autonomous Computational Fluid Dynamics

E Fan, Lisong Shi, Zhengtong Li, Chih-yung Wen

TL;DR

PhyNiKCE tackles the critical problem of unreliable autonomous CFD automation due to semantic-physical disconnects in LLM-driven pipelines. By decoupling neural planning from symbolic validation via a Symbolic Knowledge Engine and a CSP-based Deterministic RAG Engine, it enforces physical fidelity and numerical stability before OpenFOAM execution. The approach uses five specialized retrievers to ensure multi-physics consistency, delivering a 51% overall accuracy and an 81% execution rate on non-tutorial literature cases, with substantial reductions in error-reflection iterations and LLM token usage. These results demonstrate that a neurosymbolic, auditable framework can substantially improve robustness and efficiency in industrial CFD automation and offer a scalable paradigm for trustworthy AI across CAE domains.

Abstract

The deployment of autonomous agents for Computational Fluid Dynamics (CFD), is critically limited by the probabilistic nature of Large Language Models (LLMs), which struggle to enforce the strict conservation laws and numerical stability required for physics-based simulations. Reliance on purely semantic Retrieval Augmented Generation (RAG) often leads to "context poisoning," where agents generate linguistically plausible but physically invalid configurations due to a fundamental Semantic-Physical Disconnect. To bridge this gap, this work introduces PhyNiKCE (Physical and Numerical Knowledgeable Context Engineering), a neurosymbolic agentic framework for trustworthy engineering. Unlike standard black-box agents, PhyNiKCE decouples neural planning from symbolic validation. It employs a Symbolic Knowledge Engine that treats simulation setup as a Constraint Satisfaction Problem, rigidly enforcing physical constraints via a Deterministic RAG Engine with specialized retrieval strategies for solvers, turbulence models, and boundary conditions. Validated through rigorous OpenFOAM experiments on practical, non-tutorial CFD tasks using Gemini-2.5-Pro/Flash, PhyNiKCE demonstrates a 96% relative improvement over state-of-the-art baselines. Furthermore, by replacing trial-and-error with knowledge-driven initialization, the framework reduced autonomous self-correction loops by 59% while simultaneously lowering LLM token consumption by 17%. These results demonstrate that decoupling neural generation from symbolic constraint enforcement significantly enhances robustness and efficiency. While validated on CFD, this architecture offers a scalable, auditable paradigm for Trustworthy Artificial Intelligence in broader industrial automation.

PhyNiKCE: A Neurosymbolic Agentic Framework for Autonomous Computational Fluid Dynamics

TL;DR

PhyNiKCE tackles the critical problem of unreliable autonomous CFD automation due to semantic-physical disconnects in LLM-driven pipelines. By decoupling neural planning from symbolic validation via a Symbolic Knowledge Engine and a CSP-based Deterministic RAG Engine, it enforces physical fidelity and numerical stability before OpenFOAM execution. The approach uses five specialized retrievers to ensure multi-physics consistency, delivering a 51% overall accuracy and an 81% execution rate on non-tutorial literature cases, with substantial reductions in error-reflection iterations and LLM token usage. These results demonstrate that a neurosymbolic, auditable framework can substantially improve robustness and efficiency in industrial CFD automation and offer a scalable paradigm for trustworthy AI across CAE domains.

Abstract

The deployment of autonomous agents for Computational Fluid Dynamics (CFD), is critically limited by the probabilistic nature of Large Language Models (LLMs), which struggle to enforce the strict conservation laws and numerical stability required for physics-based simulations. Reliance on purely semantic Retrieval Augmented Generation (RAG) often leads to "context poisoning," where agents generate linguistically plausible but physically invalid configurations due to a fundamental Semantic-Physical Disconnect. To bridge this gap, this work introduces PhyNiKCE (Physical and Numerical Knowledgeable Context Engineering), a neurosymbolic agentic framework for trustworthy engineering. Unlike standard black-box agents, PhyNiKCE decouples neural planning from symbolic validation. It employs a Symbolic Knowledge Engine that treats simulation setup as a Constraint Satisfaction Problem, rigidly enforcing physical constraints via a Deterministic RAG Engine with specialized retrieval strategies for solvers, turbulence models, and boundary conditions. Validated through rigorous OpenFOAM experiments on practical, non-tutorial CFD tasks using Gemini-2.5-Pro/Flash, PhyNiKCE demonstrates a 96% relative improvement over state-of-the-art baselines. Furthermore, by replacing trial-and-error with knowledge-driven initialization, the framework reduced autonomous self-correction loops by 59% while simultaneously lowering LLM token consumption by 17%. These results demonstrate that decoupling neural generation from symbolic constraint enforcement significantly enhances robustness and efficiency. While validated on CFD, this architecture offers a scalable, auditable paradigm for Trustworthy Artificial Intelligence in broader industrial automation.
Paper Structure (38 sections, 2 equations, 10 figures, 2 tables, 4 algorithms)

This paper contains 38 sections, 2 equations, 10 figures, 2 tables, 4 algorithms.

Figures (10)

  • Figure 1: High-level control loop of the PhyNiKCE framework. The LLM-driven Agent parses multi-modal user inputs (literature, grids, instructions) and plans the simulation. The Symbolic Knowledge Engine acts as a deterministic guardrail, validating the agent's plan against physical constraints before execution in OpenFOAM. An autonomous reflection loop enables the agent to correct runtime errors, ensuring a physically valid flow field.
  • Figure 2: Architecture of the PhyNiKCE framework. The Symbolic Knowledge Engine (top) performs offline Knowledge Base Construction (Stage 0) to transform raw tutorials into a structured Symbolic Knowledge Base for the Deterministic RAG Engine. The Autonomous CFD Agent (bottom) executes the simulation workflow: parsing User Input (Stage 1), performing Case File Initialization (Stage 2) via symbolic queries, and engaging in Error Reflection (Stage 3) to autonomously resolve runtime failures. Red arrows indicate the injection of physically and numerically knowledgeable context.
  • Figure 3: Example of converting an OpenFOAM FoamFile dictionary to LLM-friendly JSON format.
  • Figure 4: The dispatch logic of the Deterministic RAG Engine. The diagram maps the Agent's specific case file generation and correction tasks to the specialized retriever. Left (Stage 2: Case File Initialization): For the case file initialization, target case files are routed to the appropriate retriever based on their physical dependencies. Right (Stage 3: Error Reflection): Execution failures are routed to retrievers to generate targeted fixes.
  • Figure 5: Geometries, grids, and boundary types of CFD cases for the validation test. (a) the NACA 0012 airfoil case sun2023comparison. (b) the Nozzle case yu2023comparative.
  • ...and 5 more figures