[Nek5000-users] Subscribe

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Mar 15 13:49:21 CDT 2018


Dear Ilya,


Given a list of points, x, which can be and _should_ be distinct on each mpi process, interp_v() returns the fluid velocity at each of those points, x_i, i=1,...,npart.   Here, npart can be zero on some processors, but each process _must_ call interp_v.


Particle positions are then updated using 3rd-order Adams Bashforth (AB3).


     x^n = x^{n-1} + dt*(23/12 v^{n-1} - 16/12 v^{n-2} + 5/12 v^{n-3}


Each mpi rank is responsible for updating it's list of particle positions.


interp_v handles all of the interpolation and data movement required to find the velocity at any point x_i in the list.  (Communication would be required, for example, if a particle on a given mpi rank was in an element that is on a difference processor.)   Communication cost is ~ M * log_2 P, where M is the maximum of npart (or perhaps the average of npart).


ndim is the number of space dimensions (2 or 3).


hth


Paul


________________________________
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: Thursday, March 15, 2018 9:07:51 AM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] Subscribe

Hello everybody!

Can you tell me how this function work?

!-----------------------------------------------------------------------
      subroutine particle_advect_std(x,vh,partv,npart)

!     Lagrangian particle advection

      include 'SIZE'
      include 'TOTAL'

      real x(ldim,lpart),vh(ldim,2:3,lpart),partv(lpart)
      common /scruz/ u1(ldim,lpart)

      common /padvc/ xmx(3,0:2)

      if (istep.eq.0) then      ! AB1
         call rzero(vh,3*ndim*npart)
         c1 = 1.
         c2 = 0.
         c3 = 0.
      elseif (istep.eq.1) then  ! AB2
         c1 = 3
         c2 = -1.
         c3 = 0
         c1 = c1/2.
         c2 = c2/2.
      else                    ! AB3
         c1 = 23.
         c2 = -16.
         c3 = 5.
         c1 = c1/12.
         c2 = c2/12.
         c3 = c3/12
      endif


      call interp_v(u1,x,npart)

      do i=1,npart
      do k=1,ndim
!     Update particle position and history
           x(k,i) = x(k,i)
     $              + dt*(c1*u1(k,i) + c2*vh(k,2,i) + c3*vh(k,3,i))
!     Update particle and fluid velocity history
           vh(k,3,i) = vh(k,2,i)
           vh(k,2,i) = u1(k,i)
      enddo
      enddo

      return
      end
!----------------------------------------------------------------------


I understood how works function interp_v. Also, I know what is ldim, lpart, x, u1.

I think that vh is lagged velocity.

Can I give vh?  What is partv? I have no idea( And scruz?

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


More information about the Nek5000-users mailing list