# UDF Problem

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

 April 24, 2005, 18:21 UDF Problem #1 Zhang 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 rom 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 Zhang 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 rom 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 Zhang 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Rizwan Fluent UDF and Scheme Programming 32 May 8, 2015 06:05 july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56 mansha goraya FLUENT 0 October 29, 2007 01:31 akr FLUENT 3 August 22, 2007 07:14 chiseung FLUENT 4 January 10, 2002 10:58

All times are GMT -4. The time now is 09:26.