|
[Sponsors] |
May 17, 2011, 22:41 |
FLUENT UDF in Intepreting
|
#1 |
New Member
NGH
Join Date: May 2011
Posts: 15
Rep Power: 15 |
Hi
I have created a vel.c file for parabolic velocity BC at the inlet. The UDF.c is as shown below. During intepreting by the fluent, it has a syntax error at line 2. However, I dont find anything wrong with line 2. Anyone out there see the source of this syntax error, please help thanks #include "udf.h" DEFINE_PROFILE (inlet_x_velocity, thread, index) /*line 2*/ { real x[ND_ND]; real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y=x[1]; F_PROFILE(f, thread, index) = 0.4*[-0.64*(y/0.1)^6 +3.9*(y/0.1)^5 - 9.2*(y/0.1)^4 m+ 11*(y/0.1)^3 - 6.9*(y/0.1)^2]; } end_f_loop(f, thread) } |
|
May 19, 2011, 04:16 |
|
#2 |
Member
alighaffari
Join Date: May 2011
Posts: 31
Rep Power: 15 |
Hi NGH
I have examined your udf it has no problem in line2.But its problem is in line 12. I have solved this problem and it has been interpreted properly: #include"udf.h" DEFINE_PROFILE (inlet_x_velocity, thread, index) /*line 2*/ { real x[ND_ND]; real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y=x[1]; F_PROFILE(f, thread, index) = 0.4*(-0.64*pow((y/0.1),6) +3.9*pow((y/0.1),5) - 9.2*pow((y/0.1),4)+ 11*pow((y/0.1),3) - 6.9*pow((y/0.1),2));/*line12*/ } end_f_loop(f, thread) } enjoy |
|
May 19, 2011, 04:49 |
|
#3 |
New Member
NGH
Join Date: May 2011
Posts: 15
Rep Power: 15 |
Hi alighaffari
Thanks a lot! I will try that again. |
|
July 19, 2011, 06:41 |
problem in UDF on LINUX
|
#4 |
New Member
walle
Join Date: Jul 2011
Posts: 10
Rep Power: 15 |
Hey i have a same problem
the following is the UDF It runs fine when on windows 7. however on linux system gives me a syntax error in line 2. Pls help me out with this. #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, nv) { real x[3]; real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y=x[1]; F_PROFILE(f, thread, nv) = 0.0015*(1-pow(((y-0.005)/0.005),2)); } end_f_loop(f, thread) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent udf, saving data in udf | mohsen zendehbad | Fluent UDF and Scheme Programming | 15 | June 14, 2017 00:23 |
Transient pressure UDF for parallel fluent | droberts | Fluent UDF and Scheme Programming | 5 | October 11, 2010 05:13 |
Using Fluent with a UDF frm a remote m/c | aarti | FLUENT | 2 | September 11, 2008 20:53 |
UDF problem caused by various version of Fluent | Yurong | FLUENT | 3 | January 15, 2006 11:57 |
Can somebody send me a Fluent 6 UDF manual?? | KKLAU | FLUENT | 4 | April 14, 2004 17:37 |