CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   foamToCGNS and cgnsToFoam for OpenFOAM-2.1.1 (http://www.cfd-online.com/Forums/openfoam-programming-development/121114-foamtocgns-cgnstofoam-openfoam-2-1-1-a.html)

glasenapp July 22, 2013 03:44

foamToCGNS and cgnsToFoam for OpenFOAM-2.1.1
 
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::pi*degree/180.0;
new: return Foam::constant::mathematical::pi*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

akashjangid August 12, 2013 08:00

cgnsToFoam: command not found
 
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!


broinel February 22, 2014 03:59

foamToCGNS and cgnsToFoam for OpenFOAM-2.3.0
 
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

sivakumar April 7, 2014 14:07

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

sivakumar April 8, 2014 07:10

Problem solved


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