[Nek5000-users] Scalar Derivatives / Scalar Dissipation

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Apr 15 03:47:50 CDT 2011


Hi Neks,

I would like to investigate the mixing of passive scalars in turbulent flows. Therefore, I tried to write a function to compute the scalar dissipation rate. I found someone on the list who did it for temperature and pressure so I tried the same way. Unfortunately, my gradients seem to be zero all the time. The code i wrote looks like:

      include 'SIZE'
      include 'TOTAL'
      include 'ZPER'
      include 'NEKUSE'

      common /scalar/ dc1dx(lx1*ly1,lz1*lelt)
     &             ,  dc1dy(lx1*ly1,lz1*lelt)
     &             ,  dc1dz(lx1*ly1,lz1*lelt)
      real scalar_diss
      scalar_diss = 0.0

      call gradm1(dc1dx, dc1dy, dc1dz, ps(1))
        do i=1,lx1*ly1
          do j=1,lz1*lelt
              scalar_diss = scalar_diss + (dc1dx(i, j)**2)*2
              scalar_diss = scalar_diss + (dc1dy(i, j)**2)*2
              scalar_diss = scalar_diss + (dc1dz(i, j)**2)*2
           enddo
        enddo
        write(6,*) scalar_diss

I looks pretty much the same like in https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2010-November/001106.html. The fields have all the same size (lx1=lx2=lx3 and so on).
My testcase is a small rectangular grid initialized with the passive scalar set to one in the lower half and zero in the upper half. Thus, I would expect some value about 2*number of points.
I hope you can help me. I'm struggling with this for some time now, but could not find my mistake. Maybe it is just my lack of experience with Fortran.

Thank you
Alex


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


More information about the Nek5000-users mailing list