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

Step 6: User-Defined Function (UDF)

  A UDF is used to specify the fixed velocities that simulate the impeller. The values of the time-averaged impeller velocity components and turbulence quantities are based on experimental measurement. The variation of these values may be expressed as a function of radius, and imposed as polynomials according to:

$variable = A_{1} + A_{2}r + A_{3}r^{2} + A_{4}r^{3} + \ldots$

  The order of polynomial to be used depends on the behavior of the function being fitted. For this tutorial, the polynomial coefficients shown in Table  21.1 are provided in the UDF fix.c.


Table 21.1: Impeller Profile Specifications

Variable $A_1$ $A_2$ $A_3$ $A_4$ $A_5$ $A_6$
$u$ velocity -7.1357e-2 54.304 -3.1345e+3 4.5578e+4 -1.966e+5 -
$v$ velocity 3.1131e-2 -10.313 9.5558e+2 -2.0051e+4 1.186e+5 -
kinetic energy 2.2723e-2 6.7989 -424.18 9.4615e+3 -7.725e+4 1.8410e+5
dissipation -6.5819e-2 88.845 -5.3731e+3 1.1643e+5 -9.120e+5 1.9567e+6


For more informtion about setting up a UDF using the DEFINE_PROFILE macro, refer to the separate UDF Manual. Though this macro is usually used to specify a profile condition on a boundary face zone, it is used in fix.c to specify the condition in a fluid cell zone. Hence, the arguments of the macro have been changed accordingly.

1.   Interpret the UDF source file fix.c.

Define $\rightarrow$ User-Defined $\rightarrow$ Functions $\rightarrow$ Interpreted...

figure

(a)   Enter fix.c for Source File Name.

  If the UDF source file is not in your working folder, you must enter the entire folder path for Source File Name instead of just entering the file name. Alternatively, click Browse... and select fix.c in the eulerian_multiphase_granular folder that was created after you unzipped the original file.

(b)   Enable Display Assembly Listing.

  The Display Assembly Listing option displays the assembly language code in the console as the function compiles.

(c)   Click Interpret to interpret the UDF.

(d)   Close the Interpreted UDFs dialog box.

Note:   The name and contents of the UDF are stored in the case file when you save the case file.


next up previous contents Previous: Step 5: Phases
Up: Using the Eulerian Multiphase
Next: Step 7: Cell Zone
Release 12.0 © ANSYS, Inc. 2009-02-09