CORTEXA
← Browse
arxivcs.LGcs.SE2026-07-31

Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategies

Jan Marius Stürmer, Jascha Knack, Tobias Koch, Andreas Weinmann

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.

View free PDFSource page

Related papers

arxivcs.LGcs.SE2026-07-06

Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learning

Saurabhsingh Rajput, Tushar Sharma

Code models strictly prioritize functional correctness, leaving software energy efficiency as an unoptimized byproduct. Training models to generate energy-efficient code requires reproducible feedback at scale, which physical hardware measurement cannot reliably provide due to va…

View free PDFSource page
arxivcs.SEcs.AIcs.LG2026-07-04

Don't Blame the Large Language Model: How Agent Harness Evolution Shapes Coding Agent Quality

Oussama Ben Sghaier, Hao Li, Bram Adams, Ahmed E. Hassan

Coding agents, autonomous systems that use large language models (LLMs) to resolve software engineering tasks, rely on agent harness: a middleware layer in between a developer and a large language model that orchestrates system prompts, tool execution, context management, and ite…

View free PDFSource page
arxivcs.SEcs.CRcs.LG2026-06-30

An Empirical Study of Security Calibration in Large Language Models for Code

Mohammed Latif Siddiq, Md. Nafiu Rahman, Joanna C. S. Santos

Large Language Models (LLMs) are rapidly transforming software development, yet their use in security-critical contexts raises a key question: do models know when their generated code is insecure? This property, known as calibration, measures whether a model's confidence aligns w…

View free PDFSource page
arxivcs.SEcs.LGcs.PL2026-07-15

Quantize with Confidence? An Empirical Study of Quantization for Code Generation

Saima Afrin, Md. Zahidul Haque, Antonio Mastropaolo

The growing adoption of local inference frameworks such as Ollama has made it increasingly common for developers to run large code models on laptops and other resource-constrained hardware. In these settings, post-training quantization is essential for reducing memory footprint a…

View free PDFSource page
arxivcs.LGcs.SE2026-07-21

Spaghetti Architect: A Contamination-Resistant, By-Construction-Labelled, Multi-Language Code Dataset Generator

Yuxiang Ji

Mined code corpora are abundant but uncontrolled: a snippet's semantics, surface "messiness," and difficulty are whatever the wild contained; there is no known-optimal reference to grade against; and any public sample may already sit in a model's training set. We present Spaghett…

View free PDFSource page