CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF temperature variation (

Alex E-H October 31, 2008 10:48

UDF temperature variation
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

e0125583 November 7, 2008 09:04

Re: UDF temperature variation
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.

Zohud February 19, 2017 09:19

Bulk Temperature
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

jadnakhl February 19, 2017 15:55

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.

All times are GMT -4. The time now is 19:44.