CFD Online Discussion Forums

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

Alex E-H November 5, 2008 09:38

UDF temperature variation
hi. i am attempting to simulate a sinusoidally varying temperature velocity inlet and the following is my udf:

#include "udf.h"

DEFINE_PROFILE(unsteady_temp,thread,index) { face_t f; real T; real t = CURRENT_TIME;

begin_f_loop(f,thread) /* loops over all faces in the thread passed in the macro argument */ { F_PROFILE(f,thread,index) = 10.0 *sin(t*(3.14159/720) /* here stands the profile function as a function of time */ } end_f_loop(f,thread) }

When interpreting in Fluent I am getting the message:

Error: U:\4th_yr\FYP\2nd\Unsteady\unsteady_temperature.c: line 12: parse error.

Can anybody help me with this please?


Alex E-H November 5, 2008 10:03

Re: UDF temperature variation
sorry i have modified i think this should work but still doesnt:

#include "udf.h" DEFINE_PROFILE(unsteady_temperature, thread, position) { face_t f; real t = CURRENT_TIME;

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

parse error on line 10?


Alex E-H November 5, 2008 10:18

Re: UDF temperature variation
please do not worry to reply to this i have figured it out


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