Output Architecture & Post-Processing

Output Architecture & Post-Processing

This section details the file output schemas, diagnostic CSV configurations, and ParaView post-processing workflows.

1. Unstructured Mesh Visualizations (VTU & PVTU)

The solver exports spatial grid results in XML-based unstructured grid formats (.vtu and .pvtu), allowing parallel loading into ParaView.

1.1 Partitioned Grid Layout (PVTU)

When running in parallel using MPI, each rank writes its local mesh domain to an independent, binary-encoded .vtu file (e.g. flow_001000_P0000.vtu for Rank 0).

The master rank writes a central XML Parallel Unstructured Grid (.pvtu) file pointing to the partition files:

<?xml version="1.0"?>
<VTKFile type="PUnstructuredGrid" version="0.1" byte_order="LittleEndian">
  <PUnstructuredGrid GhostLevel="0">
    <PPointData Scalars="T" Vectors="velocity">
      <PDataArray type="Float64" Name="T"/>
      <PDataArray type="Float64" Name="velocity" NumberOfComponents="3"/>
    </PPointData>
    <PCellData>
      <PDataArray type="Float64" Name="rho"/>
    </PCellData>
    <PPoints>
      <PDataArray type="Float64" Name="Points" NumberOfComponents="3"/>
    </PPoints>
    <Piece Source="VTK/flow_001000_P0000.vtu"/>
    <Piece Source="VTK/flow_001000_P0001.vtu"/>
  </PUnstructuredGrid>
</VTKFile>

2. Real-Time PVD Timeline Collection Builder

To prevent overwriting or breaking time-series animations upon restarting a simulation: * When resuming a run (restart_from_file = .true.), the solver calls load_existing_pvd, which parses the existing flow.pvd file up to the restart step, preserving previous steps. * When writing new steps, the solver appends new entries to the flow.pvd file, maintaining timeline continuity across restarts.

3. Diagnostic CSV Tables

Numerical validation and conservation metrics are written directly to structured CSV files under the <output_dir>/diagnostics/ folder:

3.1 energy_diagnostics.csv

Monitors thermal conservation and temperature recovery. * step, time: Time-marching tracking parameters. * min_T, max_T, mean_T: Temperature grid statistics (). * min_h, max_h, mean_h: Sensible enthalpy statistics (). * max_qrad: Peak radiative heat sink value (). * rel_h_residual: Relative conservation balance deficit from energy operator updates.

3.2 chemistry_diagnostics.csv

Monitors stiff reactor kinetics and subcycling metrics. * step, time: CFD marching tracking parameters. * chem_steps: Number of local CVODE reactor steps completed. * max_dT, max_dY: Peak thermal and composition changes across the chemistry step. * cache_hits, cache_misses: Diagnostic indicators measuring Cantera state-caching efficiency.

4. ParaView Post-Processing Workflow

To perform quantitative validation of diffuse coflow flames against experimental profiles or 1D models:

  1. Load full domain: Open the central flow.pvd file in ParaView.
  2. Plot Over Line Filter:
  3. Select Filters -> Data Analysis -> Plot Over Line.
  4. Radial Profiles: Set line coordinates from to to extract radial profiles downstream.
  5. Centerline Profiles: Set line coordinates along the symmetry boundary from to .
  6. Data Export: Click File -> Save Data to write the line-resampled parameters (velocity, temperature, species mass fractions) to CSV files.