Build a boundary thermodynamic composition vector for fixed-T boundaries.
Fixed-composition species boundaries use patch_Y through
boundary_species; non-Dirichlet species boundaries use the adjacent
interior composition. Fixed-temperature enthalpy is then evaluated as
.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_t), | intent(in) | :: | mesh | |||
| type(bc_set_t), | intent(in) | :: | bc | |||
| type(case_params_t), | intent(in) | :: | params | |||
| integer, | intent(in) | :: | face_id | |||
| integer, | intent(in) | :: | cell_id | |||
| real(kind=rk), | intent(in) | :: | species_Y(:,:) | |||
| real(kind=rk), | intent(out) | :: | Y_point(:) |
subroutine build_boundary_thermo_Y(mesh, bc, params, face_id, cell_id, species_Y, Y_point) type(mesh_t), intent(in) :: mesh type(bc_set_t), intent(in) :: bc type(case_params_t), intent(in) :: params integer, intent(in) :: face_id integer, intent(in) :: cell_id real(rk), intent(in) :: species_Y(:,:) real(rk), intent(out) :: Y_point(:) integer :: k real(rk) :: ext_Y, sum_Y logical :: is_dirichlet if (size(Y_point) < params%nspecies) then call fatal_error('energy', 'Y_point too small in build_boundary_thermo_Y') end if if (size(species_Y, 1) < params%nspecies .or. size(species_Y, 2) < cell_id) then call fatal_error('energy', 'species_Y has incompatible shape in boundary thermo composition') end if sum_Y = zero do k = 1, params%nspecies call boundary_species(mesh, bc, face_id, k, species_Y(k, cell_id), ext_Y, is_dirichlet) Y_point(k) = max(zero, ext_Y) sum_Y = sum_Y + Y_point(k) end do if (sum_Y > tiny_safe) then Y_point(1:params%nspecies) = Y_point(1:params%nspecies) / sum_Y else Y_point = zero Y_point(1) = 1.0_rk end if end subroutine build_boundary_thermo_Y