CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF - Temperature adjustment

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

LinkBack Thread Tools Display Modes
Old   July 16, 2010, 15:00
Default UDF - Temperature adjustment
New Member
Join Date: May 2009
Location: Santa Clara, CA
Posts: 9
Rep Power: 10
PaulK is on a distinguished road

I am trying to increase the temperature at a supply inlet relative to a pressure outlet.

My UDF is below. I am trying to loop over the supply face (velocity inlet) and then specify its temperature as the extraction face (pressure outlet) + 10. The UDF compiles, but when I get a fatal error when I try to attach it to the velocity inlet temperature spec.

#include "udf.h"
#define extractID 17
#define supplyID 18
DEFINE_ADJUST(tempRecirc, d)
    face_t f;
    cell_t c;
    Thread *tf1 = Lookup_Thread(d, extractID);
    Thread *tf2 = Lookup_Thread(d, supplyID);
    float x[3];
    begin_f_loop(f, tf2)
    F_T(f, tf2) = F_T(f, tf1) + 10.;
    end_f_loop(f, tf2)
PaulK is offline   Reply With Quote

Old   July 16, 2010, 15:09
New Member
Join Date: May 2009
Location: Santa Clara, CA
Posts: 9
Rep Power: 10
PaulK is on a distinguished road
I should note: it is not simply a matter of specifying the temperature + 10 at the inlet once which is why I am using DEFINE_ADJUST and not DEFINE_PROFILE. There are multiple recirculations and power dissipation throughout the volume, so I eventually want to specify the outlet face temperature according to a performance curve a function of the extraction temperature.

I am new to this, however, so please correct me if I should still be working with DEFINE_PROFILE.
PaulK is offline   Reply With Quote


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 for a horizontal temperature profile CD Fluent UDF and Scheme Programming 8 August 5, 2016 20:13
UDF or any approach for Bulk Temperature calculation vemps FLUENT 0 May 1, 2009 01:09
UDF velocity and temperature Raj FLUENT 3 February 1, 2009 19:29
how to write a 3D linear temperature of UDF venus FLUENT 1 October 28, 2008 03:46
Access Granular Temperature in UDF Gavin FLUENT 5 July 22, 2005 11:06

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