Dpm and udf
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 |
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 |
thanks
Thanks a lot!!
I will try that. Cinzia |
What is the issue? Determing the variable for y-position? Changing the particle fate to escaped?
|
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 } |
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. |
Checking UDF
1 Attachment(s)
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 |
All times are GMT -4. The time now is 23:14. |