CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

FLUENT received fatal signal (ACCESS_VIOLATION)???

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

LinkBack Thread Tools Display Modes
Old   September 26, 2009, 18:04
Default FLUENT received fatal signal (ACCESS_VIOLATION)???
New Member
Join Date: Aug 2009
Posts: 6
Rep Power: 10
Jinfeng is on a distinguished road
Dear Friends,

I wrote a DEFINE_ON_DEMAND type code to read some data from files into FLUENT so that I can use the data in later source term calculations. After interpreting it successfully, I clicked "EXCUTE" the Excute on Demand panel and I got this error message:

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

I have no idea what the problem could be, I am seeking some experts' opinions.........

Here is that part of the code(The matrix definitions was defined as global variables and were not pasted here):

int numnodes;
int i;

FILE *ifp; // Pointer for the data file
FILE *kfp;
int k=0;

numnodes = xdirnodes * ydirnodes * zdirnodes; // Calculate total number of nodes in volume
ifp = fopen("Rho.dat", "r"); // Open data file for scanning
kfp = fopen("ExEyEz.dat", "r");

//*** READ IN VALUES ***//
for(i=1; i<=numnodes; i++)
"%f", rho[k]);
"%f", dvdx[k]);
"%f", dvdy[k]);
"%f", dvdz[k]);

Jinfeng is offline   Reply With Quote

Old   October 19, 2009, 11:03
Default Pointers... always a problem
Senior Member
dmoroian's Avatar
Join Date: Mar 2009
Posts: 649
Rep Power: 13
dmoroian is on a distinguished road
You should put a check for the pointers:
if (NULL == if)
   Error("Something is wrong with your input file!\n");
To read data with fscanf you need pointers, which means you have to dereference the variable if is not a pointer.

fscanf(ifp, "%f", &rho[k]);
To make the code look nicer I would use i-1 instead of k.

dmoroian is offline   Reply With Quote


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
FLUENT received fatal signal (ACCESS_VIOLATION) CHAKER FLUENT 4 December 11, 2015 04:20
On Bug of Fluent 12.0 lzgwhy FLUENT 0 August 26, 2009 06:41
Problems in lauching FLUENT Lourival FLUENT 3 January 16, 2008 17:48
fatal signal (ACCESS_VIOLATION) manu FLUENT 0 December 10, 2007 07:10
FLUENT received fatal signal (ACCESS_VIOLATION) samy FLUENT 0 November 10, 2007 14:09

All times are GMT -4. The time now is 23:51.