|
[Sponsors] |
November 6, 2013, 13:36 |
Trouble getting current temperature in a UDF
|
#1 |
New Member
Sam
Join Date: Sep 2013
Posts: 4
Rep Power: 12 |
I'm trying to write a UDF that will apply a new temperature to a wall at each time step. However, I keep getting an error message whenever I attempt to use F_T(f,t) or C_T(c,t). Here is my UDF:
DEFINE_PROFILE(WALL_NomOps,thread,i) { face_t f; float t; real current_temp; begin_f_loop(f,thread) { t=N_TIME; current_temp= F_T(f,t); F_PROFILE(f,thread,i)=(4.19778032257033*pow(10,-15))*pow(t,6)+(-3.07012244075472*pow(10,-11))*pow(t,5)+(9.33165359014658*pow(10,-08))*pow(t,4)+(-0.000150853451771018)*pow(t,3)+(0.136765032525550) *pow(t,2)+(-65.9156858075105)*t+13191.0819218154+current_temp; } end_f_loop(f,thread) } I keep getting the error: "invalid type conversion: float -> pointer to char." Does anyone know what this error message means and how to fix it? Thanks! |
|
November 7, 2013, 09:42 |
|
#2 |
New Member
Join Date: Jun 2013
Posts: 18
Rep Power: 12 |
Replace the 'float' with 'real'
|
|
November 7, 2013, 09:51 |
|
#3 |
New Member
Join Date: Jun 2013
Posts: 18
Rep Power: 12 |
In addition, replace 't' with 'T'.
At the begining of your UDF, the t is a thread not a temperature subsequent yet. This will clash. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to change heat transfer coefficient with wall temperature | emmkell | Fluent UDF and Scheme Programming | 18 | August 7, 2018 03:44 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 06:27 |
Inlet won't apply UDF and has temperature at 0K! | tccruise | Fluent UDF and Scheme Programming | 2 | September 14, 2012 06:08 |
UDF - Temperature adjustment | PaulK | FLUENT | 1 | July 16, 2010 15:09 |
UDF with Granular Temperature | meangreen | Fluent UDF and Scheme Programming | 0 | February 14, 2010 17:58 |