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

UDF: temperature profile

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 29, 2004, 03:28
Default UDF: temperature profile
  #1
dolores
Guest
 
Posts: n/a
I am modeling an industrial oven using 2d, segregated, laminar, unsteady solver. At some period of time, the temperature of the heater coil is linearly increasing. The next period, the temperature is just constant. I tried DEFINE_PROFILE, can't compile it. How do I make the flow time as a trigger to switch from linear to constant temperature?
  Reply With Quote

Old   March 29, 2004, 05:20
Default Re: UDF: temperature profile
  #2
thomas
Guest
 
Posts: n/a
you should post your udf !
  Reply With Quote

Old   March 29, 2004, 07:12
Default Re: UDF: temperature profile
  #3
dolores
Guest
 
Posts: n/a
#include "udf.h"

DEFINE_ADJUST(heater_temp, d) { Thread *t; face_t f; int time=RP_Get_Integer("time-step"); thread_loop_f(t,d) { begin_f_loop (f,t)

{

if (time<50)

F_PROFILE(f,t,0) = 2*time + 273;

else

F_PROFILE(f,t,0) = 373;

} end_f_loop (f,t) } }

sorry, here's the UDF, this one I tried DEFINE_ADJUST since DEFINE_PROFILE doesn't seem to recognize "time element" FLUENT reports syntax error on line 6( Thread *t; line 8 (int time = RP_Get....) line 9 (thread_loop_f...). FLUENT reports "f:undeclared variable" on line 11 (begin_f_loop...) the heater temperature profile should be like this: heats up from room temp to 100 degree Celcius in 50 minutes, then stays at 100 degree Celcius for an hour
  Reply With Quote

Old   March 29, 2004, 17:43
Default Re: UDF: temperature profile
  #4
Ajay
Guest
 
Posts: n/a
Should'nt you be using RP_Get_Real("flow-time") ? your UDF looks coorect wonder why the error. I have used RP_Get_Real("flow-time") with define_profile it worked fne. -Ajay
  Reply With Quote

Old   March 29, 2004, 23:27
Default Re: UDF: temperature profile
  #5
dolores
Guest
 
Posts: n/a
thanks for the replies. another question, how would you use the if/else statement inside the DEFINE_PROFILE function. I somehow always get a "syntax error" on if/else statement. many thanks
  Reply With Quote

Old   March 30, 2004, 05:53
Default Re: UDF: temperature profile
  #6
Andrew Garrard
Guest
 
Posts: n/a
Right, for a start you are not defining your thread, you will need something like Thread *thread = Lookup_Thread(d, ID), otherwise the face loop will not know what to loop over.

Secondly, I don't think there is anything wrong with your if/else statments, I think the problem is in you F_PROFILE. You are setting the F_PROFILE(f, t, 0), What is 0? You want to set the temperature, if I understood correctly. If you are trying to set the temperature on a boundary you should use a DEFINE_PROFILE and hook it in the boundary conditions panel within the fluent GUI.

Hope some of this helps.
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 8 May 11, 2014 08:34
defining temperature profile with UDF mohammadkm Fluent UDF and Scheme Programming 11 July 3, 2013 00:15
please help UDF for velocity profile in y-directio raju FLUENT 3 September 22, 2008 16:36
UDF temp. profile BC Shashikant FLUENT 0 June 24, 2006 03:16
temperature profile on boundary sivakumar FLUENT 5 November 24, 2002 01:58


All times are GMT -4. The time now is 06:57.