![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
An interpreted UDF is a function that is interpreted directly from a source file (e.g., udfexample.c) at runtime. You will use the Interpreted UDFs dialog box to interpret all of the functions in a source file (e.g., udfexample.c) in a single step. After a source file is interpreted, you can write the case file and the names and contents of the interpreted function(s) will be stored in the case. In this way, the function(s) will be automatically interpreted whenever the case file is subsequently read. After it has been interpreted (either manually through the Interpreted UDFs dialog box or automatically upon reading a case file), all of the interpreted UDFs that are contained within a source file will become visible and selectable in graphical user interface dialog boxes in ANSYS FLUENT.
Inside ANSYS FLUENT, the source code is compiled into an intermediate, architecture-independent machine code using a C preprocessor . This machine code then executes on an internal emulator, or interpreter, when the UDF is invoked. This extra layer of code incurs a performance penalty, but allows an interpreted UDF to be shared effortlessly between different architectures, operating systems, and ANSYS FLUENT versions. If execution speed does become an issue, an interpreted UDF can always be run in compiled mode without modification.