initboundary Subroutine

public subroutine initboundary()

Uses

  • proc~~initboundary~~UsesGraph proc~initboundary initboundary module~modglobal modglobal proc~initboundary->module~modglobal module~modinletdata modinletdata proc~initboundary->module~modinletdata

Arguments

None

Called by

proc~~initboundary~~CalledByGraph proc~initboundary initboundary program~dalesurban DALESURBAN program~dalesurban->proc~initboundary

Source Code

   subroutine initboundary
      use modglobal,    only : ib, kb, ke, kh, kmax, pi, zf, iplane
      use modinletdata, only : irecy
      implicit none

      real    :: zspb, zspt
      integer :: k
      allocate (tsc(kb:ke + kh))
      ! Sponge layer
      if (ksp == -1) then
         !      ksp  = min(3*kmax/4,kmax - 15)
         ksp = (kb - 1) + max(min(3*kmax/4, kmax - 15),1)
      end if

      zspb = zf(ksp)
      zspt = zf(ke)

      tsc(kb:ksp - 1) = 0.0
      do k = ksp, ke
         tsc(k) = rnu0*sin(0.5*pi*(zf(k) - zspb)/(zspt - zspb))**2
      end do
      tsc(ke + 1) = tsc(ke)
      irecy = ib + iplane

   end subroutine initboundary