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

my UDF can not calculation?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2010, 09:59
Default my UDF can not calculation?
  #1
New Member
 
jiahongshu
Join Date: Oct 2010
Location: china
Posts: 6
Rep Power: 16
happyrabbit is on a distinguished road
hello,everyone, I need some help to my UDF, after compiling , initialize ,and when iterate, the console appears the following text,
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 know there are some reason for it ,the condition seting , the computer system, the udf , after my consideration ,I am wondering the UDF have errors but compiling would not detected ,so please help to have a look, thanks !

my UDF :

#include "udf.h"
real p11=0.0;
real p22=0.0;
real p=0.0;
Thread *t;
face_t f;
real FC[2];
real I[2]={6,14};
int i=0,ID;
DEFINE_CG_MOTION(piston1,dt,vel,omega,time,dtime)
{ Domain *domain;
domain = Get_Domain(1);
while(i<2)
{ if(i==0)
{ ID=I[i];
t= Lookup_Thread(domain, ID);
begin_f_loop(f, t)
{
p11=F_P(f,t);
}
end_f_loop(f, t)
printf("p11 = %f ", p11);
}
i++;
if(i==1)
{ ID=I[i];
t= Lookup_Thread(domain, ID);
begin_f_loop(f, t)
{
p22=F_P(f,t);
}
end_f_loop(f, t)
printf("p22 = %f ", p22);
}
i++;}
p=(p11+p22);
printf("p = %f", p);
vel[0]=p/1000;

}
DEFINE_CG_MOTION(piston2,dt,vel,omega,time,dtime)
{

vel[0]=p/1000;

}
__________________
I want to find a good job, fightting!
happyrabbit is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I stop the calculation in UDF Seyoung Oh Fluent UDF and Scheme Programming 1 September 24, 2013 08:44
calculation average pressure in a plane with UDF Vitalij FLUENT 1 April 10, 2007 04:39
Calculation of face vaules with udf rom FLUENT 0 November 3, 2005 03:04
Warning 097- AB Siemens 6 November 15, 2004 05:41
If it's right to use this UDF in DPM calculation? welch FLUENT 0 May 8, 2004 06:49


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