The udf.h header file contains:
Definitions for DEFINE macros
#include compiler directives for C or C++ library function header
files
Header files (for example, mem.h) for other ANSYS Fluent-supplied macros and functions.
You must, therefore, include the udf.h file
at the beginning of every UDF source code file
using the #include compiler directive:
#include "udf.h"
For example, when udf.h is included in
the source file containing the DEFINE statement
from the previous section,
#include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, index)
upon compilation, the macro will expand to
void inlet_x_velocity(Thread *thread, int index)
Important: You do not need to put a copy of udf.h in your local folder when you compile your UDF. The ANSYS Fluent solver automatically reads the udf.h file from the following folder after your UDF is compiled, for example:
path\ANSYS Inc\v182\fluent\fluent18.2.0\src
where path is
the folder in which you have installed ANSYS Fluent (by default, the path
is C:\Program Files).