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.

Currently supports fixed-value (Dirichlet) and zero-gradient (Neumann) BCs.

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

Called by

proc~~boundary_species~~CalledByGraph proc~boundary_species mod_bc::boundary_species proc~advance_species_transport mod_species::advance_species_transport proc~advance_species_transport->proc~boundary_species proc~build_boundary_thermo_y mod_energy::build_boundary_thermo_Y proc~build_boundary_thermo_y->proc~boundary_species proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~build_boundary_thermo_y program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~advance_species_transport program~lowmach_react_hex->proc~advance_energy_transport

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