关键词不能为空

当前您在: 主页 > 英语 >

Fluent网格格式

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-01 21:42
tags:

-

2021年2月1日发(作者:rookie什么意思)


B. Case and Data File Formats



This Appendix describes the contents and formats of


FLUENT


case and data files.



Descriptions of the sections are grouped according to function.



?



Section


B.2


: The differences between formatted and binary files.



?



Section


B.3


: Creating grids for


FLUENT


.



?



Section


B.4


: The boundary conditions, material properties, and solver control settings.



?



Section


B.3


and Section


B.5


: Importing solutions into another postprocessor.



The case and data files may contain other sections that are intended for internal use only.



B.1 Guidelines



The


FLUENT


case and data files are broken into several sections according to the following guidelines:



?



Each section is enclosed in parentheses and begins with a decimal integer indicating its type. This


integer is different for formatted and binary files (Section


B.2


).



?



All groups of items are enclosed in parentheses. This makes skipping to ends of (sub)sections and


parsing


them


very


easy.


It


also


allows


for


easy


and


compatible


addition


of


new


items


in


future


releases.



?



Header information for lists of items is enclosed in separate sets of parentheses preceding the items,


and the items are enclosed in their own parentheses.



B.2 Formatting Conventions in Binary and Formatted Files



For formatted files, examples of file sections are given in Sections


B.3


and


B.4


. For binary files, the header


indices described in this section (e.g., 10 for the node section) are preceded by 20 for single-precision binary


data, or by 30 for double-precision binary data (e.g., 2010 or 3010 instead of 10). The end of the binary data


is indicated by End of Binary Section 2010 or End of Binary Section 3010 before the closing parameters of


the section.



An example with the binary data represented by periods is as follows:









(2010 (2 1 2aad 2 3)(








.








.








.








)








End of Binary Section 2010)


B.3 Grid Sections



Grid sections are stored in the case file. A grid file is a subset of a case file, containing only those sections


pertaining to the grid. The currently defined grid sections are:



?



Comment (See


B.3.1


)



?



Header (See


B.3.2


)



?



Dimensions (See


B.3.3


)



?



Nodes (See


B.3.4


)



?



Periodic Shadow Faces (See


B.3.5


)



?



Cells (See


B.3.6


)



?



Faces (See


B.3.7


)



?



Face Tree (See


B.3.8


)



?



Cell Tree (See


B.3.9


)



?



Interface Face Parents (See


B.3.10


)



The section ID numbers are indicated in both symbolic and numeric forms. The symbolic representations are


available as symbols in a


Scheme


source file ( ), which is available from Fluent Inc., or as macros


in a C header file ( xfile.h), which is located in the following directory in your installation area:




1


//fluent6.x/client/src/xfile.h



B.3.1 Comment



Index:



0


Scheme symbol:



xf-comment


C macro:



XF_COMMENT


Status:



optional


Comment sections can appear anywhere in the file (except within other sections) as:









(0


It


is


recommended


to


precede


each


long


section,


or


group


of


related


sections,


by


a


comment


section


explaining what is to follow.



Example:










(0








(37 (








(relax-mass- flow 1)








(default-coefficient ())








(default-method 0)








))


B.3.2 Header



Index:



1


Scheme symbol:



xf-header


C macro:



XF_HEADER


Status:



optional


Header sections can appear anywhere in the file (except within other sections) as:









(1


The purpose of this section is to identify the program that wrote the file. Although it can appear anywhere, it


is one of the first sections in the file. Additional header sections indicate other programs that may have been


used in generating the file. It provides a history mechanism showing


where the file came from and how it


was processed.


B.3.3 Dimensions



Index:



2


Scheme symbol:



xf-dimension


C macro:



XF_DIMENSION


Status:



optional


The dimensions of the grid appear as:









(2 ND)


where ND is 2 or 3. This section is supported as a check that the grid has the appropriate dimension.


B.3.4 Nodes



Index:



10


Scheme symbol:



xf-node


C macro:



XF_NODE


Status:



required


Example:










(10 (zone-id first-index last-index type ND)(








x1 y1 z1








x2 y2 z2



2








.








.








.








))


?



If zone-id is zero, this provides the total number of nodes in the grid. first-index will then be one,


last-index


will


be


the


total


number


of


nodes


in


hexadecimal


,


type


is


equal


to


1,


ND


is


the


dimensionality


of


the


grid,


and


there


are


no


coordinates


following.


The


parentheses


for


the


coordinates are not there either.



For example: (10 (0 1 2d5 1 2))



?



If


zone-id


is


greater


than


zero,


it


indicates


the


zone


to


which


the


nodes


belong.


first-index


and


last-index are the indices of the nodes in the zone,


in hexadecimal


. The values of last-index in each


zone must be less than or equal to the value in the declaration section.


Type


is always equal to 1.



ND is an optional argument that indicates the dimensionality of the node data, where ND is 2 or 3.



If


the


number


of


dimensions


in


the


grid


is


two,


as


specified


by


the


node


header,


then


only


and


coordinates are present on each line.



Example of two-dimensional grid:









(10 (1 1 2d5 1 2)(








1.500000e-01 2.500000e-02








1.625000e-01 1.250000e-02



3


















.


















.


















.








1.750000e-01 0.000000e+00








2.000000e-01 2.500000e-02








1.875000e-01 1.250000e-02








))


Because


the


grid


connectivity


is


composed


of


integers


representing


pointers


(see


Cells


and


Faces),


using


hexadecimal conserves space in the file and provides for faster file input and output. The header indices are


in hexadecimal so that they match the indices in the bodies of the grid connectivity sections. The zone-id and


type are also in hexadecimal for consistency.



B.3.5 Periodic Shadow Faces



Index:



18


Scheme symbol:



xf-periodic-face


C macro:



XF_PERIODIC_FACE


Status:



required only for grids with periodic boundaries


This


section


indicates


the


pairings


of


periodic


faces


on


periodic


boundaries.


Grids


without


periodic


boundaries do not have sections of this type. The format of the section is as follows:









(18 (first-index last-index periodic-zone shadow-zone)(








f00 f01








f10 f21








f20 f21








.








.








.








))


where



first- index


=


index of the first periodic face pair in the list


last- index


=


index of the last periodic face pair in the list


periodic-zone


=


zone ID of the periodic face zone


shadow-zone


=


zone ID of the corresponding shadow face zone


These


are


in


hexadecimal


format.


The


indices


in


the


section


body


(


f*)


refer


to


the


faces


on


each


of


the


periodic boundaries (in hexadecimal), the indices being offsets into the list of faces for the grid.



Note:




In this case, first-index and last- index do not refer to face indices. They refer to indices in the list of periodic


pairs.



Example:










(18 (1 2b a c) (








12 1f








13 21








ad 1c2








.








.








.








))


B.3.6 Cells




4


Index:



12


Scheme symbol:



xf-cell


C macro:



XF_CELL


Status:



required


The declaration section for cells is similar to that for nodes.









(12 (zone-id first-index last-index type element- type))


Again, zone-id is zero to indicate that it is a declaration of the total number of cells. If last-index is zero, then


there are no cells in the grid. This is useful when the file contains only a surface mesh to alert


FLUENT


that


it


cannot


be


used.


In


a


declaration


section,


the


type


is


ignored,


and


has


the


value


of


zero,


while


the


element-type is ignored completely.



For example,









(12 (0 1 3e3 0))


It states that there are 3e3 (hexadecimal) = 995 cells in the grid. This declaration section is required and must


precede the regular cell sections. The element-type in a regular cell section header indicates the type of cells


in the section, as follows:



element-type


description



nodes/cell



faces/cell



0


mixed




1


triangular


3


3


2


tetrahedral


4


4


3


quadrilateral


4


4


4


hexahedral


8


6


5


pyramid


5


5


6


wedge


6


5


Regular


cell


sections


have


no


body,


but


they


have


a


header


of


the


same


format


where


first-index


and


last-index indicate the range for the particular zone, type indicates whether the cell zone is an active zone


(solid or fluid), or inactive zone (currently only parent cells resulting from hanging node adaption). Active


zones are represented with type=1, while inactive zones are represented with type=32.



In the earlier versions of


FLUENT


, a distinction was made used between solid and fluid zones. This is now


determined by properties (i.e., material type).



A


type


of


zero


indicates


a


dead


zone


and


will


be


skipped


by


FLUENT


.


If


a


zone


is


of


mixed


type


( element-type=0), it will have a body that lists the element type of each cell.


Example


:









(12 (9 1 3d 0 0)(








1 1 1 3 3 1 1 3 1








.








.








.








))


Here, there are 3d (hexadecimal) = 61 cells in cell zone 9, of which the first 3 are triangles, the next 2 are


quadrilaterals, and so on.


B.3.7 Faces



Index:



13


Scheme symbol:



xf-face


C macro:



XF_FACE


Status:



required


The face section has a header with the same format as that for cells (but with a section index of 13).




5








(13 (zone-id first-index last-index type element-type))


A zone- id of zero indicates a declaration section with no body, and element-type indicates the type of faces in


that zone. The body of a regular face section contains the grid connectivity, and each line appears as follows:









n0 n1 n2 cr cl


where,



n*


=


defining nodes (vertices) of the face


c*


=


adjacent cells


This is an example of the triangular face format. The actual number of nodes depends on the element type.


The order of the cell indices is important. The first cell ( cr) is the cell on the right side of the face and cl is


the cell on the left side.



Handedness is determined by the right- hand rule. If you curl the fingers of your right hand in the order of the


nodes, your thumb will point to the right side of the face.



?



vector pointing outside the grid plane is used to determine the right-hand-side cell ( cr)


In 2D grids, the


k


?


?


r


?

< br>. If there is no adjacent cell, then either cr or cl is zero. All cells, faces, and nodes have positive


from


k


indices. For files containing only a boundary mesh, both these values are zero. If it is a two-dimensional grid,


n2 is omitted.



If the face zone is of mixed type ( element-type = 0), the body of the section will include the face type and


will appear as follows:









type v0 v1 v2 c0 c1


Here, type is the type of face, as defined in the following table:



element- type


face type



nodes/face



0


mixed



2


linear


2


3


triangular


3


4


quadrilateral


4


The current valid boundary condition types are defined in the following table:



bc name


bc id



interior


2


wall


3


pressure- inlet, inlet-vent, intake-fan


4


pressure-outlet, exhaust-fan, outlet- vent


5


symmetry


7


periodic-shadow


8


pressure-far-field


9


velocity-inlet


10


periodic


12


fan, porous-jump, radiator


14


mass-flow-inlet


20


interface


24


parent (hanging node)


31


outflow


36


axis


37


For non-conformal grid interfaces, the faces resulting from the intersection of the non-conformal grids are



6


placed in a separate face zone. A factor of 1000 is added to the type of these sections, e.g., 1003 is a wall


zone.



For information on face-node connectivity for various cell types in


FLUENT


, refer to Section


6.1.2


.



B.3.8 Face Tree



Index:



59


Scheme symbol:



xf-face-tree


C macro:



XF_FACE_TREE


Status:



only for grids with hanging-node adaption


This section indicates the face hierarchy of the grid containing hanging nodes. The format of the section is as


follows:



(59 (face-id0 face-id1 parent-zone-id child-zone-id)


(



number-of-kids kid-id-0 kid-id-1 ... kid-id-n



.



.



.


))


where,



face-id0


=


index of the first parent face in the section


face-id1


=


index of the last parent face in the section


parent-zone-id


=


ID of the zone containing parent faces


child-zone-id


=


ID of the zone containing children faces


number-of-kids


=


the number of children of the parent face


kid-id-n


=


the face IDs of the children



These are in hexadecimal format.



B.3.9 Cell Tree




Index:



58


Scheme symbol:



xf-cell-tree


C macro:



XF_CELL_TREE


Status:



only for grids with hanging-node adaption


This section indicates the cell hierarchy of the grid containing hanging nodes. The format of the section is as


follows:



(58 (cell-id0 cell-id1 parent-zone-id child-zone-id)


(



number-of-kids kid-id-0 kid-id-1 ... kid-id-n



.



.



.


))


where,



cell-id0


=


index of the first parent cell in the section


cell-id1


=


index of the last parent cell in the section


parent-zone-id


=


ID of the zone containing parent cells


child-zone-id


=


ID of the zone containing children cells



7


number- of-kids


=


the number of children of the parent cell


kid-id-n


=


the cell IDs of the children


These are in hexadecimal format.



B.3.10 Interface Face Parents



Index:



61


Scheme symbol:



xf-face-parents


C macro:



XF_FACE_PARENTS


Status:



only for grids with non-conformal interfaces


This


section


indicates


the


relationship


between


the


intersection


faces


and


original


faces.


The


intersection


faces (children) are produced from intersecting two non-conformal surfaces (parents) and are some fraction


of the original face. Each child will refer to at least one parent. The format of the section is as follows:



(61 (face-id0 face-id1)


(



parent-id-0 parent-id-1



.



.



.


))


where,


face- id0


=


index of the first child face in the section


face-id1


=


index of the last child face in the section


parent-zone-id


=


index of right-side parent face


child-zone-id


=


index of left-side parent face


number-of-kids


=


the number of children of the parent face


These are in hexadecimal format.



If


you read a non-conformal grid from


FLUENT


into


TGrid


,


TGrid


will skip this


section, so it will not


maintain all the information necessary to preserve the non-conformal interface. When you read the grid back


into


FLUENT


, you will need to recreate the interface.



Example Files




Example 1




Figure


B.3.1


illustrates a simple quadrilateral mesh with no periodic boundaries or hanging nodes.




Figure B.3.1:


Quadrilateral Mesh



8


The following describes this mesh:



(0



(0


(2 2)



(12 (0 1 3 0))


(13 (0 1 a 0))


(10 (0 1 8 0 2))



(12 (7 1 3 1 3))



(13 (2 1 2 2 2)(


1 2 1 2


3 4 2 3))



(13 (3 3 5 3 2)(


5 1 1 0


1 3 2 0


3 6 3 0))



(13 (4 6 8 3 2)(


7 4 3 0


4 2 2 0


2 8 1 0))



(13 (5 9 9 a 2)(


8 5 1 0))



(13 (6 a a 24 2)(


6 7 3 0))



(10 (1 1 8 1 2)


(



1.00000000e+00



0.00000000e+00



1.00000000e+00



1.00000000e+00



2.00000000e+00



0.00000000e+00



2.00000000e+00



1.00000000e+00



0.00000000e+00



0.00000000e+00



3.00000000e+00



0.00000000e+00



3.00000000e+00



1.00000000e+00



0.00000000e+00



1.00000000e+00))


Example 2




Figure


B.3.2


illustrates a simple quadrilateral mesh with periodic boundaries but no hanging nodes. In this


example, bf9 and bf10 are faces on the periodic zones.




9

-


-


-


-


-


-


-


-



本文更新与2021-02-01 21:42,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/595286.html

Fluent网格格式的相关文章