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

a udf problem

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2010, 23:00
Unhappy a udf problem
  #1
New Member
 
daniel
Join Date: Mar 2010
Posts: 4
Rep Power: 16
danielchen37 is on a distinguished road
dear all:
i come across a udf problem. the case ran well without the udfs. but when the udfs were compiled, built and loaded, the error signal would appear and the interation would not process a bit.
here is the error signal:

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 udfs are compiled and loaded successfully as:
xforce.c
yforce.c
zforce.c
uds.c
Generating Code...
# Generating udf_names.c because of makefile xforce.obj yforce.obj zforce.obj uds.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj xforce.obj yforce.obj zforce.obj uds.obj
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Creating library libudf.lib and object libudf.exp
Done.
"E:/hyc/hyc/RE1000"
Opening library "E:\hyc\hyc\RE1000\libudf"...
Library "E:\hyc\hyc\RE1000\libudf\ntx86\3d\libudf.dll" opened
xforce_source
yforce_source
zforce_source
uds_source
Done.

and here is one code of my udfs and the rest of the udfs all share with the same structure:
#include"udf.h"
#include"mem.h"
#include"metric.h"
DEFINE_SOURCE(xforce_source,c,t,dS,eqn)
{
real dens;
real u;
real v;
real w;
real ux;
real uy;
real uz;
real cp;
real A;
real con;
real tx;
real tgx;
real source;
real x[ND_ND];
real ur;
real sc;
real sp;
C_CENTROID(x,c,t);
dens=C_R(c,t);
u=C_U(c,t);
v=C_V(c,t);
w=C_W(c,t);
ux=C_DUDX(c,t);
uy=C_DUDY(c,t);
uz=C_DUDZ(c,t);
A=C_UDSI(c,t,0);
tx=C_T_G(c,t)[0];
con=-0.02;
ur=v*uy+u*uz;
sc=dens*ur+con*A*tx;
sp=dens*ux;
source=sp*u+sc;
dS[eqn]=sp;
return source;
}

please tell me what's wrong with my udf and how could i correct it.
thank you!
danielchen37 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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 07:05
UDF problem mansha goraya FLUENT 0 October 29, 2007 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 08:14
udf problem shan FLUENT 6 March 17, 2004 04:01
UDF problem chiseung FLUENT 4 January 10, 2002 10:58


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