[Nek5000-users] Subscribe

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Mar 15 09:07:51 CDT 2018


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/8adb6279/attachment.html>


More information about the Nek5000-users mailing list