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

UDF, Looping through threads or faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2005, 14:35
Default UDF, Looping through threads or faces
  #1
Zhang
Guest
 
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,

Zhang
  Reply With Quote

Old   June 21, 2005, 02:24
Default Re: UDF, Looping through threads or faces
  #2
Joey
Guest
 
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?

Joey

  Reply With Quote

Reply


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
Loop over the faces of a cell in UDF Anthony Wachs Fluent UDF and Scheme Programming 6 April 2, 2024 11:10
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 11:55


All times are GMT -4. The time now is 22:43.