![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
After you have interpreted (Chapter 4) or compiled (Chapter 5) 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.
Boundary Conditions
or
Cell Zone Conditions
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.2.17) , select the function name (e.g., x_velocity::libudf) from the X Velocity drop-down list, and click OK. Note that the UDF name that is displayed in the drop-down lists is preceded by the word udf (e.g., 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 wish to set.
See Section 2.3.15 for details about DEFINE_PROFILE functions.
Hooking Profiles for UDS Equations
For each of the
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 (e.g.,
Fluid or
Solid) and a specified value or flux UDF for all wall, inflow, and outflow boundaries.
After you have interpreted (Chapter 4) or compiled (Chapter 5) 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.
Boundary Conditions
or
Cell Zone Conditions
Define
User-Defined
Scalars...
Next, select the UDS tab in the wall, inflow, or outflow boundary dialog box (Figure 6.2.19).
For each UDS ( User Scalar 0, User Scalar 1, etc.) specify the boundary condition value as a constant value or a UDF (e.g., 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 (i.e., the dot product of the negative of the term in parentheses on the left hand side of this equation ( in the separate 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.
|
In some cases, you may wish 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 Section 2.3.15 for details about DEFINE_PROFILE functions.