Published in Advanced Modeling and Simulation in Engineering Sciences, the study presents a method that allows for the accurate prediction of time-evolving physical systems while strictly enforcing the first and second laws of thermodynamics. This approach addresses a significant limitation in traditional data-driven models, which often fail to respect physical constraints, leading to unstable long-term predictions and poor generalization to unseen scenarios.
The core of the proposed methodology is a thermodynamics-informed graph neural network built upon the MeshGraphNet architecture. Unlike standard neural networks that act as black boxes, this framework incorporates a nodal port-metriplectic formulation to embed thermodynamic structure directly into the learning process. By doing so, the model ensures that energy is conserved and entropy production remains non-negative, thereby maintaining physical consistency throughout the simulation. This integration of physics into the neural network architecture provides a robust foundation for modeling complex dynamical systems where traditional numerical solvers may be computationally prohibitive.
The technical implementation involves replacing the standard decoder of the MeshGraphNet architecture with multiple specialized decoders. These decoders are designed to predict local energy and entropy gradients, as well as Poisson and dissipative operators. The components are assembled at each graph node according to the General Equation for Non-Equilibrium Reversible-Irreversible Coupling, or GENERIC, formalism. This formalism extends traditional Hamiltonian mechanics to include dissipative systems, allowing the model to capture both conservative and irreversible dynamics. The use of a port-metriplectic structure enables the treatment of each graph node as a local open system that exchanges energy and entropy with its neighbors, facilitating a consistent application of thermodynamic bias in global systems.
To validate the framework, the authors evaluated the model on two distinct fluid mechanics examples involving incompressible flow past obstacles. The first example focused on unsteady flow past cylindrical obstacles, where the geometry varied in size and position but maintained a cylindrical shape. The second example involved a more diverse set of geometries, including circles, triangles, squares, rectangles, pentagons, and hexagons, which were randomly varied in position, orientation, and size. These test cases were designed to assess the model’s ability to generalize to previously unseen shapes and configurations, a critical requirement for real-world applications in engineering and scientific simulation.
The underlying dynamics for both examples were governed by the incompressible Navier-Stokes equations. The state variables included velocity and pressure fields at each node of the graph, discretized on Eulerian triangular meshes. The model was trained on synthetic data generated by high-fidelity computational fluid dynamics simulations. For the cylindrical obstacle case, the dataset consisted of 1,200 simulations, while the varying geometry case also utilized 1,200 simulations with an average of 2,600 mesh nodes per case. The training process involved optimizing the network parameters to minimize a loss function composed of data accuracy and thermodynamic consistency terms, ensuring that the learned dynamics adhered to the prescribed physical laws.
The results demonstrated that the proposed method achieves accurate long-term predictions and robust generalization to unseen geometries. In the flow-past-a-cylinder example, the model maintained stable error growth over long rollout horizons, indicating its capability to predict system evolution over extended periods without diverging. When compared to baseline models, including a vanilla MeshGraphNet and a vanilla Thermodynamics-Informed Neural Network, the proposed method exhibited lower mean error and variance. This suggests that the combination of geometric biases from graph neural networks and thermodynamic biases from the GENERIC formalism contributes significantly to improving long-range prediction accuracy.
Computational efficiency was another key finding of the study. The authors reported substantial speedups compared to traditional numerical solvers. In the first example, the model achieved speedups of up to 107 times faster than the ground-truth CFD simulations. In the second example, involving varying geometries, the speedups reached up to 145 times. These performance gains make the method suitable for quasi-real-time and real-time applications, such as predictive digital twins, where rapid simulation is essential. The inference times were measured on high-end GPUs, demonstrating that the approach is not only accurate but also practical for large-scale simulations.
The study highlights the importance of incorporating physical knowledge into machine learning models for scientific applications. Traditional deep learning approaches often struggle with extrapolation and long-term stability, particularly when applied to physical systems governed by complex differential equations. By embedding thermodynamic constraints, the proposed framework ensures that the predictions remain physically meaningful, even when the model is applied to scenarios not explicitly covered during training. This approach offers a scalable solution for modeling complex physical behaviors, potentially extending to other areas of computational mechanics and fluid dynamics.
Despite its promising results, the method has certain limitations related to scalability and computational cost. In simulations with fine meshes, a high number of message passing iterations or fine time discretization is required to capture the dynamics accurately, which can increase the computational burden. The authors note that future work will explore multiscale and hierarchical graph neural networks to address these challenges. Additionally, the model was trained and validated on synthetic CFD datasets, and its applicability to experimental data or more complex fluid behaviors, such as non-Newtonian fluids or turbulent regimes, remains to be explored. Integrating sensor-based data could further enhance the real-world applicability of the framework.
The development of this thermodynamics-informed graph neural network represents a significant step forward in the field of scientific machine learning. By bridging the gap between geometric deep learning and physics-informed modeling, the researchers have created a tool that offers both accuracy and physical consistency. This work underscores the potential of machine learning to accelerate scientific discovery and engineering design, providing a robust alternative to traditional numerical methods for simulating complex physical systems. The open-access nature of the publication and the availability of the code on GitHub further facilitate the adoption and extension of this methodology by the broader scientific community.
To construct the geometric representation, the researchers mapped the computational mesh directly into a directed graph, establishing an exact correspondence between mesh vertices and graph nodes as well as their respective connectivity edges. Each node receives a twelve-dimensional feature vector encompassing local velocity components, pressure, and a one-hot vector distinguishing inflow, outflow, wall boundary, and fluid nodes. Meanwhile, edge attributes receive a three-dimensional vector containing relative nodal displacements along with their Euclidean norm. This formulation preserves rotational and translational invariance across arbitrary meshes, while global normalization statistics ensure consistent numerical scaling across variables.
Within the pipeline, node and edge attributes are first converted into higher-dimensional latent embeddings through dedicated multilayer perceptron encoders. The processing module executes fifteen message-passing blocks that employ unshared parameters and integrate residual connections to maintain numerical stability. In each block, an edge multilayer perceptron updates latent edge representations using features from sender nodes, receiver nodes, and connecting edges. A permutation-invariant summation operator aggregates incoming messages across each nodal neighborhood before a second multilayer perceptron updates latent node features. Across the network, latent representations maintain a hidden dimension of 128 neurons distributed across two hidden layers, with transformations driven by Swish activation functions.
To generate thermodynamically admissible trajectory steps, the network channels latent representations through six specialized multilayer perceptron decoder heads. Rather than predicting raw velocity changes directly, these heads forecast nodal gradients for energy and entropy alongside flattened representations of the Poisson and dissipative operators at both node and edge levels. An intermediate reparametrization module then reshapes these flattened vectors into structured matrices, explicitly enforcing skew-symmetry on the Poisson operators and positive semi-definiteness on the dissipative friction matrices. Once assembled into the local port-metriplectic equations, these components yield the nodal time derivatives. A forward-Euler integration step then advances the full system state across discrete time increments of 0.01 seconds.
Model parameters were optimized by minimizing a composite loss combining a mean squared error data term and a degeneracy penalty. The data term evaluates differences between predicted and ground-truth time derivatives over all graph nodes, which balances the relative scales of state variables. Meanwhile, the degeneracy penalty enforces the physical orthogonality conditions where Poisson operators nullify entropy gradients and dissipative operators nullify energy gradients. Using the Adam optimizer with a batch size of two, training was conducted over single-step updates with an added noise variance of 0.02. The learning rate began at 0.0001 and decayed exponentially to 0.000001 after eight million steps, with degeneracy loss weighting calibrated between 0.01 and 0.1.
The numerical experiments provided rigorous testbeds across standardized and varied obstacle geometries. The multi-geometry dataset partitioned 1,200 simulations into 1,000 training, 100 validation, and 100 test runs, with fluid density set to 1.0, dynamic viscosity to 0.001, and freestream velocity sampled uniformly between 0.5 and 1.5. Model training required 140 hours on a single NVIDIA RTX 3090 graphics card across 34 epochs for the cylindrical setup, and 76 hours across 35 epochs on an NVIDIA RTX 4090 card for the varied geometry collection. By comparison, traditional high-fidelity simulations required intensive computation on an Intel i9-13900K processor with 64 gigabytes of memory across 600 discrete time increments.
Subject of Research: Meshgraphnets informed locally by thermodynamics for the simulation of flows around arbitrarily shaped objects
Article Title: Meshgraphnets informed locally by thermodynamics for the simulation of flows around arbitrarily shaped objects
Article References: Bermejo, C., Badías, A., González, D., & Cueto, E. (2025). Meshgraphnets informed locally by thermodynamics for the simulation of flows around arbitrarily shaped objects. Advanced Modeling and Simulation in Engineering Sciences, 12(1), Article 27. https://doi.org/10.1186/s40323-025-00311-8
Image Credits: AI Generated
DOI: 10.1186/s40323-025-00311-8
Keywords: Meshgraphnets, informed, locally, thermodynamics, simulation, flows, around, arbitrarily, shaped, objects, scientific research
Cite Scienmag News
Kelsey Dorsey. (November 13, 2026). Thermodynamics-Informed Graph Networks Simulate Complex Fluid Flows. Scienmag. https://scienmag.com/thermodynamics-informed-graph-networks-simulate-complex-fluid-flows/
Kelsey Dorsey. "Thermodynamics-Informed Graph Networks Simulate Complex Fluid Flows." Scienmag, 13 November 2026, https://scienmag.com/thermodynamics-informed-graph-networks-simulate-complex-fluid-flows/. Accessed 13 November 2026.
Kelsey Dorsey. "Thermodynamics-Informed Graph Networks Simulate Complex Fluid Flows." Scienmag. November 13, 2026. https://scienmag.com/thermodynamics-informed-graph-networks-simulate-complex-fluid-flows/








