Curvilinear-FDM FLUX-VECTOR-SPLITTING residual on NODAL transformation metrics (the FVS counterpart of compute_resid_fdm_curv_2d): R = -(1/J)[ (Fhat_{i+1/2}-Fhat_{i-1/2}) + (Ghat_{j+1/2}-Ghat_{j-1/2}) ] with the contravariant split-flux reconstruction Fhat_{i+1/2} = recon_L[ Fhat^+ ] + recon_R[ Fhat^- ], mirroring the uniform FVS residual compute_resid_fdm_fvs_2d but with CONTRAVARIANT split fluxes and the 1/J divisor.
FREESTREAM (the headline gate): the metric used to SPLIT each stencil node is FROZEN at the FACE metric (mesh%sx_xi(:,i,j) for face i / mesh%sx_eta(:,i,j) for face j) — the same GCL-telescoping face metric the FDS branch uses — NOT a per-node metric. Then for a constant free-stream the split is identical at every stencil node, the (constant-reproducing) reconstruction returns it unchanged, and the face flux collapses to Fhat_face = S_face . (F,G). The conservative difference therefore telescopes through the discrete GCL identity (Delta_xi S_xi + Delta_eta S_eta = 0) to machine zero, exactly as the FDS branch does. A naive per-node-metric split would instead leak the reconstruction's truncation error into the free-stream residual.
Cost note: because the metric is per-face, the split is recomputed for each stencil node at each face (2*sw split_contravariant_2d calls per face) rather than precomputed once per node as in the uniform FVS path. This keeps the formulation freestream-consistent and high-order; the LF split (no LAPACK) used by the accuracy/positivity gates keeps the cost modest.
BCs: the full nodal BC set is applied via apply_halos_2d's nodal kernel (apply_bcs_fdm_2d): periodic, outflow, supersonic_inlet, characteristic farfield, and the curvilinear slip wall (reflection about the boundary-node metric normal). This is the production FVS residual for the curvilinear showcases (cylinder/airfoil/blunt body) and the bump/ramp validation. Unlike the FDS path it applies no weak wall-flux at the boundary face (the weak pressure wall is FDS-only by design); the nodal ghost reflection is its wall treatment. No positivity limiter is applied (FVS reconstructs fluxes, not states), mirroring compute_resid_fdm_fvs_2d.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_2d_t), | intent(inout) | :: | state |