|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Jul 2009
Posts: 2
Rep Power: 0 ![]() |
Hi, i am relatively new to UDF
![]() below is my UDF file, /************************************************** ******************** udfexample.c UDF for specifying a steady-state velocity profile boundary condition ************************************************** ********************/ #include "udf.h" /* must be at the beginning of every UDF you write */ DEFINE_PROFILE(start_temperature,thread,index) { real y[ND_ND]; /* this will hold the position vector */ real x; face_t f; begin_f_loop(f,thread) /* loops over all faces in the thread passed in the DEFINE macro argument */ { F_CENTROID(y,f,thread); x = y[0]; F_PROFILE(f,thread,index) = 400.351. + 300.*x; } end_f_loop(f,thread) } When i interpret my UDF file, it says parse error at the profile function file F_PROFILE(f,thread,index) = 400.351. + x*300.; But when i remove the decimal values of 400.351 to 400, it has no problem interpreting it. Is there any other methods or tips that enable me to include decimal values inside the profile function? Thx a bunch ![]() Last edited by Wiggy; July 21, 2009 at 15:28. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Micael
Join Date: Mar 2009
Location: Canada
Posts: 156
Rep Power: 17 ![]() |
Did you try this:
F_PROFILE(f,thread,index) = 400.351 + 300.*x; instead of this:? F_PROFILE(f,thread,index) = 400.351. + 300.*x; There are two decimal points here: "400.351." The second one is inappropriate. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF profile function of iteration | nando83 | FLUENT | 0 | July 9, 2009 11:19 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 04:41 |
errors | Fahad | Main CFD Forum | 0 | March 23, 2004 13:20 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 14, 2003 23:19 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 15:16 |