No-stress boundary condition for the BR1 diffusive flux. Reflects the interior gradient so that the normal component of the averaged gradient vanishes at the boundary: sigma_ext = sigma_int - 2 (sigma_int . nhat) nhat This gives zero diffusive flux through the wall and is unconditionally stable for Bassi-Rebay.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BoundaryCondition), | intent(in) | :: | bc | |||
| class(Model), | intent(inout) | :: | mymodel |
subroutine pbc2d_NoStress_advection_diffusion_2d_t(bc,mymodel)
!! No-stress boundary condition for the BR1 diffusive flux.
!! Reflects the interior gradient so that the normal component
!! of the averaged gradient vanishes at the boundary:
!! sigma_ext = sigma_int - 2 (sigma_int . nhat) nhat
!! This gives zero diffusive flux through the wall and is
!! unconditionally stable for Bassi-Rebay.
class(BoundaryCondition),intent(in) :: bc
class(Model),intent(inout) :: mymodel
! Local
integer :: n,i,iEl,s,ivar
real(prec) :: nhat(1:2),sigma_n
select type(m => mymodel)
class is(advection_diffusion_2d_t)
do n = 1,bc%nBoundaries
iEl = bc%elements(n)
s = bc%sides(n)
do i = 1,m%solution%interp%N+1
nhat(1:2) = m%geometry%nHat%boundary(i,s,iEl,1,1:2)
do ivar = 1,m%nvar
sigma_n = m%solutionGradient%boundary(i,s,iEl,ivar,1)*nhat(1)+ &
m%solutionGradient%boundary(i,s,iEl,ivar,2)*nhat(2)
m%solutionGradient%extBoundary(i,s,iEl,ivar,1) = &
m%solutionGradient%boundary(i,s,iEl,ivar,1)-2.0_prec*sigma_n*nhat(1)
m%solutionGradient%extBoundary(i,s,iEl,ivar,2) = &
m%solutionGradient%boundary(i,s,iEl,ivar,2)-2.0_prec*sigma_n*nhat(2)
enddo
enddo
enddo
endselect
endsubroutine pbc2d_NoStress_advection_diffusion_2d_t