NeuralFlowTheory & User Reference Manual
NeuralFlowML Physics-Constrained Objectives and Jacobian Metrics
LIKUA HomeManual Home

NeuralFlowML Physics-Constrained Objectives and Jacobian Metrics

Not a data-fit loss. The central NeuralFlowML training signal is built from the NeuralFlow finite-volume conservation imbalance. In this chapter 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 NeuralFlow 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 ,

NeuralFlow 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 .

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 , define

With ,

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 , 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 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.

Used in NeuralFlow NeuralFlowML physical objectives

ModePurpose
UnweightedDirect finite-volume residual Euclidean norm.
Reduced pressure-velocity metricLocal preconditioning-aware residual transformation.
Residual hotspotAmplifies locally difficult cells.
Normalized-score hotspotNormalizes the difficulty score while retaining physical residual components in the gradient path.
Primitive-scaled hotspotPreconditioning- and primitive-authority-aware local metric; current default.
Regularized frozen correctionComplete frozen spatial-Jacobian operator metric.
Frozen local row-GramCell-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 NeuralFlowML update move the current NeuralFlow 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 NeuralFlowML to imitate a stored completed CFD field.