Radiation BC: zero acoustic perturbation in the exterior state; the sound speed (variable 4), background density (variable 5) and relaxation rate (variable 6) are copied from the interior side so the Riemann solver sees a consistent c and rho0 (impedance-matched, non-reflecting outflow) and the exterior state stays a faithful mirror of the interior one for diagnostics. The relaxation rate carries no flux, so its exterior value never enters the tendency.
| 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 4), background density (variable 5) and relaxation
!! rate (variable 6) are copied from the interior side so the Riemann solver
!! sees a consistent c and rho0 (impedance-matched, non-reflecting outflow)
!! and the exterior state stays a faithful mirror of the interior one for
!! diagnostics. The relaxation rate carries no flux, so its exterior value
!! never enters the tendency.
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:3) = 0.0_prec
m%solution%extBoundary(i,j,iEl,4) = m%solution%boundary(i,j,iEl,4) ! c preserved
m%solution%extBoundary(i,j,iEl,5) = m%solution%boundary(i,j,iEl,5) ! rho0 preserved
m%solution%extBoundary(i,j,iEl,6) = m%solution%boundary(i,j,iEl,6) ! sigma preserved
enddo
enddo
endselect
endsubroutine hbc2d_Radiation_LinearEuler2D