[Nek5000-users] Stream function

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Jun 26 11:35:23 CDT 2018


Hi Phillip,

I am using the “Blasius” example test outputting the streamfunction as a scalar.
I included my code below. I am not sure what I am doing wrong.
In userchk, I added “compute streamfunction from vorticity” from the psi_omega example, but it does not compute the psi properly… (max_psi = min_psi = 0 in every step)

c-----------------------------------------------------------------------
      subroutine userchk
      include 'SIZE'
      include 'TOTAL'

      common /myblas/ ub(lx1,ly1,lz1,lelt),vb(lx1,ly1,lz1,lelt)
      common /blasiusr/ u(lx1,ly1,lz1,lelv),v(lx1,ly1,lz1,lelv)
      common /blasiusg/ bin(lx1,ly1,lz1,lelv)
      common /scrns/    dum(lx1*ly1*lz1*lelv)

      common /xtream/ psi(lx1*ly1*lz1*lelt)
     $              , rhs(lx1*ly1*lz1*lelt)
     $              , h1 (lx1*ly1*lz1*lelt)
     $              , h2 (lx1*ly1*lz1*lelt)

      integer bin
      real normu(50),normv(50)

      real xmax,xmin,dx
      save xmax,xmin,dx

      n = nx1*ny1*nz1*nelv

c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
c     Compute streamfunction from vorticity
      call col2(rhs,bm1,n)
      call rone (h1 ,n)
      call rzero(h2 ,n)

      tol = param(22)
      imsh   = 1
      call hmholtz('psi ',psi,rhs,h1,h2,v1mask,vmult,imsh,tol,200,1)
c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
      if (istep.eq.0) call outpost(vx,vy,vz,pr,psi,'   ')

c     Compute delta*

      do i=1,n
         dum(i) = 1.-vx(i,1,1,1)
      enddo
      tot_deficit = glsc2(dum,bm1,n)
      xmin        = glmin(xm1,n)
      xmax        = glmax(xm1,n)
      delta_star  = tot_deficit/(xmax-xmin)
      psimin      = glmin(psi,n)
      psimax      = glmax(psi,n)
      if (nid.eq.0) write(6,1) istep,time,delta_star,psimin,psimax
    1 format(i8,1p4e13.5,'  blasius: delta*')

      return
      end









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180626/c1d8fb3c/attachment.html>


More information about the Nek5000-users mailing list