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

UDF for linear temperature gradient

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2016, 06:48
Default UDF for linear temperature gradient
  #1
shg
New Member
 
shg
Join Date: May 2016
Posts: 1
Rep Power: 0
shg is on a distinguished road
Hi
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

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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
UDF to modify inlet fluid temperature Vipul_Patel Fluent UDF and Scheme Programming 0 February 22, 2016 21:11
UDF for time-mean temperature gradient nenazarian Fluent UDF and Scheme Programming 1 November 12, 2012 03: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 18:29


All times are GMT -4. The time now is 10:41.