CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to follow the path of a particle in DPM? (https://www.cfd-online.com/Forums/fluent-udf/141147-how-follow-path-particle-dpm.html)

upeksa September 1, 2014 07:35

How to follow the path of a particle in DPM?
 
I want to write a UDF, that, when there is an impact on a wall, the coordinates of the centroids in the particle path which made that impact are shown.

Do you know how to loop over particle path in a DEFINE_ON_DEMAND? And how to retrieve the particle ID of each path?

Thanks for helping.

pakk September 1, 2014 10:22

You ask for a solution using DEFINE_ON_DEMAND, but I would instead use DEFINE_DPM_BC (or maybe DEFINE_DPM_SCALAR_UPDATE, depending on what you exactly want).
In that case, p is the pointer to the particle, p->part_id is the ID and P_POS(p) is the position of the particle.

If with "centroid" you mean the center of the face on which the particle collided, you would access it using the "f" in the DEFINE_DPM_BC macro, and then F_CENTROID(x,f,t) would set the centroid of that face to variable x.

souria November 26, 2014 11:18

hey,
Did you find the answer to your question ??

I'm trying to do the same thing ..

Let me know please
Thanks

Quote:

Originally Posted by upeksa (Post 508627)
I want to write a UDF, that, when there is an impact on a wall, the coordinates of the centroids in the particle path which made that impact are shown.

Do you know how to loop over particle path in a DEFINE_ON_DEMAND? And how to retrieve the particle ID of each path?

Thanks for helping.



All times are GMT -4. The time now is 10:03.