CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   help wanted on interpreting a simple UDF (https://www.cfd-online.com/Forums/fluent/35230-help-wanted-interpreting-simple-udf.html)

Suresh December 5, 2004 21:31

help wanted on interpreting a simple UDF
 
Hi.. i have written a small udf to define the temperatute profile which is T = 200 sin(pi*t/10)...this is the temperature that has to be used as a BC on one of the walls of a 2d block. the accompanying udf is

#include "udf.h" DEFINE_PROFILE(unsteady_temp, thread, position) { face_t f;

begin_f_loop(f, thread)

{

real t = RP_Get_Real("flow-time");

F_PROFILE(f, thread, position) = 200*sin(0.314.*t);

} end_f_loop(f, thread) }

now wen i try to onterpret this UDF i get the following error mesage..cannot figure out whr the problem is...can anyone help...urgent...as i am stuck on the submission of an assigment on monday..ie dec 6th.. the error mesage is as below

C:\Fluent.Inc tbin tx86\cpp.exe -IC:\Fluent.Inc\fluent6.1.22/src -IC:\Fluent.Inc\fluent6.1.22/cortex/src -IC:\Fluent.Inc\fluent6.1.22/client/src -IC:\Fluent.Inc\fluent6.1.22/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" C:\wang\chetan-udf.c Error: C:\wang\chetan-udf.c: line 9: parse error.

....suresh


hongfw December 6, 2004 08:33

Re: help wanted on interpreting a simple UDF
 
There is a erro in the line 9, please check "200*sin(0.314.*t)", the term 0.314. is not correct, it may be 0.314, or 314.0

Suresh December 6, 2004 15:33

Re: help wanted on interpreting a simple UDF
 
Thank you ...hong...actually it eluded me for quite a while but i found tht mistake ...thanx anyways... suresh

hongfw December 8, 2004 08:28

Re: help wanted on interpreting a simple UDF
 
I hope you can express what you want to say more clearly.

Suresh December 8, 2004 11:41

Re: help wanted on interpreting a simple UDF
 
well..hong i was saying thank you for the help extended.. by the way...u got any idea on modelling a screw compressor???


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