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

UDF ERROR: ACCESS_VIOLATION

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 19, 2005, 10:38
Default UDF ERROR: ACCESS_VIOLATION
  #1
M.Sundar
Guest
 
Posts: n/a
Hai fluent users

i want to add source term(In Energy Eq w/m3) as a function of volume fraction in VOF multi phase model. Is it possible to call C_VOF(c,pt[0])(Volume fraction) inside DEFINE_SOURCE. When i try to use it gives error message

C:\DEFINE.c:6: macro `DEFINE_SOURCE' used with only 3 args 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: ()

The udf is(DEFINE.c)

#include "udf.h"

DEFINE_SOURCE(heatgen,c,t) {

Thread **pt;

real x[ND_ND],y;

real source;

y=x[1];

C_CENTROID(x, c, t); if ((C_VOF(c,pt[1])==0))

source = 9e9;

else

source=0;

return source; }

Please tell what is the error

Thanks in advance

  Reply With Quote

Old   May 19, 2005, 15:36
Default Re: UDF ERROR: ACCESS_VIOLATION
  #2
pUl|
Guest
 
Posts: n/a
Syntax for DEFINE_SOURCE is

DEFINE_SOURCE( name, c, t, dS, eqn)

You are missing dS, the derivative of the source and eqn number, eqn.

Refer:

http://www.fluentusers.com/fluent/do...udf/node81.htm

Here is a sample UDF:

#include "udf.h"

#define C2 100.0

DEFINE_SOURCE(xmom_source,c,t,dS,eqn)

{

real x[ND_ND];

real con, source;

C_CENTROID(x,c,t);

con = C2*0.5*C_R(c,t)*x[1];

source = -con*fabs(C_U(c, t))*C_U(c,t);

dS[eqn] = -2.*con*fabs(C_U(c,t));

return source;

}
  Reply With Quote

Old   May 14, 2012, 16:40
Default same problem
  #3
New Member
 
moon
Join Date: Feb 2012
Posts: 24
Rep Power: 6
moun139 is on a distinguished road
i write a udf and when i want to intialize it write me :

fluent faltal....

what is the problem ?
moun139 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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 20:05.