CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

UDF for linear temperature gradient

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

LinkBack Thread Tools Display Modes
Old   June 9, 2016, 06:48
Default UDF for linear temperature gradient
New Member
Join Date: May 2016
Posts: 1
Rep Power: 0
shg is on a distinguished road
I am trying to apply a UDF for linear temperature gradient across a surface. The left wall of the surface is at 700K, while the right wall is at 300K. Length of surface is 10mm.
The UDF goes this way:
#include "udf.h"

DEFINE_PROFILE(temperature_profile, thread, position)
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;

begin_f_loop(f, thread)
F_CENTROID(x, f, thread);
y = x[0];
F_PROFILE(f, thread, position) = 500-40*y;
end_f_loop(f, thread)
However, this temperature profile doesn't show up in the results.
Can someone please send me a correct UDF for this?
shg 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 to modify inlet fluid temperature Vipul_Patel Fluent UDF and Scheme Programming 0 February 22, 2016 22:11
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 11 April 22, 2014 12:32
UDF for time-mean temperature gradient nenazarian Fluent UDF and Scheme Programming 1 November 12, 2012 04:30
UDF slip and temperature jump from IFRT abir Fluent UDF and Scheme Programming 1 July 30, 2012 05:44
UDF velocity and temperature Raj FLUENT 3 February 1, 2009 19:29

All times are GMT -4. The time now is 17:25.