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

Trouble getting current temperature in a UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2013, 13:36
Default Trouble getting current temperature in a UDF
  #1
New Member
 
Sam
Join Date: Sep 2013
Posts: 4
Rep Power: 12
sparke03 is on a distinguished road
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!
sparke03 is offline   Reply With Quote

Old   November 7, 2013, 09:42
Default
  #2
New Member
 
Join Date: Jun 2013
Posts: 18
Rep Power: 12
wond is on a distinguished road
Replace the 'float' with 'real'
wond is offline   Reply With Quote

Old   November 7, 2013, 09:51
Default
  #3
New Member
 
Join Date: Jun 2013
Posts: 18
Rep Power: 12
wond is on a distinguished road
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.
wond is offline   Reply With Quote

Reply


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


All times are GMT -4. The time now is 09:27.