F_PROFILE 宏在 DEFINE_PROFILE UDF 中使用,对给定的面(face)和线索(thread)设置边界值。标号 i 既是F_PROFILE 也是 DEFINE_PROFILE 的参数,用来识别特定的,待设置边界变量(如:压力、温度、速度), F_PROFILE 在mem.h 中定义。
- 语法: F_PROFILE(f,t,i)
- 参数:
- face_t f //the index of the face
- thread *t //a pointer to the face’s thread
- int i //an integer index to the particular face variable that is to be set
- 返回值: void
说明:在将一个 DEFINE_PROFILE UDF 链接(hook)到边界条件对话框的特定变量(如,压力、温度、速度)时,ANSYS Fluent 会定义 i,i 被传递给 UDF 用来识别在操作哪个变量。
实例:
假设欲定义一个压力变化的边界条件,式子如下:
p ( y ) = 1.1 × 1 0 5 − 0.1 × 1 0 5 (