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

BOUNDARY_PROFILE UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
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

Old   April 16, 2008, 18:08
Default Re: BOUNDARY_PROFILE UDF
  #2
ALI
Guest
 
Posts: n/a
Hello Sandilya,

May be the compiler you are using might be the problem try to write the code using Microsoft Visual C++ 6.0 or Microsoft Visual C++.Net.

Sometime Earlier i also had the same problem , i tried to check the license and again installed the software (it was on 64-BIT LINUX/UNIX SERVER) but it showed me the same problem then i tried to install it on 32 BIT windows version and it woorked might be this problem for you also.

Just check the code first in those compilers if you are not sucessful in that then go ahead and try the second solution .
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:11.