CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDF Problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 24, 2005, 18:21
Default 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
  Reply With Quote

Old   April 25, 2005, 08:20
Default 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
  Reply With Quote

Old   April 25, 2005, 11:25
Default 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?
  Reply With Quote

Old   April 26, 2005, 01:52
Default 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
  Reply With Quote

Old   April 26, 2005, 11:02
Default 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
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 32 May 8, 2015 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 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
UDF problem chiseung FLUENT 4 January 10, 2002 10:58


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