Radiation BC: zero acoustic perturbation in the exterior state; the sound speed (variable 5) and background density (variable 6) are copied from the interior side so the Riemann solver sees a consistent c and rho0 (impedance-matched, non-reflecting outflow).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BoundaryCondition), | intent(in) | :: | bc | |||
| class(Model), | intent(inout) | :: | mymodel |
subroutine hbc2d_Radiation_LinearEuler2D(bc,mymodel)
!! Radiation BC: zero acoustic perturbation in the exterior state; the
!! sound speed (variable 5) and background density (variable 6) are copied
!! from the interior side so the Riemann solver sees a consistent c and
!! rho0 (impedance-matched, non-reflecting outflow).
class(BoundaryCondition),intent(in) :: bc
class(Model),intent(inout) :: mymodel
! Local
integer :: n,i,iEl,j
select type(m => mymodel)
class is(LinearEuler2D_t)
do n = 1,bc%nBoundaries
iEl = bc%elements(n)
j = bc%sides(n)
do i = 1,m%solution%interp%N+1
m%solution%extBoundary(i,j,iEl,1:4) = 0.0_prec
m%solution%extBoundary(i,j,iEl,5) = m%solution%boundary(i,j,iEl,5) ! c preserved
m%solution%extBoundary(i,j,iEl,6) = m%solution%boundary(i,j,iEl,6) ! rho0 preserved
enddo
enddo
endselect
endsubroutine hbc2d_Radiation_LinearEuler2D