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

darova
darova 2020년 5월 19일
What about *.stl? Can you read stl format?
sgericeb
sgericeb 2020년 5월 20일
I did think of doing that and importing it into gmsh, although I hoped there might be another alternative
darova
darova 2020년 5월 20일
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일

1 개 추천

I just wrote a function to do that. Please check it.
It works for 2D triangular mesh with one or multiple domain.
emrah sever
emrah sever 2022년 3월 25일

0 개 추천

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