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

CGNS converters available

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree6Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 22, 2009, 14:59
Default
  #81
Member
 
hamdi
Join Date: Mar 2009
Posts: 72
Rep Power: 8
hamcer is on a distinguished road
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.
hamcer is offline   Reply With Quote

Old   June 22, 2009, 15:03
Default
  #82
Member
 
hamdi
Join Date: Mar 2009
Posts: 72
Rep Power: 8
hamcer is on a distinguished road
hi,
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.
hamcer is offline   Reply With Quote

Old   June 24, 2009, 04:43
Default 2D-Meshes
  #83
New Member
 
Join Date: Apr 2009
Posts: 17
Rep Power: 8
walex is on a distinguished road
hi everybody,

Maybe this info is useful for people dealing with 2D Meshes.
I converted a 2D Mesh and after the conversion the mesh is extruded in z-direction, which is ok as Openfoam doesnt work with "real" 2D meshes. But the extrusion is much too high as it is set automatically to 1. This causes cells with a high aspect ratio, which leads to strange results. I solved the problem by modifying the point file manually and then using checkMesh to check if the mesh is ok with the reduced extrusion. Maybe somebody has a better and more comfortable idea?

Regards
Alex
walex is offline   Reply With Quote

Old   August 13, 2009, 01:52
Default
  #84
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 10
braennstroem is on a distinguished road
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
braennstroem is offline   Reply With Quote

Old   October 22, 2009, 04:31
Default
  #85
Member
 
hamdi
Join Date: Mar 2009
Posts: 72
Rep Power: 8
hamcer is on a distinguished road
hello,*
I tried to install cgns converter in OF-1.6 but without success using the web page:
http://openfoamwiki.net/index.ph/Sig...GNS_Converters
is there a solution for this?

thanks in advance.
hamcer is offline   Reply With Quote

Old   October 22, 2009, 09:57
Default
  #86
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Hello,

Our group has developed and contributed the source code for the CGNS converters.

We are not using version 1.6 yet, so basically we have not contributed any adjustments to the CGNS converters source code for that release.

One solution for you is to keep on working on the source code in order to make it run. That's the beauty of the Open Source concept.

Regards,

Martin
Quote:
Originally Posted by hamcer View Post
hello,*
I tried to install cgns converter in OF-1.6 but without success using the web page:
http://openfoamwiki.net/index.ph/Sig...GNS_Converters
is there a solution for this?

thanks in advance.
mbeaudoin is offline   Reply With Quote

Old   November 26, 2009, 12:11
Default bug in base.C in libcgnsoo_3.0 librairies ?
  #87
New Member
 
Julien Christophe
Join Date: Nov 2009
Posts: 4
Rep Power: 7
christju is on a distinguished road
Hello,
I'm actually implementing some functions writing in CGNS format from OpenFoam in order to have identical file structure than the files used as input in VLab (Acoustic BEM solver)...

To do so, I have to write informations about "time step" or "actual time"... This is done using :

CGNSOO::BaseIterativeData_t Base_it = cgnsBase.writeBaseIterativeData( "TimeIterValues", nsteps );
Base_it.writeDataArray("TimeValues", time );
Base_it.writeDataArray("IterationValues", it );

I have the following error when I'm running my function :
terminate called after throwing an instance of 'CGNSOO::cgns_exception'
what(): CGNS error in node::go_here while calling cg_goto
can't go to label 'ZoneIterativeData_t' under 'CGNSBase_t'
Aborted

To solve the problem, I changed in the file base.C of the libcgnsoo librairies the following line in the last function (BaseIterativeData_t Base_t::writeBaseIterativeData( const string& name, int nsteps )) :

return BaseIterativeData_t(push("ZoneIterativeData_t",1)) ;
to :
return BaseIterativeData_t(push("BaseIterativeData_t",1)) ;

Is it a bug in the librairies? or am I using the functions in a wrong way and this was not a bug??

If it's not a bug, how to do :

cg_biter_write(index_file,index_base,"TimeIterValu es",nsteps);
cg_goto(index_file,index_base,"BaseIterativeData_t ",1,"end");
cg_array_write("TimeValues",RealDouble,1,&nb,&time );
cg_array_write("IterationValues",Integer,1,&nb,&it );

using the functions of the libcgnsoo??

Thank you in advance for you answer,
Julien
christju is offline   Reply With Quote

Old   November 26, 2009, 15:31
Default
  #88
New Member
 
Robert Magnan
Join Date: Mar 2009
Location: Varennes, Quebec, Canada
Posts: 4
Rep Power: 8
rmagnan is on a distinguished road
You're right Julien,

It is definitely a bug and your solution looks right. This is one area of libcgnsoo that was never used nor tested...

Are you calling this from within cgnsToFoam or are you calling the library from your own code?

-Robert
rmagnan is offline   Reply With Quote

Old   November 26, 2009, 15:57
Default
  #89
New Member
 
Julien Christophe
Join Date: Nov 2009
Posts: 4
Rep Power: 7
christju is on a distinguished road
I'm using it in my own code... that is in fact quite similar to the foamToCGNS utility. I just simplify it because I just need the surface pressure on the walls but also some extra informations like the face areas and the face normals...

Thank you for the answer

Julien
christju is offline   Reply With Quote

Old   November 30, 2009, 04:34
Default
  #90
New Member
 
Julien Christophe
Join Date: Nov 2009
Posts: 4
Rep Power: 7
christju is on a distinguished road
I have an other problem concerning the element type....
I have a mesh that I created myself, so I know there are only HEXA_8 elements. But using the foamToCGNS function, I have always MIXED type....
I think there is a problem in the writeCGNS.H function when the element type is checked on all the cells. A loop is done on the cells :

bool first_time = true;;
forAll(cells, celli)
{
int nVerticesFirstCell = 0;
if( first_time )
{
first_time = false;
nVerticesFirstCell = cells[celli].size(); // Type of first cell

// check the type of the first cell (I remove the code for this post)

}
else if(nVerticesFirstCell != cells[celli].size()) // Is the next one different
{
element_type = CGNSOO::MIXED;
s_element_type = "MIXED";
break;
}
}

The nVerticicesFirstCell variable is (re)set to zero in the cell loop... so the elseif is always true and then the element type is always MIXED....
I think the " int nVerticesFirstCell = 0;" should be out of the cell loop right?

I hope it helps,
Julien
christju is offline   Reply With Quote

Old   January 13, 2010, 16:17
Default
  #91
New Member
 
Join Date: Jan 2010
Posts: 1
Rep Power: 0
turboserge is on a distinguished road
Hello Everyone,
I have been working recently with OpenFOAM. I use OpenFOAM-1.6. And the time I try to compile CGNS-Converter. However, with little success. When you run Allwmake in the folder /Turbomachnery/src I get the following message:


user@linux-3knl:~/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src> ./Allwmake
+ wmake libso OpenFoamTurbo
Making dependency list for source file finiteVolume/cfdTools/general/SRFZones/SRFZone.C
SOURCE=finiteVolume/cfdTools/general/SRFZones/SRFZone.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/user/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home//OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/SRFZone.o
finiteVolume/cfdTools/general/SRFZones/SRFZone.C: In member function ‘void Foam::SRFZone::addCoriolis(Foam::fvVectorMatrix&) const’:
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:97: error: request for member ‘db’ is ambiguous
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: candidates are: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:97: error: expected primary-expression before ‘>’ token
finiteVolume/cfdTools/general/SRFZones/SRFZone.C: In member function ‘void Foam::SRFZone::addCentrifugal(Foam::fvScalarMatrix &) const’:
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:122: error: request for member ‘db’ is ambiguous
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: candidates are: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:122: error: expected primary-expression before ‘>’ token
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:135: error: request for member ‘db’ is ambiguous
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: candidates are: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:135: error: expected primary-expression before ‘>’ token
finiteVolume/cfdTools/general/SRFZones/SRFZone.C: In member function ‘void Foam::SRFZone::addSu(Foam::fvVectorMatrix&) const’:
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:171: error: request for member ‘db’ is ambiguous
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: candidates are: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
/home/user/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam:bjectRegistry& Foam::IOobject::db() const
finiteVolume/cfdTools/general/SRFZones/SRFZone.C:171: error: expected primary-expression before ‘>’ token
make: *** [Make/linux64GccDPOpt/SRFZone.o] Fehler 1
++ pwd
+ CGNSLIBHOME=/home/user/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src/cgnslib_2.5
+ '[' -e /home/user/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src/cgnslib_2.5 -a '!' -r /home/user/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src/cgnslib_2.5/platforms/linux64GccDPOpt/lib/libcgns_2.5.a ']'
++ pwd
+ LIBCGNSOOHOME=/home/user/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src/libcgnsoo_3.0
+ '[' -e /home/user/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src/libcgnsoo_3.0 -a '!' -r /home/user/OpenFOAM/OpenFOAM-1.6/TurboMachinery/src/libcgnsoo_3.0/platforms/linux64GccDPOpt/lib/libcgnsoo3.a ']'






The first problem apparently is the function db (). Probably defined differently than in OF1.5. Maybe someone can give me a hint. Or tell me what function db () is and where it is defined.

I would be grateful for any help.


Greeting Turboserge
turboserge is offline   Reply With Quote

Old   February 10, 2010, 17:11
Default
  #92
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Hey, I got the cgnsToFoam converter to work with OpenFOAM 1.6.x and ubuntu 9.10. First of all, to compile the libs I had to install libtools from the repository. Then I needed to make a minor change to the code to get cgnsToFoam to work (see below). I have to admit I don't really know what I'm doing, but since the Xfer object just seems to be there for transfer purposes I thought the damage I could do is small, and it seems to work as the cgnsToFoam test case ran without errors. I'll see if I can get foamToCGNS to work with 1.6 as well.

In file CGNSBoundaryConditions.C:
Code:
Foam::polyMesh* CGNSBoundaryConditions::buildFoamMesh( const Foam::Time& t ) const
{
    //int n = patchFaces.size();
    if ( debug_ )
    {
        Foam::Info << "Patches:\n";
        forAll( patchNames, i )
        {
            Foam::Info << "\tPatch " << i << " named " << patchNames[i] 
                << ", type = " << patchTypes[i] << "/" << patchPhysicalTypes[i] 
                << Foam::endl;
        }
    }
    Foam::word defaultPatchName = "defaultWall";
    Foam::word defaultPatchType = Foam::wallPolyPatch::typeName;
    return new Foam::polyMesh(
        Foam::IOobject
        (
            Foam::polyMesh::defaultRegion,
            t.constant(),
            t
        ),
        Foam::Xfer<Foam::Field<Foam::Vector<double> > >(mapper.getPoints()),
        mapper.getCells(),
        patchFaces,
        patchNames,
        patchTypes,
        defaultPatchName,
        defaultPatchType,
        patchPhysicalTypes,
        true
    );
}
akidess is offline   Reply With Quote

Old   February 10, 2010, 18:55
Default
  #93
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Quote:
Originally Posted by DSpreitz View Post
Hey Hamdi,

Did you ever succeed in installing the CGNS tools under Ubuntu?
You did stop trying or did you find a solution? If so, could you please share your solution? I am stuck on the same problem.

Regards

Dominic
I just got it to work. The answer is right there, but I missed it myself for quite a while! Edit the Allwmake file to include settings for TKINCS:

make TKLIBS="-L/usr/lib64 -ltcl8.4 -ltk8.4" TKOGLXLIB="-L/usr/X11R6/lib64 -lXmu -lXext" TKINCS="-I/usr/include/tcl"
akidess is offline   Reply With Quote

Old   February 10, 2010, 19:07
Default
  #94
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Ok, so to make foamToCGNS compatible with 1.6, first the make options have to be modified to account for the new directory structure:
-I$(WM_PROJECT_DIR)/src/turbulenceModels/incompressible/RAS/lnInclude

(incompressible and RAS switched positions).

Then, in file foamToCGNS.C, line 161:
volPointInterpolation pInterp(mesh);

In 1.6, volPointInterpolation just takes one argument, an fvMesh. So it looks like we don't need to make a pointMesh any more. I used the test2 test-case and had a look at the resulting .cgns file with the cgnstools, and it seems to be alright. Of course it would be better if someone had a look at it in a proper post-processing tool as I was just looking for absolutely obvious misbehavior.
astein likes this.
akidess is offline   Reply With Quote

Old   February 13, 2010, 06:20
Default
  #95
Member
 
hamdi
Join Date: Mar 2009
Posts: 72
Rep Power: 8
hamcer is on a distinguished road
hi! akidess,

I m still under OF-1.5 to use cgnsToFoam, but I w'd like use't under OF-1.6 also.
Hence I do the modifications what you have done but, without suces:
My system is ubuntu-9.10 32 bit:
since I use 32 bit I made modification in Allwmake as follow:

make TKLIBS="-L/usr/lib -ltcl8.4 -ltk8.4" TKOGLXLIB="-L/usr/X11R6/lib -lXmu -lXext"TKINCS="-I/usr/include/tcl"
and i done your line
make TKLIBS="-L/usr/lib64 -ltcl8.4 -ltk8.4" TKOGLXLIB="-L/usr/X11R6/lib64 -lXmu -lXext"TKINCS="-I/usr/include/tcl"
and for both lignes i have:
cgnsToFoam : commande not found
hamcer is offline   Reply With Quote

Old   February 13, 2010, 09:45
Default
  #96
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Hamdi, you are not giving me a lot to work with here.. Were you able to compile the converters? Were there any errors when you executed the make-command? If not, the problem might be that the utility binaries are not in your $PATH.
akidess is offline   Reply With Quote

Old   February 15, 2010, 17:18
Default cgns
  #97
Member
 
hamdi
Join Date: Mar 2009
Posts: 72
Rep Power: 8
hamcer is on a distinguished road
hello akidess ;
see attached file;
regards.
hamcer is offline   Reply With Quote

Old   February 17, 2010, 18:28
Default
  #98
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
There is no file attached to your latest post.
akidess is offline   Reply With Quote

Old   February 18, 2010, 17:26
Default
  #99
Member
 
hamdi
Join Date: Mar 2009
Posts: 72
Rep Power: 8
hamcer is on a distinguished road
hello,
sorry for this mistake,

the link is here:
http://www.sendspace.com/file/ug0fpm

hope it helps.
hamcer is offline   Reply With Quote

Old   February 22, 2010, 09:29
Default
  #100
Member
 
Nick Gardiner
Join Date: Apr 2009
Location: Chichester, UK
Posts: 93
Rep Power: 8
NickG is on a distinguished road
Hi

Am having the following error when running ./Allwmake in src:

cgnsoo.H:383: error: ‘range’ is not a type

OpenFoamTurbo compiles as does cgnslib...

Any solutions?

Thanks
NickG is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CGNS Prateek CFX 3 September 22, 2008 05:58
CGNS help vipin Main CFD Forum 1 June 28, 2008 09:59
CGNS help vipin CFX 0 June 6, 2008 03:01
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 01:34
CGNS Steven Beale Phoenics 1 September 14, 2002 05:41


All times are GMT -4. The time now is 06:07.