AI 中文总结
研究针对OpenFOAM配置CFD案例的难题,提出IteraSim RAG。通过LLM扩展查询、多种融合与重排策略及多智能体分工协作,结合规范知识层。在28个案例基准测试中表现良好,能完成配置、诊断修复问题,还公布相关内容以保障可重复性。
AI 中文摘要
在OpenFOAM中配置计算流体动力学(CFD)案例需要组装一个由相互一致的求解器、离散化和边界条件字典组成的多目录输入文件,这对非专业人员使用开源CFD软件构成了重大障碍。大型语言模型(LLMs)与检索增强生成(RAG)相结合可以降低这一障碍,但现有系统存在单扁平查询检索、对不同操作请求应用单一检索策略以及让单个智能体起草和审查自身输出等问题。本文提出IteraSim RAG,针对这三个限制构建的用于自动生成OpenFOAM案例的检索增强软件后端。LLM首先将查询扩展为物理、求解器关键字和故障排除变体,然后通过互反排名融合合并结果排名列表,最大边际相关性对融合候选者相对于HNSW索引的密集向量存储进行重新排名。确定性关键字路由器将工具条件工作流查询和语料库范围的物理查询分配到单独的检索路径,生成由架构师、输入编写器和审查器智能体分担,由涵盖求解器选择、湍流封闭、边界条件和有限体积默认值的静态规范知识层支持。在一个公开的28个案例的基准测试中,该管道平均检索覆盖率达到77.9%(中位数79.1%),参数修改类别超过90%。所有六个参考配置在OpenFOAM v2506上运行完成,两个合成损坏的案例在有界审查器循环中仅使用求解器日志和规范层进行诊断和修复。基准测试、评分标准和图形脚本已发布以确保可重复性。
英文摘要
Configuring a computational fluid dynamics (CFD) case in OpenFOAM requires assembling a multi-directory input deck of mutually consistent solver, discretisation and boundary-condition dictionaries -- a task that remains a substantial barrier to non-specialist use of open-source CFD software. Large language models (LLMs) coupled with retrieval-augmented generation (RAG) can lower this barrier, but existing systems retrieve with a single flat query, apply one retrieval strategy to operationally distinct requests, and let a single agent both draft and review its own output. We present IteraSim RAG, a retrieval-augmented software back-end for automated OpenFOAM case generation built around these three limitations. An LLM first expands the query into physics, solver-keyword and troubleshooting variants, Reciprocal Rank Fusion then merges the resulting ranked lists, and Maximal Marginal Relevance re-ranks the fused candidates against an HNSW-indexed dense vector store. A deterministic keyword router dispatches tool-conditioned workflow queries and corpus-wide physics queries down separate retrieval paths, and generation is split across an Architect, an InputWriter and a Reviewer agent, backed by a static canonical-knowledge layer covering solver selection, turbulence closures, boundary conditions and finite-volume defaults. On an openly released 28-case benchmark spanning zero-shot setup, few-shot generalisation, single-parameter modifications and turbulence-model swaps, the pipeline attains a mean retrieval coverage of 77.9% (median 79.1%), with the parameter-modification category exceeding 90%. All six reference configurations run to completion on OpenFOAM v2506, and two synthetically corrupted cases are diagnosed and repaired within the bounded Reviewer loop using only the solver log and the canonical layer. The benchmark, scoring rubric and figure scripts are released for reproducibility.
Comments40 pages, 7 figures, 5 tables. Submitted to Computer Physics Communications