[ANSYS, Inc. Logo] return to home search
next up previous contents index

2.1 Introduction

DEFINE macros are predefined macros provided by ANSYS, Inc. that must be used to define your UDF. A listing and discussion of each DEFINE macros is presented below. (Refer to Section  1.4 for general information about DEFINE macros.) Definitions for DEFINE macros are contained within the udf.h file. For your convenience, they are provided in Appendix  B.

For each of the DEFINE macros listed in this chapter, a source code example of a UDF that utilizes it is provided, where available. Many of the examples make extensive use of other macros presented in Chapter  3. Note that not all of the examples in the chapter are complete functions that can be executed as stand-alone UDFs in ANSYS FLUENT. Examples are intended to demonstrate DEFINE macro usage only.

Special care must be taken for some serial UDFs that will be run in parallel ANSYS FLUENT. See Chapter  7 for details.

figure   

Note that all of the arguments to a DEFINE macro need to be placed on the same line in your source code. Splitting the DEFINE statement onto several lines will result in a compilation error.

figure   

Make sure that there are no spaces between the macro (e.g., DEFINE_PROFILE) and the first parenthesis of the arguments, as this will cause an error in Windows.

figure   

Do not include a DEFINE macro statement (e.g., DEFINE_PROFILE) within a comment in your source code. This will cause a compilation error.


next up previous contents index Previous: 2. DEFINE Macros
Up: 2. DEFINE Macros
Next: 2.2 General Purpose DEFINE
Release 12.0 © ANSYS, Inc. 2009-01-14