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

Problem trapping Particles with UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2008, 05:03
Default Problem trapping Particles with UDF
  #1
J. Krick
Guest
 
Posts: n/a
Hallo,

I wrote this UDF:

#include "udf.h"

--------------------------------------------------------------------

/************************************************** ****************/

/* UDF which counts particles that passed through a sampler and */

/* removes them afterwards. */

/************************************************** ****************/

#define REMOVE_PARTICLES TRUE

DEFINE_DPM_OUTPUT(discrete_phase_counter,header,fp ,p,t,plane)

{

if(header)

par_fprintf_head(fp,"Particle ID \n"); /*Writes the string to the head of the file*/

par_fprintf(fp,"%d \n", p->part_id, P_POS(p)[0]);

#if REMOVE_PARTICLES /*This if loop removes the particles*/

p->stream_index=-1;

#endif

} --------------------------------------------------------------------

If a Particle is sampled it will give the Particle ID and delete this Particle. This works just fine. The Problem is with Fluent.

In Fluent I defined a plane by "Surface -> Plane....". I used the option "Bounded" and set it in such a way, that it will cover the lower half of my qubic domain.

After that, I injected a single Particle in the upper half of my domain. I made such, that the Particle does not hit the plane, but will exit the domain by the outlet. When I displayed the particle's track, I could see that I moves from the inlet directly to the outlet without hitting the plane.

However, when I click on "Report -> Discrete Phase -> Sample..." and select the injection, my plane and the outlet and then click on "Compute", Fluent tells me that the particle was trapped by the plane.

For me I seems as if Fluent does not use the bounded plane which I define, but uses a plane that cuts the whole domain.

Does anyone know a way, how to make Fluent just trap the particles which actually impact on the bounded plane.

Thank you for your attention.

bye,

Julian

  Reply With Quote

Old   November 18, 2008, 13:39
Default Re: Problem trapping Particles with UDF
  #2
KJ Larsen
Guest
 
Posts: n/a
Hi Julian

One thing I can suggest is that the trajectories of the particle shown in Display -> Particles Tracks and the position data obtained from your code above through Report -> Discrete Phase -> Sample are probably from different particles. (although it looks as though you need a %f in for P_POS(p)[0] to be written to the file). It writes tracking X particles on the console when you Compute the sample implying . If you have turbulent effects possibly the second particle followed a different path and hit the lower plane.

You could add P_POS(p)[1] to show the Y position the particle takes through the plane (I'm assuming Y is up and down with regard to the halves of the domain) and then be sure that the particle is being trapped in the wrong place.

I'm afraid I had a similar problem with sampling (without using a UDF) so your hypothesis seems correct.

It is possible to set walls to trap particles, however then having to set the non-existent wall not to interrupt the continuous phase probably complicates the problem.

Can I ask what you're doing with your output data? I've ended up using excel for now.

As a last resort you could try splitting your mesh down this trapping plane. So simulate the front part of the grid. Then using the data about those particles which were trapped in the top you could set up a UDF injection to simulate the latter part separately.

I hope you get better advice though. Kris
  Reply With Quote

Old   November 19, 2008, 03:28
Default Re: Problem trapping Particles with UDF
  #3
Julian K.
Guest
 
Posts: n/a
Thank you Kris once again for your help.

I just released a single particle. I'm am very sure, that it did not hit the plane. I also printed the coordinates of the impact point. They did not lie within the plane.

Unfortunately, it is not possible for me to set up new walls, since I am working in the post-processing. I think, in order to get new walls, I would have to go back to Grid Generation and thus redo the simulations. This takes too much time.

Anyway, I think I found a solution. It is rather comlicated though. The basic idea is to let the UDF check whether or not, the particles hits the plane within its boundaries. This is possible since we have the coordinates of the impact point, as well as the coordinates of the plane. Also I am using rectangular planes, which makes live more easy.

If you need some further explanation, please let me know.

After all, I will use Excel for analysis...

Bye,

Julian
  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
Trapping particles Francisco Castellanos Rodriguez FLUENT 11 September 6, 2017 19:25
Problem with adhering particles Ivan Siemens 0 June 17, 2004 07:29
Particles problem carno Siemens 0 August 25, 2003 06:23
about erosion problem caused by solid particles hannah CFX 4 August 20, 2003 05:42
effect of ventilation on particles problem Jules FLUENT 0 June 10, 2002 15:41


All times are GMT -4. The time now is 11:20.