|
[Sponsors] |
July 8, 2021, 07:26 |
Find integer ID for lookup_thread
|
#1 |
New Member
wiki
Join Date: Jun 2021
Posts: 8
Rep Power: 5 |
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. |
|
July 9, 2021, 04:36 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
In boundary conditions dialog box 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);
__________________
best regards ****************************** press LIKE if this message was helpful |
|
July 9, 2021, 04:53 |
|
#3 |
New Member
wiki
Join Date: Jun 2021
Posts: 8
Rep Power: 5 |
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 |
|
July 9, 2021, 05:10 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
as far as I understand, yes
Code:
/* pt[0] , pt[1] are for primary , secondary*/
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
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 11:53 |
How to make a code parallel? | Bruno Machado | Fluent UDF and Scheme Programming | 15 | May 27, 2016 10:18 |
CFX-Pre problem, pls help!!! | cth_yao | CFX | 0 | February 17, 2012 01:52 |
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 | Attesz | OpenFOAM Installation | 45 | January 13, 2012 13:38 |
Problem Building OF on Centos cluster (no admin rights) | CKH | OpenFOAM Installation | 5 | November 13, 2011 07:32 |