hbc3d_Radiation_LinearEuler3D Subroutine

public subroutine hbc3d_Radiation_LinearEuler3D(bc, mymodel)

Radiation BC: zero acoustic perturbation in the exterior state; the sound speed (variable 5), background density (variable 6) and relaxation rate (variable 7) are copied from the interior side so the Riemann solver sees a consistent c and rho0 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.

Arguments

TypeIntentOptionalAttributesName
class(BoundaryCondition), intent(in) :: bc
class(Model), intent(inout) :: mymodel

Contents


Source Code

  subroutine hbc3d_Radiation_LinearEuler3D(bc,mymodel)
    !! Radiation BC: zero acoustic perturbation in the exterior state; the
    !! sound speed (variable 5), background density (variable 6) and relaxation
    !! rate (variable 7) are copied from the interior side so the Riemann solver
    !! sees a consistent c and rho0 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,j,iEl,s

    select type(m => mymodel)
    class is(LinearEuler3D_t)
      do n = 1,bc%nBoundaries
        iEl = bc%elements(n)
        s = bc%sides(n)
        do j = 1,m%solution%interp%N+1
          do i = 1,m%solution%interp%N+1
            m%solution%extBoundary(i,j,s,iEl,1:4) = 0.0_prec
            m%solution%extBoundary(i,j,s,iEl,5) = m%solution%boundary(i,j,s,iEl,5) ! c preserved
            m%solution%extBoundary(i,j,s,iEl,6) = m%solution%boundary(i,j,s,iEl,6) ! rho0 preserved
            m%solution%extBoundary(i,j,s,iEl,7) = m%solution%boundary(i,j,s,iEl,7) ! sigma preserved
          enddo
        enddo
      enddo
    endselect

  endsubroutine hbc3d_Radiation_LinearEuler3D