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

fatal error while execute on demand...

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2013, 15:49
Default fatal error while execute on demand...
  #1
New Member
 
Ch_Flame
Join Date: Apr 2012
Location: Iran
Posts: 13
Rep Power: 14
fatemeh chitgarha is on a distinguished road
hi,i'm 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 interpreting goes well without any errors until reach execute on demand where it yield the above errors.
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 iterated as well. The following is my source code. Can anyone tells me what is the causes of the errors?
#include "udf.h"
#include "sg_mem.h"
#include "outlet.h"
DEFINE_DIFFUSIVITY(diffu,c,t,i)
{
return (C_MU_T(c,t)) / 0.055;
}
DEFINE_PROFILE(scaler_outlet,t,i)
{
real s;
face_t f;
begin_f_loop(f,t)
{
s=C_UDSI(F_C0(f,t),THREAD_T0(t),0);
F_PROFILE(f,t,i) = s;
}
end_f_loop(f,t)
}
DEFINE_ON_DEMAND(on_demand_calca)
{
Domain *d; /* declare domain pointer since it is not passed as an
argument to the DEFINE macro */
Thread *t;
cell_t c;
real x;
real y;
real z;
d = Get_Domain(1); /* Get the domain using ANSYS FLUENT utility */
/* Loop over all cell threads in the domain */
thread_loop_c(t,d)
{
/* Loop over all cells */
begin_c_loop(c,t)
{
if (0.055 < C_FMEAN(c,t) )
x = 1;
else
x = 0;
C_UDMI(c,t,0) = x;
if (0.055 < C_FMEAN(c,t) && C_FMEAN(c,t) < 0.099 )
y = 1;
else
y = 0;
C_UDMI(c,t,1) = y;
if (0.055 < C_FMEAN(c,t) && C_FMEAN(c,t) < 0.077 )
z = 1;
else
z = 0;
C_UDMI(c,t,2) = z;
C_UDMI(c,t,3) = C_UDMI(c,t,0) + C_UDMI(c,t,1) + C_UDMI(c,t,2);
if (C_UDMI(c,t,0) + C_UDMI(c,t,1) + C_UDMI(c,t,2) == 0.)
C_UDMI(c,t,3) = 0.01;
end_c_loop(c,t)
}
}
}
Thanx.
fatemeh chitgarha is offline   Reply With Quote

Old   July 29, 2013, 02:44
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
I think you dont need #include "sg_mem.h" and #include "outlet.h". Try ignoring them.
vasava is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Execute on Demand Denis Fluent UDF and Scheme Programming 6 June 26, 2018 04:40
execute udf in ss & transient simulation hosseinhgf FLUENT 0 December 1, 2010 08:41
error while execute on demand Anderson Main CFD Forum 4 October 17, 2008 11:48
execute on demand pourak FLUENT 0 April 20, 2007 06:24
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


All times are GMT -4. The time now is 00:15.