|
[Sponsors] |
May 18, 2012, 06:07 |
Boundary Temperature Profile UDF error
|
#1 |
New Member
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 14 |
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 22:18. |
|
May 18, 2012, 22:19 |
|
#2 |
New Member
Nara Shikamaru
Join Date: Apr 2012
Posts: 22
Rep Power: 14 |
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. |
|
Tags |
udf wall boundary fluent |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." | sega | OpenFOAM Community Contributions | 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 06:07 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |