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

foamToCGNS and cgnsToFoam for OpenFOAM-2.1.1

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By glasenapp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2013, 03:44
Default foamToCGNS and cgnsToFoam for OpenFOAM-2.1.1
  #1
New Member
 
Tobias Glasenapp
Join Date: Mar 2013
Location: Karlsruhe, Germany
Posts: 4
Rep Power: 13
glasenapp is on a distinguished road
Hello foamers,

since there have been questions on how to compile the converters foamToCGNS and cgnsToFoam for the current OpenFOAM versions, I made a list of what needs to be changed in order to use them for OpenFOAM-2.1.1:

foamToCGNS

edit Turbomachinery/applications/utilities/postProcessing/dataConversion/foamToCGNS/ foamToCGNS.C:

line 161 old: volPointInterpolation pInterp(mesh, pMesh);
new: volPointInterpolation pInterp(mesh);

edit Turbomachinery/applications/utilities/postProcessing/dataConversion/foamToCGNS/ Make/options
change order of „RAS“ and „incompressible“

line 15 old: -I$(WM_PROJECT_DIR)/src/turbulenceModels/RAS/incompressible/lnInclude \
new: -I$(WM_PROJECT_DIR)/src/turbulenceModels/incompressible/RAS/lnInclude \


cgnsToFoam

go to Turbomachinery/applications/utilities/mesh/conversion/cgnsToFoam

edit CGNSBoundaryConditions.C:

line 244 old: Foam::FatalErrorIn("CGNSBoundaryConditions::addBou ndaryPatch")
new: FatalErrorIn("CGNSBoundaryConditions::addBoundaryPatch")
line 818 old: return Foam::mathematicalConstant:i*degree/180.0;
new: return Foam::constant::mathematical:i*degree/180.0;
line 1029 old: Foam::FatalErrorIn("computeMatchingCyclicFaces")
new: FatalErrorIn("computeMatchingCyclicFaces")
lines 1177/1178 old: patchPhysicalTypes
new: patchPhysicalTypes,
true

general

edit Turbomachinery/src/cgnstools_2.5/Allwmake
line 27
old: make TKLIBS="-L/usr/lib64 -ltcl8.4 -ltk8.4" TKOGLXLIB="-L/usr/X11R6/lib64 -lXmu -lXext"
new: make TKLIBS="-L/usr/lib64 -ltcl8.4 -ltk8.4" TKOGLXLIB="-L/usr/X11R6/lib64 -lXmu -lXext" TKINCS="-I/usr/include/tcl"

copy /src/finiteVolume/interpolation/pointVolInterpolation folder from OF-1.5-dev or OF-1.6-ext to current version and coyp links of files to the lnInclude directory

compilation
ignore errors „could not open file structure_t.H“, „could not open file cgnsmll.H“ and „could not open file checkerror.H“

Cheers,
Tobias
cosimobianchini likes this.
glasenapp is offline   Reply With Quote

Old   August 12, 2013, 08:00
Default cgnsToFoam: command not found
  #2
New Member
 
Akash Sharma
Join Date: May 2013
Location: Paris
Posts: 15
Rep Power: 12
akashjangid is on a distinguished road
Hello,

I have a mesh in cgns format and i am using OpenFOAM-2.1.1. I did the changes as told by glasenapp, but its still showing error

ln: creating symbolic link `mesh.cgns': File exists
./Allrun: line 10: cgnsToFoam: command not found
Running simpleFoam...
Done.

Any suggestions? Thanks a lot in advance for your help!

akashjangid is offline   Reply With Quote

Old   February 22, 2014, 02:59
Default foamToCGNS and cgnsToFoam for OpenFOAM-2.3.0
  #3
New Member
 
Bruno Eckmann
Join Date: Jul 2012
Posts: 1
Rep Power: 0
broinel is on a distinguished road
Hello everyone!

I've been trying the last day to set up the cgns-tools with OF 2.3.0.
Here my experience and progress so far: as i usually not working on linux i post also some beginner stuff.

This is what finally made it (very close) to work:

1. Do the steps described by glasenapp.
- Note: Some of the steps are already included in the recent CGNS version
- Note: the lnInclude directory you'll find in your OpenFoam directory /src/finiteVolume/lnInclude. You can create links with (make sure you're SU):
Code:
ln -s /opt/openfoam230/src/finiteVolume/interpolation/pointVolInterpolation/* /opt/openfoam230/src/finiteVolume/lnInclude/
2. run Allwmake in your /TurboMachinery/src directory. I had to install the following to things:
- apt-get install automake
- apt-get install libtool


3. run Allwmake in your /TurboMachinery/applications directory

After that i can now use the cgnsToFoam (Test-Case 1) was ok!

I get an error in test case 2: "FOAM FATA ERROR: More than six unsigned transforms detected: ...."

"From function void Foam::globalIndexAndTransform:determineTransforms( ) ..."

any suggestions?

regards
B
broinel is offline   Reply With Quote

Old   April 7, 2014, 14:07
Default
  #4
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Hi There,
I tried to compile cgns in OF-2.1.1 (standard Version not extended version), and I downloaded the OF-1.6.1-ext, then copied the pointVolInterpolation to the current version.

Then I have given link

siva@siva001:~$
ln -s /opt/openfoam211/src/finiteVolume/interpolation/pointVolInterpolation/* /opt/openfoam211/src/finiteVolume/lnInclude
Then I executed ./Allwmake at turbomachinery/src

I am getting the following message:

See config.h for further configuration information.
------------------------------------------------------------------------
+ make
cd . && aclocal -I config
/bin/bash: aclocal: command not found
make: *** [aclocal.m4] Error 127
+ make install
cd . && aclocal -I config
/bin/bash: aclocal: command not found
make: *** [aclocal.m4] Error 127
+ popd
~/OpenFOAM/OF-2.1.1/TurboMachinery/src



I am not sure what I am doing,


Can any tell me what to do?


when I try to run cgnsToFoam, I am getting output "command not found",


Thanks,


Siva

Last edited by sivakumar; April 8, 2014 at 03:41.
sivakumar is offline   Reply With Quote

Old   April 8, 2014, 07:10
Default
  #5
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Problem solved
sivakumar is offline   Reply With Quote

Old   August 24, 2015, 09:17
Default
  #6
New Member
 
Fernando Soares Alves
Join Date: Oct 2013
Posts: 16
Rep Power: 12
FernandoSoares is on a distinguished road
Hi Sivakumar,

would you mind sharing how you solved that issue? I'm also trying to compile it here and I'm getting the same error messages. I've already followed the steps mentioned by Tobias in the beginning of this post.

Many thanks in advance,

F. Soares
FernandoSoares is offline   Reply With Quote

Old   November 11, 2015, 22:54
Default
  #7
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
Hello! Fernando

try these

apt-get install automake
apt-get install libtool
hamcer is offline   Reply With Quote

Old   December 5, 2016, 22:49
Default
  #8
Member
 
Janry
Join Date: Oct 2015
Posts: 46
Rep Power: 10
qjh888 is on a distinguished road
Hi foamers,

I want to compile the foamToCgns coverters into foam extend 3.0,
Any suggestions?

Thanks,
Janry
qjh888 is offline   Reply With Quote

Reply

Tags
cgnstofoam, foamtocgns


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] cgnsToFoam error when converting ICEM mesh glasenapp OpenFOAM Meshing & Mesh Conversion 5 October 13, 2016 22:37


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