|
[Sponsors] | |||||
UDF for external force related to particle position |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Rexxar
Join Date: May 2012
Location: Bethlehem, PA
Posts: 36
Rep Power: 15 ![]() |
Hi,
i wanna exert an external force on particles, and below is my draft. But it is not working, anyone have some idea? Thank you very much. Code:
#include "udf.h"
DEFINE_DPM_BODY_FORCE(particle_body_force,p,i)
{
real bforce=0;
Domain *domain;
domain = Get_Domain(1);
Thread *t;
cell_t c;
real xc[ND_ND];
thread_loop_c(t,domain)
{
begin_c_loop_all(c, t)
{
C_CENTROID(xc,c,t);
bforce = xc[0];
}
end_c_loop_all(c, t)
}
return (bforce);
}
__________________
Best, Rexxar |
|
|
|
|
|
|
|
|
#2 |
|
Member
Rexxar
Join Date: May 2012
Location: Bethlehem, PA
Posts: 36
Rep Power: 15 ![]() |
Code:
Thread *t=P_CELL_THREAD(p); cell_t c=P_CELL(p); C_CENTROID(xc,c,t);
__________________
Best, Rexxar |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UDF for defining a body force in Singel ROtating Reference Frame | teymourj | Fluent UDF and Scheme Programming | 9 | August 18, 2016 16:33 |
| how to know position of particle in PTK | areriko | CFX | 0 | November 19, 2007 22:19 |
| udf about particle concentration--who can help me? | zhaoh | FLUENT | 1 | January 17, 2007 12:46 |
| how to get the particle residence time in UDF? | welch | FLUENT | 0 | November 17, 2005 20:32 |
| How can I get the particle current position in UDF | cfdfans | FLUENT | 4 | April 2, 2001 06:03 |