write_lowmach_debug_vtu_arrays Subroutine

private subroutine write_lowmach_debug_vtu_arrays(unit_id, mesh, flow, params, fields, transport)

Append variable-density low-Mach debug fields to the VTU CellData block.

This helper writes one scalar value per owned cell, matching the normal parallel VTU partitioning. It intentionally does not change numerics.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit_id
type(mesh_t), intent(in) :: mesh
type(flow_mpi_t), intent(in) :: flow
type(case_params_t), intent(in) :: params
type(flow_fields_t), intent(in) :: fields
type(transport_properties_t), intent(in) :: transport

Source Code

   subroutine write_lowmach_debug_vtu_arrays(unit_id, mesh, flow, params, fields, transport)
      integer, intent(in) :: unit_id
      type(mesh_t), intent(in) :: mesh
      type(flow_mpi_t), intent(in) :: flow
      type(case_params_t), intent(in) :: params
      type(flow_fields_t), intent(in) :: fields
      type(transport_properties_t), intent(in) :: transport

      if (.not. params%enable_variable_density) return

      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'lowmach_source_current')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'lowmach_source_projection')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'lowmach_source_difference')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'divu_recomputed')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'divu_minus_S_projection')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'divu_minus_S_current')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'rho_current')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'rho_projection')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'rho_current_minus_projection')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'mass_flux_divergence_recomputed')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'lowmach_source_history_estimate')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'lowmach_source_advective_density')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'u_dot_grad_rho')
      call write_lowmach_debug_scalar(unit_id, mesh, flow, fields, transport, 'continuity_residual_estimate')

   end subroutine write_lowmach_debug_vtu_arrays