CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

What's a UDF?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2003, 04:25
Default What's a UDF?
  #1
Farooq
Guest
 
Posts: n/a
can anyone tell me what's a udf file...is it like a case file that defines the initial conditions for the FLUENT solver...

i have made my 3D mesh and am going to use Fluent to solve it now...why and where will i need the udf file?

Rgds,

Farooq
  Reply With Quote

Old   December 9, 2003, 04:41
Default Re: What's a UDF?
  #2
Andrew Garrard
Guest
 
Posts: n/a
This really is a case of RTFM

http://www.fluentusers.com/fluent61/.../udf/node4.htm
  Reply With Quote

Old   December 9, 2003, 04:59
Default Re: What's a UDF?
  #3
Farooq
Guest
 
Posts: n/a
thanks for the reply...could u just summarize the content in that webpage...i cannot access the forum because i am a student in NUS...and the authorization to the user support is only for our SVU (Supercomputing) administrator...

thanks...

Farooq
  Reply With Quote

Old   December 9, 2003, 05:57
Default Re: What's a UDF?
  #4
Andrew Garrard
Guest
 
Posts: n/a
I have copied and pasted the page into this forum for you. However, in my opinion, everyone who works with fluent NEEDS access to the manuals. If you are a student I would suggest you recomend that your library obtains a copy for student use. Also, fluent are pretty good about proving student support. I am a student myself and they have provied me with access to the User support centre.

A user-defined function, or UDF, is a function that you program that can be dynamically loaded with the FLUENT solver to enhance the standard features of the code. UDFs are written in the C programming language. They are defined using DEFINE macros that are supplied by Fluent Inc. They access data from the FLUENT solver using predefined macros and functions also supplied by Fluent Inc. Every UDF contains the udf.h file inclusion directive ( #include "udf.h") at the beginning of the source code file, which allows definitions for DEFINE macros and other Fluent-provided macros and functions to be included during the compilation process. UDFs are executed as either interpreted or compiled functions in FLUENT. Values that are passed to the solver by a UDF or returned by the solver to a UDF must be specified in SI units.

In summary, UDFs:

are written in the C programming language. (Chapter 2)

must have an include statement for the udf.h file. (Section 1.5)

must be defined using DEFINE macros supplied by Fluent Inc. (Section 1.4)

access FLUENT solver data using predefined macros and functions supplied by Fluent Inc. (Chapters 5 and 6)

are executed as interpreted or compiled functions. (Chapter 7)

must have all values returned to the FLUENT solver specified in SI units. User-defined functions can perform a variety of tasks in FLUENT. They can return a value unless they are defined as void in the udf.h file. If they do not return a value, they can modify an argument, modify a variable not passed as an argument, or perform I/O tasks with case and data files. In summary, UDFs can:

return a value.

modify an argument.

return a value and modify an argument.

modify a FLUENT variable (not passed as an argument).

write information to (or read information from) a case or data file. UDFs are written in C using any text editor and the source file is saved with a .c file extension. Source files typically contain a single UDF, but they can contain multiple, concatenated functions. Source files can be either interpreted or compiled in FLUENT. For interpreted UDFs, source files (e.g., pressure_profile.c) are interpreted and loaded directly at runtime, in a single-step process. For compiled UDFs, the process involves two separate steps. A shared object code library is first built and then it is loaded into FLUENT. Once interpreted or compiled, UDFs will become visible and selectable in FLUENT graphics panels, and can be hooked to a solver by choosing the function name in the appropriate panel (see Chapter 8).

  Reply With Quote

Old   December 9, 2003, 06:19
Default Re: What's a UDF?
  #5
Rahul
Guest
 
Posts: n/a
Hi Even in Fluent manual main page you can see link for UDF manual. If you have Fluent with you then just go to help page yuu can get info about UDF Rahul
  Reply With Quote

Old   December 9, 2003, 06:52
Default Re: What's a UDF?
  #6
mateus
Guest
 
Posts: n/a
Hi!

If you are solving some basic problem you will probabilly not need to use an UDF. So don`t wory about it... You can find Fluent documentation at http://www.engr.subr.edu/support/fluent/

and read all about udfs

regards

MATEUS
  Reply With Quote

Reply


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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 05:00.