CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF Temperature boundaries Condition

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

Like Tree1Likes
  • 1 Post By flotus1

LinkBack Thread Tools Display Modes
Old   July 17, 2012, 07:50
Default UDF Temperature boundary Conditions
New Member
Join Date: Jul 2012
Posts: 6
Rep Power: 5
sylvix48 is on a distinguished road
I'm trying to set a variable temperature as boundary condition on the exterior surface of a cylinder. I work in 3D and I've done the attached udf. It is well compiled under Fluent but there is no fluctuation of temperature along the tube. In my case the Temperature should change on the Z axis but in the simulation it seems that it changes on the x axis. Could you tell my if my UDF is OK and why it doesn't work ?


Here's the code :


/* profile for temperature */


real z[ND_ND];
real y;
face_t f;


F_PROFILE(f,t,i) =4.6706*10*10*10*10*10*10*y*y*y*y*y+2.3199*10*10*1 0*10*10*10*y*y*y*y-85471*y*y*y-72106*y*y-437.51*y+1722.5;

Attached Files
File Type: c temperature.c (442 Bytes, 15 views)

Last edited by sylvix48; July 17, 2012 at 09:20.
sylvix48 is offline   Reply With Quote

Old   July 17, 2012, 11:06
Senior Member
flotus1's Avatar
Join Date: Jun 2012
Location: Germany
Posts: 1,134
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
z[0] reads the x-coordinate. No wonder your profile changes with x.

use z[2] instead.
sylvix48 likes this.
flotus1 is offline   Reply With Quote

Old   July 18, 2012, 03:01
New Member
Join Date: Jul 2012
Posts: 6
Rep Power: 5
sylvix48 is on a distinguished road
Thanks a lot, it works !

I'm beginner in the UDF coding, I don't know all the stuff about it
sylvix48 is offline   Reply With Quote

Old   July 20, 2012, 12:26
New Member
Join Date: Jul 2012
Posts: 18
Rep Power: 5
mila_oliv is on a distinguished road
I'm also new at udf and I want to stabilish simple boundary conditions.

I'm trying to implement stream function to compare my result with fluent's result.

On the cavity walls, Velocity is zero. Do I have to mention this or when I simulate I set this on fluent?

Look what I've done:

#include "udf.h"
#include "mem.h"


real NV_VEC(psi);
real NV_VEC(vxdy);
real source;
int n,m,deltay;
cell_t c;
Thread *t;

/* the following are the boudary conditions that I don't know if I need to write. 1 is the starting point and e the ending point of the mesh*/

deltay=1/m; /*mesh size: mXm and cavity size: 1 meter*/
source=NV_V(psi,+=,vxdy); /* psi[i][j+1]=psi[i][j]+(Vx*delta y) or stream function definition*/
return source;

mila_oliv 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
defining temperature profile with UDF mohammadkm Fluent UDF and Scheme Programming 11 July 3, 2013 00:15
UDF setting wall boundary condition with a DEFINE_PROFILE NLao FLUENT 1 April 17, 2011 05:23
Please Help! Temperature profile UDF for 3D geometry subhankar_bhandari FLUENT 2 April 16, 2011 05:30
Help please! UDF for Temperature profile in 3D subhankar_bhandari Fluent UDF and Scheme Programming 2 August 16, 2010 08:37
boundary condition for temperature ane Main CFD Forum 0 March 24, 2008 05:27

All times are GMT -4. The time now is 15:12.