Reinforcement Learning-Enhanced Large Language Models for Automated Modeling of Nuclear Thermal-Hydraulic Systems: A Plan-and-Act Agent Framework
Open Access
- 11 June 2026
- journal article
- research article
- Published by MDPI AG in Applied Sciences
- Vol. 16 (12) , 5885
Abstract
Automating system-level nuclear thermal-hydraulic (T-H) model construction remains challenging because platform-specific API syntax, graph connectivity, parameter dependency ordering, and solver admissibility must be satisfied simultaneously. This study develops a closed-loop modeling framework on the SAFRI platform by combining supervised fine-tuning (SFT), a Plan-and-Act agent with retrieval-grounded parameter completion, and reinforcement learning based on group relative policy optimization (GRPO). The SFT stage uses a 6003-record domain corpus derived from expert-authored or expert-verified SAFRI modeling exemplars, while system-level generalization is evaluated on a held-out 50-case in-house evaluation set separated at the case-template level. At the component level, LoRA-adapted Qwen3-8B achieves 100% code accuracy, compared with 50% for zero-shot and 74% for one-shot prompting. At the system level, the SFT agent attains a 100% syntax success rate (SSR), 90% topology success rate (TSR), and 72.4% physical convergence rate (PCR), showing that local API correctness is insufficient for solver-valid model assembly. After GRPO training with schema, topology, physics, and sequence rewards, the full SAFRI-SFT-RL agent reaches a 100% SSR, 100% TSR, and 88.8% PCR on the in-house evaluation set, while an error self-healing loop resolves execution-time failures in an average of 2.3 corrective iterations. These results show that solver-grounded reinforcement learning is effective for closing the gap between syntactically correct script generation and physically convergent nuclear T-H model construction.Keywords
This publication has 11 references indexed in Scilit:
- A Survey on Large Language Models for Code GenerationACM Transactions on Software Engineering and Methodology, 2026
- Domain-Specific Large Language Model for Renewable Energy and Hydrogen Deployment StrategiesEnergies, 2024
- Lost in the Middle: How Language Models Use Long ContextsTransactions of the Association for Computational Linguistics, 2024
- Physics-Informed Neural Network Solution of Point Kinetics Equations for a Nuclear Reactor Digital TwinEnergies, 2022
- Digital Twin Concepts with Uncertainty for Nuclear Power ApplicationsEnergies, 2021
- Thermal hydraulic considerations of nuclear reactor systems: Past, present and future challengesExperimental and Computational Multiphase Flow, 2019
- Proximal Policy Optimization AlgorithmsarXiv, 2017
- Why nuclear energy is sustainable and has to be part of the energy mixSustainable Materials and Technologies, 2014
- Multiphase Flow Dynamics 42009
- Thermal-Hydraulic System Codes in Nulcear Reactor Safety and Qualification ProceduresScience and Technology of Nuclear Installations, 2008