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 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Jiexian Ma
Jiexian Ma am 15 Mär. 2025
Bearbeitet: Jiexian Ma am 17 Mär. 2025

1 Stimme

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 am 25 Mär. 2022

0 Stimmen

Save it in stl formay by using
stlwrite
open in gmsh and then save as .msh.

Kategorien

Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 19 Mai 2020

Bearbeitet:

am 17 Mär. 2025

Community Treasure Hunt

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

Start Hunting!

Translated by