CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] how to convert a mesh drawn in matlab to a format which can be used in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-meshing/128215-how-convert-mesh-drawn-matlab-format-can-used-openfoam.html)

jali January 7, 2014 00:32

how to convert a mesh drawn in matlab to a format which can be used in OpenFOAM
 
I have a refined quadrilateral mesh in 2D which is shown in a figure generated by matlab. Could any one give me some idea about how to convert the figure into a mesh file which can be used in OpenFOAM?
Thank you for your help.

CoolHand April 23, 2014 11:35

This is what I'm doing right now and has taken a few months to get right. I created a MatLab code that writes a .msh ASCII file. Then I use gmshToFoam to convert it to the OpenFOAM format. Be warned: This is not a simple thing to do. Here is the GMSH documentation on how the file is formatted.

http://www.geuz.org/gmsh/doc/texinfo...II-file-format

mm1993 July 19, 2017 14:16

Hi CoolHand , could you give me the Matlab code that convert a Matlab mesh in a .msh ASCII file? If for you it is not a problem .
Tanks a lot!

jali July 19, 2017 20:16

Hi CoolHand, it is very appreciated if you could share your Matlab code with us.


All times are GMT -4. The time now is 19:15.