33.1 Filters

The solver keeps the default field registry of EquationSystem (Chapter 13): m_fields, the conservative variables density, momentum and total energy, are the solution role and the one physical group. Checkpoint, AverageFields, HistoryPoints and Mean therefore work unchanged, and their files contain the conservative variables.

The compressible solution is conservative, so component slices of m_fields cannot be used as velocity or pressure views. Supporting the fluid diagnostics requires the equation system to provide backend-native primitive workspaces and populate

These values should be computed lazily once per filter phase and shared by all consumers. A natural extension is a lazy physical-role provider in FieldRegistry, with the resolved view cached for the lifetime of that registry. The conversion kernel and its workspace belong to the compressible solver (or to a compressible primitive-state service), not to the filters. This preserves the backend-independent filter layer and avoids a host conversion of conservative fields.

Fluid diagnostics need more than the primitive roles. A kinetic-energy diagnostic of variable-density flow integrates density-weighted quantities, so it requires the density role as well as the velocity. A boundary-force diagnostic requires a constitutive contract as well as primitive pressure: the Navier–Stokes equations may use a dynamic, possibly temperature-dependent, viscosity and a dilatational stress term, and Euler flow has no viscous traction. The equation system should therefore publish a viscous-stress (or boundary traction) view or service computed by its diffusion model. Treating momentum gradients as velocity gradients would be incorrect.

Tests of such diagnostics need analytic variable-density fields, and inviscid and viscous cases using the same equation-of-state and transport models as the solver. A negative test should confirm that an Euler run rejects a requested viscous contribution.