Abstract:
Addressing the escalating computational bottlenecks in high-fidelity simulations of energy power systems and the rigorous demands of the AI for Science paradigm, this study aims to revolutionize traditional thermodynamic modeling by establishing a novel high-performance computing framework that seamlessly integrates the IAPWS-IF97 standard with deep learning computational architectures. To achieve this objective, the research team designed and implemented TensorIF97, a specialized light water thermodynamic property computation library engineered on the Libtorch C++ backend, which successfully transformed the legacy scalar calculation paradigm into a highly optimized parallel computing mode through a comprehensive tensorization reconstruction strategy. This methodological innovation specifically involved leveraging advanced broadcasting mechanisms to expand coefficient vectors and eliminate redundant memory access overhead, employing element-wise tensor operations to efficiently map complex high-order polynomial calculations onto modern SIMD (single instruction multiple data) and SIMT (single instruction multiple thread) hardware architectures, and implementing a sophisticated tensor mask mechanism to decouple intricate physical logic branching from the underlying hardware instruction flow, thereby preventing thread divergence on graphics processing unit (GPU) devices. Furthermore, to rigorously address the critical requirement for accurate partial derivatives in Jacobian matrix constructions and backpropagation algorithms without compromising thermodynamic consistency, the study meticulously customized a reverse calculation logic for single-phase flow based on the Bridgman thermodynamic formula table, deliberately bypassing the automatic differentiation (AD) of empirical backward equations to prevent numerical distortion and ensure adherence to Maxwell relations. The comprehensive experimental results demonstrate that TensorIF97 achieves exceptional computational accuracy and efficiency across diverse scenarios, maintaining relative deviations of less than 10
−4% for both double precision (kFloat64) and single precision (kFloat32) modes when rigorously benchmarked against SEUIF97 across nine fundamental thermodynamic properties and complex partial derivative terms. Regarding computational efficiency, TensorIF97 exhibits a super-linear speedup over traditional serial libraries, achieving an acceleration ratio of approximately 12 984 times under a massive data scale of 10
7 while keeping computational time stable and almost constant, effectively masking the linear cost of large-scale data processing with a single constant-level kernel launch overhead. This research concludes that the tensor-based computation paradigm successfully decouples thermodynamic logic from underlying hardware execution, providing a robust and scalable solution for large-scale scientific computing that not only significantly enhances the efficiency of property calculations in thermal-hydraulic simulations but also offers high-performance operator support for the direct coupling of deep learning models with high-fidelity physical equations, thereby establishing a foundational tool for enabling “super-real-time” simulations in full-core nuclear reactor analyses and advancing the frontier of physics-informed neural networks.