CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   which open source meshing software exports in cgns? (https://www.cfd-online.com/Forums/main/105120-open-source-meshing-software-exports-cgns.html)

spitfire July 23, 2012 14:02

which open source meshing software exports in cgns?
 
I'm using a newly released solver SU2 and would like to do a mesh convergence study.

The problem I have is that the program requires meshes to be in the .cgns format and atm I'm really struggling to find any open source mesh generators that allow you to export in this format. Commercial mesh generators (like Pointwise/Gridgen) are capable of doing so but I don't have access to them.

Are there any open source mesh generators that allow you to export in this format? Or can i create the mesh in another format and then use a converter? I'd love some help please. =)

julien.decharentenay July 23, 2012 19:15

You could use openFoam as an intermediate format and then use foamToCgns (which I think is part of the standard distribution). I have no personal experience and it probably is not straightforward.

BTW: I had a look at SU2 and when I noticed that they had their own mesh format or CGNS, I left it in the too hard basket...

Cheers.
Julien

ogloth July 24, 2012 03:50

Hello,

the native SU2 format is incredibly simple. We have an export function in our open-source mesher enGrid (see http://engits.eu/en/engrid). I have tried to use SU2 myself, but I had problems when using highly an-isotropic boundary layers. It turned out that this might be due to a too low accuracy for the output file. If you try it and you run into problems, please drop me a note.

Cheers,
Oliver

spitfire August 8, 2012 16:14

Hi,

I get the following error message when trying to export with CGNS:

CGNS support has not been compiled

file:cgnswriter.cpp
line:333

How do I get it working? Thanks

AeroMike August 20, 2012 10:16

If you are just using structured grids it is very easy to generate them using a really simple Fortran code. There are some really good examples which are easy to follow provided by the NASA website: http://www.grc.nasa.gov/WWW/cgns/CGN...r/started.html
Mike

spitfire August 20, 2012 12:18

No, unfortunately, I need an unstructured grid

AeroMike August 20, 2012 12:19

Ah, in that case it is do-able but potentially a lot tricker, I don't have any experience with writing grid gens for unstructured cases, sorry!

spitfire August 20, 2012 12:22

Do you know how to get cgns support on for meshers like Gmsh? That seems like the best open souce mesher to me but I still can't get CGNS to work.

AeroMike August 20, 2012 12:25

Sorry, no experience with anything other than commercial and writing my own generators.

praveen August 21, 2012 00:11

Quote:

Originally Posted by spitfire (Post 377822)
Do you know how to get cgns support on for meshers like Gmsh? That seems like the best open souce mesher to me but I still can't get CGNS to work.

If you want to use gmsh, you can easily rewrite the file in SU2 native format. I have some code here

https://code.google.com/p/cfdlab/sou...trunk/3d/grid/

There is a gmsh2cgns program which can handle tetrahedral grids only but you should be able to modify it for general case. The generated cgns grids work with freecfd but I have not tested with su2.

If you use them and have some success/failure please let me know.

I would recommend directly converting gmsh format to su2 format, rather than using cgns format.

ogloth August 21, 2012 05:35

@spitfire
 
Sorry, I missed your post with the CGNS problem.

If you are using enGrid, you can directly export to SU2 format -- no need for CGNS. You might have to check out the branch called "release-1.4" from our GIT repository (the default is still 1.3). In order to do that you can edit the script "build.bash", or if you know your way around GIT it is very easy.

If you get stuck, please look at the enGrid Wiki, or use the enGrid forum (I check that on a regular basis).

Btw. I am also interested in any feedback you have with SU2 ;-)

Cheers,
Oliver

spitfire September 2, 2012 15:30

Thanks all, I ended up writing my own mesh conversion tool in matlab to go from the .geo (Gmsh) to .su2 (SU2).


All times are GMT -4. The time now is 14:42.