![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Most user-defined functions access data from an ANSYS FLUENT solver. Since solver data is defined in terms of mesh components, you will need to learn some basic mesh terminology before you can write a UDF.
A mesh is broken up into control volumes, or cells. Each cell is defined by a set of nodes, a cell center, and the faces that bound the cell (Figure 1.7.1). ANSYS FLUENT uses internal data structures to define the domain(s) of the mesh, to assign an order to cells, cell faces, and nodes in a mesh, and to establish connectivity between adjacent cells.
A thread is a data structure in ANSYS FLUENT that is used to store information about a boundary or cell zone. Cell threads are groupings of cells, and face threads are groupings of faces. Pointers to thread data structures are often passed to functions and manipulated in ANSYS FLUENT to access the information about the boundary or cell zones represented by each thread. Each boundary or cell zone that you define in your ANSYS FLUENT model in a boundary conditions dialog box has an integer Zone ID that is associated with the data contained within the zone. You will not see the term "thread'' in a graphics dialog box in ANSYS FLUENT so you can think of a `zone' as being the same as a `thread' data structure when programming UDFs.
Cells and cell faces are grouped into zones that typically define the physical components of the model (e.g., inlets, outlets, walls, fluid regions). A face will bound either one or two cells depending on whether it is a boundary face or an interior face. A domain is a data structure in ANSYS FLUENT that is used to store information about a collection of node, face threads, and cell threads in a mesh.