CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF temperature variation

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

LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2008, 09:48
Default UDF temperature variation
Alex E-H
Posts: n/a
Hi. I am new to using UDFs and have read through the help file. I am attempting to create an inlet velocity whose temperature varies sinusoidally every 24 hours. My udf file is given below:

#include "udf.h"


{ real x[ND_ND]; /* this will hold the position vector */

real y;

face_t f;





F_PROFILE(f, thread, position) = 10.*sin(t*(pi/720.)) */ here stands the profile function as a function of time /*




I am receiving an error message when interpreting in fluent:

"cpp -IT:\XP\Fluent.Inc\fluent6.2.16/src -IT:\XP\Fluent.Inc\fluent6.2.16/cortex/src -IT:\XP\Fluent.Inc\fluent6.2.16/client/src -IT:\XP\Fluent.Inc\fluent6.2.16/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" U:\4th yr\FYP\2nd\Unsteady\udftempprofile.c Error: U:\4th yr\FYP\2nd\Unsteady\udftempprofile.c: line 1: parse error."

Any help is much appreciated
  Reply With Quote

Old   November 7, 2008, 08:04
Default Re: UDF temperature variation
Posts: n/a
looks like a syntax error. check if the file-format of you c-file is unix (not DOS) or try to compile the udf instead of interpreting it.
  Reply With Quote

Old   February 19, 2017, 08:19
Default Bulk Temperature
New Member
Zohud Mohammed
Join Date: Feb 2017
Location: Salfeet-Palestine
Posts: 6
Rep Power: 8
Zohud is on a distinguished road
Dear all; i am studying the heat transfer of nanorefrigerant in horizontal tube under heat flux constant; but i need a method for calculate the bulk temperature of fluid for every points on axes x. I trying write udf but there an error

/************************************************** ********************
UDF for calculate the bulk temperature
************************************************** ********************/

#include "udf.h"

real Tb;
real x[ND_ND]; /* this will hold the position vector */
real y[ND_ND];
real u=f_U(f,t)
real temp = F_T(face, thread); /* get face temperature */

face_t f;

begin_f_loop(face,thread) /* loops over all faces in the thread passed
in the DEFINE macro argument */
Tb = SUM u*temp*y / SUM u*y;

Please help me
Zohud is offline   Reply With Quote

Old   February 19, 2017, 14:55
New Member
Jad nakhl
Join Date: Feb 2017
Posts: 8
Rep Power: 8
jadnakhl is on a distinguished road
Hello sorry disturbing but i posted earlier and no one answered.
If anyone can tell me how should i draw an expanding circular pipe without getting an error in the setup if want to make a line in the drawing as centerline and by putting the problem type as axisymmetric.
jadnakhl is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF temperature variation Alex E-H FLUENT 2 November 5, 2008 09:18
Pressure temperature variation Dev CFX 0 June 21, 2007 23:01
Viscosity variation with temperature for gases- Kedar Main CFD Forum 3 October 24, 2005 06:43
variation of surface tension with temperature Markus FLUENT 1 July 17, 2002 20:23
Property variation with temperature G.Balakrishnan FLUENT 1 December 16, 2000 06:51

All times are GMT -4. The time now is 05:36.