UDF programming for pressure 3D..HELP
#include "udf.h"
DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y,z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[1]; F_PROFILE(f,thread,index) = 20.  y*y/(.0745*.0745)*20.; } end_f_loop(f,thread) } This is the UDF programming for x velocity inlet (3D).. If i want to write for pressure difference (3D)...what is the programming for that..thanks 
It's similar to define the pressure (difference) if you want to apply a pressure boundary conditon.

Hello,
I have a problem using an UDF to define my parabolic inlet velocity profile. I would like to make it this shape: Vx= 0.00094*y*y+0.00094*z*z+0.67743 I wrote this helped by your program: #include "udf.h" DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y,z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[1]; F_PROFILE(f,thread,index) = 0.00094*y*y+0.00094*z*z+0.67743; } end_f_loop(f,thread) } But what I got is a constant profile. Do you see any mistake? Thank you for your attention. 
Quote:
x[1] = y x[2] = z Maybe that? 
Thank you
Actually I couldn't do it even with your idea so I did something different:
I designed a long duct with the same conditions as my inlet duct and long enough to let the fluid reach a fully developed profile of velocity. Then I saved it by define > profile > write and set it up at the inlet. Finally it worked. Thank you for your help anyway :) C. 
All times are GMT 4. The time now is 15:39. 