Abstract
The spread of machine learning techniques coupled with the availability of high-quality experimental and numerical data has significantly advanced numerous applications in fluid mechanics. Notable among these are the development of data assimilation and closure models for unsteady and turbulent flows employing neural networks (NN). Despite their widespread use, these methods often suffer from overfitting and typically require extensive datasets, particularly when not incorporating physical constraints. This becomes compelling in the context of numerical simulations, where, given the high computational costs, it is crucial to establish learning procedures that are effective even with a limited dataset. Here, we tackle those limitations by developing NN models capable of generalizing over unseen data in low-data limit by: (i) incorporating invariances into the NN model using a Graph Neural Networks (GNNs) architecture; and (ii) devising an adaptive strategy for the selection of the data utilized in the learning process. GNNs are particularly well-suited for numerical simulations involving unstructured domain discretization and we demonstrate their use by interfacing them with a Finite Elements (FEM) solver for the supervised learning of Reynolds-averaged Navier–Stokes equations. We consider as a test-case the data-assimilation of meanflows past generic bluff bodies, at different Reynolds numbers \(50 \le Re \le 150\), characterized by an unsteady dynamics. We show that the GNN models successfully predict the closure term; remarkably, these performances are achieved using a very limited dataset selected through an active learning process ensuring the generalization properties of the RANS closure term. The results suggest that GNN models trained through active learning procedures are a valid alternative to less flexible techniques such as convolutional NN.













Similar content being viewed by others
Data Availability
Data used in the manuscript are generated by the authors and included in a public repository on GitLab at the following address: https://src.koda.cnrs.fr/j939cf4g/rans-dataset.
References
Akiba, T., Sano, S., Yanase, T., et al: Optuna: A next-generation hyperparameter optimization framework. In: Proceedings of the 25rd Association for Computing Machinery International Conference on Knowledge Discovery and Data Mining (2019)
Alnæs, M., Blechta, J., Hake, J., et al: The FEniCS project version 1.5. Arch. Numer. Softw. 3(100) (2015)
Anatol, R.: Naca report 1191 (1958)
Bae, H.J., Koumoutsakos, P.: Scientific multi-agent reinforcement learning for wall-models of turbulent flows. Nat. Commun. 13(1), 1443 (2022)
Bai, J., Ren, Y., Zhang, J.: Ripple walk training: a subgraph-based training framework for large and deep graph neural network. arXiv preprint arXiv:2002.07206 [cs.LG] (2021)
Beck, A., Kurz, M.: A perspective on machine learning methods in turbulence modeling. GAMM-Mitteilungen 44(1), e202100002 (2021)
Bengio, Y., Louradour, J., Collobert, R., et al: Curriculum learning. In: Proceedings of the 26th Annual International Conference on Machine Learning, pp. 41–48 (2009)
Brunton, S.L., Hemati, M.S., Taira, K.: Special issue on machine learning and data-driven methods in fluid dynamics. Theoret. Comput. Fluid Dyn. 34(4), 333–337 (2020)
Brunton, S.L., Noack, B.R., Koumoutsakos, P.: Machine learning for fluid mechanics. Annu. Rev. Fluid Mech. 52, 477–508 (2020)
Bucci, M.A., Semeraro, O., Allauzen, A., et al.: Curriculum learning for data-driven modeling of dynamical systems. Eur. Phys. J. E 46(3), 12 (2023)
Cai, J., Angeli, P.E., Martinez, J.M., et al: Revisiting tensor basis neural network for reynolds stress modeling: application to plane channel and square duct flows. Comput. & Fluids p. 106246 (2024)
Cécora, R.D., Radespiel, R., Eisfeld, B., et al.: Differential reynolds-stress modeling for aeronautics. AIAA J. 53(3), 739–755 (2015)
Charpiat, G., Girard, N., Felardos, L., et al: Input similarity from the neural network perspective. In: Wallach H, Larochelle H, Beygelzimer A, et al (eds) Advances in Neural Information Processing Systems, vol 32. Curran Associates, Inc., https://proceedings.neurips.cc/paper_files/paper/2019/file/c61f571dbd2fb949d3fe5ae1608dd48b-Paper.pdf (2019)
Chen, J., Hachem, E., Viquerat, J.: Graph neural networks for laminar flow prediction around random two-dimensional shapes. Phys. Fluids 33(12), 123607 (2021)
Chiarini, A., Quadrio, M., Auteri, F.: Linear stability of the steady flow past rectangular cylinders. J. Fluid Mech. 929, (2021). https://doi.org/10.1017/jfm.2021.819
Chiarini, A., Quadrio, M., Auteri, F.: A new scaling for the flow instability past symmetric bluff bodies. J. Fluid Mech. 936, R2 (2022). https://doi.org/10.1017/jfm.2022.99
Donon, B., Liu, Z., Liu, W., et al.: Deep statistical solvers. Adv. Neural. Inf. Process. Syst. 33, 7910–7921 (2020)
Dupuy, D., Odier, N., Lapeyre, C., et al.: Modeling the wall shear stress in large-eddy simulation using graph neural networks. Data-Centric Eng. 4, e7 (2023)
Duraisamy, K., Iaccarino, G., Xiao, H.: Turbulence modeling in the age of data. Annu. Rev. Fluid Mech. 51, 357–377 (2019)
Eivazi, H., Tahani, M., Schlatter, P., et al.: Physics-informed neural networks for solving reynolds-averaged navier-stokes equations. Phys. Fluids 34(7), 075117 (2022)
Foures, D.P.G., Dovetta, N., Sipp, D., et al.: A data-assimilation method for Reynolds-averaged Navier-Stokes-driven mean flow reconstruction. J. Fluid Mech. 759, 404–431 (2014)
Garnier, P., Viquerat, J., Rabault, J., et al.: A review on deep reinforcement learning for fluid mechanics. Comput. & Fluids 225, 104973 (2021)
Giannetti, F., Luchini, P.: Structural sensitivity of the first instability of the cylinder wake. J. Fluid Mech. 581, 167–197 (2007)
Goodfellow, I., Bengio, Y., Courville, A.: Deep learning. Massachusetts Institute of Technology (2016)
Guégan, T.: Contrôle d’écouleements turbulents par apprentissage automatique. Université de Poitiers (2022)
Gühring, I., Raslan, M., Kutyniok, G.: Expressivity of deep neural networks. arXiv preprint arXiv:2007.04759 34 (2020)
Hamilton, W.L.: Graph representation learning. Synth. Lect. Artif. Intell. Mach. Learn. 14(3), 1–159 (2020)
Lapeyre, C.J., Misdariis, A., Cazard, N., et al.: Training convolutional neural networks to estimate turbulent sub-grid scale reaction rates. Combust. Flame 203, 255–264 (2019)
Lee, S., You, D.: Data-driven prediction of unsteady flow over a circular cylinder using deep learning. J. Fluid Mech. 879, 217–254 (2019)
Ling, J., Templeton, J.: Evaluation of machine learning algorithms for prediction of regions of high Reynolds-averaged Navier Stokes uncertainty. Phys. Fluids 27(8), 085103 (2015)
Ling, J., Kurzawski, A., Templeton, J.: Reynolds averaged turbulence modelling using deep neural networks with embedded invariance. J. Fluid Mech. 807, 155–166 (2016)
Lino, M., Fotiadis, S., Bharath, A.A., et al.: Current and emerging deep-learning methods for the simulation of fluid dynamics. Proc. Royal Soc. A 479(2275), 20230058 (2023)
Mantic-Lugo, V., Arratia, C.: Gallaire Fmc,: self-consistent mean flow description of the nonlinear saturation of the vortex shedding in the cylinder wake. Phys. Rev. Lett. 113, 084501 (2014)
Martinkus, K., Lucchi, A., Perraudin, N.: Scalable graph networks for particle simulations. https://arxiv.org/abs/2010.06948, (2021)
McConkey, R., Yee, E., Lien, F.S.: On the generalizability of machine-learning-assisted anisotropy mappings for predictive turbulence modelling. Int. J. Comput. Fluid Dyn. 36(7), 555–577 (2022)
Morra, P., Semeraro, O., Henningson, D.S., et al.: On the relevance of reynolds stresses in resolvent analyses of turbulent wall-bounded flows. J. Fluid Mech. 867, 969–984 (2019)
Patel, Y., Mons, V., Marquet, O., et al.: Turbulence model augmented physics-informed neural networks for mean-flow reconstruction. Phys. Rev. Fluids 9(3), 034605 (2024)
Pickering, E., Rigas, G., Schmidt, O.T., et al.: Optimal eddy viscosity for resolvent-based models of coherent structures in turbulent jets. J. Fluid Mech. 917, A29 (2021)
Pope, S.B.: A more general effective-viscosity hypothesis. J. Fluid Mech. 72(2), 331–340 (1975)
Provansal, M., Mathis, C., Boyer, L.: Benard-von Karman instability: transient and forced regimes. J. Fluid Mech. 182, 1–22 (1987). https://doi.org/10.1017/S0022112087002222
Raissi, M., Yazdani, A., Karniadakis, G.E.: Hidden fluid mechanics: learning velocity and pressure fields from flow visualizations. Science 367(6481), 1026–1030 (2020)
Ren, P., Xiao, Y., Chang, X., et al.: A survey of deep active learning. Assoc. Comput. Mach. Comput. Surv. 54(9), 1–40 (2021)
von Saldern, J.G., Reumschüssel, J.M., Kaiser, T.L., et al.: Self-consistent closure modeling for linearized mean field methods. In: AIAA AVIATION 2023 Forum, p. 4351 (2023)
Sanchez-Gonzalez, A., Heess, N., Springenberg, J.T., et al.: Graph networks as learnable physics engines for inference and control. In: International Conference on Machine Learning, pp. 4470–4479 (2018)
Schmelzer, M., Dwight, R.P., Cinnella, P.: Discovery of algebraic Reynolds-stress models using sparse symbolic regression. Flow Turbul. Combust. 104, 579–603 (2020)
Shukla, K., Xu, M., Trask, N., et al.: Scalable algorithms for physics-informed neural and graph networks. Data-Centric Eng. 3, e24 (2022)
Singh, A.P., Duraisamy, K.: Using field inversion to quantify functional errors in turbulence closures. Phys. Fluids 28(4), 045110 (2016)
Sipp, D., Lebedev, A.: Global stability of base and mean flows: a general approach and its applications to cylinder and open cavity flows. J. Fluid Mech. 593, 333–358 (2007). https://doi.org/10.1017/S0022112007008907
Ströfer, C.A., Xiao, H.: End-to-end differentiable learning of turbulence models from indirect observations. Theor. Appl. Mech. Lett. 11(4), 100280 (2021)
Thuerey, N., Weißenow, K., Prantl, L., et al.: Deep learning methods for reynolds-averaged navier–stokes simulations of airfoil flows. AIAA J. 58(1), 25–36 (2020)
Toshev, A.P., Galletti, G., Brandstetter, J., et al.: Learning lagrangian fluid mechanics with e (3)-equivariant graph neural networks. In: International Conference on Geometric Science of Information, Springer, pp. 332–341 (2023)
Vinuesa, R., Brunton, S.L.: Enhancing computational fluid dynamics with machine learning. Nat. Comput. Sci. 2(6), 358–366 (2022)
Volpiani, P.S., Meyer, M., Franceschini, L., et al.: Machine learning-augmented turbulence modeling for RANS simulations of massively separated flows. Phys. Rev. Fluids 6(6), 064607 (2021)
Wallin, S., Johansson, A.V.: An explicit algebraic reynolds stress model for incompressible and compressible turbulent flows. J. Fluid Mech. 403, 89–132 (2000)
Weatheritt, J., Sandberg, R.: A novel evolutionary algorithm applied to algebraic modifications of the RANS stress-strain relationship. J. Comput. Phys. 325, 22–37 (2016)
Wilcox, D.C., et al.: Turbulence Modeling for CFD, vol. 2. DCW industries La Canada, CA (1998)
Yang, S., Vinuesa, R., Kang, N.: Enhancing graph u-nets for mesh-agnostic spatio-temporal flow prediction. arXiv preprint arXiv: 2406.03789 (2024)
Zhao, Y., Akolekar, H.D., Weatheritt, J., et al.: Rans turbulence model development using CFD-driven machine learning. J. Comput. Phys. 411, 109413 (2020)
Zhou, Z., He, G., Yang, X.: Wall model based on neural networks for les of turbulent flows over periodic hills. Phys. Rev. Fluids 6(5), 054610 (2021)
Zienkiewicz, O., Taylor, R., Nithiarasu, P.: (eds) The Finite Element Method for Fluid Dynamics, seventh Edition edn. Butterworth-Heinemann, Oxford, https://doi.org/10.1016/B978-1-85617-635-4.00016-9, (2014)
Acknowledgements
The PhD fellowship of M. Quattromini is supported by the Italian Ministry of University. This study has been partially funded under the National Recovery and Resilience Plan (NRRP), Mission 4 Component 2 Investment 1.3 - Call for tender No. 1561 of 11.10.2022 Project code PE0000021, Project title Network 4 Energy Sustainable Transition - NEST, funded by the European Union - NextGenerationEU. The support from the Agence Nationale de la Recherche (ANR) through grant ANR-21-REASON is gratefully acknowledged.
Author information
Authors and Affiliations
Contributions
All authors worked on the design and conception of the work presented. M.A.B. provided technical support for the Python and Machine Learning parts of the project. S.C. provided theoretical support for the CFD part of the project. O.S. provided support for the algorithmic, CFD, and mathematical parts of the project. M.Q. wrote the main manuscript text. All authors reviewed and accepted the manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A: Numerical simulations details
Time-resolved numerical simulations were performed using a python code based on the FEniCS [2] library. The inputs and the outputs of the Graph Neural Network model were obtained by averaging these data on-the-fly. More details on the numerical scheme can be found in [60]; the main script is based on the code described in [25], where an extensive discussion is reported. Here we summarize the essential aspects and provides details on the validation.
From the numerical viewpoint, the spatial discretization is obtained by introducing the weak formulation based on the finite element method (FEM). In particular, the finite element used is the Taylor-Hood element, with second order elements P2 for velocity and first order elements P1 for pressure. The implemented spatial integration scheme reads as
where \(\textbf{u}=(u,v)^T\) represents the velocity vector, p the pressure and Re the Reynolds number. The time marching is performed by second order backward differentiation formula (BFD): the n apex indicates the values of a quantity at the current time, with \(n-1\) the values at the previous time step and \(n-2\) its values two time steps before. The time step – denoted as \(\Delta t\) – it is chosen for granting the Courant-Friedrichs-Lewy condition, \(CFL \le 0.5\) for each of the random generated shapes.
The convective term is treated using the Newton and Picard methods, such that a linear system of equations is solved in each step of the temporal iteration. The basic mesh is based on the one used for the cylinder flow, our reference case; the mesh is refined in the most sensitive regions around the obstacle and in the wake past the cylinder [23]: these are the areas where high refinement is required for increasing the accuracy of the computations in terms of correct frequencies and growth rate of the instabilities. Beside the well known dynamics, the rich literature allows a detailed comparison for validation purposes. Thus, numerical solver and meshes were validated using the cylinder flow, in particular by comparing the drag coefficient \(C_d\) and the lift coefficient \(C_l\). Figure 14 shows the evolution in time of \(C_d\) and \(C_l\), while the table Table 2 shows the numerical comparison of (time-averaged) \(C_d\) and \(C_l\) (amplitude) with respect to values in literature. The first coefficient compares remarkably well with the values in literature, while a slightly higher \(C_l\) is found: this can be related to the chosen numerical box that is slightly small along the y direction, thus producing some numerical blockage effects; nonetheless, for the nature of the present work, the results are satisfactory. Finally, the chosen bluff bodies are characterized by mechanisms resembling the phenomena observed in the cylinder flow, thus characterized by comparable time and space scales; the corresponding meshes are characterized by a refinement similar to the one adopted for the reference case.
Appendix B: Hyperparameters optimization
Numerous parameters define the structure of a neural network, usually denoted with the term hyperparameters. We can distinguish between model hyperparameters and process hyperparameters.
-
A model hyperparameter defines the capacity of the neural network, i.e. the ability of the model to represent functions of high complexity. Thus, the capacity is directly related to the possibility of approximating a large variety of nonlinear functions.
-
A process hyperparameter defines the training phase. Tuning these hyperparameters deeply modify the duration of the training, its computational costs and the way the weights are adjusted while the model evolves.
These terms are defined a-priori, before training the model, thus they need to be manually tuned as they can’t be adjusted or learnt during the training process. In general, this does not pose problems in deep learning when the expressivity of the NN (e.g. the number of neurons, the number of layers, etc.) is enough to represent the complexity of the problem under investigation. On the other hand, since the GNN is trained to fulfil a specific task and because the computational cost of the GNN inference has to be affordable compared to the most sophisticated turbulence models available today, we tried to keep the GNN as parsimonious as possible.
To this end, the hyperparameters defining the architecture require optimization. Standard gradient based optimizers cannot be employed when dealing with integer numbers, like the number of neurons or layers. For this purpose gradient-free algorithms can be used. There exists dedicated libraries that can automate the tuning process through all the possible sets of hyperparameters by trying and appropriately pruning the unpromising sets of them. In this work we apply the library Optuna [1], an open-source package that combines efficiently searching and pruning algorithms. By exploring the complex solution hyperspace, a number of combinations of hyperparameters is found, among which the one outperforming the others in terms of monitored validation metrics is given by the following set
-
1.
Embedded dimension, 35
-
2.
Number of GNN layers, \(k = 40\)
-
3.
Update relaxation weight, \(\alpha = 6\times 10^{-1}\)
-
4.
Loss function weight, \(\gamma = 0.1\)
-
5.
Learning rate, \(LR = 3\times 10^{-3}\), as maximal/starting value.
Appendix C: Similarity criteria algorithm details
The similarity criteria algorithm designed to compare different data from the neural network perspective is based on the analysis of the vector gradients of a metric function (Eq. C3) with respect to the \(\mathbf {\theta }\) parameters of the neural network. In particular, the similarity comparison between two generic m-dimensional vectors \({\textbf {a}} \in \mathbb {R}^m\) and \({\textbf {b}} \in \mathbb {R}^m\) is computed using the cosine similarity, defined as
where \(\beta \) is the angle between the two vectors. In this context the metric we use is the Mean Absolute Error (MAE), a piecewise linear function defined as
in which \(x_i\) is the NN prediction on the node i, \(y_i\) the ground truth and \(n_i\) the number of nodes.
The choice of MAE is crucial for our analysis. In scenarios where the Mean Squared Error (MSE) is used, we empirically observe marked oscillations in the direction of the auto-similarity of the vector gradient throughout successive training epochs. Conversely, when employing MAE, the auto-similarity of the vector gradient tends to approach unity, suggesting a stable direction in the solution space, for the data under analysis. A visual representation of the consistent convergence of the vector gradient auto-similarity as function of the epochs is shown in Fig. 15, for a training process involving 9 cases in the training dataset. Training begins with a specific initial dataset; when every data point in the training dataset achieves an auto-similarity convergence exceeding a predefined threshold of 0.99, the training is stopped and we can assume that the vector gradient’s direction for each instance in the training dataset has stabilized.
The following step is to assess the similarity between cases within the training dataset and those outside it. This aims at identifying the most diverse cases among those not included in the training set, which will then be added to the training dataset to enhance diversity. Firstly, the GNN runs for additional 10 epochs to obtain the vector gradients of each out-of-training dataset instance. Then, a similarity matrix is computed by cross calculating the similarity between each in-training instance and each out-of-training instance. The case that shows the lowest similarity score is also the most diverse one and enables to promote diversification in the training dataset based on available data. Note that the values are normalized using a z-score value
where S represents the similarity score for a specific data point, \(\mu \) is the mean of all similarity scores, and \(\sigma \) their standard deviation. In summary, the approach outlined here serves as a robust method for comparing and evaluating the similarities in data behaviour leveraging the neural network model, thereby enhancing the efficacy of the training process.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Quattromini, M., Bucci, M.A., Cherubini, S. et al. Active learning of data-assimilation closures using graph neural networks. Theor. Comput. Fluid Dyn. 39, 17 (2025). https://doi.org/10.1007/s00162-025-00737-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00162-025-00737-1