|
[Sponsors] |
April 16, 2008, 12:52 |
BOUNDARY_PROFILE UDF
|
#1 |
Guest
Posts: n/a
|
hello
I am writing a UDF to define the inlet bC for compressible flow The pressure is defined by p = P_static + 0.5 * density * velocity *velocity This I am defining in UDF as given below DEFINE_PROFILE(press,t,i) { face_t f; cell_t c0; double press; double dens; double vel; double time=CURRENT_TIME; begin_f_loop(f,t) { /*c0 = F_C0(f,t);*/ press = F_P(f,t); dens = F_R(f,t); vel = F_U(f,t); if(time<20e-3) { F_PROFILE(f,t,i) = 101325 + 0.5 * dens * vel * vel; } else { F_PROFILE(f,t,i) = 0; } } end_f_loop(f,t) } But when I hook the UDF in fluent I get the following error ACCESS VIOLATION Can anyone let me know what is the problem? Thank you |
|
|
|