|
[Sponsors] |
Fluent does not recognize my UDF for velocity profile |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2012, 06:37 |
Fluent does not recognize my UDF for velocity profile
|
#1 |
New Member
selim
Join Date: Sep 2009
Location: UK
Posts: 19
Rep Power: 17 |
Dear all,
I want to impose a velocity at the inlet which is parabolic at the bottom and top and constant in the middle of the inlet. But flunet does not regonize the locations correctly, so what is wrong in my UDF, pls help!! Here is my udf, #include "udf.h" #define S 0.038 #define V1 10.86 DEFINE_PROFILE(inlet_x_velocity, thread, index) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; if (y<=S) F_PROFILE(f, thread, index) = 249.384*y*y+249.384*y; else if (S<=y<=3*S) F_PROFILE(f, thread, index) = V1; else if (3*S<=y<=4*S) F_PROFILE(f, thread, index) = -83.514*y*y-83.514*y+14.6238; } end_f_loop(f, thread) } Thank you, -Selim |
|
September 10, 2012, 07:27 |
|
#2 |
Senior Member
Flavio
Join Date: Sep 2011
Location: Brescia, Italy
Posts: 181
Rep Power: 16 |
Hi Selim,
I'm not very expert in programming but I'm doubtful about the logical condition of the IF command: y<=S in the first case, in the other I would put S<y, not S<=y, because when y=S I don't know if Fluent uses the first without error
__________________
Bionico |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help please! UDF for Temperature profile in 3D | subhankar_bhandari | Fluent UDF and Scheme Programming | 2 | August 16, 2010 09:37 |
UDF in Fluent | subha_meter | Main CFD Forum | 0 | October 18, 2009 00:54 |
Compiling UDF in Fluent 12 | jsm | FLUENT | 1 | July 22, 2009 08:40 |
UDF problem caused by various version of Fluent | Yurong | FLUENT | 3 | January 15, 2006 11:57 |
UDF of Zimont model in fluent | Z | Main CFD Forum | 0 | February 17, 2005 04:07 |