|
[Sponsors] |
June 14, 2005, 15:18 |
3d velocity inlet-help needed!
|
#1 |
Guest
Posts: n/a
|
Hello CFD community,
The subject of how to define a 3d parabolic velocity profile as been explained at numerous occasions on this site. My problem is the following: I cannot use a single one of these UDF succesfully although Fluent has no problem interpreting them succesfully. In other words, I can interpret a UDF but Fluent does not assign the proper veolcity values to the inlet face. In fact Fluent does not loop through each face of a surface as should be the case. This appears very odd to since I have no trouble using the UDF for 2d cases. But as soon as I try using 3d, I get no response and the case will case converge within 1 iteration since no change occur in the domain. As anyone experienced this problem before? I can email a small 3d mesh file to anyone curious about this. Below is a typical UDF tried. Best Regards, David ----------------------------------------------------- #include "udf.h" #define xc 0./*inlet face center cordinates are x=0 and y=0 since pipe is along z-axis*/ #define yc 0. #define radius 0.0065 #define umean 0.232 DEFINE_PROFILE(z_velocity, thread, position) { float r, x[2]; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); r = sqrt(pow(x[0]-xc,2)+pow(x[1]-yc,2)); printf("r=%.6f\n",r); /* for control purposes*/ F_PROFILE(f,thread,position) = 2*umean*(1-pow(r/radius,2)); printf("x=%.6f\t r=%.6f\t u=%.5f\n",x[0],r,2*umean*(1-pow(r/radius,2))); /* for control purposes*/ } end_f_loop(f, thread) } |
|
June 15, 2005, 07:34 |
Re: 3d velocity inlet-help needed!
|
#2 |
Guest
Posts: n/a
|
David..try using the following declaration for x: real x[ND_ND]; "The constant ND_ND is defined as 2 for RP_2D ( FLUENT 2D) and RP_3D ( FLUENT 3D). It can be used when you want to build a matrix in 2D and a matrix in 3D. When you use ND_ND, your UDF will work for both 2D and 3D cases, without requiring any modifications." - Fluent UDF Manual, Ch. 6.6 Vector Macros
|
|
June 15, 2005, 10:06 |
Re: 3d velocity inlet-help needed!
|
#3 |
Guest
Posts: n/a
|
Hello Peter, thank you for responding. I tried declaring this variable as you had suggested without any success. I don't understand why Fluent does not seem to loop on a planar surface such as the one used in my 3d case. Any other comments would be greatly appreciated!
Regards, David |
|
June 17, 2005, 11:33 |
Re: 3d velocity inlet-help needed!
|
#4 |
Guest
Posts: n/a
|
Just for the record:
I compiled the same UDF and it worked. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Velocity Inlet BC -- Flow Reversal | salihovic | FLUENT | 0 | May 8, 2011 05:45 |
Changing Boundary: Decreasing Inlet Velocity - Convergence Issues | VT_Bromley | FLUENT | 3 | February 12, 2011 09:02 |
User Defined Profiles, Swirl, Velocity Inlet | saurus | FLUENT | 0 | January 26, 2011 15:35 |
Unexpected difference between velocity / mass-flow inlet | jpo | FLUENT | 8 | December 10, 2010 07:20 |
UDF problem : inlet velocity in cyl. coord. system | Jongdae Kim | FLUENT | 0 | June 15, 2004 11:21 |