CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   fatal signal (ACCESS_VIOLATION) (https://www.cfd-online.com/Forums/fluent/137352-fatal-signal-access_violation.html)

ahvz June 14, 2014 08:08

fatal signal (ACCESS_VIOLATION)
 
Hi all,

I have been faced with this error when I do the run right after the first time step:
Error:
C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0
tx86\2ddp\fl1450s.exe 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: #f


Code:

/***********************************************************************
udfexample.c
UDF for specifying the heater
 ************************************************************************/


#include "udf.h"

#include "math.h"

real q=1.866043e+07;
DEFINE_EXECUTE_AT_END(tsensor) 
{

Domain *d;
Thread *t;
cell_t c;

CX_Cell_Id *cx_cell;
real NV_VEC(pt);
float pos[3];
float posd[3];
real xmin=0.00332165;
real ymin=0.4;
real zmin=0.36;

 NV_D(pt,=,xmin,ymin,zmin);
 pos[0]=xmin;
 pos[1]=ymin;
 pos[2]=zmin;




SV_locate_point(pos,cx_cell);
 c=cx_cell->ct.c;
t=cx_cell->ct.t;

 
 message("%en",C_T(c,t));
 if (C_T(c,t)<=297.15)
 {
 q=1.866043e+07;
 }
 else
 {
 q=0.0;
 }


}

DEFINE_SOURCE(heater_generation,c,t,dS,eqn)
{
real source;
source=q;
dS[eqn]=0.0;
return source;
}


pakk June 14, 2014 09:13

I guess your problem might be in the following two lines:

real NV_VEC(pt);
NV_D(pt,=,xmin,ymin,zmin);

I have no clue what your intention for variable "pt" was, but this is definitely a wrong way to define it. And you never use it... So either just delete those lines, or if you think you need it, change these lines into what it should be and use it.

ahvz June 15, 2014 08:50

thanks for your reply,

I was tested the case file with another computer( a LINUX system with installed Fluent 14.0 )and the case has been compiled without any error and the calculation completed.

I am wondering, why the error arises only when I do compiling in my system installed Fluent 14.5 windows 7-64bit.

regarding to your doubts,

I am doing a 3D-transient analysis, tend to get temperature of a point for each time step and immediately giving the comment (in regard to the set temperature point) to the heat source in order to be ON or OFF.


regards,


All times are GMT -4. The time now is 06:49.