CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[CGNS] CGNS converters available

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2012, 03:47
Default
  #121
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Hi all!

Some update from my side to use CGNS converters with Ubuntu 10.04 LTS
http://openfoamwiki.net/index.php/Si...untu_10.04_LTS

I would like personally thank people from Turbomachinery Group for their great contribution!

Cheers engineers,
Alex
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at

Last edited by makaveli_lcf; February 13, 2012 at 03:54. Reason: Acknowledgements
makaveli_lcf is offline   Reply With Quote

Old   November 2, 2012, 02:14
Default
  #122
New Member
 
Pendyala Gautam Dev
Join Date: Nov 2012
Location: New Delhi, India
Posts: 2
Rep Power: 0
gautamdevpendyala is on a distinguished road
Hi all,
I have an mesh file in NetCDF format. I want to process it in fluent. Would anyone please tell how can i convert NetCDF format to cgns or fluent openable formats???
Thanks
gautamdevpendyala is offline   Reply With Quote

Old   April 9, 2013, 09:04
Default cgnsToFoam still available?
  #123
New Member
 
Thomas Ponweiser
Join Date: Apr 2013
Posts: 1
Rep Power: 0
thomas.ponweiser is on a distinguished road
Is the cgnsToFoam tool still available?

The instructions given at http://openfoamwiki.net/index.php/Si...GNS_Converters seem to be outdated - the SVN repository is not reachable (any more). From a first Google search I also did not get a clue...

Thank in advance!
Thomas
thomas.ponweiser is offline   Reply With Quote

Old   April 9, 2013, 09:53
Default
  #124
Senior Member
 
Join Date: Dec 2011
Posts: 111
Rep Power: 19
haakon will become famous soon enough
The repositories are probably down together with the rest of 1.6-ext. See the message on top of OpenFOAM-WIKI: http://www.openfoamwiki.net/index.php/Main_Page so I would not take that as a sign of the tool being deprecated (however I have never used it and cannot tell you whether it still works or not).
haakon is offline   Reply With Quote

Old   March 25, 2015, 08:47
Default install cgnsToFoam on fe30
  #125
New Member
 
Norman
Join Date: Mar 2015
Posts: 6
Rep Power: 11
normy is on a distinguished road
Hi Foamers!
I wanted to ask if anyone had managed to install cgnsToFoam on foam 3.0 ext. I read the wiki page, but I think they are a bit outdated that information, including all package about turbomachinery. Any Idea?
Thanks a lot in advance for your help!
Normy
normy is offline   Reply With Quote

Old   July 1, 2015, 21:09
Default cgnstofoam_not able to build with latest libcgns_3.2.1
  #126
New Member
 
sethu
Join Date: Oct 2011
Posts: 7
Rep Power: 14
Sethu is on a distinguished road
Dear all,

I could able to successfully build cgnsToFoam and foamToCgns with libcgns_2.5 that was available in,
https://openfoamwiki.net/index.php/S...GNS_Converters

But when I tried to build the same with libcgns_3.2.1 (as my current pre processor can only export this version of cgns format), I failed in building the libraries. The error message that I get while executing Allwmake is,

file.C: In member function 'void CGNSOO::file:pen(const string&, CGNSOO::file:penmode_t)':
file.C:64:22: error: 'MODE_READ' was not declared in this scope
case READONLY : m = MODE_READ; break;
^
file.C:65:22: error: 'MODE_MODIFY' was not declared in this scope
case READWRITE: m = MODE_MODIFY; break;
^
file.C:66:22: error: 'MODE_WRITE' was not declared in this scope
case WRITE : m = MODE_WRITE; break;
^
make[2]: *** [file.lo] Error 1
make[2]: Leaving directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0'
make: *** [all] Error 2
+ make install
Making install in src
make[1]: Entering directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0/src'
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/cgnslib_3.1.4/platforms/linuxGccDPOpt/include -g -O2 -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c -o file.lo file.C
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/cgnslib_3.1.4/platforms/linuxGccDPOpt/include -g -O2 -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c file.C -fPIC -DPIC -o .libs/file.o
file.C: In member function 'void CGNSOO::file:pen(const string&, CGNSOO::file:penmode_t)':
file.C:64:22: error: 'MODE_READ' was not declared in this scope
case READONLY : m = MODE_READ; break;
^
file.C:65:22: error: 'MODE_MODIFY' was not declared in this scope
case READWRITE: m = MODE_MODIFY; break;
^
file.C:66:22: error: 'MODE_WRITE' was not declared in this scope
case WRITE : m = MODE_WRITE; break;
^
make[1]: *** [file.lo] Error 1
make[1]: Leaving directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0/src'
make: *** [install-recursive] Error 1
+ popd
~/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src


It seems that libcgnsoo_3.0 has some issue with the current libcgns_3.2.1.
Any help or suggestions would be really helpful.

Regards,

Sethu
Sethu is offline   Reply With Quote

Old   October 30, 2016, 08:46
Default
  #127
New Member
 
niuhong for china
Join Date: May 2016
Posts: 4
Rep Power: 9
niuhong is on a distinguished road
Quote:
Originally Posted by braennstroem View Post
Hi Martin,

nice work with the cgns converter! Did you consider to add a cgns output to the simplefunctionObjects for writing patch/planes during the simulation as well? This would be great :-)

Best Regards!
Fabian
hello!I want to convert cgns(from cfx) to openfoam,but i don't know how to download the cgnstofoam?Could you tell me the method?

Thankyou very much!
niuhong is offline   Reply With Quote

Old   October 30, 2016, 08:47
Default
  #128
New Member
 
niuhong for china
Join Date: May 2016
Posts: 4
Rep Power: 9
niuhong is on a distinguished road
Quote:
Originally Posted by Sethu View Post
Dear all,

I could able to successfully build cgnsToFoam and foamToCgns with libcgns_2.5 that was available in,
https://openfoamwiki.net/index.php/S...GNS_Converters

But when I tried to build the same with libcgns_3.2.1 (as my current pre processor can only export this version of cgns format), I failed in building the libraries. The error message that I get while executing Allwmake is,

file.C: In member function 'void CGNSOO::file:pen(const string&, CGNSOO::file:penmode_t)':
file.C:64:22: error: 'MODE_READ' was not declared in this scope
case READONLY : m = MODE_READ; break;
^
file.C:65:22: error: 'MODE_MODIFY' was not declared in this scope
case READWRITE: m = MODE_MODIFY; break;
^
file.C:66:22: error: 'MODE_WRITE' was not declared in this scope
case WRITE : m = MODE_WRITE; break;
^
make[2]: *** [file.lo] Error 1
make[2]: Leaving directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0'
make: *** [all] Error 2
+ make install
Making install in src
make[1]: Entering directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0/src'
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/cgnslib_3.1.4/platforms/linuxGccDPOpt/include -g -O2 -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c -o file.lo file.C
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/cgnslib_3.1.4/platforms/linuxGccDPOpt/include -g -O2 -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c file.C -fPIC -DPIC -o .libs/file.o
file.C: In member function 'void CGNSOO::file:pen(const string&, CGNSOO::file:penmode_t)':
file.C:64:22: error: 'MODE_READ' was not declared in this scope
case READONLY : m = MODE_READ; break;
^
file.C:65:22: error: 'MODE_MODIFY' was not declared in this scope
case READWRITE: m = MODE_MODIFY; break;
^
file.C:66:22: error: 'MODE_WRITE' was not declared in this scope
case WRITE : m = MODE_WRITE; break;
^
make[1]: *** [file.lo] Error 1
make[1]: Leaving directory `/home/nrcs-cae/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src/libcgnsoo_3.0/src'
make: *** [install-recursive] Error 1
+ popd
~/OpenFOAM/nrcs-cae-2.3.x/application/OSIG/TurboMachinery/src


It seems that libcgnsoo_3.0 has some issue with the current libcgns_3.2.1.
Any help or suggestions would be really helpful.

Regards,

Sethu
hello!I want to convert cgns(from cfx) to openfoam,but i don't know how to download the cgnstofoam?Could you tell me the method?

Thankyou very much!
niuhong is offline   Reply With Quote

Old   October 30, 2016, 08:48
Default
  #129
New Member
 
niuhong for china
Join Date: May 2016
Posts: 4
Rep Power: 9
niuhong is on a distinguished road
Quote:
Originally Posted by hamcer View Post
hi DSpreitz,



In the end, I haven't installed the cgnsTools in ubuntu, because it is used only for display cgns files and it'is difficult to installed it;
for the geometry cgns we are using NUMECA IGG Software in our laboratory, and I use Paraview to see the outcome of the conversion,
I think you needn't install adfviewer.

hope it help you.
hello!I want to convert cgns(from cfx) to openfoam,but i don't know how to download the cgnstofoam?Could you tell me the method?

Thankyou very much!
niuhong is offline   Reply With Quote

Old   November 5, 2016, 01:45
Default
  #130
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
Quote:
Originally Posted by niuhong View Post
hello!I want to convert cgns(from cfx) to openfoam,but i don't know how to download the cgnstofoam?Could you tell me the method?

Thankyou very much!

...........
hamcer is offline   Reply With Quote

Old   November 5, 2016, 01:47
Default
  #131
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
Hello,
it's been a long time that I left OpenFOAM.
Try using ANSYStofoam utility. if you are not forced to install the old OpenFOAM 1.5-dev (I do not know if it still exists). or, use the very new OpenFOAM 16.10.
hope that help you.
hamcer is offline   Reply With Quote

Old   November 5, 2016, 21:51
Default
  #132
swm
Member
 
swm's Avatar
 
Join Date: Dec 2013
Posts: 47
Rep Power: 12
swm is on a distinguished road
Can cgns mesh be transfered to plot3d format?
swm is offline   Reply With Quote

Old   January 19, 2017, 16:17
Default
  #133
Member
 
Join Date: Mar 2014
Posts: 39
Rep Power: 12
Traction is on a distinguished road
I succeeded by transforming the .cgns to an .unv with the help of Salome. The unv mesh can be converted into an OpenFOAM mesh by using the ideasUnvToFoam utility.
Traction is offline   Reply With Quote

Old   July 27, 2017, 04:45
Default
  #134
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hello,

I work in nuclear fusion where different aspects of a component are typically investigated by different specialized groups.
Depending on the requirements, different commercial codes or own specialized codes are used.
This makes it difficult to make use of the results of others on the detailed CFD level of the original investigation and often much information will be lost in subsequent multi physics simulations. In extreme cases even all previous results are just lumped into a single parameter.
To avoid such waste of information, one should do special calculations with an adequate CFD code (like OpenFOAM), too.
Then all data is available on a similar detail level and - provided that an interface is available - may be reasonably merged.

From this I would think that a working interface to commercial codes could boost the success of OpenFOAM.
And here CGNS as an OpenSource project should fit perfectly to the ideas of OpenFOAM.
I think it is a real pity that the CGNS converters are not part of current OF packages any more!


In my application I like to be able to use thermal and flow analyses from others with commercial codes like CFX as background fields for my OF simulations (although such analyses would be basically possible with OF, too, but why do duplicate work ?) so I wanted to have the CGNS conversion capability and tried to activate it at least for me.

Now I am at a stage where things look like they work fine enough and for those who are interested I try to summarize my findings:

1. The download of the cgns converters is described at:

https://openfoamwiki.net/index.php/S...GNS_Converters

Note that you need to have subversion (-> https://subversion.apache.org/) installed to use the repositories listed there.

I verified today that the first option
"svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/OSIG/TurboMachinery"
still works.

2. Compilation with a current OF installation (I now have 4.1) is not straightforward, I think I had to use some files from version 2.2.2.
What you really need for the converters is compiling the libraries libcgnsoo_3.0 and cgnslib_2.5.
The compilation of the cgnstools and the other stuff is optional.

However to be able to read CGNS files from current CFD codes you better compile the converters with a more recent CGNS library (-> http://cgns.github.io/).
As meanwhile the CGNS standard file format changed from ADF to HDF5 (->https://support.hdfgroup.org/HDF5/) one may also compile the CGNS library and tools with a current HDF5 library.
I did not succeed here yet, but there also exists cgnstools converters 'hdf2adf' and 'adf2hdf' that can do that job.

I have an Ubuntu installation where a CGNS library (libcgns.so.3.1) and the 'hdf2adf' and 'adf2hdf' converters may be easily installed by the package system.

3. It is also interesting to know that *.cgns files may have the solution either stored at the vertex or cell center locations. One may find out which location with the cgnstool 'cgnsview' or try 'convert_location' and look at the output.
So if like to try out forth and back conversion from and to OF for verification you won't get the original al result because foamToCGNS writes out data to the vertex locations (while OF data is at cell centers). Beyond that, for me the converters seem to work all right and it was simple to make them convert all fields. By default only valid CGNS names are converted, the cgnstool ’cgnsnames' lists them.

4. As you often do not want to use the foreign CGNS mesh directly for your calculations, you can map the data to your calculation case using 'mapFields'. However 'mapFields' not always works fine for OF cases that have been generated from CGNS files. In a case where 'mapFields' reported warnings and just wrote an unchanged target field 'checkMesh' indicated many problems with the transformed mesh.

My summary: it was some effort to get up to date CGNS capabilities for OpenFOAM but it was worth it in my case.

Hope this helps someone.
volker1 is offline   Reply With Quote

Old   December 14, 2018, 00:30
Default
  #135
Senior Member
 
harshawardhank
Join Date: Mar 2014
Posts: 209
Rep Power: 13
harsha_kulkarni is on a distinguished road
Hello friends,


I am trying to install cgnstools_2.5 but it is showing following error


make[1]: Entering directory '/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnstools_2.5/cgnstools/adfviewer'
cc -DPROTOTYPE -O2 -I../common -I/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnslib_2.5 -I/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnslib_2.5/adf -c adfwish.c
In file included from adfwish.c:15:0:
tk.h:38:17: fatal error: tcl.h: No such file or directory
compilation terminated.
Makefile:126: recipe for target 'adfwish.o' failed
make[1]: *** [adfwish.o] Error 1
make[1]: Leaving directory '/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnstools_2.5/cgnstools/adfviewer'
Makefile:53: recipe for target 'prog-adfviewer' failed
make: *** [prog-adfviewer] Error 2
----- adfviewer -----
make[1]: Entering directory '/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnstools_2.5/cgnstools/adfviewer'
installing shell scripts to /home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnstools_2.5/cgnstools/platforms/linux64Gcc47DPOpt/bin
cc -DPROTOTYPE -O2 -I../common -I/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnslib_2.5 -I/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnslib_2.5/adf -c adfwish.c
In file included from adfwish.c:15:0:
tk.h:38:17: fatal error: tcl.h: No such file or directory
compilation terminated.
Makefile:126: recipe for target 'adfwish.o' failed
make[1]: *** [adfwish.o] Error 1
make[1]: Leaving directory '/home/harsha/OpenFOAM/harsha-2.4.0/application/openfoam-extend-Breeder2.0-OSIG-TurboMachinery-master/src/cgnstools_2.5/cgnstools/adfviewer'
Makefile:81: recipe for target 'install-adfviewer' failed
make: *** [install-adfviewer] Error 2
harsha_kulkarni is offline   Reply With Quote

Old   December 14, 2018, 02:37
Default
  #136
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi,

from:
Quote:
Originally Posted by harsha_kulkarni View Post
fatal error: tcl.h: No such file or directory
I assume that probably tcl source files are not installed on your system.
tcl.h should be in /usr/include/tcl8.x

Enter e.g. "linux tcl.h" for more info on tcl from the web.

This may not be the only further software required for compilation.
I remember it took me a while until I got the cgnstools running and I did not manage to include HDF properly.
volker1 is offline   Reply With Quote

Old   December 14, 2018, 02:49
Default
  #137
Senior Member
 
harshawardhank
Join Date: Mar 2014
Posts: 209
Rep Power: 13
harsha_kulkarni is on a distinguished road
Quote:
Originally Posted by volker1 View Post
Hi,

from:


I assume that probably tcl source files are not installed on your system.
tcl.h should be in /usr/include/tcl8.x

Enter e.g. "linux tcl.h" for more info on tcl from the web.

This may not be the only further software required for compilation.
I remember it took me a while until I got the cgnstools running and I did not manage to include HDF properly.



yes it is there tcl8.6 in /usr/include/
I also add tcl.h from internet in cngtools
but error persist
harsha_kulkarni is offline   Reply With Quote

Old   December 14, 2018, 04:20
Default
  #138
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi,

I see. I am sorry I am no expert in compilation strategies, so just some ideas that hopefully help:

- check out tcl paths if just "tcl" or a version "tclx.y"is listed. For the first case there should be a symlink "tcl -> tcl8.6" in /usr/include

- make sure you have read access for this directory and file and/or compile as root.

- check out the #include statement in "tk.h"

Good luck!
volker1 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with CGNS formatted mesh in SU2 jlwhelan28 SU2 5 February 13, 2017 11:48
[Gmsh] Cgns support for gmsh robyTKD OpenFOAM Meshing & Mesh Conversion 1 July 13, 2016 11:27
SU2 not built with CGNS support. maximus23 SU2 Installation 5 May 11, 2016 12:05
writing link between two CGNS files t.teschner Main CFD Forum 1 February 4, 2014 10:26
parallel support with CGNS format not yet implemented kirkrich SU2 3 January 18, 2013 15:39


All times are GMT -4. The time now is 23:33.