|
[Sponsors] |
April 24, 2005, 18:21 |
UDF Problem
|
#1 |
Guest
Posts: n/a
|
Take an example to explain mu question:
There is a DPM concerned macro DEFINE_DPM_DRAG ( name, Re, p) which is used to specify the drag coefficient between particle and fluid. Now my question is, what to do if I just want to make use of this macro to do something else instead of specifying the drag? Or, how to obtain the drag calculated by Fluent and return it at the end of this macro (since it requires a return). Here is another example: Macro DEFINE_DPM_BC ( name, p, t, f, f_normal, dim) is called everytime a particle touches a boundary and usually we use this macro to define our own boundary conditions for particles. But what if I just want to count the number of impingement and use the default BCs? Maybe this is not a question for you. Please help me out and thanks in advance! Zhang |
|
April 25, 2005, 08:20 |
Re: UDF Problem
|
#2 |
Guest
Posts: n/a
|
Fluent standard functions for DPM can be found in dpm.h .Declarations start with FLUENT_EXPORT. The Standard function for drag coeffient is "real DragCoeff(Tracked_Particle *p)".
good luck rom |
|
April 25, 2005, 11:25 |
Re: UDF Problem
|
#3 |
Guest
Posts: n/a
|
Thanks rom. It helps a lot but I am still confused. I do not find the function for drag "real DragCoeff(Tracked_Particle *p)" in dpm.h. Neither do I know which function is for DPM BCs. Do you know where to get description of so many things defined in head files?
|
|
April 26, 2005, 01:52 |
Re: UDF Problem
|
#4 |
Guest
Posts: n/a
|
Most of the standard fluent function are undocumented so the best option ist to search the headers hoping to find something . For the fluent 6.2.16 dpm.h :
line 1135 of the header file FLUENT_EXPORT real DragCoeff(Tracked_Particle *p); in line 1051 you can find the standrad function for particle reflection: FLUENT_EXPORT void Reflect_Particle (Tracked_Particle *, real[], int, face_t, Thread *); The function returns no value so you will have to do this on your own in your DPM_BC function. So the body of your DEFINE_DPM_BC should look like this: DEFINE_DPM_BC(usr_bc_reflect,p,t,f,f_normal,dim) { Reflect_Particle(p,f_normal,dim,f,t); return PATH_ACTIVE; } good luck rom |
|
April 26, 2005, 11:02 |
Thanks a lot
|
#5 |
Guest
Posts: n/a
|
Thanks rom.
I just realized that my Fluent version is 6.1.22 in which there is no DragCoeff(...). Thanks again! Zhang |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 00:31 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 07:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 09:58 |