[Nek5000-users] dissipation rate

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Apr 17 11:15:19 CDT 2018


Hi Nek,

Is there a subrountine in the nek I can get the turbulent dissipation rate
in the position (x,y,z) which can have the similar interpolation function
with interp_v below.

      subroutine interp_v(uvw,xyz,n)
c
c     evaluate velocity for list of points xyz
c
      include 'SIZE'
      include 'TOTAL'

      real uvw(ldim,n),xyz(ldim,n)

      parameter(nmax=lpart,nfldmx=ldim)

      common /rwk_intp/
     $       fwrk(lx1*ly1*lz1*lelt,nfldmx),
     $       rwk(nmax,ldim+1),
     $       fpts(ldim*nmax),
     $       pts(ldim*nmax)
      common /iwk_intp/
     $       iwk(nmax,3)


      integer icalld,e
      save    icalld
      data    icalld /0/

      nxyz  = nx1*ny1*nz1
      ntot  = nxyz*nelt

      if (n.gt.nmax) call exitti ('n > nmax in interp_v!$',n)

      if (nelgt.ne.nelgv) call exitti
     $   ('nelgt.ne.nelgv not yet supported in interp_v!$',nelgv)

      do i=1,n ! ? not moving -> save?
         pts(i)     = xyz(1,i)
         pts(i + n) = xyz(2,i)
         if (if3d) pts(i + n*2) = xyz(3,i)
      enddo

      if (icalld.eq.0) then ! interpolation setup
        icalld = 1
        tolin  = 1.e-8
        call intp_setup(tolin)
      endif

      ! pack working array
      call opcopy(fwrk(1,1),fwrk(1,2),fwrk(1,3),vx,vy,vz)

      ! interpolate
      call intp_do(fpts,fwrk,ndim,
     $             pts(1),pts(1+n),pts(2*n+1),n,
     $             iwk,rwk,nmax,.true.)

      do i=1,n
         uvw(1,i) = fpts(i)
         uvw(2,i) = fpts(i + n)
         if(if3d) uvw(3,i) = fpts(i + n*2)
      enddo

      return
      end

Kind regards,

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


More information about the Nek5000-users mailing list