3 Finite-Volume Variables and Coupled Solution System
This chapter explains the variable ordering, residual sign convention and coupled Jacobian used by NeuralFlow. These conventions matter to users when interpreting residuals, nonlinear corrections, physical-time terms and NeuralFlowML physics gradients.
3.1 Primitive columns and conservative equation rows
NeuralFlow forms the coupled Jacobian directly with respect to the primitive correction variables. Therefore the matrix columns correspond to derivatives with respect to
The row slots use the same indices for storage convenience, but their physical meaning is different:
| Row slot | Physical residual |
|---|---|
| momentum equations | |
| pressure index |
mass/continuity equation |
| temperature index |
total-energy equation |
When turbulence, particles, or species are active, their equations and primitive corrections are appended according to the active equation layout selected by the coupled equation layout.
3.2 Residual and matrix sign
Define the finite-volume residual by Eq. (2.8).
The current assembly accumulates a face contribution
3.3 3.3 Face-local Jacobian blocks
NeuralFlow evaluates the face Jacobians
In this manual, an “exact Jacobian” means exact differentiation of the active residual expression for the coefficients held fixed during that nonlinear assembly. Coefficients refreshed outside that assembly are updated on the next nonlinear iteration.
3.4 Stored state and pseudo-time state
NeuralFlow maintains primitive variables and conservative or
conservative-like histories. The time derivative need not be the
identity in primitive variables. Let
3.5 Spatial versus physical-time residuals
In steady calculations, pseudo time is a convergence device: it stabilizes the Newton-like iteration but does not add a physical unsteady residual. In transient calculations, a physical BDF residual is added to the spatial residual and dual-time iterations converge that physical step.
For a stored physical state
3.6 Why the conventions matter
Several common formulation errors can be avoided by keeping these identities explicit:
a pressure-index row is continuity, not a pressure conservation equation;
already contains the Newton minus sign because ; the artificial-compressibility coefficient belongs to the pseudo-time mass matrix and must not be confused with the stored pressure state;
a coarse-grid or machine-learning path must use the same row/column ordering and sign convention as the main residual if it reuses the NeuralFlow matrix.