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

Trapping particles

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 4 Post By Steve Silvester
  • 1 Post By diego123

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2006, 09:37
Default Trapping particles
  #1
Francisco Castellanos Rodriguez
Guest
 
Posts: n/a
Hi,

we are working on a fireplace modelling and we are really interesting in particles. We would like to know how could we visualize where the particles are trapped.

Thanks

Fran
  Reply With Quote

Old   May 11, 2006, 14:28
Default Re: Trapping particles
  #2
Allan Walsh
Guest
 
Posts: n/a
I'm assuming you have tried Display -> Particle Tracks and....?
  Reply With Quote

Old   May 11, 2006, 17:44
Default Re: Trapping particles
  #3
Fran
Guest
 
Posts: n/a
I have tried all the options ... actually I want to visualize the point of impact where particles are trapped. I have tried with the option concentration but the result is not what I'm waiting for... I don't know if you understand what I want

Thanks a lot for your answer
  Reply With Quote

Old   May 12, 2006, 11:33
Default Re: Trapping particles
  #4
Steve Silvester
Guest
 
Posts: n/a
Hi,

I wrote a simple little udf to do this. Compile it and hook it to the wall you're interested in through the boundary conditions panel (DPM>>Boundary Cond. Type>>User Defined Function - you'd normally set this to 'trap')then select the udf in Boundary Cond. Function>>dpm_report. Next display your particle tracks. Each time a particle hits the wall you specified the udf to be active on it'll abort the trajectory and write a couple of files. The first (dpm_report_xyz.txt) is just the x,y,z co-ordinates of the trapped particle, the second (dpm_report_injection_file.txt) writes a file which defines injection positions. (It writes it to the c:\ path but you can change this).

Next, define a new injection and set 'type' to file. Load up the 'dpm_report_injection_file.txt'. Next, set your 'max number of steps in the 'DPM' panel to 1 (so they don't budge) and display your particle tracks using the new injection you just created. Should display particle positions where they were trapped. If you want to include particle variables (diameter, temperature) then just change the udf to write these as well, currently they're all zero as I was only interested in position.

The particle positions may be slightly off the wall - it seems to write the position just before it hits, but this is a tiny distance. Likewise when you track them for one step, they will move imperceptibly because you've tracked them for a single step - but again, it's a controllable fraction.

Steve

#include "udf.h" DEFINE_DPM_BC(dpm_report,p,t,f,f_normal,dim) { FILE * f1; FILE * f2; float x=0; float y=0; float z=0; f1 = fopen ("C:\\dpm_report_xyz.txt", "a"); f2 = fopen ("C:\\dpm_report_injection_file.txt", "a"); x=P_POS(p)[0]; y=P_POS(p)[1]; z=P_POS(p)[2]; fprintf (f1, "%f %f %f\n",x,y,z); fprintf (f2, "(( %f %f %f 0 0 0 0 0 0 ) name )\n",x,y,z); fclose(f1); fclose(f2); return PATH_ABORT; }

breadyu, wc34071209, KYG and 1 others like this.
  Reply With Quote

Old   May 12, 2006, 11:49
Default Re: Trapping particles
  #5
Fran
Guest
 
Posts: n/a
Hi,

Thanks a lots Steve. Your answer is very helpful.

Fran
  Reply With Quote

Old   May 24, 2006, 13:31
Default Re: Trapping particles
  #6
Fran
Guest
 
Posts: n/a
Hi,

I have tried to compile the udf but I got an error message undeclared variable P_POS. Have you an idea what can the error be? Thanks

  Reply With Quote

Old   May 24, 2006, 15:05
Default Re: Trapping particles
  #7
Fran
Guest
 
Posts: n/a
Hi

Again I have solved the problem with the undeclared variable P_POS but now I have a new problem: structure reference not implemented.

  Reply With Quote

Old   May 28, 2006, 14:27
Default Re: Trapping particles
  #8
Steve Silvester
Guest
 
Posts: n/a
Hi,

Are you interpreting it or compiling?, I don't get any errors when compiling. I can email you a compiled version that you can load up if it helps.

Steve
  Reply With Quote

Old   May 31, 2006, 17:17
Default Re: Trapping particles
  #9
Fran
Guest
 
Posts: n/a
Finally I arrived to the conclusion that I have a problem with my version of Fluent ... I tried to compile an example given in the manual book and it didn't work. I will uninstall Fluent and reinstall it. I will be very happy to get a compiled version. Thanks a lot Steve Fran

  Reply With Quote

Old   January 4, 2011, 00:52
Default
  #10
New Member
 
NH
Join Date: Jul 2009
Posts: 23
Rep Power: 16
NH_Aus is on a distinguished road
Send a message via Skype™ to NH_Aus
Quote:
Originally Posted by Steve Silvester
;132135
Hi,

I wrote a simple little udf to do this. Compile it and hook it to the wall you're interested in through the boundary conditions panel (DPM>>Boundary Cond. Type>>User Defined Function - you'd normally set this to 'trap')then select the udf in Boundary Cond. Function>>dpm_report. Next display your particle tracks. Each time a particle hits the wall you specified the udf to be active on it'll abort the trajectory and write a couple of files. The first (dpm_report_xyz.txt) is just the x,y,z co-ordinates of the trapped particle, the second (dpm_report_injection_file.txt) writes a file which defines injection positions. (It writes it to the c:\ path but you can change this).

Next, define a new injection and set 'type' to file. Load up the 'dpm_report_injection_file.txt'. Next, set your 'max number of steps in the 'DPM' panel to 1 (so they don't budge) and display your particle tracks using the new injection you just created. Should display particle positions where they were trapped. If you want to include particle variables (diameter, temperature) then just change the udf to write these as well, currently they're all zero as I was only interested in position.

The particle positions may be slightly off the wall - it seems to write the position just before it hits, but this is a tiny distance. Likewise when you track them for one step, they will move imperceptibly because you've tracked them for a single step - but again, it's a controllable fraction.

Steve

#include "udf.h" DEFINE_DPM_BC(dpm_report,p,t,f,f_normal,dim) { FILE * f1; FILE * f2; float x=0; float y=0; float z=0; f1 = fopen ("C:\\dpm_report_xyz.txt", "a"); f2 = fopen ("C:\\dpm_report_injection_file.txt", "a"); x=P_POS(p)[0]; y=P_POS(p)[1]; z=P_POS(p)[2]; fprintf (f1, "%f %f %f\n",x,y,z); fprintf (f2, "(( %f %f %f 0 0 0 0 0 0 ) name )\n",x,y,z); fclose(f1); fclose(f2); return PATH_ABORT; }
Hi Steve Silvester
I need to stop the dpm calculation and consider as trapped when the particle (centre) is xx distance away from the wall.

My case is 3d.

docnurulhasan@gmail.com
NH_Aus is offline   Reply With Quote

Old   May 23, 2013, 20:47
Default
  #11
Member
 
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 64
Rep Power: 13
liliana is on a distinguished road
Hello everybody.

I now this topic is old, but it is just what I need.

I need to visualiza or know how many particles are trapped on the wall, but I did my simulation on CFX.

The only to do this is using an UDF? There is no way to do this in CFD Post? I've been trying really hard and got no answer!

Thanks a lot!
liliana is offline   Reply With Quote

Old   September 6, 2017, 19:25
Default
  #12
New Member
 
Join Date: Aug 2017
Posts: 1
Rep Power: 0
diego123 is on a distinguished road
EDITED: I FOUND A SOLUTION (SEE BOTTOM OF THE MESSAGE)


I can't believe this has been an issue for so long... still without an easy solution! I have tried to compile that UDF like a madman and there are a lot of issues with the new versions of Microsoft Visual Studio, SDK Command Prompt... (it's not like I am fluent in those, not at all, but showing the deposition pattern of particles shows like something quite standard in a DPM problem!)

If anyone knows of a better way to obtain them... I am listening, the most I've achieved is exporting the whole .his file for the particle tracks, but post-processing all that information manually seems too much work

SOLUTION
So I have found out that it is possible to show the deposition patterns of particles by enabling the erosion\accretion option under physical models of the DPM. It shall be noted that this enables particle-particle interaction so the number of particles trapped usually increases. Once you have run your simulation you can go to Contours\DPM and show the accretion, which shows the places where the particles have been trapped.

This may not be exactly what some of you are looking for but it was good enough to me!
mecardonata likes this.

Last edited by diego123; September 8, 2017 at 14:19.
diego123 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
how to determine the number of particles injected. welch FLUENT 2 January 18, 2024 05:08
trying to simulate two-phase jet flow with particles in surface injection ajkratos FLUENT 5 March 3, 2015 22:33
particles model ati_ros61 FLOW-3D 3 December 6, 2009 17:03
Problem trapping Particles with UDF J. Krick FLUENT 2 November 19, 2008 03:28
effect of ventilation on particles problem Jules FLUENT 0 June 10, 2002 15:41


All times are GMT -4. The time now is 02:40.