![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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.
|
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.
|
|
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.
|
|
Do not include a
DEFINE macro statement (e.g.,
DEFINE_PROFILE) within a comment in your source code. This will cause a compilation error.
|