CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   print position of Lagrangian particle? (http://www.cfd-online.com/Forums/openfoam-solving/73424-print-position-lagrangian-particle.html)

sven82 March 8, 2010 10:52

print position of Lagrangian particle?
 
hi foamers,

I'm work at the moment with icoLangrangianFoam.
icoLagrangianFoam is a simple Solver exactly like icoFoam,
bur with Lagrangian particle. Now, i have problem with the position of the Lagrangian particle. For the post processing I want to follow the particle trace with a simple loop. For this loop I need the position particle, but everyone of my try s fail.
Know everyone how I can print the x,y and z position of Lagrangian particle?

thy for any help,
Sven

andrewryan March 8, 2010 12:09

I'm not sure if I understood your question correctly. There is a folder called lagrangian in the folder of every timestep. It contains a folder with the name of the could and a file called positions..

matejfor March 9, 2010 03:58

Another possibility would be to use particleTracks from $FOAM/applications/utilities/postProcessing/lagrangian which creates particle tracks for paraview from where you can export the data to a file. There's also other way, to add a bit of coding into your solver to dump the positions or any other info about your particles. search in src directory for dumpParticlePositions or writePostions function (as in basic/Cloud/Cloud.H). The only problem with this solution is, that the IOstream is that it cannot append, so you will have loads of files for each time-step. but easy script will sort it out I guess.

hope this helps

matej

andrewryan March 9, 2010 08:09

I didn't know about the particle tracks utility.. thx for the hint :)


All times are GMT -4. The time now is 15:55.