CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Boundary Temperature Profile UDF error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 18, 2012, 05:07
Default Boundary Temperature Profile UDF error
  #1
New Member
 
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 5
shikamaru is on a distinguished road
Hi,

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;

begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
z = x[1];
for (n;n<163;n++)
{
if (z < zm[0])
tmp=tmold[0];
if (z > zm[162])
tmp=tmold[162];

if (z == zm[n])
tmp = tmold[n];
else
{
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;
}
end_f_loop(f,thread)
}

Last edited by shikamaru; May 18, 2012 at 21:18.
shikamaru is offline   Reply With Quote

Old   May 18, 2012, 21:19
Default
  #2
New Member
 
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 5
shikamaru is on a distinguished road
I found out that some how in the c file the the first line was like this
#include?"udf.h"
while I was coding in notepad++ it did not show that!!
fixed with notepad.
shikamaru is offline   Reply With Quote

Reply

Tags
udf wall boundary fluent

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
groovyBC sega OpenFOAM Running, Solving & CFD 12 February 17, 2010 10:30
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


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