mod_transport_properties Module

Fluid transport properties and Cantera C++ bridge abstraction.

This module manages cell-centered physical properties such as flow density, viscosity, and species diffusivity. It acts as an isolation layer between the high-level flow/species solvers and the external Cantera C++ library.

The module supports two primary modes: 1. Constant Fallback: Properties are pulled directly from case.nml and remain uniform and static. 2. Cantera Dynamic: Mixture-averaged transport properties , are evaluated at every update interval using the current local composition, temperature, and pressure via the cantera_interface. The flow/projection density remains params%rho; Cantera thermodynamic density is stored separately as energy%rho_thermo for diagnostics and future use.


Uses

  • module~~mod_transport_properties~~UsesGraph module~mod_transport_properties mod_transport_properties module~mod_input mod_input module~mod_transport_properties->module~mod_input module~mod_kinds mod_kinds module~mod_transport_properties->module~mod_kinds module~mod_mesh_types mod_mesh_types module~mod_transport_properties->module~mod_mesh_types module~mod_mpi_flow mod_mpi_flow module~mod_transport_properties->module~mod_mpi_flow 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 mpi_f08 mpi_f08 module~mod_mpi_flow->mpi_f08

Used by

  • module~~mod_transport_properties~~UsedByGraph module~mod_transport_properties mod_transport_properties module~mod_flow_projection mod_flow_projection module~mod_flow_projection->module~mod_transport_properties module~mod_output mod_output module~mod_output->module~mod_transport_properties module~mod_output->module~mod_flow_projection module~mod_species mod_species module~mod_output->module~mod_species module~mod_species->module~mod_transport_properties module~mod_species->module~mod_flow_projection program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->module~mod_transport_properties program~lowmach_react_hex->module~mod_flow_projection program~lowmach_react_hex->module~mod_output program~lowmach_react_hex->module~mod_species

Interfaces

interface

C-Binding interface for the Cantera C++ bridge.

These routines map directly to the symbols defined in cantera_interface.cpp.

  • private function cantera_get_species_count_c() bind(c, name="cantera_get_species_count_c")

    Retrieves the total number of species in the loaded Cantera mechanism.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

C-Binding interface for the Cantera C++ bridge.

These routines map directly to the symbols defined in cantera_interface.cpp.

  • private subroutine cantera_get_species_name_c(k, name_out, name_len) bind(c, name="cantera_get_species_name_c")

    Retrieves the name of a specific species from Cantera.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: k
    character(kind=c_char, len=1), intent(out) :: name_out(*)
    integer(kind=c_int), value :: name_len

interface

C-Binding interface for the Cantera C++ bridge.

These routines map directly to the symbols defined in cantera_interface.cpp.

  • private subroutine cantera_init_c(mech_file, nspecies, species_names_flat, name_len) bind(c, name="cantera_init_c")

    Initializes the Cantera mixture and loads the mechanism file.

    Arguments

    Type IntentOptional Attributes Name
    character(kind=c_char, len=1), intent(in) :: mech_file(*)
    integer(kind=c_int), value :: nspecies
    character(kind=c_char, len=1), intent(in) :: species_names_flat(*)
    integer(kind=c_int), value :: name_len

interface

C-Binding interface for the Cantera C++ bridge.

These routines map directly to the symbols defined in cantera_interface.cpp.

  • private subroutine cantera_update_transport_c(ncells, T, P, nspecies, Y_in, mu_out, diff_out, species_names_flat, name_len) bind(c, name="cantera_update_transport_c")

    Performs a bulk update of transport properties for all cells.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: ncells
    real(kind=c_double), intent(in) :: T(ncells)
    real(kind=c_double), intent(in) :: P(ncells)
    integer(kind=c_int), value :: nspecies
    real(kind=c_double), intent(in) :: Y_in(*)
    real(kind=c_double), intent(out) :: mu_out(ncells)
    real(kind=c_double), intent(out) :: diff_out(*)
    character(kind=c_char, len=1), intent(in) :: species_names_flat(*)
    integer(kind=c_int), value :: name_len

Derived Types

type, public ::  transport_properties_t

Container for cell-centered transport properties.

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=rk), public, allocatable :: diffusivity(:,:)
real(kind=rk), public, allocatable :: lambda(:)
real(kind=rk), public, allocatable :: mu(:)
real(kind=rk), public, allocatable :: nu(:)
real(kind=rk), public, allocatable :: rho(:)

Subroutines

public subroutine finalize_transport(transport)

Safely deallocates transport property fields.

Arguments

Type IntentOptional Attributes Name
type(transport_properties_t), intent(inout) :: transport

public subroutine initialize_transport(mesh, params, transport)

Allocates property arrays and initializes the Cantera bridge if required.

Arguments

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

The computational mesh.

type(case_params_t), intent(inout) :: params

Simulation parameters (contains mechanism and species info).

type(transport_properties_t), intent(inout) :: transport

The property container to initialize.

public subroutine update_transport_properties(mesh, flow, params, Y, transport, T_state)

Evaluates physical properties for the entire domain.

Read more…

Arguments

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

The computational mesh.

type(flow_mpi_t), intent(inout) :: flow

MPI decomposition and halo metadata.

type(case_params_t), intent(in) :: params

Simulation parameters and background conditions.

real(kind=rk), intent(in), optional :: Y(:,:)
type(transport_properties_t), intent(inout) :: transport

The property container to update.

real(kind=rk), intent(in), optional :: T_state(:)

private subroutine initialize_cantera_wrapper(params)

Higher-level wrapper to coordinate Cantera initialization.

Read more…

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(inout) :: params