|
[Sponsors] |
August 25, 2017, 01:59 |
THREAD_SUPER_THREAD macro gives parse error
|
#1 |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
Hello friends,
I have written the following UDF for changing the vapour density based on mixture domain temperature. I am using a mixture model for simulating two phase flow. While interpretation, it shows line 51: parse error line 52: parse error line 53: undeclared variable rho DEFINE_PROPERTY(Vapour_density,c,t) { Thread *tp; tp = THREAD_SUPER_THREAD(t); /*line 51*/ real T = C_T(c,tp); /*line 52*/ real rho; /*line 53*/ rho = (0.00329*exp(0.19039*T) - 0.05762)*1000000.0; return p_v; } I cannot find any mistake in it. Is it because I have interpreted instead of compilation (it is not likely to be so)? Any help is greatly appreciated. |
|
August 28, 2017, 02:13 |
|
#2 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
Code:
DEFINE_PROPERTY(Vapour_density,c,t) { Thread *tp; real T = C_T(c,tp); /*line 52*/ real rho; /*line 53*/ tp = THREAD_SUPER_THREAD(t); /*line 51*/ rho = (0.00329*exp(0.19039*T) - 0.05762)*1000000.0; return p_v; } |
||
August 28, 2017, 09:00 |
|
#3 | |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
Hi Alexanderz,
Quote:
Actually, I think there is no point in changing the density in incompressible formulation (Initially I had similar UDF for vapour pressure and density). I decided to keep it constant for the simulation. So I incorporated the suggested changes in the macro for vapour pressure as follows. DEFINE_PROPERTY(Vapour_pressure,c,t) { Thread *tp; real T = C_T(c,tp); /*line 52*/ real p_v; /*line 53*/ tp = THREAD_SUPER_THREAD(t); /*line 51*/ p_v = (0.00202*exp(T/4.78878) - 0.04038)*1000000.0; return p_v; } One more point is that I do not know whether DEFINE_PROPERTY(Vapour_pressure,c,t) is internally invoked by Fluent the same way as it does for a property as density or viscosity. Or is there a macro specifically for vapour pressure? I could not find one. Anyway, I am running my simulation with the modifications. I will post the result once it is complete. |
||
August 28, 2017, 21:51 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Hello!
I do not have experience in multiphase flows simulation. However, I believe that you should choose your UDF functions as a density material property of vapour. Best regards |
|
August 29, 2017, 10:14 |
|
#5 | |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
Hi AlexanderZ,
Quote:
Fatal error" I will try your second suggestion. I am not quite sure how it is implemented. I will check the manual and then get back to you. |
||
Tags |
parse error, thread_super_thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] an error in Calculator's equation | immortality | ParaView | 12 | June 29, 2021 01:10 |
error compiling modified applications | yvyan | OpenFOAM Programming & Development | 21 | March 1, 2016 05:53 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 08:11 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |