dispthicknessexp Subroutine

public subroutine dispthicknessexp(output)

Uses

  • proc~~dispthicknessexp~~UsesGraph proc~dispthicknessexp dispthicknessexp module~modglobal modglobal proc~dispthicknessexp->module~modglobal

Arguments

Type IntentOptional Attributes Name
real, intent(out), dimension(ib:ie) :: output

Called by

proc~~dispthicknessexp~~CalledByGraph proc~dispthicknessexp dispthicknessexp proc~inletgen inletgen proc~inletgen->proc~dispthicknessexp proc~inletgennotemp inletgennotemp proc~inletgennotemp->proc~dispthicknessexp

Source Code

  subroutine dispthicknessexp(output)
! output is an array of length (ib:ie)) containing displacement thickness values
    use modglobal, only : ib,ie,kb,ke,dzf,xf!,Uinf
    implicit none

       real, dimension(ib:ie),       intent(out) :: output  !< dispacement thickness
       real, dimension(kb:ke)                    :: dthick
!       real    :: umax
       real    :: dispm
       real    :: disp2m
       real    :: xfdispm
       integer :: i,k

     ! write(6,*) 'Uinl(ke)=', uinput(ke)
       do i=ib,ie
!       umax = maxval(Utav(i,:))
       do k=kb,ke
         dthick(k) = (1.- Utav(i,k)/ Utav(i,ke)) *dzf(k)       ! time-averaged, j-averaged velocity
!         dthick(k) = (1.- Utav(i,k)/ umax) *dzf(k)       ! time-averaged, j-averaged velocity

       end do
       output(i)   = sum(dthick)  ! displacement thickness
       end do

       dispm  = sum(output(ib:ie))/(ie-ib+1)      ! mean(displacement)
       disp2m = sum(output(ib:ie)**2.)/(ie-ib+1)   ! mean(displacement^2)
       xfdispm  = sum(xf(ib:ie)*output(ib:ie))/(ie-ib+1)     ! mean(xf*displ)

       ddispdx = (xfdispm - (xfm*dispm)) / (xf2m -xfm**2.)    ! this is d/dx(delta*)
!       ddispdx = 0.    ! for the test
!       dinl    = dispm - ddispdx*xfm                         ! this is the starting value (delta* = dinl + d/dx(delta)*x)

  end subroutine dispthicknessexp