The UDF source file (example.c) must be in the same directory that contains your case (e.g., example.msh). After start FLUENT and read your case file (example.msh): Define â€" User-Defined â€" Functions â€" Interpreted In the Interpreted UDFs panel select the UDF source file (example.c) The next step is to set the Use Contributed CPP and click Interpret.

Fluent diplay a message of the interpreted UDF source file.

Close the Interpreted UDFs panel when the interpreter has finished

The proceder to Interpreted UDF is the same in the Windows and LINUX, but to compile in the Windows system it is necessary the C+ sotfware and service pack 2.

In FLUENT user guide chapter 8.2 you can see the steps TO compile UDF source file. In my opinion Interpreted UDF it is easier than Compiled UDF, however the Compiled UDF runs faster.

I'm a bit confused though, because in the udf manual i read an example for DEFINE_ADJUST that can be used as interpreted OR compiled, and another example again for DEFINE_ADJUST that can be ONLY used as compiled?

I was going through the UDF manual, and for the DEFINE_ADJUST there are two examples. For the first one it's mentioned that is used as an interpreted, and the second one only as compiled (the second one uses UDS, maybe that's why)

I want to define a von Neumann condition with a DEFINE_ADJUST function.

The major difference between interpreted and compiled UDFs is that interpreted UDFs cannot access FLUENT solver data using direct structure references; they can only indirectly access data through the use of Fluent-supplied macros. This can be significant if, for example, you want to introduce new data structures in your UDF.

A summary of the differences between interpreted and compiled UDFs is presented below. See Chapters 7 and 8 for details on interpreting and compiling UDFs, respectively, in FLUENT.

* Interpreted UDFs

o are portable to other platforms.

o can all be run as compiled UDFs.

o do not require a C compiler.

o are slower than compiled UDFs.

o are restricted in the use of the C programming language.

o cannot be linked to compiled system or user libraries.

o can access data stored in a FLUENT structure only using a predefined macro (see Chapters 5 and 6).

* Compiled UDFs

o execute faster than interpreted UDFs.

o are not restricted in the use of the C programming language.

o can call functions written in other languages (specifics are system- and compiler-dependent).

o cannot necessarily be run as interpreted UDFs if they contain certain elements of the C language that the interpreter cannot handle.

In summary, when deciding which type of UDF to use for your FLUENT model

* use interpreted UDFs for small, straightforward functions.

* use compiled UDFs for complex functions that

o have a significant CPU requirement (e.g., a property UDF that is called on a per-cell basis every iteration).