|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
U1990
Join Date: Apr 2021
Posts: 8
Rep Power: 6 ![]() |
Hello,
I'm a very new programmer in UDF and I need some basic help from you. I'm trying to model a heterogeneous reaction using DEFINE_HET_RXN_RATE. However, I'm using some correlations and I need to obtain some phase properties separately. According to manual, to use THREAD_SUB_THREAD could helps me. But there are some warnings about code and I can't solve it. Here is the code that I wrote to determinate temperature cell for phase 1 (pt[0]) and phase 2 (pt[1]): [CODE] [Thread **pt = THREAD_SUB_THREADS(t); Thread *t_1 = C_T(c,pt[0]); Thread *t_2 = C_T(c,pt[1]);] And this is the message: ..\..\src\desulfu.c(67) : error C2275: 'Thread' : illegal use of this type as an expression C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ mem.h(256) : see declaration of 'Thread' ..\..\src\desulfu.c(68) : error C2275: 'Thread' : illegal use of this type as an expression C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ mem.h(256) : see declaration of 'Thread' ..\..\src\desulfu.c(68) : error C2223: left of "->storage" must point to struct/union ..\..\src\desulfu.c(69) : error C2275: 'Thread' : illegal use of this type as an expression C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ mem.h(256) : see declaration of 'Thread' ..\..\src\desulfu.c(69) : error C2223: left of "->storage" must point to struct/union |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 35 ![]() ![]() |
Code:
Thread **pt = THREAD_SUB_THREADS(t); real t_1 = C_T(c,pt[0]); real t_2 = C_T(c,pt[1]);
__________________
best regards ****************************** press LIKE if this message was helpful |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
U1990
Join Date: Apr 2021
Posts: 8
Rep Power: 6 ![]() |
Thank you, AlexanderZ
I applied this modifications, however it doesn't fixed the problem. This is the menssage ..\..\src\desulfu.c(67) : error C2275: 'Thread' : illegal use of this type as an expression What can be the cause of this problem? Thank you. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 35 ![]() ![]() |
show your code
__________________
best regards ****************************** press LIKE if this message was helpful |
|
![]() |
![]() |
![]() |
Tags |
error, phase, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF phase properties. | U1990 | FLUENT | 0 | April 10, 2021 16:36 |
Problem accessing material properties in UDF for Multiphase Multispecies | pmtgt | Fluent Multiphase | 3 | January 17, 2021 07:11 |
Pls help me with the scattering phase function UDF | cszssj | Fluent UDF and Scheme Programming | 0 | August 1, 2017 23:22 |
UDF to access quantity of heat absorbed by one phase in Multi phase reaction process | Yuting | FLUENT | 0 | March 15, 2017 22:52 |
UDF for discrete phase circulation | kongl1986 | Fluent UDF and Scheme Programming | 0 | October 2, 2014 14:49 |