User Defined Functions (UDF) - Part 4 - Making UDFs Work in Parallel

User defined functions (UDF) allow you to modify the behavior of ANSYS Fluent to satisfy your particular modeling needs. For example, these modifications may be used to impose desired initial and boundary conditions, material models as well as various physical and chemical transformations such as heat transfer, chemical reactions or phase change. UDFs are flexible and powerful, and allow you to use ANSYS Fluent as a framework to implement new models.

In this five part webinar series our aim is to present the fundamentals of developing UDFs. After a first webinar on the basic aspects of UDFs, we will deal with advanced topics such as UDFs for multiphase flow, Lagrangian Particle Tracking, reacting flow models and other advanced topics such as making your UDF's work in parallel.

Part 4 of this webinar series will look at how many simple UDFs require no modification to work correctly in the parallel solver, it is fairly common for many users to find that from time to time a UDF needs to be changed, or "parallelized", so that it works correctly in both the serial and parallel solvers. This can seem like an intimidating task at first, but the majority of UDFs can be easily parallelized once four basic components of parallel UDFs are understood.

1. Compiler Directives
2. Looping
3. Global Reductions
4. Node-to-Host and Host-to-Node Data Transfer

As important as it is to understand how to make a UDF work in parallel, it is equally important to understand what to do when it compiles but does not work as expected. Strategies for identifying and correcting run time errors in parallel UDFs will be presented to try to make this task easier.