Towards an Online Training Strategy for Machine Learning-based Wall Models for Large-eddy Simulations Using TorchFort

  • Kumar, Vishal (Barcelona Supercomputing Center)
  • Eiximeno, Benet (NVIDIA Corporation)
  • Spiga, Filippo (NVIDIA Corporation)
  • Lehmkuhl, Oriol (Barcelona Supercomputing Center)

Please login to view abstract download link

Machine learning-based wall models for large eddy simulation (WMLES) have emerged as a promising alternative to traditional algebraic and equilibrium closures, offering improved adaptability to complex flow physics such as acceleration, separation and other non-equilibrium effects. Recent efforts have explored deep neural networks, reinforcement learning and classification-based approaches, trained on high-fidelity datasets to predict either wall shear stress or near-wall velocity profiles [1, 2, 3]. While these models have demonstrated encouraging a priori and a posteriori performance, most existing approaches rely on offline-trained networks with fixed parameters, limiting their robustness and generalizability when deployed in flows that deviate from the training distribution. Additionally, offline training incurs substantial input/output overhead, since the meshes used for training contain on the order of a billion degrees of freedom, and a single flow-field snapshot can require several hundred gigabytes. To address these limitations, this work outlines the need for online training and adaptation of ML wall models within a spectral element based-solver SOD2D [4], enabled through TorchFort [5], a Fortran-PyTorch interface designed for high-performance computing environments. TorchFort allows neural networks defined and trained in PyTorch to be embedded directly into Fortran-based LES codes, facilitating in-situ inference and gradient-based updates during runtime. This capability enables continual model adaptation to evolving flow conditions, reduces dependence on extensive precomputed training datasets, and provides a scalable pathway for incorporating reinforcement, transfer, or continual learning strategies in WMLES without disrupting existing solver infrastructures. The proposed framework will be assessed through a systematic comparison of multiple wall modelingstrategies, including conventional models and ML-based approaches, for three canonical cases: (i) turbulent channel flow, serving as a baseline for attached wall-bounded turbulence; (ii) flow over periodic hill, representative of separated flows with strong non-equilibrium effects; and (iii) the NASA hump configuration, featuring large-scale separation and reattachment under adverse pressure gradients. These cases are selected to evaluate model accuracy, adaptability, and robustness across progressively increasing levels of flow complexity.