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/)
-   -   Unit vector from cell centroid to the boundary face (https://www.cfd-online.com/Forums/fluent-udf/230892-unit-vector-cell-centroid-boundary-face.html)

Achini October 11, 2020 04:00

Unit vector from cell centroid to the boundary face
 
Hello!

I am planning to model particle attractions with the channel wall.
To get the force exerted by the channel wall to the particle, I'm planning to use DPM_BODYFORCE macro.

In order to get the resultant force, I need to get the unit vector from a cell to the boundary. how can i find it?

also how can i create a loop to loop over the cells in the boundary?

I'd be greatful if anyone could help me with this.

Thank you!

AlexanderZ October 12, 2020 06:39

the macro is
Code:

DEFINE_DPM_BODY_FORCE
the adjacent cell’s variables values could be found using F_C0(f,t),THREAD_T0(t) and F_C1(f,t),THREAD_T1(t) macros (c1 t1 in case the face is interior)

not sure what is unit vector

i recommend you to read Ansys Fluent Customization manual, you may find some examples there

Achini October 12, 2020 10:26

Hello AlexanderZ,

Thank you for your reply.

Do you know of a method to distinguish between particles injected via two separation injections (Injection 0 & Injection 1). Injected particles from both injections are identicle execpt for their surface properties.

once a particle is located, I want to identify whethher it is from injection 0 or injection 1.

I'd be greatful if you could help me with this.

Thank you!


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