initialize_transport Subroutine

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.


Calls

proc~~initialize_transport~~CallsGraph proc~initialize_transport mod_transport_properties::initialize_transport proc~initialize_cantera_wrapper mod_transport_properties::initialize_cantera_wrapper proc~initialize_transport->proc~initialize_cantera_wrapper interface~cantera_get_species_count_c mod_transport_properties::cantera_get_species_count_c proc~initialize_cantera_wrapper->interface~cantera_get_species_count_c interface~cantera_get_species_name_c mod_transport_properties::cantera_get_species_name_c proc~initialize_cantera_wrapper->interface~cantera_get_species_name_c interface~cantera_init_c mod_transport_properties::cantera_init_c proc~initialize_cantera_wrapper->interface~cantera_init_c

Called by

proc~~initialize_transport~~CalledByGraph proc~initialize_transport mod_transport_properties::initialize_transport program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~initialize_transport

Source Code

   subroutine initialize_transport(mesh, params, transport)
      type(mesh_t), intent(in) :: mesh
      type(case_params_t), intent(inout) :: params
      type(transport_properties_t), intent(inout) :: transport

      if (params%enable_cantera_fluid .or. params%enable_cantera_species .or. params%enable_cantera_thermo) then
         call initialize_cantera_wrapper(params)
      end if

      allocate(transport%rho(mesh%ncells))
      allocate(transport%mu(mesh%ncells))
      allocate(transport%nu(mesh%ncells))
      allocate(transport%lambda(mesh%ncells))
      
      if (params%nspecies > 0) then
         allocate(transport%diffusivity(params%nspecies, mesh%ncells))
         transport%diffusivity = zero
      end if

      transport%rho = params%rho
      transport%mu = zero
      transport%nu = zero
      transport%lambda = zero
   end subroutine initialize_transport