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

Trapping particles

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

Like Tree1Likes
  • 1 Post By Steve Silvester

Reply
 
LinkBack Thread Tools Display Modes
Old   May 11, 2006, 08: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, 13: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, 16: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, 10: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 likes this.
  Reply With Quote

Old   May 12, 2006, 10: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, 12: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, 14: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, 13: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, 16: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 3, 2011, 23:52
Default
  #10
New Member
 
NH
Join Date: Jul 2009
Posts: 20
Rep Power: 7
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, 19:47
Default
  #11
New Member
 
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 22
Rep Power: 3
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

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent help needed plz! No. of particles in surface injection ajkratos FLUENT 4 March 22, 2011 11:32
particles model ati_ros61 FLOW-3D 3 December 6, 2009 16:03
Problem trapping Particles with UDF J. Krick FLUENT 2 November 19, 2008 02:28
how to determine the number of particles injected. welch FLUENT 1 November 1, 2005 05:11
effect of ventilation on particles problem Jules FLUENT 0 June 10, 2002 14:41


All times are GMT -4. The time now is 08:21.