CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Boundary Temperature Profile UDF error (

shikamaru May 18, 2012 05:07

Boundary Temperature Profile UDF error

I have just started using udf. I am trying to prescribe a variable wall temperature in the boundary. But I am getting parse error in line 2 (DEFINE..)

Can anyone help me with this? and tell me what is wrong here? [downsized the arrays of the code]

#include "udf.h"
DEFINE_PROFILE(tmold_profile, thread, index)
real x[ND_ND];
real z;
real tmold[163]={228.9,277.5,301.6,.....};
real zm[163]={0.0,5.1,10.1,......};
int n=0;
real tmp=0.0;
face_t f;

z = x[1];
for (n;n<163;n++)
if (z < zm[0])
if (z > zm[162])

if (z == zm[n])
tmp = tmold[n];
if (z>zm[n] && z<zm[n+1])
tmp = tmold[n]+(z-zm[n])*(tmold[n+1]-tmold[n])/(zm[n+1]-zm[n]);

F_PROFILE(f,thread,index) = tmp+273;

shikamaru May 18, 2012 21:19

I found out that some how in the c file the the first line was like this
while I was coding in notepad++ it did not show that!!
fixed with notepad.

All times are GMT -4. The time now is 03:04.