|
[Sponsors] |
June 5, 2014, 13:31 |
Stop particle trajectory in DPM
|
#1 |
New Member
Join Date: May 2014
Posts: 4
Rep Power: 12 |
Hello, i am using FLUENT DPM to do particle tracking. And for my case, particles need to be considered as trapped when certain conditions satisfied, without ever hit the boundaries. I am now using a UDF to check whether the conditions are satisfied after each DPM time step, but don't know how to tell FLUENT that the particles need to be considered as "trapped" and stop the tracking for that particles. Can anyone know the macro or variables in DPM that i can access in UDF to do this job? Thank you so much!
|
|
June 9, 2014, 12:28 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
It's easy:
DEFINE_DPM_BC(name,p,t,f,f_normal,dim) { /*if reflected*/ return PATH_ACTIVE; /*if trapped*/ return PATH_ABORT; /*if escaped*/ return PATH_END; } You have some examples in your UDF Guide, check it for further information. Cheers |
|
June 9, 2014, 13:48 |
|
#3 |
New Member
Join Date: May 2014
Posts: 4
Rep Power: 12 |
Hi, upeksa,
Thank you for the reply! My problem is the DEFINE_DPM_BC macro will only be executed when the particle center hit the wall boundaries. While for my case, I need to stop the particles before that (when the particle surface hit the wall). I am now using DEFINE_DPM_SCALAR_UPDATE macro to make the judgement (when the particle should be stopped), but do you think we can force FLUENT to execute DEFINE_DPM_BC at a user defined condition? Thank you!! oball |
|
June 10, 2014, 08:47 |
|
#4 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
I am not sure, I have never used DPM macros that way.
Try something like: DEFINE_DPM_SCALAR_UPDATE(arguments) { /*if I want the particle to stop*/ for (i=0;i<dim;i++) P_VEL0[i]=0.0; } Let me know if it worked. Cheers |
|
June 11, 2014, 01:52 |
|
#5 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
Quote:
p->stream_index = -1; |
||
June 27, 2014, 16:53 |
|
#6 |
New Member
Join Date: May 2014
Posts: 4
Rep Power: 12 |
Just heard from ANSYS tech service, MARK_PARTICLE(p, P_FL_REMOVED) will work. It will stop the trajectory tracking for that particle and count it as trapped.
|
|
July 23, 2014, 17:38 |
|
#7 | |
New Member
Ebrahim
Join Date: Mar 2010
Posts: 28
Rep Power: 16 |
Quote:
Does the above macro work for you? I used it with FLUENT 6.3 but faced with this error: "error C2065: 'P_FL_REMOVED' : undeclared identifier" Is it only usable in ANSYS_FLUENT or can be used in FLUENT 6.3 as well? Thanks |
||
November 14, 2016, 16:35 |
|
#8 |
New Member
raa
Join Date: Oct 2016
Posts: 3
Rep Power: 10 |
||
November 18, 2016, 10:11 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It would be in possible future versions of Fluent where they change the structure of the data, such that p->stream_index is no longer the working.
Even if now "MARK_PARTICLE(p, P_FL_REMOVED)" is a macro that becomes "p->stream_index = -1", it does not have to stay this way. If you want to have more certainty that your code will run in future versions of Fluent, use the interface that the developers give you. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPM: Particle tracks stop at a "reflect" surface | Confused | FLUENT | 3 | February 7, 2022 13:12 |
DPM particle tracking considering particle size | oball | Fluent UDF and Scheme Programming | 4 | October 6, 2019 15:42 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
DPM particle trajectory | hedonist | FLUENT | 0 | April 4, 2003 00:13 |