<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Dear Ilya,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">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.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Particle positions are then updated using 3rd-order Adams Bashforth (AB3).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"> x^n = x^{n-1} + dt*(23/12 v^{n-1} - 16/12 v^{n-2} + 5/12 v^{n-3}</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Each mpi rank is responsible for updating it's list of particle positions.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">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).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">ndim is the number of space dimensions (2 or 3).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">hth</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Paul</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nek5000-users <nek5000-users-bounces@lists.mcs.anl.gov> on behalf of nek5000-users@lists.mcs.anl.gov <nek5000-users@lists.mcs.anl.gov><br>
<b>Sent:</b> Thursday, March 15, 2018 9:07:51 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Subscribe</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hello everybody!<br>
<br>
</div>
Can you tell me how this function work?<br>
<br>
!-----------------------------------------------------------------------<br>
subroutine particle_advect_std(x,vh,partv,npart)<br>
<br>
! Lagrangian particle advection<br>
<br>
include 'SIZE'<br>
include 'TOTAL'<br>
<br>
real x(ldim,lpart),vh(ldim,2:3,lpart),partv(lpart)<br>
common /scruz/ u1(ldim,lpart)<br>
<br>
common /padvc/ xmx(3,0:2)<br>
<br>
if (istep.eq.0) then ! AB1<br>
call rzero(vh,3*ndim*npart) <br>
c1 = 1.<br>
c2 = 0.<br>
c3 = 0.<br>
elseif (istep.eq.1) then ! AB2<br>
c1 = 3<br>
c2 = -1.<br>
c3 = 0<br>
c1 = c1/2.<br>
c2 = c2/2.<br>
else ! AB3<br>
c1 = 23.<br>
c2 = -16.<br>
c3 = 5.<br>
c1 = c1/12.<br>
c2 = c2/12.<br>
c3 = c3/12<br>
endif<br>
<br>
<br>
call interp_v(u1,x,npart) <br>
<br>
do i=1,npart<br>
do k=1,ndim<br>
! Update particle position and history<br>
x(k,i) = x(k,i) <br>
$ + dt*(c1*u1(k,i) + c2*vh(k,2,i) + c3*vh(k,3,i))<br>
! Update particle and fluid velocity history<br>
vh(k,3,i) = vh(k,2,i)<br>
vh(k,2,i) = u1(k,i)<br>
enddo<br>
enddo<br>
<br>
return<br>
end<br>
!----------------------------------------------------------------------<br>
<br>
<br>
</div>
I understood how works function interp_v. Also, I know what is ldim, lpart, x, u1.<br>
<br>
</div>
I think that vh is lagged velocity.<br>
<br>
</div>
Can I give vh? What is partv? I have no idea( And scruz?<br>
<br>
</div>
Ilya<br>
</div>
</div>
</body>
</html>