CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Pb with simple Fluent UDF example for inlet

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

LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2008, 10:34
Default Pb with simple Fluent UDF example for inlet
Posts: n/a
Hi all,

I want use a fully turbulent velocity profile in the inlet of my computational domain.

I have used a very simple udf from the udf examples of Fluent. The udf is interpreted without error message but when:

* I want to initialize my solution with my velocity profile at the inlet I've got:

Error: prf-set-var: invalid flonum Error Object: nan

* I try to iterate, I have this error message:

Error: > (greater-than): invalid argument [2]: wrong type [not a number] Error Object: nan

So I suspect a division by zero, but can't find it in my udf.

Any ideas ? Thanks a lot for your help.

Regards Francois

------------------------udf begins here---------------------

#include "udf.h"

#define YMIN 0.5

#define YMAX 1.5

#define UMEAN 1.0

#define B 1./7.

#define DELOVRH 0.5

#define VISC 1.7894e-05

#define CMU 0.09

#define VKC 0.41

/* profile for x-velocity */

DEFINE_PROFILE(x_velocity, t, i)


real y, del, h, x[ND_ND], ufree;

face_t f;

h = YMAX - YMIN;

del = DELOVRH*h;

ufree = UMEAN*(B+1.);

begin_f_loop(f, t)



y = x[1];

if (y <= del)

F_PROFILE(f,t,i) = ufree*pow(y/del,B);


F_PROFILE(f,t,i) = ufree*pow((h-y)/del,B);


end_f_loop(f, t)


----------------------udf end here-------------------------
  Reply With Quote


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
CO in fluent - Simple basic doubt plz help. JACK HARI FLUENT 0 December 22, 2007 01:35
How to give pressure inlet in Fluent Vijayaragavan FLUENT 2 December 13, 2007 03:21
Simple 3D Fluent Analysis Chris FLUENT 6 March 23, 2006 01:38
Simple question to Window XP Fluent user Aireen FLUENT 3 August 22, 2005 10:36
Simple fluent questions FLUENT 0 May 18, 2005 12:50

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