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

Dpm and udf

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2009, 09:18
Default Dpm and udf
  #1
New Member
 
Join Date: Mar 2009
Posts: 7
Rep Power: 16
cinmar is on a distinguished road
Hi Guys,

sorry to bother you again. Somebody can give me some indication on writing an UDF in which if a particle overcame a certain y-coordinate it has to be considered escaped? Any help is welcome.

Thanks

Cinzia
cinmar is offline   Reply With Quote

Old   March 31, 2009, 11:40
Default
  #2
Member
 
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17
HenrikS is on a distinguished road
I suggest using DEFINE_EXECUTE_AT_END. It will be run once at the end of each time step (or once at the end of each iteration if in steady state mode). Let it loop over all particles in the domain and remove particles whose Y-position is larger than a specified threshold. You can save any particle properties you wish for postprocessing by writing them to a text file, for example.

/Henrik
HenrikS is offline   Reply With Quote

Old   March 31, 2009, 11:46
Default thanks
  #3
New Member
 
Join Date: Mar 2009
Posts: 7
Rep Power: 16
cinmar is on a distinguished road
Thanks a lot!!
I will try that.

Cinzia
cinmar is offline   Reply With Quote

Old   April 2, 2009, 14:07
Default
  #4
Member
 
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17
Allan Walsh is on a distinguished road
What is the issue? Determing the variable for y-position? Changing the particle fate to escaped?
Allan Walsh is offline   Reply With Quote

Old   April 2, 2009, 14:17
Default
  #5
New Member
 
Join Date: Mar 2009
Posts: 7
Rep Power: 16
cinmar is on a distinguished road
Hi Allan,
Thanks a lot for answering.

I am not interested in the position of the particles but I would like to change their fate in ESCAPED. I have tried with sample and DEFINE_DPM_OUTPUT. When the particles reach a certain interface they should escape. My UDF doesn't work, and I do not know if it is because I am running in parallel.
My udf is simple this (actually I really do not know how to program it).

#include "udf.h"

DEFINE_DPM_OUTPUT(discrete_phase_sample,header,fp, p,t,plane)
{
#define alfa TRUE

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

p->stream_index=-1;

#endif

}
cinmar is offline   Reply With Quote

Old   April 3, 2009, 18:23
Default
  #6
Member
 
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17
Allan Walsh is on a distinguished road
How do you mean your UDF doesn't work? It compiles but doesn't do what you would like it to? Can you compile the UDF example DEFINE_DPM_OUTPUT? There are certain memory options to check for particles in parallel mode which you have probably looked at.

Another option in FLUENT UDFs to set a particle to escape is after a certain condition is reached then:
return PATH_END
and increment the variable p->gvtp.n_escaped.
Allan Walsh is offline   Reply With Quote

Old   May 4, 2009, 09:34
Default Checking UDF
  #7
New Member
 
Hisham
Join Date: Apr 2009
Posts: 1
Rep Power: 0
benmahmud is on a distinguished road
Hi guys,

I have a problem with UDF isn't working it gives an error, can someone check it and will high appreciated

Thanks

Hisham
Attached Files
File Type: txt Drag Coefficient.txt (1.5 KB, 37 views)
benmahmud 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
DPM with UDF - Step-by-Step Procedure???? Prashanth FLUENT 3 April 3, 2009 18:45
So many questions in DPM & UDF - Help! URGENT! Prashanth FLUENT 0 March 3, 2009 23:26
DPM - UDF for fluctuating bubble size Jaroslav Kotara FLUENT 1 April 19, 2006 10:02
DPM; particle seeded / deleted by UDF Laika FLUENT 6 January 23, 2006 00:40
udf of DPM questions! winnie FLUENT 6 April 30, 2003 03:52


All times are GMT -4. The time now is 06:54.