CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF temperature variation (http://www.cfd-online.com/Forums/fluent/49671-udf-temperature-variation.html)

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"

DEFINE_PROFILE(test,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) = 10.*sin(t*(pi/720.)) */ here stands the profile function as a function of time /*

}

end_f_loop(f,thread)

}

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.


All times are GMT -4. The time now is 21:39.