Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategies
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have demonstrated a strong ability to generate syntactically correct code from natural-language specifications. In this study, we explore how LLMs can be harnessed to automatically translate a neutral graph representation of fluid system models into executable code for two widely adopted simulation environments: the Python library WNTR and the Modelica Standard Library. We conduct a systematic comparison of ten state-of-the-art LLMs and six prompting strategies that differ in the contextual information supplied (e.g., code or documentation). For each configuration we assess the generated code using a suite of software-quality metrics and we validate the functional fidelity of the resulting simulation models by reproducing benchmark fluid system scenarios. Our findings offer concrete guidance for researchers and engineers seeking to integrate LLM-driven code synthesis into model-based design pipelines. While the best-performing configurations achieve acceptable syntactic quality, we observe substantial gaps remain in simulation fidelity.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 21 of its 58 references that are in the map. First posted on arXiv 31 Jul 2026.
Builds on
21 of 58 references.
References · 21
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 282
- 2024Retrieval-Augmented Generation with Graphs (GraphRAG)cited by 172
- 2023QUIK: Towards End-to-End 4-Bit Inference on Generative Large Language Modelscited by 39
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2025Devstral: Fine-tuning Language Models for Coding Agent Applicationscited by 24
- 2025Fine-tuning a Large Language Model for Automating Computational Fluid Dynamics Simulationscited by 18
9 more
- 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generationcited by 17
- 2024LLM experiments with simulation: Large Language Model Multi-Agent System for Simulation Model Parametrization in Digital Twinscited by 16
- 2025SimuGen: Multi-modal Agentic Framework for Constructing Block Diagram-Based Simulation Modelscited by 8
- 2024Source Code Clone Detection Using Unsupervised Similarity Measurescited by 5
- 2024From Engineering Diagrams to Graphs: Digitizing P&IDs with Transformerscited by 5
- 2025Text2Model: Generating dynamic chemical reactor models using large language models (LLMs)cited by 5
- 2025ModiGen: A Large Language Model-Based Workflow for Multi-Task Modelica Code Generationcited by 4
- 2026Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgementcited by 4
- 2020A Survey on the Evaluation of Clone Detection Performance and Benchmarkingcited by 3
Built on by
Citing papers per year: 2026: 1.
1 paper.