boundary_temperature Subroutine

public subroutine boundary_temperature(mesh, bc, face_id, interior_T, ext_T, is_dirichlet)

Returns the pressure BC type for a given face. Evaluates temperature at a boundary face.

Dirichlet/fixed_value boundaries return the configured patch_T. All other boundary types currently behave as zero-gradient boundaries.

Arguments

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

Called by

proc~~boundary_temperature~~CalledByGraph proc~boundary_temperature mod_bc::boundary_temperature proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~boundary_temperature program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~advance_energy_transport

Source Code

   subroutine boundary_temperature(mesh, bc, face_id, interior_T, ext_T, is_dirichlet)
      type(mesh_t), intent(in) :: mesh
      type(bc_set_t), intent(in) :: bc
      integer, intent(in) :: face_id
      real(rk), intent(in) :: interior_T
      real(rk), intent(out) :: ext_T
      logical, intent(out) :: is_dirichlet

      integer :: patch_id

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

      select case (bc%patches(patch_id)%temperature_type_id)
      case (bc_dirichlet)
         ext_T = bc%patches(patch_id)%temperature
         is_dirichlet = .true.
      case default
         ext_T = interior_T
         is_dirichlet = .false.
      end select
   end subroutine boundary_temperature