CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF, Looping through threads or faces

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

LinkBack Thread Tools Display Modes
Old   June 20, 2005, 13:35
Default UDF, Looping through threads or faces
Posts: n/a
Suppose I saved a UDM (User Defined Memory) variable in each face. Then I loop over the threads and faces to find the minimal of that variable: thread_loop_f(t, domain) {

begin_f_loop(f, t)


/* find and record the thread and face where the minimal exists */

tt = t;

ff = f;


end_f_loop(f,t) }

Here tt and ff are the same type as t and f, respectively. I am trying to use tt and ff to record the interested face and want to use them out of the loop. But it did not work. Is it because that "Thread *" and "face_t" are not like Integer of Real and they can not be assigned to another variable directly? Anybody has done similar thing and any suggestion? Thanks,

  Reply With Quote

Old   June 21, 2005, 01:24
Default Re: UDF, Looping through threads or faces
Posts: n/a
Can you do what you want within the loop using the "if........else"? I have not faced such problems. Can user define a global variables in UDF or just a UDF "global" variables.? I'm interesting in it. Could you email to me and tell me something detail?


  Reply With Quote


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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
Loop over the faces of a cell in UDF Anthony Wachs Fluent UDF and Scheme Programming 5 September 20, 2015 07:22
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 11:55

All times are GMT -4. The time now is 07:16.