CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Stop particle trajectory in DPM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2014, 13:31
Default Stop particle trajectory in DPM
  #1
New Member
 
Join Date: May 2014
Posts: 4
Rep Power: 12
oball is on a distinguished road
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!
oball is offline   Reply With Quote

Old   June 9, 2014, 12:28
Default
  #2
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 13
upeksa is on a distinguished road
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
upeksa is offline   Reply With Quote

Old   June 9, 2014, 13:48
Default
  #3
New Member
 
Join Date: May 2014
Posts: 4
Rep Power: 12
oball is on a distinguished road
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
oball is offline   Reply With Quote

Old   June 10, 2014, 08:47
Default
  #4
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 13
upeksa is on a distinguished road
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
upeksa is offline   Reply With Quote

Old   June 11, 2014, 01:52
Default
  #5
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 17
gearboy is on a distinguished road
Quote:
Originally Posted by oball View Post
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!

p->stream_index = -1;
gearboy is offline   Reply With Quote

Old   June 27, 2014, 16:53
Default
  #6
New Member
 
Join Date: May 2014
Posts: 4
Rep Power: 12
oball is on a distinguished road
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.
oball is offline   Reply With Quote

Old   July 23, 2014, 17:38
Default
  #7
New Member
 
Ebrahim
Join Date: Mar 2010
Posts: 28
Rep Power: 16
Ebrahim is on a distinguished road
Quote:
Originally Posted by oball View Post
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.
Hello Oball,
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
Ebrahim is offline   Reply With Quote

Old   November 14, 2016, 16:35
Default
  #8
New Member
 
raa
Join Date: Oct 2016
Posts: 3
Rep Power: 10
rdfing is on a distinguished road
Quote:
Originally Posted by oball View Post
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.
I don't see how MARK_PARTICLE(p, P_FL_REMOVED) would be different from p->stream_index = -1
rdfing is offline   Reply With Quote

Old   November 18, 2016, 10:11
Default
  #9
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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.
pakk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 23:43.