boundary_pressure Subroutine

public subroutine boundary_pressure(mesh, bc, face_id, interior_p, ext_p, is_dirichlet)

Evaluates projection pressure at a boundary face.

This pressure is the hydrodynamic/projection field used by the Poisson solve. It is not the thermodynamic pressure passed to Cantera.

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_p
real(kind=rk), intent(out) :: ext_p
logical, intent(out) :: is_dirichlet

Source Code

   subroutine boundary_pressure(mesh, bc, face_id, interior_p, ext_p, 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_p
      real(rk), intent(out) :: ext_p
      logical, intent(out) :: is_dirichlet

      integer :: patch_id

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

      select case (bc%patches(patch_id)%pressure_type_id)
      case (bc_dirichlet)
         ext_p = bc%patches(patch_id)%pressure
         is_dirichlet = .true.
      case default
         ext_p = interior_p
         is_dirichlet = .false.
      end select
   end subroutine boundary_pressure