|
[Sponsors] |
February 19, 2013, 05:24 |
cgns grid problem
|
#1 |
Super Moderator
|
Hello
I am trying to read a cgns file with this error. Code:
---------------------- Read grid file information ----------------------- Reading the CGNS file: GridT_NAL_PressureModel.cgns CGNS file contains 1 database(s). Database 1, Base: 1 zone(s), cell dimension of 3, physical dimension of 3. Zone 1, Zone: 326907 vertices, 887691 cells, 326907 boundary vertices. Reading grid coordinates... Number of coordinate dimensions is 3. Reading CoordinateX values from file. Reading CoordinateY values from file. Reading CoordinateZ values from file. Reading connectivity information... Number of connectivity sections is 7. !!! Error !!! Unrecognized element type. Now exiting... http://cfdcenter.aero.iisc.ernet.in/...grids_user.php Is there a way to fix this ? cgnscheck seems to be ok Code:
$ cgnscheck GridT_NAL_PressureModel.cgns reading CGNS file GridT_NAL_PressureModel.cgns reading base "Base" reading zone "Zone" reading element set "fluid" reading element set "pressure_farfield" reading element set "symmetry" reading element set "wall_wing" reading element set "wall_sting_modification" reading element set "wall_stingbase_outer" reading element set "wall_stingbase_inner" building volume faces hash table... finding exterior nodes... checking base "Base" checking zone "Zone" checking coordinates "GridCoordinates" checking coordinate "CoordinateX" WARNING:dataclass not given checking coordinate "CoordinateY" WARNING:dataclass not given checking coordinate "CoordinateZ" WARNING:dataclass not given checking elements checking element set "fluid" checking element set "pressure_farfield" checking element set "symmetry" checking element set "wall_wing" checking element set "wall_sting_modification" checking element set "wall_stingbase_outer" checking element set "wall_stingbase_inner" checking boundary conditions checking BC "pressure_farfield" checking BC interface checking BC "symmetry" checking BC interface checking BC "wall_wing" checking BC interface checking BC "wall_sting_modification" checking BC interface checking BC "wall_stingbase_outer" checking BC interface checking BC "wall_stingbase_inner" checking BC interface checking complete 3 warnings (3 shown) |
|
February 19, 2013, 05:36 |
|
#2 |
Super Moderator
|
The unrecognized element has
elemType = 20 |
|
February 20, 2013, 03:02 |
|
#3 |
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14 |
Hi Praveen,
It looks like the mesh has elements of type HEXA_20 (extra nodes at the midpoints of each hex edge), while our reader was written with HEXA_8 elements in mind. Please see the page here for more information: http://www.grc.nasa.gov/WWW/cgns/CGN...l#unstructgrid. We are currently working to expand the CGNS input and output capabilities. In the meantime, if you are interested in modifying the current CGNS implementation to suit your needs, the code for the reader can be found in geometry_structure.cpp around lines 800-1500. T |
|
February 20, 2013, 03:54 |
|
#4 |
Super Moderator
|
Thanks. I will try. I did notice some strange behaviour. We are finding number of nodes in the element here
Code:
/*--- Find the number of nodes required to represent this type of element. ---*/ if ( cg_npe(elemType, &npe) ) cg_error_exit(); elemIndex[j-1][s-1] = npe; Code:
default: printf( "\n\n !!! Error !!!\n" ); printf( " Unrecognized element type = %d.\n", elemType); printf( " Number of nodes = %d.\n", npe); printf( " Now exiting...\n\n"); exit(0); break; Code:
!!! Error !!! Unrecognized element type = 20. Number of nodes = 0. Now exiting... |
|
February 20, 2013, 04:25 |
|
#5 |
Super Moderator
|
Looking at cgnslib.h, I see that type 20 is MIXED
Code:
483 CGNS_ENUMV( MIXED ) =20, Code:
513 #define CG_NPE_MIXED 0 . . 536 #define NPE_MIXED 0 Update: The MIXED element format is explained here http://cgns.sourceforge.net/Proposed...ts_of_sids.pdf on page No. 68. I think its not so easy to modify su2 to handle this case. Last edited by praveen; February 20, 2013 at 05:22. |
|
February 26, 2013, 19:23 |
|
#6 |
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14 |
Indeed, we wrote the reader to handle separate element types rather than mixed elements within one zone (this seems to be how the mesh generation software that we most frequently use exports unstructured CGNS meshes).
That being said, it certainly isn't impossible to modify the current reader to handle this situation. In fact, I am sure other folks might be interested in something like this too. If you think you might want to give this a try, please feel free to ask questions about the current implementation in SU2. |
|
February 27, 2013, 12:21 |
|
#7 |
Member
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 14 |
I had the same problem.
I do not know how to fix that by modifying the code. So I used ICEM to convert the cell type. i.e. convert quad cell to triangle cell. Then the cgns format can be converted to su2 format by the program. It worked for me, although the number of elements increased, and costed more computational time, but the result was pretty good. |
|
February 27, 2013, 17:18 |
|
#8 |
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14 |
Ah, I had been curious about that, because we had heard that some ICEM grids were causing problems with the CGNS reader in SU2 (I don't have access to ICEM).
So, you can confirm that having mixed element types is indeed the issue w/ CGNS meshes from ICEM in SU2? Was it 2D or 3D? Same issues for interior vs. boundary elements? Thanks for the feedback. This will help guide some upgrades to the CGNS reader in SU2... |
|
February 28, 2013, 00:09 |
|
#9 |
Member
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 14 |
In my cases, y++<1, so I used hybrid mesh, namely inflation of quad(2d) or hex(3d) cells on the boundary (airfoil).
After then, I used ICEM to convert all quad to tri (2d) or all cell to tetra (3d) in the Edit Mesh Tab. Otherwise, same error would occur, as shown in #1. Finally, the exported CGNS grid can be successfully converted and used in SU2. |
|
March 7, 2013, 04:01 |
|
#10 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
Dear Praveen,
Did you find a workaround for this problem? I am also trying to use the same mesh for the workshop and I have the same problem. We created a converter from GridPro to SU2, but at first we would like to try the organiser's grids with both SU2 and OpenFOAM |
|
March 7, 2013, 04:41 |
|
#11 |
Super Moderator
|
No. I am planning to write a separate converter from cgns to su2 format but I have not had time to work on it.
|
|
March 11, 2013, 05:33 |
|
#12 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
Dear all,
My colleague Martin SPEL modified the source code in order to be able to handle the zones with mixed elements. It actually had nothing to do with HEX 20 elements. There was also another problem which was that we couldn't run the CGNS conversion if the code was compiled with MPI activated. It is now possible, since we only check if we are running parallel or not (not compilation based). Please, find attached the modified file. |
|
March 12, 2013, 01:44 |
|
#13 |
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14 |
Vincent,
Thank you for sharing: this is a great contribution! If it is alright with you and your colleague, I would like to adapt the code that you have shared and place it into the current version of SU2 so that it will be available in the next release. I'll be in touch to discuss further, Tom |
|
March 12, 2013, 03:35 |
|
#14 |
Super Moderator
|
Thanks for this. I tried it on my cgns grid. I am able to save the mesh in su2 format but cannot run the cfd with the cgns mesh, some segmentation fault.
However I do not get segmentation fault if I run with the converted su2 mesh file. |
|
March 12, 2013, 09:43 |
|
#15 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
Hi Praveen,
Totally normal from what I understood. SU2 does not handle CGNS in parallel so far. So you have to first run a serial computation, at least up to the CGNS conversion. And then you can run your parallel computation using the SU2 mesh obtained from the previous computation. A bit tricky, but at least it works @Tom: No problem, I sent you an email regarding the code. |
|
March 12, 2013, 09:58 |
|
#16 |
Super Moderator
|
I was making a serial run on the cgns file when the segmentation occurred. But yes, I can just use the converted file. Thanks.
|
|
March 12, 2013, 14:20 |
|
#17 |
Member
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 14 |
Thanks a lot, it works.
Help me saving much computational cost. |
|
September 2, 2013, 20:12 |
|
#18 |
Member
Eduardo Molina
Join Date: Sep 2010
Location: Brazil
Posts: 35
Rep Power: 16 |
Hi all,
For those who are failing to convert quad cells using cgns from ICEMCFD 14.5, just select cgns version 2.4 and SU2 is able to convert the files. I saw here in CFDOnline that other people are facing the same CGNS problem with version later than ICEM 12.1. Cheers. |
|
September 2, 2013, 20:34 |
|
#19 |
Member
Eduardo Molina
Join Date: Sep 2010
Location: Brazil
Posts: 35
Rep Power: 16 |
Hi all,
For those who are failing to convert quad cells using cgns from ICEMCFD 14.5, just select cgns version 2.4 and SU2 is able to convert the files. I saw here in CFDOnline that other people are facing the same CGNS problem with version later than ICEM 12.1. Cheers. |
|
March 10, 2014, 13:27 |
|
#20 |
New Member
Join Date: Jan 2014
Posts: 3
Rep Power: 12 |
Hello Guys,
I keep getting a similar error but I cannot compile with the archive *.cpp attached above.Am I supposed to do so? Does anyone have any idea what the problem may be? Code:
---------------------- Read grid file information ----------------------- Reading the CGNS file: Patrulha6.cgns CGNS file contains 1 database(s). Database 1, Unstructured data: 1 zone(s), cell dimension of 3, physical dimension of 3. Zone 1, Patrulha5: 6743713 vertices, 6203599 cells, 0 boundary vertices. Reading grid coordinates... Number of coordinate dimensions is 3. Reading CoordinateX values from file. Reading CoordinateY values from file. Reading CoordinateZ values from file. Reading connectivity information... Number of connectivity sections is 20. !!! Error !!! Unrecognized element type. Now exiting... Regards JuB |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
On grid independent solution for pulsatile flow | David | FLUENT | 5 | March 25, 2022 04:33 |
Help,Mixsim,Generate Grid problem | whale1011 | FLUENT | 1 | December 20, 2012 20:40 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 18:51 |
Re: Convergence problem for refined grid | CFD_Novice | Main CFD Forum | 13 | February 17, 2008 23:56 |
nonstaggered grid problem | Zhi-Xing Yu | Main CFD Forum | 7 | August 26, 1998 14:22 |