[Nek5000-users] Planar average subroutines

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Mon Sep 25 06:55:44 CDT 2017


Dear Juan Pablo,


Something like this should work in 2D and 3D , which can be put in userchk.


hth

Paul



      integer e,f

      real one(lx1*ly1*lz1*lelt)


      n = lx1*ly1*lz1*nelt


      call rone(one,n)


      vavg = 0.0 ! Numerator

      davg = 0.0 ! Denominator



      do e=1,nelt

      do f=1,2*ndim

         if (cbc(e,f,1).eq.'v  ') vavg = vavg + facint_v(vy ,area,f,e)

         if (cbc(e,f,1).eq.'v  ') davg = davg + facint_v(one,area,f,e)

      enddo

      enddo

      vavg = glsum(vavg,1) ! Sum across all processors

      davg = glsum(davg,1)

      if (davg.gt.0) vavg = vavg / davg

________________________________
From: Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov> on behalf of nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
Sent: Sunday, September 24, 2017 3:26:32 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: [Nek5000-users] Planar average subroutines

Dear Neks, I need to calculate the average UY velocity in the top face of my domain, every timestep. That face is the only one with "v  " BC, so I think it is easier to identify the elements.

Now I need to do it in 2D, but soon I'll have to do it in 3D.

I've been reading something about planar_average_z subroutine, and also planar_average_xy (for exemple). In navier5 I found only planar_average_z.

Any idea of how could use this subroutine to calculate the UY average in the top face?

Thank you.

Regards,

Juan Pablo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20170925/32160a39/attachment.html>


More information about the Nek5000-users mailing list