云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > fluent UDF第五章 使用宏存取FLUENT解算器变量

fluent UDF第五章 使用宏存取FLUENT解算器变量

  • 62 次阅读
  • 3 次下载
  • 2025/5/23 2:37:22

The macros listed in this section are defined at the boundary face of a cell and return real variables from the solver. The face variables are available in the segregated solver only. Definitions for these face macros can be found in the referenced header file (e.g., mem.h). 5.3表面宏

在这节中列出的宏是在单元格的边界面上定义的并且从求解器中返回一个真值。表面宏仅可在偏析求解器中用。这些表面宏的定义可以在相关的(.h)文件中找到。(如mem.h等)

5.3.1 Macros for Accessing Flow Variables

The macros listed in Table 5.3.1, access flow variables at a boundary face. Note that the direction of the flux determined by F_FLUX points out of the domain if the face is on the boundary.

Table 5.3.1: Macros for Accessing Flow Variables in mem.h Name(Arguments) Argument Types Returns F R(f,t) face t f, Thread *t, density F P(f,t) face t f, Thread *t, pressure F U(f,t) face t f, Thread *t, u velocity F V(f,t) face t f, Thread *t, v velocity F W(f,t) face t f, Thread *t, w velocity F T(f,t) face t f, Thread *t, temperature F H(f,t) face t f, Thread *t, enthalpy F K(f t) face t f, Thread *t, turbulent kinetic energy F D(f,t) face t f, Thread *t, turbulent kinetic energy dissipation rate F YI(f,t,i) face t f, Thread *t, int i species mass fraction F FLUX(f,t) face t f, Thread *t mass

ow rate through

a boundary face

5.3.1读写流体变量的宏

在表5.3.1中列出的宏可以在边界面读写流体变量。注意如果表面在边界上那么流体的方向是由F_FLUX决定的点指向外围空间的。

表5.3.1在mem.h中的流体变量读写的宏 参数类型 返回值

密度 face t f, Thread *t,

压力 face t f, Thread *t,

名称(参数)

F_R(f,t) F_P(f,t)

F_U(f,t) F_V(f,t) F_W(f,t) F_T(f,t) F_H(f,t) F_K(f t) F_D(f,t) F_YI(f,t,i) F_FLUX(f,t)

face t f, Thread *t, face t f, Thread *t, face t f, Thread *t, face t f, Thread *t, face t f, Thread *t, face t f, Thread *t, face t f, Thread *t, face t f, Thread *t, int i face t f, Thread *t u方向的速度 v 方向的速度 w方向的速度 温度 焓

湍流运动能

湍流运动能的分散速率 物质的质量分数

通过边界表面的质量流速

5.3.2 Macros for Accessing User-Defined Scalars and Memory

The macros listed in Table 5.3.2 can be used to access user-defined scalars and memory for faces.

Name(Arguments) Argument Types Returns F_ UDSI(f,t,i) face t f, Thread *t, int i user-de_ned scalar (face) F_UDMI(f,t,i) face t f, Thread *t, int i user-de_ned memory (face)

5.3.2读写用户定义的标量和存储器的宏

在表5.3.2中列出的宏可以用于给表面读写用户定义的标量和存储器的宏 名称(参数) 参数类型 返回值

用户确定的标量(表面) F_UDSI(f,t,i) face t f, Thread *t, int i

用户定义的存储器(表面) F_UDMI(f,t,i) face t f, Thread *t, int i

5.3.3 Miscellaneous Face Variable Macros

Additional face variable macros are listed in Table 5.3.3.

Table 5.3.3: Miscellaneous Face Variable Macros Name(Arguments) Argument Types F_C0(f,t) face t f, Thread *t F_C0_THREAD(f,t) F_C1(f,t)

F_C1_THREAD(f,t)

face t f, Thread *t face t f, Thread *t

face t f, Thread *t

Returns

cell t for cell on \\0\side of face

Thread *t for cell thread on \\0\cell t for cell on \\1\

Thread *t for cell thread on \\1\

5.3.3混合面变量宏

其余的表面变量宏在表5.3.3中列出 名称(参数) 参数类型 F_C0(f,t) face t f, Thread *t

返回值

F_C0_THREAD(f,t)

F_C1(f,t)

F_C1_ THREAD(f,t)

face t f, Thread *t

face t f, Thread *t

face t f, Thread *t

5.4 Geometry Macros

This section contains macros for retrieving geometry variables in FLUENT. Definitions for these macros can be found in the referenced header file (e.g., mem.h). 5.4几何宏

这节包含的宏是为了在FLUENT中重新得到几何变量。这些表面宏的定义可以在相关的(.h)文件中找到。(如mem.h等)

5.4.1 Number of Nodes and Faces

The macros C_NNODES and C_NFACES shown in Table 5.4.1 return the integer number of nodes or faces, respectively, for a given cell. F_NNODES returns the integer number of nodes associated with a face.

Table 5.4.1: Node and Face Variable Macros in mem.h Name(Arguments) Argument Types Returns C NNODES(c,t) cell t c, Thread *t number of nodes in a cell C NFACES(c,t) cell t c, Thread *t number of faces in a cell F NNODES(f,t) face t f, Thread *t number of nodes in a face

5.4.1节点和面的数量

在表5.4.1中列出的宏C_NNODES和C_NFACES返回相应的节点和面的整数值。对于一个给定的单元格, F_NNODES返回与某个表面相关的节点的整数个数。

表5.4.1在mem.h中的节点和表面的宏

名称(参数) 参数类型 返回值

一个单元格中的节点数 C_NNODES(c,t) cell t c, Thread *t

一个单元格中的表面数 C_NFACES(c,t) cell t c, Thread *t

一个表面中节点数 F_NNODES(f,t) face t f, Thread *t

5.4.2 Cell and Face Centroids

The macros listed in Table 5.4.2 can be used to obtain the real centroid of a cell or

face. C_CENTROID finds the coordinate position of the centroid of the cell c and stores the coordinates in the x array. F_CENTROID finds the coordinate position of the centroid of the face f and stores the coordinates in the x array. Note that the array x can be a one-, two-, or three-dimensional array.

Table 5.4.2: Centroid Variable Macros in metric.h

Name(Arguments)

C CENTROID(x,c,t) F CENTROID(x,f,t)

Argument Types

real x[ND ND], cell t c, Thread * t real x[ND ND], face t f, Thread *t Returns

x (cell centroid) x (face centroid)

5.4.2单元格和表面的重心

在表5.4.2中列出的宏可以用来获得一个单元格或是表面的真实的重心。C_CENTROID找到单元格的重心的坐标,并把它的坐标存储在矩阵X中。F_CENTROID找到表面的重心的坐标,并把它的坐标存储在矩阵X中。注意矩阵X可以是一维,二维或者是三维的。 表5.4.2 在metric.h中变量重心宏 名字(参数) 参数类型 返回值

x (单元格重心) C_CENTROID(x,c,t) real x[ND ND], cell t c, Thread * t

x (表面中心) F_CENTROID(x,f,t) real x[ND ND], face t f, Thread *t

5.4.3 Face Area

The macro F_AREA shown in Table 5.4.3 can be used to return the real face area vector.

For interior faces, the face area normal vector points from cell c0 to cell c1. The normal always points outward (out of the domain) for boundary faces.

Table 5.4.3: Face Area Macros in metric.h

Name(Arguments) Argument Types Returns F_AREA(A,f,t) A[ND ND], face t f, Thread *t A (area vector)

5.4.3 表面积

在表5.4.3中列出的宏F_AREA可以被用于返回一个实数的面积向量。对于内部的表面,标准的面积向量的方向是从单元格C0指向单元格C1。标准的方向总是从边界面向外指(范围之外)。

表5.4.3 在metric.h中的表面积宏

名称(参数) 参数类型 返回值

A (面积向量) F_AREA(A,f,t) A[ND ND], face t f, Thread *t

5.4.4 Cell Volume

The macros listed in Table 5.4.4 can be used to obtain the real cell volume for 2D, 3D,

and axisymmetric simulations.

Table 5.4.4: Cell Volume Macros in mem.h Name(Arguments) Argument Types Returns C VOLUME(c,t) cell t c, Thread *t cell volume for 2D or 3D,

cell volume/2_ for axisymmetric

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

The macros listed in this section are defined at the boundary face of a cell and return real variables from the solver. The face variables are available in the segregated solver only. Definitions for these face macros can be found in the referenced header file (e.g., mem.h). 5.3表面宏 在这节中列出的宏是在单元格的边界面上定义的并且从求解器中返回一个真值。表面宏仅可在偏析求解器中用。这些表面宏的定义可以在相关的(.h)文件中找到。(如mem.h等) 5.3.1 Mac

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com