Abstract
This paper introduces a framework to bridge the gap between Physics-Informed Neural Networks (PINNs) and professional Computational Fluid Dynamics (CFD) solvers like OpenFOAM. By incorporating discretized numerical residuals and a specialized Jacobian correction term into the neural network's loss function, the authors enable PINNs to "understand" the physics of complex external solvers that are otherwise invisible to standard automatic differentiation. Validated on nonlinear transport and unsteady flow benchmarks, the proposed ANN-DisPINN framework demonstrates superior convergence and accuracy compared to traditional PINN approaches.
Introduction
Physics-Informed Neural Networks (PINNs) have revolutionized scientific computing by embedding physical laws directly into the training process. However, most PINNs rely on Automatic Differentiation (AD) to compute gradients of the physics loss. While effective for simple, continuous equations, this approach fails when dealing with industrial-grade CFD. Professional solvers use specific discretization methods—such as Finite Volume or Finite Element—to transform continuous physics into systems of linear equations ($A\Phi = b$). Standard PINNs cannot "see" into these discretized systems if the solver is an external, compiled program, making it impossible to use the exact numerical residual as a training signal. This paper addresses this "black box" problem, allowing researchers to use the precise math of established solvers to guide neural network training.
Methodology
The authors propose a framework called ANN-DisPINN (Artificial Neural Network - Discretized PINN). The architecture integrates the neural network with the external solver's mathematical structure through three core innovations:
- Discretized Residual Loss: Instead of using a continuous PDE, the physics loss ($L_{Eqn}$) is defined by the numerical residual ($R = A\Phi - b$) exported directly from an external solver.
- Jacobian Correction: To maintain backpropagation through the "detached" external solver, the authors import the Jacobian matrix ($\partial R / \partial \Phi$). This allows optimizers like ADAM to correctly calculate weight updates based on physical error sensitivity.
- Reduced Order Modeling (ROM) Coupling: To manage the high dimensionality of CFD meshes, the system integrates with Proper Orthogonal Decomposition (POD)-Galerkin projections, reducing the problem to a manageable number of "modes."
Key Results and Insights
The methodology was validated using two primary benchmarks: a Nonlinear Transport Equation (NTE) and unsteady incompressible flow past a cylinder. Training data consisted of sparse "snapshots" generated by high-fidelity solvers like OpenFOAM.
- Accuracy and Convergence: In the NTE case, the maximum absolute error was reduced from 0.25 (without Jacobian correction) to 0.11 (with correction). The Mean Squared Error (MSE) for the physics loss dropped significantly lower ($3.5 \times 10^{-8}$) compared to the uncorrected version ($1.3 \times 10^{-7}$), proving more stable training.
- Discretization Consistency: By using the solver's own discretized equations, the network learns the exact physics, including numerical nuances like upwind schemes or non-orthogonal corrections.
- Performance: For flow past a cylinder, the DisPINN approach achieved a relative error of 3.5%. While slightly less accurate than a pure POD-Galerkin ROM (1%), it offers real-time prediction speeds and better stability in complex regimes, significantly outperforming purely data-driven models in extrapolation tasks.
Conclusion
The ANN-DisPINN framework successfully bridges deep learning with established numerical solvers. While exporting the Jacobian matrix introduces some computational overhead, it is mandatory for proper convergence when using discretized residuals. Future work will focus on extending this to complex 3D geometries and optimizing the communication bridge between Python-based deep learning frameworks and C++-based CFD solvers to further reduce reliance on high-fidelity training data.
Summary updated