CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF phase properties separately (https://www.cfd-online.com/Forums/fluent/235378-udf-phase-properties-separately.html)

U1990 April 12, 2021 18:13

UDF phase properties separately
 
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

AlexanderZ April 12, 2021 22:30

Code:

Thread **pt = THREAD_SUB_THREADS(t);
real t_1 = C_T(c,pt[0]);
real t_2 = C_T(c,pt[1]);


U1990 April 13, 2021 00:08

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.

AlexanderZ April 13, 2021 03:37

show your code


All times are GMT -4. The time now is 04:23.