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.
C-Binding interface for the Cantera C++ bridge.
These routines map directly to the symbols defined in cantera_interface.cpp.
Retrieves the total number of species in the loaded Cantera mechanism.
C-Binding interface for the Cantera C++ bridge.
These routines map directly to the symbols defined in cantera_interface.cpp.
Retrieves the name of a specific species from Cantera.
| Type | Intent | Optional | 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 |
C-Binding interface for the Cantera C++ bridge.
These routines map directly to the symbols defined in cantera_interface.cpp.
Initializes the Cantera mixture and loads the mechanism file.
| Type | Intent | Optional | 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 |
C-Binding interface for the Cantera C++ bridge.
These routines map directly to the symbols defined in cantera_interface.cpp.
Performs a bulk update of transport properties for all cells.
| Type | Intent | Optional | 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 |
Container for cell-centered transport properties.
| 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(:) |
Safely deallocates transport property fields.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(transport_properties_t), | intent(inout) | :: | transport |
Allocates property arrays and initializes the Cantera bridge if required.
| Type | Intent | Optional | 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. |
Evaluates physical properties for the entire domain.
| Type | Intent | Optional | 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(:) |
Higher-level wrapper to coordinate Cantera initialization.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(case_params_t), | intent(inout) | :: | params |