[Nek5000-users] rms in turbChannel

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Jun 9 19:09:08 CDT 2016


Hello,


In the userchk subroutine in the .usr file for the turbChannel example, what line of code can I add so rms values can be written in a .dat file such as it is done for umean and reystresses values.


      ! write statistics to file
      iostep_avg = param(68)
      if (nid.eq.0 .and. istep.gt.0 .and.
     &   mod(istep,iostep_avg).eq.0) then
         write(6,*) 'Dumping statistics ...'
         open(unit=56,file='reystresses.dat')
         write(56,'(A,1pe14.7)') '#time = ', time
         write(56,'(A)')
     &   '#  y     y+     R_uu     R_vv     R_ww     R_uv'
         open(unit=57,file='means.dat')
         write(57,'(A,1pe14.7)') '#time = ', time
         write(57,'(A)')
     &   '#  y     y+    Umean'

         m = ny1*nely/2
         do i=1,m
            write(56,3) yy(i)+1
     &                ,(yy(i)+1)*Re_tau
     &                , (urms_pl(i)-(uavg_pl(i))**2)/u_tau**2
     &                , vrms_pl(i)/u_tau**2
     &                , wrms_pl(i)/u_tau**2
     &                , uvms_pl(i)/u_tau**2
            write(57,3)  yy(i) + 1.
     &                , (yy(i)+1.)*Re_tau
     &                , uavg_pl(i)/u_tau
    3       format(1p15e17.9)
        enddo

        close(56)
        close(57)

        timel = time

      endif

      return
      end



Thank you,

Virgilio A. Gomez


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


More information about the Nek5000-users mailing list