Sunday, November 26, 2023

Using gmshToFoam to Convert 2D Mesh for OpenFOAM

Monday 27th November 2023

This is an important step in computational fluid dynamics (CFD) to use a mesh as per the software specifications. OpenFoam provides a command-line utility blockMesh to generate a mesh. Whereas, the gmsh generates a mesh in a variety of formats. Here, I follow the steps in [1] to generate and convert a mesh. Copy the example in 3.1. 2D plane-symmetric stenosis as mymsh11.geo and export it to mymsh11.msh file with the save parametric coordinates option. Use gmshToFoam application to generate the mesh for OpenFoam in the case directory. I used a copy of the elbow example case provided with the OpenFoam. For verification, see the directory polyMesh inside the constant directory, and also use the checkMesh utility.





Reference

[1] OpenFOAMWiki. 2D Mesh Tutorial using GMSH. https://openfoamwiki.net/index.php/2D_Mesh_Tutorial_using_GMSH

[2] Tariq Javid. Mesh Generation with Gmsh. https://tariqjavid72.blogspot.com/2023/11/mesh-generation-with-gmsh.html


No comments:

Post a Comment