CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

udf initalizing problem

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

LinkBack Thread Tools Display Modes
Old   March 5, 2012, 06:32
Lightbulb udf initalizing problem
New Member
Join Date: Jan 2012
Posts: 12
Rep Power: 7
studen is on a distinguished road
#include "udf.h"
DEFINE_PROPERTY(cell_viscosity, c,t)
double u, uo, A, B, C, T; //uo, A, B, C are constant
uo = 4.485e-8;
A = -7.5907e-7;
B = 3.8968e-4;
C = 4.0130e-2;

for (T=1; T<101; T++)
u = uo*(exp(1/((A*T*T)+(B*T)+C)));
printf ("T = %3.0f, u= %3.8f \n", T, u);
return u;

this is my programme to simulate heat transfer considering variable viscosity, the programme can be interpreted but when i initalize it goes into an infinte loop, need suggestions and help.

thanks in advance
studen is offline   Reply With Quote

Old   March 6, 2012, 06:14
Senior Member
Join Date: Mar 2009
Posts: 133
Rep Power: 10
coglione is on a distinguished road
First of all, the loop counter T should be defined as integer and not as real. Don't know how your compiler handles this exactly but fix it anyway.

Secondly DEFINE_PROPERTY macros are called for each cell every iteration. That means your udf will loop 100 times for each cell which may take a long time if your mesh is big.

coglione 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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 October 18, 2017 07:17
what's the problem with my udf zzyan FLUENT 0 November 4, 2010 04:56
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
UDF problem chiseung FLUENT 4 January 10, 2002 10:58

All times are GMT -4. The time now is 09:12.