Update h, cp, lambda, and diagnostic thermo density from current T.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_t), | intent(in) | :: | mesh | |||
| type(case_params_t), | intent(in) | :: | params | |||
| type(energy_fields_t), | intent(inout) | :: | energy | |||
| real(kind=rk), | intent(in), | optional | :: | species_Y(:,:) |
subroutine update_thermo_from_temperature_cantera(mesh, params, energy, species_Y) type(mesh_t), intent(in) :: mesh type(case_params_t), intent(in) :: params type(energy_fields_t), intent(inout) :: energy real(rk), intent(in), optional :: species_Y(:,:) integer :: n_len real(rk), allocatable :: P_arr(:), Y_local(:,:) character(kind=c_char), allocatable :: c_names_flat(:) if (.not. params%enable_cantera_thermo) return if (params%nspecies <= 0) then call fatal_error('energy', 'enable_cantera_thermo requires at least one inert thermo species') end if allocate(P_arr(mesh%ncells)) P_arr = params%background_press call build_thermo_Y(params, mesh%ncells, Y_local, species_Y) call build_c_species_names(params, c_names_flat, n_len) call cantera_update_thermo_c(mesh%ncells, energy%T, P_arr, params%nspecies, Y_local, & energy%h, energy%cp, energy%lambda, energy%rho_thermo, & params%energy_reference_T, c_names_flat, n_len) deallocate(P_arr) deallocate(Y_local) deallocate(c_names_flat) end subroutine update_thermo_from_temperature_cantera