CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   fatal error while execute on demand... (https://www.cfd-online.com/Forums/fluent-udf/121426-fatal-error-while-execute-demand.html)

fatemeh chitgarha July 28, 2013 15:49

fatal error while execute on demand...
 
hi,i'm try to execute my udf file through execute on demand while the following errors occured:

Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: ()

Before that, the interpreting goes well without any errors until reach execute on demand where it yield the above errors.
I try defined for the user defined memory before execute on demand but the same errors occurred again. Before that, the solution also has been iterated as well. The following is my source code. Can anyone tells me what is the causes of the errors?
#include "udf.h"
#include "sg_mem.h"
#include "outlet.h"
DEFINE_DIFFUSIVITY(diffu,c,t,i)
{
return (C_MU_T(c,t)) / 0.055;
}
DEFINE_PROFILE(scaler_outlet,t,i)
{
real s;
face_t f;
begin_f_loop(f,t)
{
s=C_UDSI(F_C0(f,t),THREAD_T0(t),0);
F_PROFILE(f,t,i) = s;
}
end_f_loop(f,t)
}
DEFINE_ON_DEMAND(on_demand_calca)
{
Domain *d; /* declare domain pointer since it is not passed as an
argument to the DEFINE macro */
Thread *t;
cell_t c;
real x;
real y;
real z;
d = Get_Domain(1); /* Get the domain using ANSYS FLUENT utility */
/* Loop over all cell threads in the domain */
thread_loop_c(t,d)
{
/* Loop over all cells */
begin_c_loop(c,t)
{
if (0.055 < C_FMEAN(c,t) )
x = 1;
else
x = 0;
C_UDMI(c,t,0) = x;
if (0.055 < C_FMEAN(c,t) && C_FMEAN(c,t) < 0.099 )
y = 1;
else
y = 0;
C_UDMI(c,t,1) = y;
if (0.055 < C_FMEAN(c,t) && C_FMEAN(c,t) < 0.077 )
z = 1;
else
z = 0;
C_UDMI(c,t,2) = z;
C_UDMI(c,t,3) = C_UDMI(c,t,0) + C_UDMI(c,t,1) + C_UDMI(c,t,2);
if (C_UDMI(c,t,0) + C_UDMI(c,t,1) + C_UDMI(c,t,2) == 0.)
C_UDMI(c,t,3) = 0.01;
end_c_loop(c,t)
}
}
}
Thanx.

vasava July 29, 2013 02:44

I think you dont need #include "sg_mem.h" and #include "outlet.h". Try ignoring them.


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