|
[Sponsors] |
December 15, 2014, 03:08 |
Define_profile udf not work correctly?!
|
#1 |
Member
Nick
Join Date: Feb 2012
Posts: 33
Rep Power: 14 |
Hello everyone!
I have compiled an UDF for FLUENT 15.0 to test a velocity parabolic profile for inlet. But the DEFINE_PROFILE macro does not seem to work right. It takes the coordinates from the last face of the thread and it gives them to the second face (face no. 1). So, the velocity vector of the last face is always bigger that the vector before. Here is the code: #include "udf.h" DEFINE_PROFILE(inlet_velocity,t,i) { real x[ND_ND]; real a; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); a = f; F_PROFILE(f,t,i) = 15.5-(a-5)*(a-5)/2; printf("face no= %d\n", f); printf("x= %f\n", x[0]); printf("y= %f\n", x[1]); } end_f_loop(f,t) } And here is a part of the results: face no= 0 x= 0.010000 y= 0.010500 face no= 1 x= 0.010000 y= 0.019500 face no= 2 x= 0.010000 y= 0.011500 face no= 3 x= 0.010000 y= 0.012500 ... The inlet starts at x=0.01; y=0.01 and stops at x=0.01; y=0.02 and has 10 faces. I done something wrong? Or there is something wrong inside macro? Thank you! |
|
Tags |
define_profile, fluent, macro, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
udf doesn't work | blaid | FLUENT | 0 | March 6, 2012 12:29 |
the udf has been hooked to the fluent successfully,but it does not work! | hugeforest | Fluent UDF and Scheme Programming | 1 | July 8, 2011 04:31 |
Timestep UDF not work | peaker007 | Fluent UDF and Scheme Programming | 0 | April 28, 2011 12:10 |
UDF for wall slipping | HFLUENT | Fluent UDF and Scheme Programming | 0 | April 27, 2011 12:03 |