CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   msh file format (http://www.cfd-online.com/Forums/fluent/36490-msh-file-format.html)

fab April 25, 2005 11:59

msh file format
 
Hi,

I want to read a fluent 'msh' file with fortran. I made the mesh in 'Icem' and exported it.

To read the mesh with a fortran sequence, I have to know the structure, but unfortunately I just find an explanation about the 'cas'-file structure in the manual.

Does anybody have an idea, how the 'msh'-file structure looks like?

Greetings! fab

Harish April 25, 2005 14:24

Re: msh file format
 
The mesh file can be read by opening into word pad. It basically has tge grid points lines faces etc. That you created. Just erase everything else other than the grid points and import the file.

-H

zxaar April 25, 2005 18:24

Re: msh file format
 
the format of meshexplained in cas file portion of manual is enough to read it, my code reads fluents mesh and only read the portion of manual

fab April 26, 2005 01:29

Re: msh file format
 
Hi,

as mentioned I saw the cas-portion in the manual before; I thought it just explains the cas-file which looks pretty different to my original msh-file.

As I understand it now, the cas-file has different sections and one is the section for the grid which does have the same structure as the msh-file. Right?

Actually, taking a look at some cas-file I just see binary stuff in the grid section, but I suppose it has the same format as in the mesh file ...

Would you mind to share the routine to read the msh-file?

Thanks!

fab

zxaar April 26, 2005 05:29

Re: msh file format
 
yes the portion describing mesh in cas file is same as the msh.

this is the reason fluent reads cas/msh file from read->cas menu.

i can give u my code to read fluent mesh, but there are two problems, one the code is written in c++, and second the file is long becuase in the same file after reading the mesh i generate coarse meshes for implementing multigrids. this will confuse you. further the module is not so fast, because for readign mesh the hex number has to be converted and that takes time (in c++ otherwise we have a funstion of reading hex, but i am currently using c type i/o),

you can drop me an email i will send you the file that reads fluent mesh, see if u can make out of it.


alireshad May 25, 2012 07:45

Quote:

Originally Posted by zxaar
;120131
yes the portion describing mesh in cas file is same as the msh.

this is the reason fluent reads cas/msh file from read->cas menu.

i can give u my code to read fluent mesh, but there are two problems, one the code is written in c++, and second the file is long becuase in the same file after reading the mesh i generate coarse meshes for implementing multigrids. this will confuse you. further the module is not so fast, because for readign mesh the hex number has to be converted and that takes time (in c++ otherwise we have a funstion of reading hex, but i am currently using c type i/o),

you can drop me an email i will send you the file that reads fluent mesh, see if u can make out of it.

hi zxaar
please send me your code.i urgently need this code
ali.reshad68@yahoo.com
thanks

znri October 14, 2014 09:57

Quote:

Originally Posted by alireshad (Post 363095)
hi zxaar
please send me your code.i urgently need this code
ali.reshad68@yahoo.com
thanks

Hi
I have a msh file that I have created with a software for generating porous models. I need to read it with fortran (or C++). But my msh file is binary and when I open it in wordpad , I can't see within the file. And the software hasn't any option for producing msh file. How I can I convert my msh file to ascii format? I want then use this msh file to fluent.
Any help would be appreciated.

abhi158 October 29, 2014 12:03

Quote:

Originally Posted by zxaar
;120131
yes the portion describing mesh in cas file is same as the msh.

this is the reason fluent reads cas/msh file from read->cas menu.

i can give u my code to read fluent mesh, but there are two problems, one the code is written in c++, and second the file is long becuase in the same file after reading the mesh i generate coarse meshes for implementing multigrids. this will confuse you. further the module is not so fast, because for readign mesh the hex number has to be converted and that takes time (in c++ otherwise we have a funstion of reading hex, but i am currently using c type i/o),

you can drop me an email i will send you the file that reads fluent mesh, see if u can make out of it.

hi ...
i have gone through the post, i am also looking for a way to import ansys icem msh file in FORTRAN....
if nebody has a sample program or subroutine related.....can u please mail me abhibhesania@gmail.com .....
its quite urgent....


All times are GMT -4. The time now is 20:30.