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

Help: UDF of "particle body force" !!!

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

Like Tree1Likes
  • 1 Post By sujith

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2007, 10:50
Default Help: UDF of "particle body force" !!!
  #1
zhaoh
Guest
 
Posts: n/a
Happy new year, everyone I hope get help from you. I have compiled a UDF about particle body force, but it doesn't work. The physic model is this: the particle is injecting into enclosure. The body force forces on particles according to different positions of particles. My UDF is:

#include "udf.h" #include "dpm.h" #include "surf.h" #define C1 2.2 #define C2 1.5 DEFINE_DPM_BODY_FORCE(p_b_force,p,i) { cell_t c=RP_CELL(&(p->cCell)); Thread *t = RP_THREAD(&(p->cCell)); Particle *p; real bforce; if(i==1) bforce=0; else if(i==0) { bforce=C1*P_POS(p)[0]+C2*P_POS(p)[1]; } return (bforce/P_MASS(p)); } but it has some problem as follows: (system "move user_nt.udf libudf\ntx86\2d")0 (system "copy C:\Fluent.Inc\fluent6.1.22\src\makefile_nt.udf libudf\ntx86\2d\makefile") (chdir "libudf")() (chdir "ntx86\2d")() 004.c ..\..\src\004.c(10) : error C2082: redefinition of formal parameter 'p' Done. Opening library "libudf"... Error: open_udf_library: the system can not find the library。 Error Object: () If I delete the code "Particle *p", it will be still have a error as follows: Error: get_udf_function: function p_b_force has wrong type: 27 != 17 Error Object: () Hope your reply. Thanks a lot!

  Reply With Quote

Old   January 8, 2007, 12:29
Default Re: Help: UDF of "particle body force" !!!
  #2
sujith
Guest
 
Posts: n/a
It is not required to define Particle *p, This will be passed as an argument buy fluent itself (p_b_force,p,i).

Error: get_udf_function: function p_b_force has wrong type: 27 != 17 Error Object: ()

This error usually occurs when you are hooking the udf at wrong position.

Regards, Sujith S Nair
cdf_user likes this.
  Reply With Quote

Old   January 9, 2007, 08:45
Default Re: Help: UDF of "particle body force" !!!
  #3
zhaoh
Guest
 
Posts: n/a
sujith:

Thank you very much.Maybe you are right.I have been chosen "Initialization--p_b_force"in "User-Defined Fuctions" panel when i set injection properies of particles. I have do it according to your advice. It remain have some problems. i haven`t see any particles in the region after computing. Maybe,My programs have some problems. I have to check it. Thank you again!!!
  Reply With Quote

Old   January 16, 2007, 21:17
Default Re: Help: UDF of "particle body force" !!!
  #4
OC
Guest
 
Posts: n/a
What are you trying to get out of your udf?

OC/mnhka@yahoo.com
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF in Fluent Andrew Fluent UDF and Scheme Programming 5 March 7, 2016 04:38
Force can not converge colopolo CFX 13 October 4, 2011 23:03
UDF force on a face enry Fluent UDF and Scheme Programming 10 March 23, 2011 11:48
Problem with a simple UDF to calculate cell-averaged particle values kmayank FLUENT 1 January 18, 2011 02:40
Magnus lift force using UDF - urgent help please Angela Wang FLUENT 2 December 17, 2008 07:03


All times are GMT -4. The time now is 08:10.