NeuralFlow
NeuralFlow applies neural networks within a fully conservative formulation rather than relying on traditional PINN residual minimization.
NeuralFlow applies neural networks within a fully conservative formulation rather than relying on traditional PINN residual minimization.
NeuralFlow is a next-generation CFD solver that combines finite-volume methods with AI to accelerate fluid simulations.
It uses a Graph Neural Operator as a trainable correction engine. Starting from a CFD state, the model performs multiple rollout corrections to velocity, pressure, and temperature, aiming to reach a physically consistent solution in far fewer steps.
Training is guided by conservation of mass, momentum, and energy, with feedback from an advanced implicit CFD solver methodology, including flux coupling and linearized equation sensitivity.
Episode-based training keeps memory requirements practical while allowing the model to learn a compressed convergence path.
Methodology
NeuralFlow couples a Graph Neural Operator with an advanced implicit finite-volume CFD solver through two forms of automatic differentiation.
Forward-mode AD is used inside the CFD solver to compute flux Jacobians and the sensitivity of the conservation equations to the predicted flow variables. Reverse-mode AD is used inside the neural network to update its trainable parameters through backpropagation.
This dual-AD strategy allows the GNO to learn correction steps that improve conservation of mass, momentum, and energy. Instead of only learning from data, NeuralFlow learns from the solver’s own implicit methodology, including flux coupling, variable interactions, and linearized equation sensitivity.
Through episode-based multi-rollout training, the model aims to learn a compressed convergence path and reach physically consistent CFD solutions in far fewer steps.
NeuralFlow vs. Classical PINNs
Classical PINNs usually enforce physics by differentiating the governing PDEs directly inside the loss function. The neural network is asked to satisfy pointwise forms of mass, momentum, and energy equations.
This can work well for smooth problems, but it becomes difficult for real CFD flows with shocks, boundary layers, strong gradients, and discontinuities. In these regions, the differential form can become numerically fragile, and training may suffer from instability or oscillations.
NeuralFlow uses a different approach.
Instead of relying on the pointwise differential form, NeuralFlow works with the finite-volume conservation form. The network is trained to reduce the net flux imbalance through each control volume. This is closer to how industrial CFD solvers actually enforce conservation.
The fluxes are not simple symbolic expressions. They come from proven CFD numerical methods, including advanced flux schemes such as AUSM⁺-up. During training, NeuralFlow also uses solver-computed Jacobians, so the learning signal contains the sensitivity information of the finite-volume discretization.
This means the model learns from conservation laws, but also from the numerical methodology of a real CFD solver.
The result is a more robust form of physics-informed learning: conservation is enforced in integral form, shock and boundary-layer behavior is handled through CFD-grade flux methods, and training benefits from the solver’s linearized structure.
In short: classical PINNs differentiate the equations. NeuralFlow integrates fluxes over control volumes and learns from solver-proven numerical fluxes and Jacobians.
NeuralFlow is a next-generation CFD solver that combines advanced finite-volume methods with artificial intelligence to accelerate fluid simulations. Instead of replacing the CFD solver, NeuralFlow uses a Graph Neural Operator as a trainable correction engine. Starting from a CFD state, the neural operator performs several rollout correction steps on velocity, pressure, and temperature, with the objective of reaching a physically consistent solution in far fewer steps than a conventional solver iteration history.
Classical physics-informed neural networks usually enforce the pointwise differential form of the governing equations. This can be difficult for real CFD flows containing shocks, thin boundary layers, steep gradients, or discontinuities.
NeuralFlow instead works with the integral finite-volume form of the conservation laws. For each control volume, the solver measures the net conservation imbalance through the surrounding faces.
\( \mathcal{B}_i(V) = \sum_{f \in \partial \Omega_i} \mathcal{F}_f(V) A_f - S_i(V)\Omega_i = 0 \)
Here, \( \mathcal{B}_i(V) \) is the conservation imbalance of cell \( i \), \( \mathcal{F}_f(V) \) is the numerical flux through face \( f \), \( A_f \) is the face area, \( S_i(V) \) is the source term, and \( \Omega_i \) is the control-volume size.
This formulation directly enforces conservation of mass, momentum, and energy in the same way as a real CFD solver.
The neural model does not directly replace the CFD solution. Instead, it predicts corrections to the current flow state.
\( V^{k+1} = V^k + \Delta V_\theta^k \)
where \( V^k \) is the current state and \( \Delta V_\theta^k \) is the correction proposed by the Graph Neural Operator. The correction is applied to the primitive flow variables, such as velocity, pressure, and temperature.
The purpose of the network is to learn a compressed convergence path. A classical implicit CFD solver may need many iterations to reach a converged state. NeuralFlow tries to learn how to reach a useful, physically consistent solution in only a small number of learned correction steps.
NeuralFlow uses multi-rollout correction. Starting from a fixed training state, the Graph Neural Operator applies several learned corrections in sequence:
\( V^0 \rightarrow V^1 \rightarrow V^2 \rightarrow \cdots \rightarrow V^m \)
After the rollout sequence, the CFD solver evaluates how well the final field satisfies the conservation laws.
Training is organized into episodes. Each episode starts from a fixed training anchor, performs a limited number of rollout/update steps, and then measures the true online conservation error at the end of the episode.
This gives the method a reinforcement-learning flavor. The CFD state acts as the environment, the neural operator proposes correction actions, and the conservation imbalance provides the physics-based feedback. However, the feedback is not a black-box reward. It is generated by an advanced implicit finite-volume CFD solver.
The feedback used by NeuralFlow is not just a scalar residual value. It comes from the numerical methodology of the implicit CFD solver. The solver assembles the conservation imbalance and computes the sensitivity of the equations to the flow variables through flux Jacobians.
\( A = \frac{\partial \mathcal{B}}{\partial V} \)
This matrix contains the linearized finite-volume structure of the solver, including flux coupling, variable interactions, boundary-condition effects, and the sensitivity of the conservation equations to the solution state.
Therefore, the GNO learns not only from conservation laws, but also from the proven numerical structure of an advanced implicit CFD method.
A physics-based objective can be written as:
\( \mathcal{J}_{phys}(V) = \frac{1}{2} \mathcal{B}(V)^T W \mathcal{B}(V) \)
where \( W \) is a weighting operator used to scale or emphasize different parts of the conservation imbalance.
The gradient with respect to the flow state is obtained through the solver's linearized system:
\( \frac{\partial \mathcal{J}_{phys}}{\partial V} = A^T W \mathcal{B}(V) \)
This is the key connection between the CFD solver and the neural network. The solver provides the physics-based direction in solution space, and the neural network learns parameters that generate better correction steps.
NeuralFlow uses two forms of automatic differentiation.
Forward-mode automatic differentiation is used inside the CFD solver to compute flux Jacobians and the sensitivity of the conservation equations with respect to the predicted flow variables.
Reverse-mode automatic differentiation is used inside the neural network to update its trainable parameters through backpropagation.
\( \frac{\partial \mathcal{J}_{phys}}{\partial \theta} = \frac{\partial \mathcal{J}_{phys}}{\partial V} \frac{\partial V}{\partial \theta} \)
This dual-AD strategy allows NeuralFlow to combine CFD-grade flux linearization with neural-network training. The solver computes how the conservation equations respond to the flow state, and the neural network learns how to produce corrections that reduce the conservation imbalance more efficiently.
Backpropagating through a long sequence of learned CFD corrections would require storing many intermediate graph states, messages, tensors, flow fields, and solver quantities. For realistic finite-volume meshes, this memory cost can become too high.
Episode-based training controls this cost by using short rollout windows. The model learns from the physics feedback over a limited episode, and the true online conservation error is measured at the end of the episode.
This makes the method practical for large CFD problems while still allowing the GNO to learn accelerated convergence behavior.
Classical PINNs differentiate the governing equations directly and enforce the pointwise PDE form. This can become fragile near shocks, discontinuities, and thin boundary layers.
NeuralFlow instead integrates fluxes over control volumes. It uses solver-proven numerical flux methods, such as AUSM-type fluxes, and trains with solver-computed Jacobians. This gives the method the robustness of finite-volume CFD while retaining the learning capability of neural operators.
NeuralFlow is designed to learn a compressed convergence path for CFD simulations. It does not replace the governing equations or the CFD solver methodology. Instead, it uses a Graph Neural Operator as a trainable correction engine guided by conservation laws, finite-volume fluxes, exact solver Jacobians, and implicit CFD linearization.
The goal is to reach physically consistent CFD solutions in far fewer steps, while preserving the conservation, robustness, and numerical knowledge of advanced CFD solvers.
What Is Completed So Far?
✓ Forward-mode AD integration for flux calculations.
✓ Implementation of robust neural network architectures in C++ (LibTorch) for in-solver training.
✓ Incorporation of boundary conditions and additional physics constraints (e.g., energy equation) directly in the training loop.
✓ Demonstrated efficiency for compressible high-speed flows.
Future Plans & Expectations
NeuralFlow is currently in active development, and we anticipate:
In the next phase, we aim to provide benchmark comparisons against traditional CFD solvers, focusing on convergence speed and physical accuracy in complex flow regimes.