boundary_species Subroutine

public subroutine boundary_species(mesh, bc, face_id, k, interior_Y, ext_Y, is_dirichlet)

Evaluates species mass fractions at a boundary face.

Dirichlet species boundaries use patch_Y(k,p). All other species boundary types currently extrapolate the interior mass fraction, so fixed temperature boundaries without fixed species use the interior composition when constructing .

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh
type(bc_set_t), intent(in) :: bc
integer, intent(in) :: face_id
integer, intent(in) :: k
real(kind=rk), intent(in) :: interior_Y
real(kind=rk), intent(out) :: ext_Y
logical, intent(out) :: is_dirichlet

Source Code

   subroutine boundary_species(mesh, bc, face_id, k, interior_Y, ext_Y, is_dirichlet)
      type(mesh_t), intent(in) :: mesh
      type(bc_set_t), intent(in) :: bc
      integer, intent(in) :: face_id
      integer, intent(in) :: k
      real(rk), intent(in) :: interior_Y
      real(rk), intent(out) :: ext_Y
      logical, intent(out) :: is_dirichlet

      integer :: patch_id

      patch_id = mesh%faces(face_id)%patch
      if (patch_id <= 0) then
         ext_Y = interior_Y
         is_dirichlet = .false.
         return
      end if

      select case (bc%patches(patch_id)%species_type_id)
      case (bc_dirichlet)
         ext_Y = bc%patches(patch_id)%species_Y(k)
         is_dirichlet = .true.
      case default
         ext_Y = interior_Y
         is_dirichlet = .false.
      end select
   end subroutine boundary_species