Lagrangian particloe Tracking and getting values back
I am trying to trace particles with a modifed program which uses the standard particle Cloud definitions. In my program which is simply modified from the standard Lagrangian solvers I have the expression
I want to access the particle's 'position' following that move so that I can do some extra calculation involving it and to store a std::vector of these positions. I may later want to get other information such as velocity too.
I define the variable 'particles' as
which conforms with hte satndard definitions fo particle clouds.
How can I access the position an other information from these Lagrangian solvers and particle clouds?
The next statement is particles.write(), which writes all the lagrangian defaulat cloud data so the information is there, but how to access it?
Lagrangian Tracking of particles
I found out how to do this. The passive particle Cloud is a C++ list of somne kind. You need to define an iterator to the list.
passiveParticleCloud::iterator iter = particles.begin();
Foam::vector Possy = iter().position();
Foam::vector Velocy = iter().U();
Foam::vector Diam = iter().d();
step through by incrementing iter
easy once you have spent hours on it.
|All times are GMT -4. The time now is 19:21.|