[Nek5000-users] Computing total kinetic energy

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Dec 4 02:08:49 CST 2012


Hello

I use following code to compute total kinetic energy in the domain inside
userchk

c     Compute total kinetic energy
      if(mod(istep,10).eq.0)then
         n = nx1*ny1*nz1*nelv
         xke = glsc3(vx, vx, bm1, n)
         yke = glsc3(vy, vy, bm1, n)
         zke = glsc3(vz, vz, bm1, n)
         total_ke = 0.5*(xke + yke + zke)
         if(nid.eq.0) write(6,1) istep, time, total_ke
    1    format(i6,1p2e14.6,' Totalke')
      endif

Is this correct ? Does this account for the parallel computation or do I
need to do something extra to gather from other processes ?

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


More information about the Nek5000-users mailing list