![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In many cases, the UDF source code that you will write for a single-phase flow will be the same as for a multiphase flow. For example, there will be no differences between the C code for a single-phase boundary profile (defined using DEFINE_PROFILE) and the code for a multiphase profile, assuming that the function is accessing data only from the phase-level domain to which it is hooked in the graphical user interface. If your UDF is not explicitly passed a pointer to the thread or domain structure that it requires, you will need to use a special multiphase-specific macro (e.g., THREAD_SUB_THREAD) to retrieve it. This is discussed in Chapter 3.
See Appendix B for a complete list of general-purpose DEFINE macros and multiphase-specific DEFINE macros that can be used to define UDFs for multiphase model cases.