CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   BOUNDARY_PROFILE UDF (https://www.cfd-online.com/Forums/fluent/47945-boundary_profile-udf.html)

Sandilya Garimella April 16, 2008 12:52

BOUNDARY_PROFILE UDF
 
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

ALI April 16, 2008 18:08

Re: BOUNDARY_PROFILE UDF
 
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 .


All times are GMT -4. The time now is 17:39.