Difference between revisions of "Polyhedral mesh generation"
From OpenFOAMWiki
(2D polyhedral mesh initial article) |
(Formatting and pictures) |
||
Line 2: | Line 2: | ||
In that case, the workflow is as follows: | In that case, the workflow is as follows: | ||
− | + | # Import a tetrahedral mesh into OpenFoam, e. g. by using gmshToFoam | |
− | + | [[File:Original tet.png|250px]] | |
− | + | # Generate a polyhedral mesh using polyDualMesh. polyDualMesh will put the new mesh into a new time directory "latestTime + deltaT" | |
− | + | # Move the polymesh files from the new directory (e. g. "0.1/polyMesh/*") to the base mesh folder (e. g. "constant/polyMesh/"). After running polyDualMesh, your mesh will have two cells in the third dimension, which is not what you want to have in a 2D case. | |
− | + | [[File:PolyDualMesh.png|250px]] | |
− | + | # Delete the time directory (e. g. 0.1) | |
+ | # run the setSet application to create a cell set that contains only one layer of cells | ||
+ | # run subsetMesh to create a new mesh that contains only the previously selected cell set | ||
+ | [[File:CleanPolyMesh.png|250px]] | ||
+ | |||
+ | |||
+ | Sample case: [[File:Autopoly.tar.gz]] |
Revision as of 11:31, 31 May 2011
You can generate a polyhedral mesh from a tetrahedral mesh using the utility polyDualMesh. This is fairly straightforward, unless you are trying to generate a 2D polyhedral mesh.
In that case, the workflow is as follows:
- Import a tetrahedral mesh into OpenFoam, e. g. by using gmshToFoam
- Generate a polyhedral mesh using polyDualMesh. polyDualMesh will put the new mesh into a new time directory "latestTime + deltaT"
- Move the polymesh files from the new directory (e. g. "0.1/polyMesh/*") to the base mesh folder (e. g. "constant/polyMesh/"). After running polyDualMesh, your mesh will have two cells in the third dimension, which is not what you want to have in a 2D case.
- Delete the time directory (e. g. 0.1)
- run the setSet application to create a cell set that contains only one layer of cells
- run subsetMesh to create a new mesh that contains only the previously selected cell set
Sample case: File:Autopoly.tar.gz