Parabolic boundary condition: zero diffusive flux normal to the wall (no-stress for momentum, no-heat-flux for rho*theta).
Reflects the normal component of the interior solution gradient:
grad_ext = grad_int - 2 * (grad_int . n) * n
After AverageSides() this gives avgGrad . n = 0 at every wall node, so the BR1 diffusive boundary flux f^diff = -coeff(avgGrad.n)nmag vanishes identically on no-normal-flow walls.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BoundaryCondition), | intent(in) | :: | bc | |||
| class(Model), | intent(inout) | :: | mymodel |
subroutine pbc2d_NoStress_ESAtmo2D(bc,mymodel)
!! Parabolic boundary condition: zero diffusive flux normal to the wall
!! (no-stress for momentum, no-heat-flux for rho*theta).
!!
!! Reflects the normal component of the interior solution gradient:
!!
!! grad_ext = grad_int - 2 * (grad_int . n) * n
!!
!! After AverageSides() this gives avgGrad . n = 0 at every wall node,
!! so the BR1 diffusive boundary flux f^diff = -coeff*(avgGrad.n)*nmag
!! vanishes identically on no-normal-flow walls.
class(BoundaryCondition),intent(in) :: bc
class(Model),intent(inout) :: mymodel
! Local
integer :: n,i,iEl,k,iVar
real(prec) :: nhat(1:2),gn,g(1:2)
select type(m => mymodel)
class is(ESAtmo2D_t)
do n = 1,bc%nBoundaries
iEl = bc%elements(n)
k = bc%sides(n)
do i = 1,m%solution%interp%N+1
nhat = m%geometry%nHat%boundary(i,k,iEl,1,1:2)
do iVar = 1,m%nvar
g(1:2) = m%solutionGradient%boundary(i,k,iEl,iVar,1:2)
gn = g(1)*nhat(1)+g(2)*nhat(2)
m%solutionGradient%extBoundary(i,k,iEl,iVar,1) = g(1)-2.0_prec*gn*nhat(1)
m%solutionGradient%extBoundary(i,k,iEl,iVar,2) = g(2)-2.0_prec*gn*nhat(2)
enddo
enddo
enddo
endselect
endsubroutine pbc2d_NoStress_ESAtmo2D