CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Fatal Signal (ACCESS_VIOLATION)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 12, 2010, 12:01
Default Fatal Signal (ACCESS_VIOLATION)
  #1
New Member
 
Joe Paul
Join Date: Jun 2009
Posts: 3
Rep Power: 8
Joe101 is on a distinguished road
Hi,

I have written a UDF to rotate an ellipse in 2D with a constant angular velocity. It has been compiled and loaded without any errors. However, when i come to preview the mesh motion i get the following error message:

"Updating mesh at time level N...
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: ()"

I cant work out the problem but i have a feeling it might be my udf as i am new to c programming. Here is a copy of the udf:

#include "udf.h"
DEFINE_CG_MOTION(ellipse, dt, vel, omega, time, dtime)
{
face_t f;
Thread *tf = DT_THREAD(dt); /* [5] */
Node *node;
real xn, yn, r, theta, y0, x0;
int n;
begin_f_loop(f,tf) /* Loops over all faces in the thread passed in the DEFINE macro argument [10] */
{
f_node_loop(f,tf,node) /* Loops over all nodes in the face */
{
xn = NODE_X(node); // calculate x-coordinate of a grid point on wall /* [15] */
yn = NODE_Y(node); // calculate y-coordinate of a grid point on wall
x0=0.0;
y0=0.0;
/* [20] */
r=sqrt(((xn-x0)*(xn-x0))+((yn-y0)*(yn-y0)));
theta=atan((yn-y0)/(xn-x0));
*omega=1000.0; /* [25] */
vel[0]=r*(*omega)*sin(theta);
vel[1]=-r*(*omega)*cos(theta);
} /* [30] */
}
end_f_loop(f,tf);
}

Any suggestions would be very much appreciated.
Joe101 is offline   Reply With Quote

Old   February 16, 2010, 13:59
Default
  #2
New Member
 
USMAN
Join Date: Nov 2009
Posts: 28
Rep Power: 7
usman naseer is on a distinguished road
hi,,
i think it is not the problem of udf alone.It is possible that your udf is absolutely correct but you will still get this message.it is actually due to a combination of errors due to which Fluent can't proceed further.i will suggest you to check your boundary conditions and the values of pressure assigned.
Regards
usman naseer is offline   Reply With Quote

Old   February 17, 2010, 13:13
Default
  #3
Member
 
Allan Walsh
Join Date: Mar 2009
Posts: 55
Rep Power: 8
Allan Walsh is on a distinguished road
If you do much with udfs, you may see this message a lot - starting all the way back from Version 4. I have not tried to look through your UDF code, but in general the error occurs when you try and access a variable that is not accessible. So you might look for something where the variable is not yet defined or you are overwriting something. Good luck.
Allan Walsh is offline   Reply With Quote

Old   November 19, 2010, 00:59
Default
  #4
New Member
 
zhangzhiyan
Join Date: Jul 2010
Location: Urumqi CHINA
Posts: 16
Rep Power: 7
zzyan is on a distinguished road
hi joe101
i have same problem about node_x(node), have you sloved this problem, if yes, could you tell me how ?
thanks

Quote:
Originally Posted by Joe101 View Post
Hi,

I have written a UDF to rotate an ellipse in 2D with a constant angular velocity. It has been compiled and loaded without any errors. However, when i come to preview the mesh motion i get the following error message:

"Updating mesh at time level N...
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: ()"

I cant work out the problem but i have a feeling it might be my udf as i am new to c programming. Here is a copy of the udf:

#include "udf.h"
DEFINE_CG_MOTION(ellipse, dt, vel, omega, time, dtime)
{
face_t f;
Thread *tf = DT_THREAD(dt); /* [5] */
Node *node;
real xn, yn, r, theta, y0, x0;
int n;
begin_f_loop(f,tf) /* Loops over all faces in the thread passed in the DEFINE macro argument [10] */
{
f_node_loop(f,tf,node) /* Loops over all nodes in the face */
{
xn = NODE_X(node); // calculate x-coordinate of a grid point on wall /* [15] */
yn = NODE_Y(node); // calculate y-coordinate of a grid point on wall
x0=0.0;
y0=0.0;
/* [20] */
r=sqrt(((xn-x0)*(xn-x0))+((yn-y0)*(yn-y0)));
theta=atan((yn-y0)/(xn-x0));
*omega=1000.0; /* [25] */
vel[0]=r*(*omega)*sin(theta);
vel[1]=-r*(*omega)*cos(theta);
} /* [30] */
}
end_f_loop(f,tf);
}

Any suggestions would be very much appreciated.
__________________
In learning and straightway practising is there not pleasure also? When friends gather round from afar do we not rejoice? Whom lack of fame cannot vex is not he a gentleman?
zzyan is offline   Reply With Quote

Reply

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) shashikant FLUENT 3 November 29, 2014 13:03
How to remove the error:FLUENT received a fatal signal (SEGMENTATION VIOLATION). Conan FLUENT 1 March 20, 2009 14:51
FLUENT received fatal signal (ACCESS_VIOLATION) Vivek FLUENT 0 May 31, 2007 17:58
received fatal signal brusly FLUENT 1 April 12, 2007 12:49
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


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