Table of Contents
Fetching ...

Neural Physics: Using AI Libraries to Develop Physics-Based Solvers for Incompressible Computational Fluid Dynamics

Boyang Chen, Claire E. Heaney, Christopher C. Pain

TL;DR

The work addresses the need for flexible, differentiable CFD solvers compatible with modern AI hardware by recasting discretised PDEs as convolutional neural network layers with analytically determined weights. It advances a Neural Physics framework that realizes Jacobi and multigrid solvers (via a U‑Net) without training, validated across advection–diffusion, Burgers, and incompressible Navier–Stokes equations. The approach achieves results indistinguishable from conventional solvers, while offering platform portability, differentiability for optimization, and easy integration with data-driven models, including potential enhancements for unstructured meshes and parallel HPC. This represents a new pathway to solve PDEs with implicit methods using standard AI libraries, enabling hybrid physics–ML modeling and efficient deployment on AI accelerators.

Abstract

Numerical discretisations of partial differential equations (PDEs) can be written as discrete convolutions, which, themselves, are a key tool in AI libraries and used in convolutional neural networks (CNNs). We therefore propose to implement numerical discretisations as convolutional layers of a neural network, where the weights or filters are determined analytically rather than by training. Furthermore, we demonstrate that these systems can be solved entirely by functions in AI libraries, either by using Jacobi iteration or multigrid methods, the latter realised through a U-Net architecture. Some advantages of the Neural Physics approach are that (1) the methods are platform agnostic; (2) the resulting solvers are fully differentiable, ideal for optimisation tasks; and (3) writing CFD solvers as (untrained) neural networks means that they can be seamlessly integrated with trained neural networks to form hybrid models. We demonstrate the proposed approach on a number of test cases of increasing complexity from advection-diffusion problems, the non-linear Burgers equation to the Navier-Stokes equations. We validate the approach by comparing our results with solutions obtained from traditionally written code and common benchmarks from the literature. We show that the proposed methodology can solve all these problems using repurposed AI libraries in an efficient way, without training, and presents a new avenue to explore in the development of methods to solve PDEs with implicit methods.

Neural Physics: Using AI Libraries to Develop Physics-Based Solvers for Incompressible Computational Fluid Dynamics

TL;DR

The work addresses the need for flexible, differentiable CFD solvers compatible with modern AI hardware by recasting discretised PDEs as convolutional neural network layers with analytically determined weights. It advances a Neural Physics framework that realizes Jacobi and multigrid solvers (via a U‑Net) without training, validated across advection–diffusion, Burgers, and incompressible Navier–Stokes equations. The approach achieves results indistinguishable from conventional solvers, while offering platform portability, differentiability for optimization, and easy integration with data-driven models, including potential enhancements for unstructured meshes and parallel HPC. This represents a new pathway to solve PDEs with implicit methods using standard AI libraries, enabling hybrid physics–ML modeling and efficient deployment on AI accelerators.

Abstract

Numerical discretisations of partial differential equations (PDEs) can be written as discrete convolutions, which, themselves, are a key tool in AI libraries and used in convolutional neural networks (CNNs). We therefore propose to implement numerical discretisations as convolutional layers of a neural network, where the weights or filters are determined analytically rather than by training. Furthermore, we demonstrate that these systems can be solved entirely by functions in AI libraries, either by using Jacobi iteration or multigrid methods, the latter realised through a U-Net architecture. Some advantages of the Neural Physics approach are that (1) the methods are platform agnostic; (2) the resulting solvers are fully differentiable, ideal for optimisation tasks; and (3) writing CFD solvers as (untrained) neural networks means that they can be seamlessly integrated with trained neural networks to form hybrid models. We demonstrate the proposed approach on a number of test cases of increasing complexity from advection-diffusion problems, the non-linear Burgers equation to the Navier-Stokes equations. We validate the approach by comparing our results with solutions obtained from traditionally written code and common benchmarks from the literature. We show that the proposed methodology can solve all these problems using repurposed AI libraries in an efficient way, without training, and presents a new avenue to explore in the development of methods to solve PDEs with implicit methods.
Paper Structure (15 sections, 43 equations, 14 figures, 1 table, 1 algorithm)

This paper contains 15 sections, 43 equations, 14 figures, 1 table, 1 algorithm.

Figures (14)

  • Figure 1: A schematic diagram showing how the smoothing, restriction and prolongation operations are arranged in one multigrid iteration or cycle.
  • Figure 2: Coarsening and restriction operations shown in 2D. Three grid levels are shown with the weights of the convolutional filters required for restriction and prolongation. The values at orange nodes are mapped from grid level 1 to 2 (and vice verse) whilst values at green nodes are mapped from level 2 to 3 (and vice versa).
  • Figure 3: Left: a schematic diagram showing how one multigrid cycle (1MG) uses skip connections to pass the residual between the layers using a U-Net (blue horizontal arrows). Restrictions are indicated by blue arrows and prolongations by green arrows. Right bottom: a schematic diagram showing how three multigrid cycles are brought together to form an overall solution method. The input of this multigrid method is the source $\bm{b}$. The output is the solution $\bm{T}$ after three cycles. (The initial estimate of the solution is taken as zero.) Right top: a box labelled "MG" is used to represent three MG cycles, and its input and output, which are shown in detail beneath it (bottom right).
  • Figure 4: Schematic diagrams showing how a neural network can be used for time stepping. The plot at the top left shows this for the advection equation. On the top right we indicate how this can be repurposed to solve equations involving the advection of momentum. The bottom plot shows a single time step in the solution of the Navier-Stokes equations. In these diagrams, $\bm{s}$ the source term for two different equations.
  • Figure 5: Numerical solution of the 2D diffusion equation at times 0, 25, 50 and 100 seconds. The initial condition of a Gaussian distribution is diffused by a traditional computational fluid dynamics code (left) and the Neural Physics approach based on CNNs (right). The three values shown in each graph correspond to the maximum values of the solution which occur at $x$=0.
  • ...and 9 more figures