Error udf - define_profile
Hi everybody,
I'm trying to interpreted an UDF-file but from fluent I get error all the time. It writes this error: Error: C:\BFS_channel\inlet_z_velocity.c: line 1: parse error. My UDF file looks like this: #include "udf.h" #define DELTA 0.003 /*thickness of boundary layer [m]*/ #define W 20. /*velocity in free streem [m/s]*/ #define P 1./7. /*exponent of power*/ DEFINE_PROFILE(inlet_z_velocity,thread,position) { real x [ND_ND], b; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); b=x[1]; if (b <= DELTA) { F_PROFILE(f,thread,position)=W*pow(b/DELTA,b); } else { F_PROFILE(f,thread,position)=W } } end_f_loop(f,thread) } Can anybody help me please? I think I tried everything what I know and still can't find parse error in 1st line. Thank you for your help Best regards H. |
You missed a semicolon at the end of
Code:
F_PROFILE(f,thread,position)=W; |
Thank you for your answer but it doesn't work anyway. So i think I will do it in CFX it will be much easier.
|
I tested this code and worked
--------------------------------------- #include "udf.h" #define DELTA 0.003 /*thickness of boundary layer [m]*/ #define W 20. /*velocity in free streem [m/s]*/ #define P 1./7. /*exponent of power*/ DEFINE_PROFILE(inlet_z_velocity,thread,position) { real x [ND_ND], b; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); b=x[1]; if (b <= DELTA) F_PROFILE(f,thread,position)=W*pow(b/DELTA,b); else F_PROFILE(f,thread,position)=W; } end_f_loop(f,thread) } --------------------------------------------- when you are using (if) doesn't need {{}} |
All times are GMT -4. The time now is 20:59. |