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

UDF - Temperature adjustment

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2010, 16:00
Default UDF - Temperature adjustment
  #1
New Member
 
Paul
Join Date: May 2009
Location: Santa Clara, CA
Posts: 9
Rep Power: 17
PaulK is on a distinguished road
Hi,

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.

Code:
#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)
}
Thanks!
PaulK is offline   Reply With Quote

Old   July 16, 2010, 16:09
Default
  #2
New Member
 
Paul
Join Date: May 2009
Location: Santa Clara, CA
Posts: 9
Rep Power: 17
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

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 for a horizontal temperature profile CD Fluent UDF and Scheme Programming 9 May 6, 2018 13:13
UDF or any approach for Bulk Temperature calculation vemps FLUENT 0 May 1, 2009 02: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 12:06


All times are GMT -4. The time now is 18:50.