|
[Sponsors] |
May 19, 2005, 11:38 |
UDF ERROR: ACCESS_VIOLATION
|
#1 |
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 |
|
May 19, 2005, 16:36 |
Re: UDF ERROR: ACCESS_VIOLATION
|
#2 |
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; } |
|
May 14, 2012, 17:40 |
same problem
|
#3 |
New Member
moon
Join Date: Feb 2012
Posts: 26
Rep Power: 14 |
i write a udf and when i want to intialize it write me :
fluent faltal.... what is the problem ? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
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 22:38 |
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 |