CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

BOUNDARY_PROFILE UDF

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 16, 2008, 12:52
Default BOUNDARY_PROFILE UDF
  #1
Sandilya Garimella
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
  Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 22:31.