mod_output Module

Output management for VTK visualization and diagnostics (XML VTU format).

This module handles the generation of simulation results in modern XML-based VTK format (.vtu) and CSV-based global diagnostics. It manages the creation of the output directory, writing mesh summaries, and generating PVD collection files for time-series visualization in ParaView.


Uses

  • module~~mod_output~~UsesGraph module~mod_output mod_output module~mod_energy mod_energy module~mod_output->module~mod_energy module~mod_fields mod_fields module~mod_output->module~mod_fields module~mod_flow_projection mod_flow_projection module~mod_output->module~mod_flow_projection module~mod_input mod_input module~mod_output->module~mod_input module~mod_kinds mod_kinds module~mod_output->module~mod_kinds module~mod_mesh_types mod_mesh_types module~mod_output->module~mod_mesh_types module~mod_mpi_flow mod_mpi_flow module~mod_output->module~mod_mpi_flow module~mod_species mod_species module~mod_output->module~mod_species module~mod_transport_properties mod_transport_properties module~mod_output->module~mod_transport_properties module~mod_energy->module~mod_fields module~mod_energy->module~mod_input module~mod_energy->module~mod_kinds module~mod_energy->module~mod_mesh_types module~mod_energy->module~mod_mpi_flow iso_c_binding iso_c_binding module~mod_energy->iso_c_binding module~mod_bc mod_bc module~mod_energy->module~mod_bc module~mod_profiler mod_profiler module~mod_energy->module~mod_profiler mpi_f08 mpi_f08 module~mod_energy->mpi_f08 module~mod_fields->module~mod_input module~mod_fields->module~mod_kinds module~mod_fields->module~mod_mesh_types module~mod_fields->module~mod_bc module~mod_flow_projection->module~mod_fields module~mod_flow_projection->module~mod_input module~mod_flow_projection->module~mod_kinds module~mod_flow_projection->module~mod_mesh_types module~mod_flow_projection->module~mod_mpi_flow module~mod_flow_projection->module~mod_transport_properties module~mod_flow_projection->module~mod_bc module~mod_flow_projection->module~mod_profiler module~mod_flow_projection->mpi_f08 module~mod_input->module~mod_kinds iso_fortran_env iso_fortran_env module~mod_kinds->iso_fortran_env module~mod_mesh_types->module~mod_kinds module~mod_mpi_flow->module~mod_kinds module~mod_mpi_flow->module~mod_mesh_types module~mod_mpi_flow->mpi_f08 module~mod_species->module~mod_fields module~mod_species->module~mod_flow_projection module~mod_species->module~mod_input module~mod_species->module~mod_kinds module~mod_species->module~mod_mesh_types module~mod_species->module~mod_mpi_flow module~mod_species->module~mod_transport_properties module~mod_species->module~mod_bc module~mod_transport_properties->module~mod_input module~mod_transport_properties->module~mod_kinds module~mod_transport_properties->module~mod_mesh_types module~mod_transport_properties->module~mod_mpi_flow module~mod_bc->module~mod_input module~mod_bc->module~mod_kinds module~mod_bc->module~mod_mesh_types module~mod_profiler->module~mod_kinds module~mod_profiler->iso_fortran_env module~mod_profiler->mpi_f08

Used by

  • module~~mod_output~~UsedByGraph module~mod_output mod_output program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->module~mod_output

Subroutines

public subroutine prepare_output(params, flow)

Creates the output directory specified in the case parameters.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow

public subroutine write_diagnostics_header(params, flow)

Writes the CSV header for global simulation diagnostics.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow

public subroutine write_diagnostics_row(params, flow, step, time, stats)

Appends a new row of diagnostic data to the CSV file.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow
integer, intent(in) :: step
real(kind=rk), intent(in) :: time
type(solver_stats_t), intent(in) :: stats

public subroutine write_mesh_summary(params, flow, mesh)

Writes a human-readable summary of the mesh connectivity and patches.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow
type(mesh_t), intent(in) :: mesh

public subroutine write_pvd_collection(params, flow, nsteps, output_interval, dt)

Writes a PVD collection file to allow ParaView to load time-series data.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow
integer, intent(in) :: nsteps
integer, intent(in) :: output_interval
real(kind=rk), intent(in) :: dt

public subroutine write_vtu_unstructured(params, flow, mesh, fields, species, energy, transport, step)

Writes the full flow field to an XML Unstructured Grid file (.vtu).

Read more…

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(inout) :: flow
type(mesh_t), intent(in) :: mesh
type(flow_fields_t), intent(in) :: fields
type(species_fields_t), intent(in) :: species
type(energy_fields_t), intent(in) :: energy
type(transport_properties_t), intent(in) :: transport
integer, intent(in) :: step

private subroutine validate_hex_connectivity(mesh)

Performs sanity checks on hex connectivity before writing output.

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh

private subroutine write_pvtu_master(params, flow, step)

Writes the master Parallel VTK file (.pvtu) that links the rank pieces.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow
integer, intent(in) :: step

private subroutine write_vtu_cell_scalar(unit_id, name, field)

Internal helper to write a scalar field to a VTU file.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit_id
character(len=*), intent(in) :: name
real(kind=rk), intent(in) :: field(:)