CFD Online Logo CFD Online URL
Home > Forums > FLUENT

error caused by UDF, plz help

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

LinkBack Thread Tools Display Modes
Old   January 4, 2012, 04:45
Default error caused by UDF, plz help
New Member
Join Date: Jan 2012
Posts: 10
Rep Power: 7
molixu is on a distinguished road
There is error as followed when I try to add the UDF boundary condition:
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: ()
I can't figure out what's the problem. It's a 2D model. I want to calculate the total heat added to the model by the function:
Q_tot +=Q;

Here's my UDF code, plz help me with that.. Thank you!!

#include "udf.h"
real Q_tot=0;
DEFINE_PROFILE (unsteady_heatflux, thread, position)
Domain *d;
real cp=880;
real density=2180;
real tempn, templ, volume, Q;
Thread *t;
cell_t c;
d= Get_Domain(1); /*Get the domain using Fluent utility *//*Loop over all cell threads in the domain*/
thread_loop_c(t,d) /*Compute Q */ /*Loop over all cells */
real time= RP_Get_Real("flow-time");
real b=(int)(time/3600)+1;
int i=(int)((b-1)/24);
real Heat[4]={278.5, 280.7, 278.5, 280.5};
volume=C_VOLUME(c,t); /* get cell volume */
templ=C_T_M1(c,t); /*Get cell tempertuare of previous step*/
tempn=C_T(c,t); /*Get cell tempertuare*/
Q_tot +=Q;
if (Q_tot<= Heat[i])
else F_PROFILE(c,t,position)=0;

Last edited by molixu; January 4, 2012 at 08:48.
molixu is offline   Reply With Quote


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
Help ME For Pressure Outlet UDF PLZ!!! Yapoo Fluent UDF and Scheme Programming 2 December 26, 2011 12:45
LES and UDF... plz help! mariachi FLUENT 2 January 24, 2010 12:11
UDF and LES....... plz help out! mariachi Fluent UDF and Scheme Programming 0 January 23, 2010 13:23
plz help. a UDF problem. mehrdad FLUENT 0 August 13, 2007 05:19
udf problem!! plz guevara FLUENT 6 March 5, 2003 05:56

All times are GMT -4. The time now is 22:38.