After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_PROFILE UDF, the name of the function you supplied as a DEFINE macro argument will become visible and selectable in the appropriate
boundary zone condition dialog box, cell zone condition dialog box,
or Shell Conduction Layers dialog box in ANSYS Fluent.
To open the boundary or cell zone condition dialog box, select the
zone in the Boundary Conditions or Cell Zone Conditions task page and click the Edit... button.
Setup →
Boundary Conditions
or
Setup →
Cell Zone Conditions
To open the Shell Conduction Layers dialog box, enable the Shell Conduction option in the Thermal tab of the Wall dialog box, and then click the button.
To hook the UDF, select the name of your function in the appropriate drop-down list. For example, if your UDF defines a velocity inlet boundary condition, click the Momentum tab in the Velocity Inlet dialog box (Figure 6.40: The Velocity Inlet Dialog Box), select the function name (for example, x_velocity::libudf) from the X Velocity drop-down list, and click . Note that the UDF name that is displayed in the drop-down lists is preceded by the word udf (for example, udf x_velocity::libudf).
If you are using your UDF to specify a fixed value in a cell zone, you will need to turn on the Fixed Values option in the Fluid or Solid dialog box. Then click the Fixed Values tab and select the name of the UDF in the appropriate drop-down list for the value you want to set.
See
DEFINE_PROFILE
for details
about DEFINE_PROFILE functions.
For each of the N scalar equations you have specified in your ANSYS Fluent model using the User-Defined Scalars dialog box, you can hook a fixed-value UDF for a cell zone (for example, Fluid or Solid) and a specified-value or flux UDF for all wall, inflow, and outflow boundaries.
After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_PROFILE UDF, the name of the function you supplied as a DEFINE macro argument will become visible and selectable in the appropriate
boundary or cell zone condition dialog box in ANSYS Fluent. To open the
boundary or cell zone condition dialog box, select the zone in the Boundary Conditions or Cell Zone Conditions task page and click the Edit... button.
Setup →
Boundary Conditions
or
Setup →
Cell Zone Conditions
If you are using your UDF to specify a fixed value in a cell zone, you will need to enable the Fixed Values option in the Fluid or Solid dialog box. Then click the Fixed Values tab (Figure 6.41: The Fluid Dialog Box with Fixed Value Inputs for User-Defined Scalars) and select the name of the UDF (for example, fixed_scalar_0) in the appropriate drop-down list for the value you want to set.
If you are using your UDF to define a specific value or flux for a scalar equation in a boundary condition dialog box, you will first need to enter a nonzero number in the User-Defined Scalars field in the User-Defined Scalars dialog box.
Parameters & Customization → User Defined Scalars
Edit...
Next, select the UDS tab in the wall, inflow, or outflow boundary dialog box (Figure 6.42: The Wall Dialog Box with Inputs for User-Defined Scalars).
For each UDS (User Scalar 0, User Scalar 1, and so on) specify the boundary condition
value as a constant value or a UDF (for example, user_scalar::libudf) in the User-Defined Scalar Boundary Value group
box. If you select Specified Flux in the User-Defined Scalar Boundary Condition group box for a
particular UDS, then your input will be the value of the flux at the
boundary (that is, the dot product of the negative of the term in
parentheses on the left hand side of Equation 1–9 (in the Theory Guide) with the vector that is normal
to the domain); if you instead select Specified Value, then your input will be the value of the scalar itself at the boundary.
In the sample dialog box shown previously, for example, the Specified Value for User Scalar 0 is set to a user_scalar UDF.
Note that for interior walls, you will need to select Coupled Boundary if the scalars are to be solved on both sides of a two-sided wall. Note that the Coupled Boundary option will show up only in the drop-down list when all zones is selected for Solution Zones in the User-Defined Scalars dialog box.
Important: In some cases, you may want to exclude diffusion of the scalar at the inlet of your domain. You can do this by disabling Inlet Diffusion for the scalar in the User-Defined Scalars dialog box.
See
DEFINE_PROFILE
for details
about DEFINE_PROFILE functions.