Hostname: page-component-74656f9884-rngvg Total loading time: 0 Render date: 2026-11-05T09:38:35.218Z Has data issue: false hasContentIssue false

An end-to-end PyTorch interface for differentiable PDE solvers: A RANS model-correction study

Published online by Cambridge University Press:  07 September 2026

Luca Saverio*
Affiliation:
Digital Sciences & Technologies Department, Safran Tech , Magny-Les-Hameaux, 78114, France DAAA, ONERA, Institut Polytechnique de Paris , Meudon, 92190, France
Michele Alessandro Bucci
Affiliation:
Digital Sciences & Technologies Department, Safran Tech , Magny-Les-Hameaux, 78114, France
Gianmarco Farro
Affiliation:
DAAA, ONERA, Institut Polytechnique de Paris , Meudon, 92190, France
Cédric Content
Affiliation:
DAAA, ONERA, Institut Polytechnique de Paris , Meudon, 92190, France
Denis Sipp
Affiliation:
MONHADE, équipe INRIA-ONERA, DSG, ONERA, Institut Polytechnique de Paris, Palaiseau, 91120, France
*
Corresponding author: Luca Saverio; Email: luca.saverio2205@yahoo.it

Abstract

This work presents an end-to-end strategy for solving inverse problems constrained by Partial Differential Equations within a fully differentiable Machine Learning framework. The proposed formulation provides a unified and user-friendly methodology applicable to a wide range of problems, from data assimilation to closure modeling. Our approach combines a baseline differentiable PDE solver, which predicts the state $ \boldsymbol{w} $ from the nonlinear system $ \boldsymbol{R}\left(\boldsymbol{w}\right)=0 $, with a generic additive, parametrized, and differentiable correction $ {\boldsymbol{f}}_{\boldsymbol{\vartheta}}\left(\boldsymbol{w}\right) $, with trainable parameters $ \boldsymbol{\vartheta} $. We show how to optimize $ \boldsymbol{\vartheta} $ within a fully differentiable Python workflow by reformulating the PDE as an implicit layer, enabling its integration into arbitrary objective functions, while leveraging PyTorch’s automatic differentiation graph. The method is demonstrated on the Reynolds-averaged Navier–Stokes equations for compressible flows, where the closure term, or a portion of it, is modeled using trainable parameters or a Neural Network. The first application considers the 2D NASA Wall-Mounted Hump test case, where a production-term parameter is optimized against time-averaged LES data. A second application is carried out on the VKI LS-59 turbine blade, where the Spalart–Allmaras eddy viscosity field is reconstructed through the optimization of a trainable spatial field. A dataset is generated starting from the VKI LS-59 turbine blade geometry using the differentiable BROADCAST solver with the Spalart–Allmaras turbulence model. The results highlight the flexibility of the framework, showing its applicability beyond turbulence modeling to a broader class of physics-informed PDE-constrained problems with data-driven components.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BYCreative Common License - NCCreative Common License - SA
This is an Open Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike licence (http://creativecommons.org/licenses/by-nc-sa/4.0), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the same Creative Commons licence is used to distribute the re-used or adapted article and the original article is properly cited. The written permission of Cambridge University Press or the rights holder(s) must be obtained prior to any commercial use.
Open Practices
Open data
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Figure 1. Diagram representing the explicit RANS layer.

Figure 1

Figure 2. Diagram representing the operations inside of the implicit layer (underlined boxes) appearing in (2.26) and (2.27).Figure 2. long description.

Figure 2

Figure 3. Outline of the geometry of the 2D NASA Wall-Mounted Hump with the corresponding boundary conditions.

Figure 3

Figure 4. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with implicit layer: behavior of the normalized cost-function J/J0$ \mathcal{J}/{\mathcal{J}}_0 $ for 50 optimizer iterations using the L-BFGS PyTorch optimizer. The procedure is halted once the variation in the loss function satisfies a specified tolerance threshold. Specifically, the norm of the loss function starts at 3.245×10−4$ 3.245\times {10}^{-4} $, and at the end of the computation, the reached value is 6.611×10−5$ 6.611\times {10}^{-5} $.

Figure 4

Figure 5. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with implicit layer: representation of the error fields for the velocities computed with the SA turbulence model (the baseline) with respect to the LES solutions, normalized by the reference freestream velocity U∞$ {U}_{\infty } $. It is not possible to show the whole computational domain depicted in Figure 3 since the LES solution is available only in the central region of the computational mesh. As the region of primary interest is the recirculation zone downstream of the hump, the figure shows the error profiles with a zoom on this area.Figure 5. long description.

Figure 5

Figure 6. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with implicit layer: representation of the error fields for the velocities at the final iteration with respect to the LES solutions, normalized by the reference freestream velocity U∞$ {U}_{\infty } $. It is not possible to show the whole computational domain depicted in Figure 3 since the LES solution is available only in the central region of the computational mesh. The same scales as Figure 5 were kept to highlight the decrease in errors. We can see that the β$ \beta $ parameter is not sufficiently flexible to accurately reproduce the high-fidelity data in the recirculation region. Franceschini et al. (2020) showed that this may be understood by the rigidity of the chosen control parameter β$ \beta $. As the region of primary interest is the recirculation zone downstream of the hump, the figure shows the error profiles with a zoom on this area.Figure 6. long description.

Figure 6

Figure 7. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with implicit layer.Figure 7. long description.

Figure 7

Figure 8. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with implicit layer: comparison between wall-quantities computed from LES data Uzun and Malik, (2018), RANS using the baseline SA model, and the corrected RANS model using the optimized β$ \beta $.Figure 8. long description.

Figure 8

Figure 9. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with explicit layer: behavior of the normalized cost-function J/J0$ \mathcal{J}/{\mathcal{J}}_0 $ consisting here in the residual of the corrected RANS system for 2000 optimizer iterations using the SGD PyTorch optimizer. In this case, the proposed optimization procedure consistently reduces this residual by several orders of magnitude, reflecting a drastically improved consistency between the data and the corrected model.

Figure 9

Figure 10. Data assimilation with β$ \beta $ on Wall-Mounted Hump case handled with explicit layer: βopt$ {\beta}^{opt} $ obtained by minimizing the residual of RANS equations. It is possible to see that it is practically exact with respect to the results shown in Figure 7.Figure 10. long description.

Figure 10

Figure 11. Representation of the outline of the VKI LS-59 structured mesh with the boundary conditions imposed in the CFD solver.Figure 11. long description.

Figure 11

Figure 12. Solution of baseline SA model on VKI LS-59 case with Newton-based relaxation method: isentropic Mach Number at the wall computed with the BROADCAST solver with respect to experimental results extracted from Jagodzińska et al. (2024).Figure 12. long description.

Figure 12

Figure 13. Data assimilation with μt$ {\mu}_t $ on VKI LS-59 case handled with explicit layer: results of the residual minimization strategy on the VKI LS-59 case with respect to SA results.Figure 13. long description.

Figure 13

Figure 14. Superposition of all generated blade geometries with the original blade profile and control points (from Hercus and Cinnella, 2011).Figure 14. long description.

Figure 14

Table 1. Parameters and ranges used to generate the DOETable 1. long description.

Figure 15

Figure 15. Closure with a CNN for μt$ {\mu}_t $ on custom dataset handled with explicit layer: eddy viscosity prediction on two cases extracted from the validation set.Figure 15. long description.

Figure 16

Table 2. Simulation parameters for cases 676 and 679Table 2. long description.

Figure 17

Figure 16. Closure with a CNN for μt$ {\mu}_t $ on custom dataset handled with explicit layer: ensemble statistics of the predicted turbulent viscosity field for case 676. The mean field highlights the robustness of the prediction, while the standard deviation identifies regions of higher variability across models.Figure 16. long description.

Figure 18

Figure B1. Histograms of the input parameters for the converged simulations. Despite the removal of some cases due to lack of convergence, the retained simulations remain well distributed across the prescribed parameter ranges, ensuring a representative coverage of the design space.Figure B1. long description.

Figure 19

Figure B2. Sobol sensitivity indices for selected principal modes of the conservative variables. In red the 0th$ {0}^{th} $ order indices and in green the 1st$ {1}^{st} $ order. The first four modes capture dominant flow features, while subsequent modes highlight the contribution of input parameters to higher-order variations.Figure B2. long description.

Figure 20

Table D1. Architecture of the CNN used in this workTable D1. long description.

Figure 21

Figure D1. Schematic illustration of the convolutional kernel. The light blue cells denote the physical domain and the white cells the ghost cells. The convolutional kernels (yellow, red, and green) are chosen smaller than the stencil of the numerical scheme, ensuring locality and preventing the introduction of additional couplings. This preserves the sparsity pattern of the Jacobian matrix. Moreover, the kernels applied along the different directions share the same weights (indicated by identical colors), enforcing rotational invariance with respect to the grid. The contributions from the different convolutional directions are then combined in the physical domain.Figure D1. long description.

Submit a response

Comments

No Comments have been published for this article.