|
[Sponsors] |
March 30, 2009, 08:18 |
Dpm and udf
|
#1 |
New Member
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
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 |
|
March 31, 2009, 10:40 |
|
#2 |
Member
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
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 |
|
March 31, 2009, 10:46 |
thanks
|
#3 |
New Member
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
Thanks a lot!!
I will try that. Cinzia |
|
April 2, 2009, 13:07 |
|
#4 |
Member
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17 |
What is the issue? Determing the variable for y-position? Changing the particle fate to escaped?
|
|
April 2, 2009, 13:17 |
|
#5 |
New Member
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
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 } |
|
April 3, 2009, 17:23 |
|
#6 |
Member
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17 |
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. |
|
May 4, 2009, 08:34 |
Checking UDF
|
#7 |
New Member
Hisham
Join Date: Apr 2009
Posts: 1
Rep Power: 0 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPM with UDF - Step-by-Step Procedure???? | Prashanth | FLUENT | 3 | April 3, 2009 17:45 |
So many questions in DPM & UDF - Help! URGENT! | Prashanth | FLUENT | 0 | March 3, 2009 22:26 |
DPM - UDF for fluctuating bubble size | Jaroslav Kotara | FLUENT | 1 | April 19, 2006 09:02 |
DPM; particle seeded / deleted by UDF | Laika | FLUENT | 6 | January 22, 2006 23:40 |
udf of DPM questions! | winnie | FLUENT | 6 | April 30, 2003 02:52 |