NeuralFlow: Solver-Trained Recurrent Graph Neural Operator
Terminology and role. NeuralFlow is the learned iterative solver option in CMPS. It is not a postprocessor and not a one-shot surrogate fitted to a database of completed CFD fields. NeuralFlow is a recurrent local Graph Neural Operator (GNO): CMPS supplies the current finite-volume state, mesh topology, boundary information and conservation imbalance, and the GNO learns a correction that is applied repeatedly toward a converged state.
What NeuralFlow is—and is not
The central object learned by NeuralFlow is the iterative correction process, rather than a direct map from geometry and boundary conditions to one completed flow field. For rollout index \(r\),
where \(\mathcal M\) is the finite-volume mesh graph and \(\mathcal C_{BC}\) is the prescribed boundary-condition encoding. The same learned operator is reused recurrently, analogous to repeatedly applying an iterative nonlinear solver update.
| Method class | Primary learned object | Relation to CMPS physics |
|---|---|---|
| One-shot surrogate / ROM | Completed field or engineering quantity | Usually trained mainly from solved-case labels. |
| Classical PINN | Continuous field satisfying pointwise differential-equation penalties | Physics normally appears through differential PDE residuals evaluated at sample points. |
| NeuralFlow | Recurrent local solver correction | Trained through CMPS finite-volume residuals, numerical fluxes and solver Jacobian feedback. |
Therefore NeuralFlow does not replace the CMPS flux functions, thermodynamic closures, boundary-condition operators or conservation equations with a neural approximation. Those remain the physical authority during training.
Current learned state
The current production GNO state contains exactly the carrier primitive variables
The present formulation rejects equation layouts for which \(n_q\neq D+2\). Species, turbulence variables, dilute-particle variables, solid variables and VOF fractions are therefore outside the current learned-state schema.
CMPS as the physics teacher
After a NeuralFlow correction is applied, CMPS evaluates the ordinary cell-centered finite-volume imbalance
The face term is the same assembled CMPS numerical flux contribution used by the conventional solver. Thus shocks, wall layers, boundary closures and all-Mach flux behavior enter training through the actual discretized physics rather than through a separate neural flux law.
Let the exact residual Jacobian of the active differentiated residual be
With the current CMPS linear-system sign convention,
For a frozen quadratic physical metric
the state-space training gradient is
During training, the finite-volume residual provides the physics objective and the coupled CMPS Jacobian supplies the sensitivity of that objective to the primitive state. Differentiation through the recurrent GNO then propagates the state-space gradient to the network parameters:
Meaning of “exact Jacobian.” Exact here means exact differentiation of the active differentiated residual for the prepared assembly state. Coefficients intentionally frozen outside that differentiated expression remain frozen, exactly as in the conventional implicit CMPS assembly.
Finite-volume physics rather than pointwise PDE fitting
NeuralFlow is closer in spirit to a physics-constrained learned nonlinear solver than to a classical PINN. The physical constraint is the integral finite-volume balance over every control volume,
represented numerically by \(\mathbf B_i=\mathbf 0\). Consequently, the same upwind fluxes, wall closures, thermodynamic derivatives and implicit coupling used to resolve shocks and boundary layers also define the training feedback.
Actual recurrent correction pipeline
- Construct the directed finite-volume graph from CMPS cell-face connectivity.
- Encode local primitive state, mesh geometry and solver-inspired edge quantities.
- Encode prescribed boundary conditions with explicit masks, family labels and physical auxiliary values.
- Apply one shared graph-update operator repeatedly to propagate information through the local mesh graph.
- Decode a primitive correction: additive velocity increments and multiplicative/logarithmic pressure-temperature corrections.
- Apply the configured bounded correction authority and physical pressure/temperature limits.
- Repeat the learned correction recurrently during rollout.
- During training, write predicted states back to CMPS, assemble physical imbalance/Jacobian feedback, and backpropagate the resulting physics-constrained gradient through the rollout.
Construction lifecycle and option consistency
The graph must exist before the GNO architecture is constructed. The current ordering is
Architecture-changing controls such as hidden width, repeated graph-stage count, device and arithmetic precision are therefore construction-time semantics.
Current structural defaults
| Control | Current default | Meaning |
|---|---|---|
| Hidden MLP widths | 96, 96, 96 | Encoder and graph sub-network widths. |
| Activation | SiLU | Current default nonlinear activation. |
| Latent node width | 96 | Dimension of the recurrent hidden state. |
| Shared graph stages | 60 | Repeated applications of one shared graph operator per GNO forward pass. |
| Hidden residual scale | 0.5 | \(h^{\ell+1}=h^\ell+0.5\,\Delta h^\ell\). |
| Training rollout steps | 20 | Recurrent learned corrections unrolled before the final physical objective. |
| Learned relaxation head | Off | Default correction authority is fixed rather than predicted. |
| Maximum velocity relaxation | 0.4 | Velocity correction authority per learned pass. |
| Maximum pressure relaxation | 0.05 | Applied to the bounded log-pressure correction. |
| Maximum temperature relaxation | 0.05 | Applied to the bounded log-temperature correction. |
| Log-pressure cap | 0.2 | Bound before relaxation. |
| Log-temperature cap | 0.08 | Bound before relaxation. |
| Default device / precision | NVIDIA CUDA / single precision | CPU and double-precision execution are also supported. |
Boundary-condition scope
The learned descriptor currently has explicit semantics for far field, pressure outlet, ordinary wall and symmetry faces. It transports prescribed boundary information into the GNO rather than treating detached solver-computed face states as training data. One-dimensional charring walls and one-sided interior/FSI-wall graph edges are rejected by the present schema.
Execution modes and present restrictions
| Mode | Role |
|---|---|
| CFD | Conventional CMPS solve with no NeuralFlow correction. |
| Training | Recurrent differentiable GNO rollout with CMPS physics feedback and optimizer update. Current CMPS formulation is serial. |
| Inference | No-gradient recurrent GNO evaluation for learned state advancement. |
The current VOF state is incompatible with the \([\mathbf u,p,T]\) learned schema, so VOF remains on the conventional CFD path. The same applies to other equation layouts that add active transported variables beyond the current carrier primitive block.
Detailed NeuralFlow chapters
The formulation is expanded in finite-volume graph and boundary encoding, recurrent correction, rollout and training, and physics-constrained objectives and Jacobian metrics.