1.3.1. Including the udf.h Header File in Your Source File

The udf.h header file contains:

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).



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