CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   error while execute on demand (http://www.cfd-online.com/Forums/main/15884-error-while-execute-demand.html)

Anderson October 15, 2008 06:59

error while execute on demand
 
hi,i'm actually 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 compilation goes well without any errors until reach execute on demand where it yield the above errors. i've try interpret as well but still the same errors come out. Can anyone give me some suggestions?

Anderson October 15, 2008 23:38

Re: error while execute on demand
 
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 initialized and iterate as well. The following is my source code. Can anyone tells me what is the causes of the errors?

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: ()

#include "udf.h"

DEFINE_ON_DEMAND(calc_eq)

{

Domain *d;

real tavg = 0.;

real tmax = 0.;

real tmin = 0.;

real temp,volume,vol_tot;

Thread *t;

cell_t c;

d = Get_Domain(1);

thread_loop_c(t,d)

{

begin_c_loop(c,t)

{

volume = C_VOLUME(c,t);

temp = C_T(c,t);

if (temp < tmin || tmin == 0.) tmin = temp;

if (temp > tmax || tmax == 0.) tmax = temp;

vol_tot += volume;

tavg += temp*volume;

}

end_c_loop(c,t)

tavg /= vol_tot;

printf("\n Tmin = %g Tmax = %g Tavg = %g\n",tmin,tmax,tavg);

begin_c_loop(c,t)

{

temp = C_T(c,t);

C_UDMI(c,t,0) = (temp-tmin)/(tmax-tmin);

}

end_c_loop(c,t)

} }

Ananda Himansu October 16, 2008 05:50

Re: error while execute on demand
 
No idea. I do not know the Fluent UDF language or C (being a Fortran person). However, I must ask, does Fluent somewhere initialize vol_tot to zero?

Anderson October 17, 2008 10:22

Re: error while execute on demand
 
The solution regarding the following error for execute on demand can be solved by the following steps:

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: ()

1)Read your case file,check your grid 2)Add the source file to your UDF to be compiled. At the compilation, build and load the the source file. 3)Set your user defined memory to 1. 4)Initialized your solution and performed 1 iteration. 5)Load again the UDF source file in User defined function. 6)Now try execute on demand.


Ananda Himansu October 17, 2008 11:48

Re: error while execute on demand
 
That is good to know.

I still do not understand why you do not have something like

real vol_tot = 0.; real temp, volume;

instead of

real temp,volume,vol_tot;

at the beginning of the udf. But perhaps the initialization of vol_tot is being performed in step 3) of your usage protocol.



All times are GMT -4. The time now is 21:35.