# Difference between revisions of "Write OpenFOAM meshes"

m |
|||

Line 7: | Line 7: | ||

[[points]] (x y z) point locations | [[points]] (x y z) point locations | ||

− | [[owner]], [[neighbour]] for every face the (labels of the) cells on either side. The owner cell should be the lowest numbered cell. Boundary faces have -1 as neighbour. | + | [[owner]], [[neighbour]] for every face the (labels of the) cells on either side. The owner cell should be the lowest numbered cell. Boundary faces have -1 as neighbour (1.4.1) or neighbour list is truncated to only the internal faces (1.5) |

[[faces]] for each face an ordered list of point labels. The normal (righthand rule) should point away from the owner cell (so the boundary faces point out of the domain) | [[faces]] for each face an ordered list of point labels. The normal (righthand rule) should point away from the owner cell (so the boundary faces point out of the domain) |

## Revision as of 15:12, 25 June 2008

(adapted from http://openfoam.cfd-online.com/cgi-bin/forum/show.cgi?1/1507)

- All meshes are 3D. Use single layer of cells with empty front and back patches to create a 2D simulation.

- Meshes are defined by five files:

points (x y z) point locations

owner, neighbour for every face the (labels of the) cells on either side. The owner cell should be the lowest numbered cell. Boundary faces have -1 as neighbour (1.4.1) or neighbour list is truncated to only the internal faces (1.5)

faces for each face an ordered list of point labels. The normal (righthand rule) should point away from the owner cell (so the boundary faces point out of the domain)

The face ordering is quite intricate:

- internal faces get ordered such that when stepping through the higher numbered neighbouring cells in incremental order one also steps through the corresponding faces in incremental order (upper-triangular ordering)

- boundary faces are bunched per patch. The boundary file then tells where the start and size of the patch are in the faces list. For coupled faces there is an additional ordering inside the patch:

- cyclics: should be ordered such that face 'i' is coupled to face 'i + size()/2' where size() is the number of faces of the patch. Additionally the 0th point of a face is considered coupled to the 0th point of its coupled face.

- processor: should be ordered such that face 'i' on one processor is coupled to face 'i' on the neighbouring processor. Same additional constraint on the order of the points in a face as cyclics.