CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > enGrid

CGNS Export

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2013, 04:38
Default CGNS Export
  #1
New Member
 
Sebastian
Join Date: May 2013
Posts: 7
Rep Power: 13
sebastian610 is on a distinguished road
Has anybody managed to export a CGNS file from engrid?

I tried to modify the engrid/src/scripts/engrid_installer_updater.cfg and changed the line

PROJECT_FILE=engrid.pro

to

PROJECT_FILE=engrid.pro.cgns

Unfortunately engrid still says that CGNS support has not been compiled.
sebastian610 is offline   Reply With Quote

Old   September 29, 2013, 05:57
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Sebastian,

Last time Oliver had a quick look at it, he decided it was preferable to implement the ability for exporting to SU2: http://engits.eu/vanilla/index.php?p...-engrid-1.3/p1

Anyway, his initial answer back then was this:
Quote:
I haven't used that for ages ... here is what I would try:

1. Install CGNS and make sure that the headers and libraries are found by the compiler/linker
2. enable CGNS support in libengrid.pro (DEFINES += CGNS_SUPPORT)
3. cross your fingers ;-)
I'll give it a try myself and report back if I have any success.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 29, 2013, 06:52
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Sebastian,

I managed to get this working on Ubuntu 12.04. Steps:
  1. Apply the following changes:
    Code:
    diff --git a/src/engrid.pro.app b/src/engrid.pro.app
    index 5849203..e51ae15 100644
    --- a/src/engrid.pro.app
    +++ b/src/engrid.pro.app
    @@ -81,6 +81,9 @@ LIBS        += -lvtkRendering
     LIBS        += -lvtksys
     LIBS        += -lvtkVolumeRendering
     LIBS        += -lvtkWidgets
    +LIBS += -lcgns
    +
    +  
     }
     
     OTHER_FILES += checkcomments.py todo.txt
    diff --git a/src/libengrid/libengrid.pro b/src/libengrid/libengrid.pro
    index 6726531..a2d85df 100755
    --- a/src/libengrid/libengrid.pro
    +++ b/src/libengrid/libengrid.pro
    @@ -35,6 +35,7 @@ win32-msvc* {
         QMAKE_CXXFLAGS += -g
     }
     
    +DEFINES += CGNS_SUPPORT
     
     INCLUDEPATH += ..
     INCLUDEPATH += ./libengrid-build
  2. Install the cgns development package:
    Code:
    sudo apt-get install libcgns-dev
  3. Inside enGrid's folder "src", run:
    Code:
    make -j4
    This should be able to (re)build with the support for CGNS.
Best regards,
Bruno
__________________

Last edited by wyldckat; November 30, 2013 at 09:19. Reason: "sudo", not "sudp"
wyldckat is offline   Reply With Quote

Old   September 29, 2013, 14:49
Default
  #4
New Member
 
Sebastian
Join Date: May 2013
Posts: 7
Rep Power: 13
sebastian610 is on a distinguished road
Hello Bruno,

thanks for your suggestion. I implemented your changes as best I could, but when compiling I get an error compiling cgnswriter.cpp. I am on Fedora anyway.

This is where I have to give up. It's a pity because otherwise engrid in combination with gmsh is really great. I am a bit astonished that there is no broad acceptance and support of cgns. The NASA tools are not bad either, but do not offer much regarding data import/export.

Maybe foamToCgns could be a solution, but it is not straight out of the box either.

-Sebastian
sebastian610 is offline   Reply With Quote

Old   September 30, 2013, 03:40
Default
  #5
Senior Member
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 121
Rep Power: 17
ogloth is on a distinguished road
Hi Sebastian & Bruno,

personally I find that CGNS is not much of a standard, because there is a lot of different ways you could organise your CGNS file and it it is no way guaranteed that a given CGNS file works with a given solver.

Which error message did the complier produces when trying to compile the CGNS writer?

What exactly do you want to do? Maybe it would indeed be easier to simply write an export function for the format you need -- other than CGNS ;-)

Out of interest: Do you use Gmsh for surface meshing? Did you ever try enGrid's own surface mesher?

Kind regards,
Oliver
ogloth is offline   Reply With Quote

Old   September 30, 2013, 07:13
Default
  #6
New Member
 
Sebastian
Join Date: May 2013
Posts: 7
Rep Power: 13
sebastian610 is on a distinguished road
Hello Oliver and Bruno,

I want to transfer data between an inhouse 1D solver and 3D CFD. CGNS appeared to me a good choice since I did not want to reinvent yet another format. With CGNS I also have some experience using the NASA tools to explore and access the data. From what I have learned so far, CGNS is not that widely accepted as a standard format for data transfer between CFD codes. This is probably the right moment to drop the idea of using CGNS. The only requirement for a data exchange standard is that it be widely understood and accepted. Maybe SU2 is an option.

The reason for using gmsh (surface) + engrid is that I have worked out how to obtain an Openfoam mesh this way. If there is an easier way using only engrid, all the better.

-Sebastian
sebastian610 is offline   Reply With Quote

Reply

Tags
cgns, engrid, export


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
CGNS export in Fluent Bjarne Børresen FLUENT 1 April 21, 2011 06:15
Export CGNS with CFX 10.0 Luca CFX 1 December 29, 2010 07:09
How to export cgns file from res file with only some variables? zeitistgeld CFX 0 July 14, 2010 14:59
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
export or convert gambit mesh to CGNS zaidun FLUENT 6 April 20, 2006 05:48


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