|
[Sponsors] |
March 11, 2010, 21:06 |
a define_source problem
|
#1 |
New Member
daniel
Join Date: Mar 2010
Posts: 4
Rep Power: 16 |
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! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Incoherent problem table in hollow-fiber spinning | Gianni | FLUENT | 0 | April 5, 2008 10:33 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 14:52 |