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

Find integer ID for lookup_thread

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2021, 06:26
Default Find integer ID for lookup_thread
  #1
New Member
 
wiki
Join Date: Jun 2021
Posts: 8
Rep Power: 4
wiki123 is on a distinguished road
Hello everyone.

I am new to UDF programming and working on a multiphase problem. I have a questions as follows. I shall be highly thankful for any response.

I am using a DEFINE_ INIT function and want to access a mixture thread/super thread pointer for a multiphase problem. UDF manual provides a lookup_thread macro with two arguments of domain and ID to access the thread pointer. Also, it states that ANSYS fluent will automatically pass mixture domain pointer argument for lookup_thread if it is operating inside DEFINE_INIT. But I am confused how to get the int ID. It will be for a mixture thread. Where to find it?

In boundary conditions dialog box or phases dialog box?

Any help shall be highly appreciated.

Thanks in advance.

Best regards.
wiki123 is offline   Reply With Quote

Old   July 9, 2021, 03:36
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
In boundary conditions dialog box
this is ID of mixture thread

to get the thread of phases you can try to use
Code:
int phase_domain_index = 0; /* primary phase index is 0 */
Thread *mixture_thread; /* mixture-level thread pointer */
Thread *subthread = THREAD_SUB_THREAD(mixture_thread,phase_domain_index);
wiki123 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   July 9, 2021, 03:53
Default
  #3
New Member
 
wiki
Join Date: Jun 2021
Posts: 8
Rep Power: 4
wiki123 is on a distinguished road
Thank you dear Alexander for your reponse.

As you mentioned about accessing the sub thread pointer, can we also access it using the pointer array?

I read this in the manual but I dont know whether I understand it correctly or not.

thread *sub_thread_pointer= pt[i]; /* pt[0] or pt[1] for primary or secondary*/

Thank you for your time.

Best regards
wiki123 is offline   Reply With Quote

Old   July 9, 2021, 04:10
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
as far as I understand, yes
Code:
/* pt[0] , pt[1] are for primary , secondary*/
wiki123 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   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
[foam-extend.org] 3.2 Installation in Debian 8.5 jsm OpenFOAM Installation 2 June 19, 2016 10:53
How to make a code parallel? Bruno Machado Fluent UDF and Scheme Programming 15 May 27, 2016 09:18
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 00:52
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 06:32


All times are GMT -4. The time now is 20:30.