[ANSYS, Inc. Logo] return to home search
next up previous contents index

5. Compiling UDFs

After you have written your UDF(s) using any text editor and have saved the source file with a .c extension in your working folder, you are ready to compile the UDF source file, build a shared library from the resulting objects, and load the library into ANSYS FLUENT. After being loaded, the function(s) contained in the library will appear in drop-down lists in graphical interface dialog boxes, ready for you to hook to your CFD model. Follow the instructions in Section  5.2 to compile UDF source files using the graphical user interface (GUI). Section  5.3 explains how you can use the text user interface (TUI) to do the same. The text interface option provides the added capability of allowing you to link precompiled object files derived from non- ANSYS FLUENT sources (e.g., Fortran sources) to your UDF (Section  5.4). This feature is not available in the GUI. Section  5.5 describes how you can load (and unload) multiple UDF libraries using the UDF Library Manager dialog box. The capability of loading more than one UDF library into ANSYS FLUENT raises the possibility of data contention if multiple libraries use the same user-defined scalar (UDS) and user-defined memory (UDM) locations. These clashes can be avoided if libraries reserve UDS or UDM prior to usage. See Sections  3.2.8 and 3.2.9, respectively, for details.




next up previous contents index Previous: 4.3 Common Errors Made
Up: ANSYS FLUENT 12.0 UDF Manual
Next: 5.1 Introduction
Release 12.0 © ANSYS, Inc. 2009-01-14