Hi- I have a problem and am not sure quite how to deal with it. I have fluid code which has been hybridized with a set of non interacting particles. The output is as follows: I output the fluid variables as a time series:
x_0(i,j,k) x_1(i,j,k) x_2(i,j,k) : : : where x is the fluid variable. The particle positions are output as this: x_0(n) x_1(n) x_2(n) where n runs from 1 to nparts. So for 30720 particles, each time step contains a 1x30720 array. I do this for both x and y. The particle number is related to the inital grid coordinates by: x(n) = i*dx i=1,30 y(n) = j*dy j=1,1024 I want to map these positions back onto my fluid grid and represent them as dots (appropriately sampled, of course). The particle number is implicit in the index of the particle array. I have tried mapping the particles back onto the grid within the code, but the results are unsatisfactory. I would think I could make a 2 vector out of the x and y positions, but then I need to attach a particle number to that two vector, such that particle m is at X(x(m),y(m)). Is this easy to do, and if so, how do I do it? It is ok that the particle positions are in physical coordinates, since I remap the fluid(i,j,k) variables onto the same grid. Any advice would be helpful. Thanks, Dan
