🤖 AI Summary
This work addresses the challenge that large language models (LLMs) in autonomous computational fluid dynamics (CFD) often produce invalid simulation configurations due to violations of physical conservation laws and numerical instability, while semantic retrieval alone cannot guarantee physical correctness. To bridge this gap, we propose PhyNiKCE, a novel neuro-symbolic framework that decouples neural generation from symbolic constraints for the first time. Our approach models simulation setup as a constraint satisfaction problem via a symbolic knowledge engine and enforces physical constraints rigorously through deterministic retrieval-augmented generation (RAG). Evaluated on the OpenFOAM platform with Gemini-2.5-Pro/Flash, PhyNiKCE achieves a 96% performance improvement over state-of-the-art baselines, reduces autonomous correction cycles by 59%, and lowers token consumption by 17%, significantly enhancing the alignment between semantic understanding and physical fidelity.
📝 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.