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

UDF phase properties separately

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2021, 18:13
Default UDF phase properties separately
  #1
New Member
 
U1990
Join Date: Apr 2021
Posts: 8
Rep Power: 2
U1990 is on a distinguished road
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
U1990 is offline   Reply With Quote

Old   April 12, 2021, 22:30
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,639
Rep Power: 23
AlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   April 13, 2021, 00:08
Default
  #3
New Member
 
U1990
Join Date: Apr 2021
Posts: 8
Rep Power: 2
U1990 is on a distinguished road
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.
U1990 is offline   Reply With Quote

Old   April 13, 2021, 03:37
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,639
Rep Power: 23
AlexanderZ will become famous soon enough
show your code
__________________
best regards


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

Reply

Tags
error, phase, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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


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