CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   Converting Fluent mesh files to Gambit neutral files (https://www.cfd-online.com/Forums/ansys-meshing/76295-converting-fluent-mesh-files-gambit-neutral-files.html)

samuelkc May 21, 2010 04:14

Converting Fluent mesh files to Gambit neutral files
 
1 Attachment(s)
Now that Ansys no longer supports Gambit (after this month), it is no longer possible to export meshes in Gambit neutral format (*.neu) for any legacy codes which require it. Attached to this post is the code for two tools:

msh2neu: convert Fluent mesh files (*.msh) to Gambit neutral files (*.neu)
neu2msh: convert Gambit neutral files (*.neu) to Fluent mesh files (*.msh)

The code is limited to two dimensional, non-periodic meshes. However, it supports tagging of boundaries (for specification of boundary conditions in your code) and tagging of mesh regions (e.g. to distinguish an outlet region where the convection-diffusion equation is solved instead of Navier-Stokes).

Compilation is using gcc and make. Also included is documentation. I could not include any example meshes or icemcfd projects because of the size constraint on attachments.

This code may or may not be of any use to anyone, but I certainly need it as my own code was developed to use Gambit neutral files only and Gambit license support ends in a few days time. If anybody else has a similar problem, feel free to use it.

Vimal.Singh July 9, 2010 18:37

Hi Samuel,

Do you know if somebody had developed or using any prgoram to convert FLUENT mesh file to GAMBIT neutral file format for 3D problem. My code is also uses the files with GAMBIT *.neu file format.

Thanks,

Vimal

samuelkc July 9, 2010 20:13

Hi Vimal,

Sorry, I don't know of any 3D equivalent to my code. It may exist somewhere out there, of course, but I wasn't able to find any *.msh to *.neu converter when I looked.

Perhaps your best solution is to develop your own converter. You could use my code as a guide, but beware that there will be some significant changes in going to 3D. Information on the file formats is available in the manuals, which will be invaluable if you choose to go down this path.

Regards,
Sam

samuelkc July 9, 2010 20:16

By the way, I understand that it may be possible to purchase a separate license for Gambit. However, it is no longer included in the standard package for Ansys/Fluent. Talk to your local distributor.

Sam

Vimal.Singh July 9, 2010 22:51

Thanks Sam. I will look into it. If there is something will discuss with you.

Regards,

Vimal

Femgineer July 24, 2013 08:02

Any progress?
 
Any chance anyone has had any progress with creating a 3D version?
This is exactly what I've been looking for!

Many thanks.

subhash April 1, 2016 07:57

Unable to cunvert .msh file .neu
 
Hi Sam,
First i would like to appreciate you on the work done by you in converting .msh to .neu and via-versa
I have downloaded your code and installed successfully,
I tried to convert one .msh(2D) file to .neu, its successfully dumping an output.neu file but it is having only nodal coordinate information, there is nothing written in the out file regarding element connectivity and all.
did you face this kind of problem at your work any time?
I am not understanding what is wrong with my file........:confused:
Thank you in advance.

samuelkc August 30, 2017 03:54

To everyone posting on this thread:

I haven't looked at this code since I finished my PhD years ago. Please understand that I cannot provide any further development or tech support on it. Also, I rarely check this forum, as you have probably gathered.

If the code that I have provided (with the included documentation) happens to be useful to you, great. If it is not quite adequate for your needs, by all means hack it around until it is. If you believe that your hacked version would be useful to others, by all means post it on this thread too.

If someone else wants to go to the effort of developing a 3D version, by all means post it on this thread so that others can benefit too.

zuheyr April 21, 2021 04:07

Did you find an answer to this?
 
Quote:

Originally Posted by subhash (Post 592855)
Hi Sam,
First i would like to appreciate you on the work done by you in converting .msh to .neu and via-versa
I have downloaded your code and installed successfully,
I tried to convert one .msh(2D) file to .neu, its successfully dumping an output.neu file but it is having only nodal coordinate information, there is nothing written in the out file regarding element connectivity and all.
did you face this kind of problem at your work any time?
I am not understanding what is wrong with my file........:confused:
Thank you in advance.

Hi I share your concern, did you happen to solve this problem? Many thanks for letting me know.

Kind regards, Zuheyr

samuelkc April 21, 2021 06:28

I have not looked at this code for over a decade, so can't be of much help now.

The code worked fine for converting 2D meshes at the time that I developed it, including nodes, edges and elements. If people are finding that it's not working anymore, then that is probably due to some change in the format of the input file.

I recommend tackling the issue by creating an input file which is of a tiny mesh, e.g. with just 20 elements or so. Use this as input while you debug my code, as it will be easier to see what is going on. Debugging can be done using a tool such as GDB, or the old-school method of inserting diagnostic printf() statements in the code and recompiling it. You should be able to see where the code gets up to in parsing the input file, processing it, and generating the output. That may be enough to reveal the problem, if it's some trivial formatting issue.

If you make any progress, please post your findings on this thread, along with your updated version of the code and the tiny mesh input file used for testing.


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