NeuralFlow Physics-Constrained Objectives and Jacobian Metrics
Not a data-fit loss. The central NeuralFlow training signal is built from the CMPS finite-volume conservation imbalance. In this chapter \(\mathbf B\) is the assembled vector of net flux/source imbalance per cell, not an error relative to a stored target solution.
Residual and solver-matrix convention
Define the exact residual Jacobian of the active differentiated assembly as
The current CMPS implicit matrix uses the opposite sign,
This distinction removes the apparent sign ambiguity in the transpose-Jacobian training path.
Physical gradient injected into the recurrent GNO
For
with frozen \(\mathbf W\),
CMPS computes the transpose-matrix action and applies the minus sign once when building the external final-state gradient. Reverse-mode differentiation through the recurrent GNO then maps that state gradient to \(\nabla_\theta J_{phys}\).
Unweighted physical objective
The division by active cell count makes the basic physical-loss scale approximately mesh-size independent.
Residual-hotspot weighting
For
the bounded hotspot factor is
Then
In the normalized-score hotspot mode, equation-wise block RMS values are used only to build the difficulty score. The transpose-Jacobian path still receives the original physical residual components multiplied by the hotspot factor.
Frozen reduced pressure-velocity metric
For a residual block \(\mathbf b=[\mathbf b_m,b_p,b_T]^T\), define
With \(\mathbf z=\mathbf T^{-1}\mathbf b\),
Primitive-scaled hotspot metric
The current default physical-loss mode adds primitive correction scales
The local score and weighted objective are
Regularized complete frozen-Jacobian correction metric
At an accepted reference state let
Construct
The metric is
With cell-block factorization \(\mathbf D_\delta=\mathbf L\mathbf L^T\), the equilibrated system is
The metric solve is accepted only when its a-posteriori error estimate satisfies the configured tolerance.
Physical scales for the complete frozen metric
When explicit scales are not supplied, the reference velocity can be resolved from supported physical boundary data using an area-weighted RMS:
With static thermodynamic boundary data,
Frozen local Jacobian row-Gram metric
The local approximation retains all owner/neighbor Jacobian blocks in a given residual row:
The objective is
The frozen scalar \(\gamma\) is selected so that the dimensionless state-gradient RMS matches the reference primitive-scaled metric at the accepted anchor.
Default physical-metric controls
The default mode is the primitive-scaled hotspot metric with
For the complete frozen-correction metric, the default controls include
Current metric restrictions
The frozen-Jacobian metrics currently use the steady spatial Jacobian in the learned-training path; transient physical-time Jacobian terms are not included. Frozen metric data are tied to the accepted reference/anchor and must be rebuilt when case-defining physics or that anchor changes.
Implemented NeuralFlow physical objectives
| Mode | Purpose |
|---|---|
| Unweighted | Direct finite-volume residual Euclidean norm. |
| Reduced pressure-velocity metric | Local preconditioning-aware residual transformation. |
| Residual hotspot | Amplifies locally difficult cells. |
| Normalized-score hotspot | Normalizes the difficulty score while retaining physical residual components in the gradient path. |
| Primitive-scaled hotspot | Preconditioning- and primitive-authority-aware local metric; current default. |
| Regularized frozen correction | Complete frozen spatial-Jacobian operator metric. |
| Frozen local row-Gram | Cell-local operator metric assembled from the block row of the frozen Jacobian. |
Interpretation as learned nonlinear solution
All of these objectives ask the same fundamental question: does the recurrent NeuralFlow update move the current CMPS state toward finite-volume physical consistency? They differ only in how the imbalance is scaled or conditioned before its gradient is injected through the recurrent GNO. None requires NeuralFlow to imitate a stored completed CFD field.