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 Members List Search Today's Posts Mark Forums Read

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2010, 09:04
Default
  #101
Member
 
Nick Gardiner
Join Date: Apr 2009
Location: Chichester, UK
Posts: 94
Rep Power: 17
NickG is on a distinguished road
Fuller error message:
cgnsoo.H:383: error: ‘range’ is not a type
cgnsoo.H:384: error: ISO C++ forbids declaration of ‘range’ with no type
cgnsoo.H:384: error: conflicting declaration ‘const int range’
cgnsoo.H:384: error: ‘range’ has a previous declaration as ‘const CGNSOO::range& range’
cgnsoo.H:384: error: expected ‘,’ or ‘...’ before ‘&’ token

Thanks
NickG is offline   Reply With Quote

Old   March 7, 2010, 08:17
Default
  #102
Member
 
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 16
gregor is on a distinguished road
Hi,

same problem here (OpenFoam-1.5-dev Rev 1670 & ubuntu 9.10). Any solutions yet ??

Gregor
gregor is offline   Reply With Quote

Old   March 7, 2010, 13:17
Default
  #103
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Nick, Gregor, did you use the following svn checkout?

svn checkout https://openfoam-extend.svn.sourcefo...TurboMachinery

I'm not getting that error, and I don't even see "int range" in the line in question. This compilation should be independent of the OpenFOAM version you are using.

Hamdi, I cannot reproduce your error.

If you want to retrace my steps:
Code:
mkdir $HOME/OpenFOAM/extend/
cd $HOME/OpenFOAM/extend/
svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.5/OSIG/TurboMachinery
cd $HOME/OpenFOAM/extend/TurboMachinery/src
./Allwmake

cd $HOME/OpenFOAM/extend/TurboMachinery/applications/utilities/mesh/conversion/cgnsToFoam/
wget http://dl.dropbox.com/u/1261220/CGNSBoundaryConditions.C
wmake
This should get the cgnsToFoam tool to work.
akidess is offline   Reply With Quote

Old   March 8, 2010, 03:03
Default
  #104
Member
 
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 16
gregor is on a distinguished road
Hi Anton,

thanks for your reply! Yes i used the same svn link to get the sources.

Still the same error. The lines of Question in my "cgnsoo.H" are the following:

Code:
// same method using ranges as arguments
    GridConnectivity1to1_t readGridConnectivity1to1( int index, string& connecname, string& donorname, range& range, range& donorrange, vector<int>& transform ) const;
    GridConnectivity1to1_t writeGridConnectivity1to1( const string& connecname, const string& donorname, const range& range, const range& donorrange, const vector<int>& transform );
regards
Gregor
gregor is offline   Reply With Quote

Old   March 8, 2010, 04:36
Default
  #105
Member
 
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 16
gregor is on a distinguished road
ok it seems that at least the libaries are compiled now.

looks like i got a problem with the declaration of "range" in the namespace CGNSOO. I added a "CGNSOO::" to every occurance of range& he didnt like.
gregor is offline   Reply With Quote

Old   March 15, 2010, 03:00
Default cgnsToFoam memory usage
  #106
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Dear all,

I try to convert a grid in cgns format to OpenFOAM. The size of the cgns file is about 1.2Go.
I have a machine with 16Go of RAM but apparently it is not enough, and there is also 8Go of swap which is used.
I don't understand why it uses so much memory to convert the grid. And since I'll have to convert bigger meshes than that, I was wondering if there is something I missed which would help me to reduce memory usage?
Any help is welcome.

Regards,

Vincent
vinz is offline   Reply With Quote

Old   April 14, 2010, 05:02
Default
  #107
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
Quote:
Originally Posted by akidess View Post
Nick, Gregor, did you use the following svn checkout?

svn checkout https://openfoam-extend.svn.sourcefo...TurboMachinery

I'm not getting that error, and I don't even see "int range" in the line in question. This compilation should be independent of the OpenFOAM version you are using.

Hamdi, I cannot reproduce your error.

If you want to retrace my steps:
Code:
mkdir $HOME/OpenFOAM/extend/
cd $HOME/OpenFOAM/extend/
svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.5/OSIG/TurboMachinery
cd $HOME/OpenFOAM/extend/TurboMachinery/src
./Allwmake

cd $HOME/OpenFOAM/extend/TurboMachinery/applications/utilities/mesh/conversion/cgnsToFoam/
wget http://dl.dropbox.com/u/1261220/CGNSBoundaryConditions.C
wmake
This should get the cgnsToFoam tool to work.
hello Akidess,

I have just updated my system and my Of to of-1.6.
cgnstofoam worked well by this steps:

mkdir $HOME/OpenFOAM/extend/
cd $HOME/OpenFOAM/extend/
svn checkout https://openfoam-extend.svn.sourcefo...TurboMachinery
cd $HOME/OpenFOAM/extend/TurboMachinery/src
./Allwmake

cd $HOME/OpenFOAM/extend/TurboMachinery/applications/utilities/mesh/conversion/cgnsToFoam/
wget http://dl.dropbox.com/u/1261220/CGNS...ryConditions.C
wmake

thank you for the effort you have made.
hamcer is offline   Reply With Quote

Old   May 14, 2010, 09:26
Default
  #108
Member
 
achinta
Join Date: May 2010
Location: Sydney
Posts: 66
Rep Power: 15
achinta is on a distinguished road
Hi Martin,
Is the converter for OpenFOAM 1.6 available? I want to convert flow solutions obtained in OpenFOAM to CGNS format(foamToCGNS command).
Could we use the converter available for OF-1.5 in OF-1.6 directly? Or do we need to make any changes?

Kind regards,
Achinta
achinta is offline   Reply With Quote

Old   November 4, 2010, 04:18
Default
  #109
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 15
hamzamotiwala is on a distinguished road
Hello,

I am new to this forum. Since the discussion was about CGNS, I thought of making a relevant request .I am looking for a working sample C program that can read and write data from an unstructured grid file in CGNS Format. Can anyone help me out with this problem please. Will really appreciate the help.

Thanks
hamzamotiwala is offline   Reply With Quote

Old   November 19, 2010, 06:13
Default cgnsToFoam did not recognize faces/patches
  #110
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Quote:
Originally Posted by mbeaudoin View Post
Hello Eric,

The warnings about the "Cell type" is for the non-3D cell types present in your CGNS file:
triangles (TRI_3)
rectangle (QUAD_4)
line segments (BAR_2)
points (NODE)

As of now, the cgnsToFoam converter only supports the following type of 3D cells for unstructured mesh:
tetrahedron (TETRA_4)
pyramids (PYRA_5)
prisms (PENTA_6)
hexahedron (HEXA_8)

It looks like your unstructured mesh has a lot of 2D elements (triangles and rectangles).

The current implementation of cgnsToFoam will not reconstruct 3D cells from a bunch of 2D faces. This 3D topology information is normally known from your CGNS generator, so you need to find a way to export your mesh as 3D cells (tets, hexs, pyramids or prisms) and not as 2D faces.

Is your unstructured mesh exported in CGNS as a bunch of 2D faces, or do you have 3D cells in your mesh as well?

As for the following type of message:
"FOAM Warning : BC "exhaust" : patch defined by a unsupported PointSetType_t - skipped.",

It looks like some, if not all, of your boundary conditions are defined in your CGNS file as something other than a point list, or a point range.

Which software did you use for generating your CGNS file?

Is it possible for you to share this CGNS file?

We have developped the CGNS converters based on the outputs generated by the commercial softwares we are using for our CFD simulations and mesh modelling.

During that process, we have discovered that the CGNS "standard" can be implemented differently from vendor to vendor, so your CGNS file might be yet another implementation that we need to make some adjustments for.

Martin

Hello,

I had same problem when converting the CGNS file generated by MIME (Metacomp Technologies). See error messages below and file attached.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 2 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "TRI_3" found in zone 0, section 3 has no OpenFOAM equivalence - skipping
--> FOAM Warning : BC "inlet" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "outlet" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "side" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "topbottom" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "cylinder" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 582
Found 28176 undefined faces in mesh; adding to default patch.
Output of mesh and boundary conditions

Could you help me to fix that?
Actually the code converted the mesh but all patches had zero faces associated. Only a default patch was identified with all faces. Is there any way to automatically identify the faces of each patch?

See the mesh at link below:

https://www.4shared.com/file/eYuxdxRQ/gridcgns.html

Regards,

Guilherme
Attached Files
File Type: zip boundary.zip (526 Bytes, 4 views)

Last edited by aerothermal; November 19, 2010 at 06:53.
aerothermal is offline   Reply With Quote

Old   November 22, 2010, 13:16
Default
  #111
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
One way to fix it is to use the utility "autoPatch"

Code:
$ autoPatch 30
it will automatically create patches but will save in 0 and 1 times under polyMesh
just copy it to your constant/polyMesh
and erase all other polyMesh
after that visualize in Paraview
and rename the patches and types at constant/polyMesh/boundary file

regards,

Guilherme
aerothermal is offline   Reply With Quote

Old   March 27, 2011, 01:24
Default
  #112
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hello,
I wonder how you handle parallel data. As I see it the cgns files are written to the processor directories. Do you think it is possible to write a large 'serial' file in parallel, so that one avoids all the processor files.

Best Regards!
Fabian
braennstroem is offline   Reply With Quote

Old   April 6, 2011, 05:15
Default
  #113
Member
 
Kurne
Join Date: Aug 2010
Location: Pune, INDIA
Posts: 88
Rep Power: 15
kurne is on a distinguished road
Dear Martin Beaudoin

I have taken the CGNS converter from here http://openfoamwiki.net/index.php/Si...GNS_Converters and as per instruction on this link i am trying to install CGNS converter but i am facing the error when i run ./Allwmake in src directory and the error is

src/Makefile.am:31: its definition is in aclocal's search path.
make: *** [Makefile.in] Error 1
+ make install
cd . && /bin/bash /home/sameer/OpenFOAM/sameer-1.5-dev/TurboMachinery/src/libcgnsoo_3.0/config/missing --run automake-1.11 --gnits
src/Makefile.am:31: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:31: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:31: to `configure.in' and run `aclocal' and `autoconf' again.
src/Makefile.am:31: If `AC_PROG_LIBTOOL' is in `configure.in', make sure
src/Makefile.am:31: its definition is in aclocal's search path.
make: *** [Makefile.in] Error 1
+ popd

I am using OpenFOAM 1.5-dev with gcc version 4.4.3.Will you please help me.

Thanks in advance.
__________________
Simulation Is Determination Of Imagination Towards Approximation ®


Best Regards

Mubeen K Kurne
kurne is offline   Reply With Quote

Old   April 21, 2011, 06:46
Default
  #114
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Hi,

Does cgnsToFoam work with OpenFOAM 1.7?
maysmech is offline   Reply With Quote

Old   April 21, 2011, 07:43
Default
  #115
Member
 
Kurne
Join Date: Aug 2010
Location: Pune, INDIA
Posts: 88
Rep Power: 15
kurne is on a distinguished road
Dear Maysam

I didn't get anywhere information regarding the CGNS converter on OpenFOAM 1.7.1 and what i read is CGNS is available up to OpenFOAM 1.6 only.And might be it is not available on OpenFOAM 1.7.1.

But i am trying to install on OpenFOAM 1.5 dev and still i didn't get rid out of it.I am trying hope in coming days i will install it.
__________________
Simulation Is Determination Of Imagination Towards Approximation ®


Best Regards

Mubeen K Kurne
kurne is offline   Reply With Quote

Old   May 12, 2011, 11:59
Default
  #116
OFU
New Member
 
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 16
OFU is on a distinguished road
Hi,

in the meantime...is there a possibility to convert cgns files to OpenFoam 1.7 or are there still only the converters for OF 1.4 and 1.5?

Best regards,
Jennifer
OFU is offline   Reply With Quote

Old   May 12, 2011, 12:25
Default
  #117
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Hi OFU,

I used only 1.5 but ran simulations in 1.6-ext and 1.7.1. It works well. Just install the two (or three) distributions and setup the environment in different terminal windows.

Regards,
Guilherme
aerothermal is offline   Reply With Quote

Old   May 22, 2011, 20:11
Default
  #118
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Hi Guiherme,

Do you mean that it works with 1.7.x same as 1.5?

I want to import openFoam result as case and data to Fluent. Have you had this experience with 1.7?
maysmech is offline   Reply With Quote

Old   June 15, 2011, 09:38
Default
  #119
OFU
New Member
 
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 16
OFU is on a distinguished road
Hi,

I tried to convert a cgns file to OpenFOAM with version 1.5. As I want to extract and convert the solutions that are stored in the cgns file as OpenFOAM fields I used the option -saveSolutions. I got the following message:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 1 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 2 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 3 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 4 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 5 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 6 has no OpenFOAM equivalence - skipping
--> FOAM Warning : Cell type "QUAD_4" found in zone 0, section 7 has no OpenFOAM equivalence - skipping
--> FOAM Warning : BC "BC_1" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "BC_2" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "BC_3" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "BC_4" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "BC_5" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "BC_6" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning : BC "BC_7" : patch defined by a unsupported PointSetType_t - skipped.
--> FOAM Warning :
From function polyMesholyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576
Found 88064 undefined faces in mesh; adding to default patch.
Output of mesh and boundary conditions
--> FOAM Warning : Skipping unknown CGNS scalar : "P"
--> FOAM Warning : Skipping unknown CGNS scalar : "R"
--> FOAM Warning : Skipping unknown CGNS scalar : "T"
--> FOAM Warning : Skipping unknown CGNS scalar : "U"
--> FOAM Warning : Skipping unknown CGNS scalar : "V"
--> FOAM Warning : Skipping unknown CGNS scalar : "W"

Can anybody tell me how to solve this problem? And where are the converted solutions stored, if the converter works without problems? In a 0/ directory?
The only files I got after running cgnsToFoam were the five files in constant/polyMesh...

Thanks
Jennifer
OFU is offline   Reply With Quote

Old   August 7, 2011, 05:20
Default
  #120
Rol
New Member
 
Roland
Join Date: Jul 2010
Posts: 8
Rep Power: 15
Rol is on a distinguished road
Quote:
Originally Posted by kurne View Post
Dear Martin Beaudoin

I have taken the CGNS converter from here http://openfoamwiki.net/index.php/Si...GNS_Converters and as per instruction on this link i am trying to install CGNS converter but i am facing the error when i run ./Allwmake in src directory and the error is

src/Makefile.am:31: its definition is in aclocal's search path.
make: *** [Makefile.in] Error 1
+ make install
cd . && /bin/bash /home/sameer/OpenFOAM/sameer-1.5-dev/TurboMachinery/src/libcgnsoo_3.0/config/missing --run automake-1.11 --gnits
src/Makefile.am:31: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:31: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:31: to `configure.in' and run `aclocal' and `autoconf' again.
src/Makefile.am:31: If `AC_PROG_LIBTOOL' is in `configure.in', make sure
src/Makefile.am:31: its definition is in aclocal's search path.
make: *** [Makefile.in] Error 1
+ popd

I am using OpenFOAM 1.5-dev with gcc version 4.4.3.Will you please help me.

Thanks in advance.
I had the same problem. you need to have libtool installed
sudo apt-get install libtool
Rol is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 00:51.