<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>