CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF interpretation trough TUI

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

LinkBack Thread Tools Display Modes
Old   March 14, 2005, 16:50
Default UDF interpretation trough TUI
Posts: n/a
Hi everybody, I am working on a pulsatile flow simulation. I use a UDF to define a parabolic velocity profile at inlet of my model with a time-dependent centerline velocity.

My problem is that I cannot "interpret" the UDF through text commands but it seems that I cannot link the interpreted UDF to the appropriate boundary condition (in my case the UDF is used for the x-velocity component). Fluent prompts for file name and file data. I tried entering my UDF source code file without success.

I would be grateful for any advice anyone might have on this.

Best Regards David
  Reply With Quote

Old   March 15, 2005, 03:55
Default Re: UDF interpretation trough TUI
Melaku Habte
Posts: n/a

You would get much more help if you put the error that fluent gave you up here, also your UDF...if there are some bugs ppl can see it.


Melaku Habte
  Reply With Quote

Old   March 18, 2005, 15:26
Default Re: UDF interpretation trough TUI
Posts: n/a
Hi Melaku,

I am still struggling with this so I would appreciate your help. As mentionned previously, I need a certain UDF for inlet velocity. When using text commands, I am having problem "hooking" the UDF at velocity inlet once it has been interpreted succesfully. Also I cannot use an boundary profile file because the inlet condition has a time and space dependency. (See UDF)

Below I have copied part of the transcript file. Look closely to the definition of the velocity inlet condition. More precisely:

profile name [""] "square_wave" data name [""] "square_wave"

where square_wave is the name of my UDF. Am I doing somethig wrong? (See below Transcript File)

Also, bear in mind that I do not get an error message as you might have tought from my previous message. Nevertheless when I verify, with GUI, the x-velocity component for the velocity inlet has not been updated has I would like.

/*Partial Transcript File*/

> /define/user-defined/interpreted-functions UDF Source File Name [""] "c:libudfsquare_wave0.c" CPP Command Name ["cpp"] "cpp" virtual machine stack size [10000] 10000 display assembly code listing? [no] no

cpp -IC:\FLUENT.INC\fluent6.1.22/src -IC:\FLUENT.INC\fluent6.1.22/cortex/src -IC:\FLUENT.INC\fluent6.1.22/client/src -IC:\FLUENT.INC\fluent6.1.22/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" c:\libudf\square_wave0.c

> /define/boundary-conditions/velocity-inlet (velocity_inlet.11) zone id/name [velocity_inlet.11] 3 Velocity Specification Method: Magnitude and Direction [no] no Velocity Specification Method: Components [no] yes Reference Frame: Absolute [yes] yes Use Profile for X-Velocity? [no] yes profile name [""] "square_wave" data name [""] "square_wave" Use Profile for Y-Velocity? [no] "no 0

The UDF that I would like to use is as follows. But again I do not think the problem lies there has Fluent interprets it succcesfully:

#include "udf.h" DEFINE_PROFILE (square_wave,thread,position) {

#define PI 3.14159

real x[ND_ND];

face_t f;

real z,y,test;


if (z<0.30)

test =0;

else if (z<0.70)


else if (z<1.3)


else if (z<1.7)


else if (z<2.3)


else if (z<2.7)


else if (z<3.3)


else if (z<3.7)


else if (z<4.3)




begin_f_loop(f, thread)




y = x[1];

F_PROFILE(f,thread,position) = test - y*y/(.0065*.0065)*test;


end_f_loop(f, thread)


Any comments or observations would be of great help.

Regards, David

  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
UDF Interpretation Error levonlarson FLUENT 0 July 18, 2011 11:57
Problem in Interpretation of UDF coolkdm Fluent UDF and Scheme Programming 2 June 11, 2011 03:42
solving ODE with interpretation of UDF wlt_1985 FLUENT 0 January 17, 2011 03:56
struggling with interpretation of UDF in fluent Suman Kandula FLUENT 0 August 9, 2007 12:56
UDF Interpretation Suvash FLUENT 0 November 1, 2005 00:10

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