Convert triangular matlab mesh into .msh file

I have generated a 2D triangular mesh in matlab, however, I need to find a way to convert it into a .msh file. I have been searching for ages but haven't found any way to do this. I think the easiest way to convert it into a .msh file would be in GMSH but I can't find a way to upload the mesh into GMSH. I'm open to any alternatives.
Many thanks.

3 个评论

What about *.stl? Can you read stl format?
I did think of doing that and importing it into gmsh, although I hoped there might be another alternative
YOu want to read it from FLUENT? If i remember correctly there should be boundary conditions

请先登录,再进行评论。

回答(2 个)

Jiexian Ma
Jiexian Ma 2025-3-15
编辑:Jiexian Ma 2025-3-17
I just wrote a function to do that. Please check it.
It works for 2D triangular mesh with one or multiple domain.
Save it in stl formay by using
stlwrite
open in gmsh and then save as .msh.

类别

帮助中心File Exchange 中查找有关 Convert Image Type 的更多信息

提问:

2020-5-19

编辑:

2025-3-17

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by