5.1.2. Compilers

The graphical and text interface processes for a compiled UDF require the use of a C compiler that is native to the operating system and machine you are running on. Most Linux operating systems provide a C compiler as a standard feature. If you are operating on a Windows system, you must ensure that Microsoft Visual Studio is installed on your machine before you proceed (for example, Microsoft Visual C++, v10.0 or higher). If you are unsure about compiler requirements for your system, contact ANSYS Fluent installation support. For Linux machines, ANSYS Fluent supports any ANSI-compliant compiler.


Important:  Obsolete versions of any native compiler may not work properly with compiled UDFs.


When launching ANSYS Fluent on Windows using Fluent Launcher, the Environment tab (Figure 5.1: The Environment Tab of the Fluent Launcher Dialog Box) allows you to specify compiler settings for compiling UDFs.

Figure 5.1:  The Environment Tab of the Fluent Launcher Dialog Box

The Environment Tab of the Fluent Launcher Dialog Box

The Set up Compilation Environment for UDF option is enabled by default, and allows you to specify a batch file that contains UDF compilation environment settings. Enter a batch filename and path in the field, or click   to browse for a batch file. By default, the Fluent Launcher dialog box is set to use the udf.bat file that is saved in your computer as part of the ANSYS Fluent installation. It is recommended that you keep the default batch file, which is tested with the latest MS Visual Studio C++ compilers at the time of the ANSYS Fluent release date.


Release 18.2 - © ANSYS, Inc. All rights reserved.