CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   It would be wonderful if a tool for FoamToTecplot is available (https://www.cfd-online.com/Forums/openfoam-post-processing/61323-would-wonderful-if-tool-foamtotecplot-available.html)

luckyluke April 8, 2005 02:41

Foam->Fluent->Tecplot doesn't
 
Foam->Fluent->Tecplot doesn't work well. Some solution field (e.g. gamma) will be lost along the conversion process.

cjwu April 8, 2005 03:16

Hi, Luckyluke, We made a
 
Hi, Luckyluke,

We made a very preliminary tool: foamToTecplot. You can download the file from

http://jslx.kmip.net/foamToTecplot-.tar.gz

and at your $HOME, use the following command to put it into the right place.

tar zxvf foamToTecplot-.tar.gz

then go to $HOME/OpenFOAM/OpenFOAM-1.1/applications/utilities/postProcessing/dataConversion /

wmake

That's all! After get into (your working dir.)/run/tutorials/icoFoam, you can use "foamToTecplot . cavity" to transform the data of the first example into tecplot format.

If you can improve it, please send me a copy.

Best,

Chui-Jie WU

cjwu April 8, 2005 03:31


 


cjwu April 8, 2005 03:36

Here is the tool. Chui-
 
Here is the tool.



Chui-Jie WU

cjwu April 8, 2005 03:41

Sorry! It is too big(203KB) to
 
Sorry! It is too big(203KB) to upload here.
Please just click on the web address in my first message to download the file.

Chui-Jie WU

henry April 8, 2005 03:56

It might be small enough if it
 
It might be small enough if it is cleared-out of binary versions. Have you run wclean in the directory before packing? Do you have more than one binary version built in there? 32 and 64bit? Check the contents of the Make directory, you should only have files and options in there if everything is cleared-out well.

cjwu April 8, 2005 04:07

OK! Now it is small enough to
 
OK! Now it is small enough to upload here.
After you download the file http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif foamToTecplot-.tar.gz
go to your $HOME, use the following command to put it into the right place.

tar zxvf foamToTecplot-.tar.gz

then go to $HOME/OpenFOAM/OpenFOAM-1.1/applications/utilities/postProcessing/dataConversion/foamToTecplot/

and input:

wmake

I compiled it under RedHat Linux 9.

Best,

CJ

luckyluke April 8, 2005 08:20

Hi,CJ. Some errors come out al
 
Hi,CJ. Some errors come out along the 'wmake' cmd (OpenFOAM-1.0).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Making dependency list for source file foamToTecplot.C
could not open file createTime.H for source file foamToTecplot.C

SOURCE_DIR=.
SOURCE=foamToTecplot.C ; g++ -m32 -Dlinux -DlinuxOpt -DscalarMachine -DoptSolvers -Wall -W -Wno-unused-parameter -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/u1/yzheng9/OpenFOAM/OpenFOAM-1.0/src/OpenFOAM/lnInclude -IlnInclude -I. -DWM_PROJECT_VERSION='"'1.0'"' -I/u1/yzheng9/OpenFOAM/OpenFOAM-1.0/src/cfdTools/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxOpt/foamToTecplot.o
foamToTecplot.C:56:27: createTime.H: No such file or directory
In file included from foamToTecplot.C:57:
/u1/yzheng9/OpenFOAM/OpenFOAM-1.0/src/OpenFOAM/lnInclude/createMesh.H: In function `int main(int, char**)':
/u1/yzheng9/OpenFOAM/OpenFOAM-1.0/src/OpenFOAM/lnInclude/createMesh.H:2: error: `runTime' undeclared (first use this function)
/u1/yzheng9/OpenFOAM/OpenFOAM-1.0/src/OpenFOAM/lnInclude/createMesh.H:2: error: (Each undeclared identifier is reported only once for each function it appears in.)
make: *** [Make/linuxOpt/foamToTecplot.o] Error 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cjwu April 8, 2005 23:24

I compiled foamToTecplot under
 
I compiled foamToTecplot under OpenFOAM1.1.
Did you input 'wmake' in the directory?

$HOME/OpenFOAM/OpenFOAM-1.1/applications/utilities/postProcessing/dataConversion /foamToTecplot/

CJ

rybakov April 18, 2005 17:19

Hallo Chui-Jie. I don't have
 
Hallo Chui-Jie.
I don't have problems with compiling. Then I try to translte result from Example icoFoam -> cavity.
In result file 2 last colomns seem like unnecessary.

Tecplot 10 can not read file. When I try to open file I recive message
Err: Err: Fe Cell 1 has bad index of 0.
Error occurred on line 621...

cjwu April 18, 2005 21:35

Hi, Dear Andrey, Thanks for
 
Hi, Dear Andrey,

Thanks for your email! Since I do not have Tecplot 10.0, I only
did the test in Tecplot 9.0 and without any problem. Did you get
something like the enclosed file? Please try the enclosed file in Tecplot
10.0. I will try to get a Tecplot 10.0 and test in it.

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif 0.5.dat.gz

What do you mean "In result file 2 last colomns seem like unnecessary."?

Best,

CJ

rybakov April 19, 2005 07:45

Hi CJ, I understand my proble
 
Hi CJ,
I understand my problem. I have started at first Ucomponents and then foamToTecplot. Therefore I recieved 3 additional columns. Wnen I delete files Ux, Uy, Uz, I have no problems with icoFoam -> cavity and converter.

But then I started to convert dieselFoam->aachenBomb
There is one small problem. At the beginning of the resulting file from foamToTecplot are only X, Y, Z, Vx, Vy, Vz, P wrote as header varialbles. When resulting directory has other variables (T, dQ, k, etc), it must be added by hands.

rybakov April 19, 2005 08:05

Right now in file writeTECfi
 
Right now in file
writeTECfile.H
string <<'VARIABLES...
must be change for every special case and then compiled. I think it is not big problem http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

jkim April 27, 2005 03:59

Hi, Chui-Jie WU, I tested you
 
Hi, Chui-Jie WU,
I tested your foamToTec file converting program.
When I ploted the cavity mesh which is in the tut dir., I found mesh was kinked.
SO I read the source file writeTecfile.H, and found that vertex numbering is not correct.
OpenFoam's vertex numbering for the hex element can be directly used for the tecplot.
That is, vertex ordering of the shapeLabels is
0, 1, 2, 3, 4, 5, 6, 7 for hex
0, 1, 2, 2, 3, 4, 5, 6 for wedge
0, 1, 2, 2, 3, 4, 5, 5 for prism
0, 1, 2, 3, 4, 4, 4, 4 for pyramid
0, 1, 2, 2, 3, 3, 3, 3 for tet

Anyone, please check which vertex ordering is correct for tecplot plotting, and post the results
Thanks.

ali April 28, 2005 11:19

Jontage, You're right. The
 
Jontage,

You're right. The shapeLabels should be changed as you mentioned. Actually, I only changed and tested the "hex" that is:

0, 1, 2, 3, 4, 5, 6, 7 for hex

and didn't change "wedge" or others. I guess for the other cases, you're right too.

PS: Don't you think this is the correct order for wedge?

0, 1, 2, 0, 3, 4, 5, 6 for wedge

hartinger May 13, 2005 12:53

Hallo, I changed the vertex
 
Hallo,

I changed the vertex ordering as proposed by Jongtae Kim and made the 'VARIABLES...' declaration in writeTECfile.H automatically. I tested it for my hex-mesh and the pitzDaily test-case and worked fine. The code is attached.
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif foamToTecplot.tar.gz

markus

cjwu June 9, 2005 00:00

Hi, Jongtae, Ali and Markus,
 
Hi, Jongtae, Ali and Markus,

Thanks a lot for pointing out the error. I tested the code by Markus, and it works fine.

CJ

ali September 9, 2005 14:43

I guess this "foamToTecplot" s
 
I guess this "foamToTecplot" still has some shortcomings. If you refine mesh at some cells using "refineMesh", "foamToTecplot" gives error. It doesn't convert to Tecoplot data, while for example, "foamToFieldview" easily converts it into Fieldview. Any ideas?

--> FOAM FATAL ERROR : Wrong number of vertices in cell
expected 4,5,6,7 or 8, found 0

Function: foamToTecplot
in file: writeTECfile.H at line: 96.

FOAM aborting

Aborted

mattijs September 12, 2005 04:38

My guess is that you have poly
 
My guess is that you have polyhedral cells. These cannot be handled by Tecplot so would need to be decomposed by the converter and this probably isn't being done.

francois September 22, 2005 09:57

Hi all, I've just dowload f
 
Hi all,

I've just dowload foamToTecplot.tar.gz and try to build it in my ~/OpenFOAM/beaubert-1.2/applications/

I make a tar zxvf foamToTecplot.tar.gz and in the foamToTecplot directory I make a wmake but I got the following errors:

wmake
make: Nothing to be done for `allFiles'.
make: `Make/tru64GccOpt/dependencies' is up to date.

SOURCE_DIR=.
SOURCE=foamToTecplot.C ; g++ -DFOAM_EXCEPTION -Dtru64 -Dtru64GccOpt -DscalarMachine -DoptSolvers -Wall -O2 -fno-schedule-insns -DNoRepository -ftemplate-depth-30 -I/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/cfdTools/lnInclude -I/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/tru64GccOpt/foamToTecplot.o
foamToTecplot.C:30:19: error: fvCFD.H: No such file or directory
foamToTecplot.C:38: error: expected initializer before '<' token
foamToTecplot.C: In function 'int main(int, char**)':
foamToTecplot.C:42: error: 'argList' has not been declared
foamToTecplot.C:42: error: 'noParallel' was not declared in this scope
foamToTecplot.C:44: error: 'label' does not name a type
foamToTecplot.C:45: error: 'word' does not name a type
foamToTecplot.C:55: error: 'dynWordList' was not declared in this scope
foamToTecplot.C:55: error: expected `;' before 'headerNames'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/addConstantOption.H :1: error: 'argList' has not been declared
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/addConstantOption.H :1: error: 'validOptions' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/addConstantOption.H :2: error: 'argList' has not been declared
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/addTimeOption.H:1: error: 'argList' has not been declared
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/addLatestTimeOption .H:1: error: 'argList' has not been declared
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/setRootCase.H:1: error: 'argList' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/setRootCase.H:1: error: expected `;' before 'args'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/setRootCase.H:3: error: 'args' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/setRootCase.H:5: error: 'FatalError' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createTime.H:1: error: 'Info' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createTime.H:1: error: 'endl' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createTime.H:6: error: 'args' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createMesh.H:2: error: 'nl' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createMesh.H:4: error: 'fvMesh' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createMesh.H:4: error: expected `;' before 'mesh'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/createMesh.H:15: error: 'mesh' was not declared in this scope
foamToTecplot.C:63: error: 'pointMesh' was not declared in this scope
foamToTecplot.C:63: error: expected `;' before 'pMesh'
foamToTecplot.C:64: error: 'volPointInterpolation' was not declared in this scope
foamToTecplot.C:64: error: expected `;' before 'pInterp'
foamToTecplot.C:73: error: 'fileName' was not declared in this scope
foamToTecplot.C:73: error: expected `;' before 'dxDataPath'
foamToTecplot.C:74: error: 'dxDataPath' was not declared in this scope
foamToTecplot.C:74: error: 'mkDir' was not declared in this scope
foamToTecplot.C:76: error: expected `;' before 'dxDataFile'
foamToTecplot.C:77: error: 'OFstream' was not declared in this scope
foamToTecplot.C:77: error: expected `;' before 'timeOut'
foamToTecplot.C:80: error: 'label' was not declared in this scope
foamToTecplot.C:80: error: expected `;' before 'memberNumber'
foamToTecplot.C:83: error: 'instantList' was not declared in this scope
foamToTecplot.C:83: error: expected `;' before 'Times'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOptions.H: 1: error: expected `;' before 'startTime'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOptions.H: 2: error: expected `;' before 'endTime'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkConstantOption .H:3: error: 'startTime' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:3 : error: 'scalar' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:3 : error: expected `;' before 'time'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:6 : error: expected `;' before 'nearestDiff'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:8 : error: 'Times' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:1 2: error: expected `;' before 'diff'
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:1 3: error: 'diff' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:1 3: error: 'nearestDiff' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:2 0: error: 'startTime' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkTimeOption.H:2 1: error: 'endTime' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkLatestTimeOpti on.H:3: error: 'startTime' was not declared in this scope
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/checkLatestTimeOpti on.H:3: error: 'Times' was not declared in this scope
foamToTecplot.C:88: error: expected `;' before 'i'
foamToTecplot.C:88: error: name lookup of 'i' changed for new ISO 'for' scoping
foamToTecplot.C:67: error: using obsolete binding at 'i'
foamToTecplot.C:88: error: 'endTime' was not declared in this scope
foamToTecplot.C:91: error: 'startTime' was not declared in this scope
foamToTecplot.C:98: error: 'Times' was not declared in this scope
foamToTecplot.C:102: error: 'IOobjectList' was not declared in this scope
foamToTecplot.C:102: error: expected `;' before 'objects'
foamToTecplot.C:106: error: expected `;' before 'dxDataFile'
foamToTecplot.C:107: error: expected `;' before 'dataOut'
writeDXgrid.H:2: error: expected initializer before '&' token
writeDXgrid.H:4: error: 'points' was not declared in this scope
writeDXgrid.H:11: error: 'headerNames' was not declared in this scope
writeDXdata.H:3: error: 'SLList' was not declared in this scope
writeDXdata.H:3: error: 'word' was not declared in this scope
writeDXdata.H:3: error: 'validFields' was not declared in this scope
writeDXdata.H:5: error: expected `;' before 'i'
writeDXdata.H:5: error: 'nTypes' was not declared in this scope
writeDXdata.H:7: error: 'wordList' was not declared in this scope
writeDXdata.H:7: error: expected `;' before 'fieldNames'
writeDXdata.H:9: error: expected `;' before 'j'
writeDXdata.H:9: error: 'j' was not declared in this scope
writeDXdata.H:9: error: 'fieldNames' was not declared in this scope
writeDXdata.H:11: error: expected `;' before 'fieldName'
writeDXdata.H:13: error: 'IOobject' was not declared in this scope
writeDXdata.H:13: error: expected `;' before 'fieldObject'
writeDXdata.H:22: error: 'fieldObject' was not declared in this scope
writeDXdata.H:27: error: 'volScalarField' has not been declared
writeDXdata.H:27: error: 'typeName' was not declared in this scope
writeDXdata.H:30: error: 'fieldName' was not declared in this scope
writeDXdata.H:32: error: 'volScalarField' was not declared in this scope
writeDXdata.H:32: error: expected `;' before 'DXScalarField'
writeDXdata.H:34: error: 'pointScalarField' was not declared in this scope
writeDXdata.H:34: error: expected `;' before 'tmp'
writeDXdata.H:39: error: 'tmp' was not declared in this scope
writeDXdata.H:44: error: 'headerNames' was not declared in this scope
writeDXdata.H:49: error: 'volVectorField' has not been declared
writeDXdata.H:52: error: 'fieldName' was not declared in this scope
writeDXdata.H:54: error: 'volVectorField' was not declared in this scope
writeDXdata.H:54: error: expected `;' before 'DXVectorField'
writeDXdata.H:56: error: 'pointVectorField' was not declared in this scope
writeDXdata.H:56: error: expected `;' before 'tmp'
writeDXdata.H:61: error: 'tmp' was not declared in this scope
writeDXdata.H:68: error: 'headerNames' was not declared in this scope
writeDXseries.H:2: error: 'memberNumber' was not declared in this scope
writeDXseries.H:4: error: 'timeOut' was not declared in this scope
writeDXseries.H:9: error: 'timeOut' was not declared in this scope
writeDXseries.H:10: error: 'memberNumber' was not declared in this scope
writeTECfile.H:2: error: expected initializer before '&' token
writeTECfile.H:3: error: expected initializer before '&' token
writeTECfile.H:5: error: 'dataOut' was not declared in this scope
writeTECfile.H:9: error: 'headerNames' was not declared in this scope
writeTECfile.H:19: error: 'points' was not declared in this scope
writeTECfile.H:24: error: 'tab' was not declared in this scope
writeTECfile.H:29: error: 'cells' was not declared in this scope
writeTECfile.H:31: error: expected initializer before '&' token
writeTECfile.H:33: error: 'shapeLabels' was not declared in this scope
writeTECfile.H:37: error: 'tab' was not declared in this scope
writeTECfile.H:96: error: 'FatalError' was not declared in this scope
/data2/beaubert/usr/local/lib/gcc/alphaev7-dec-osf5.1b/4.0.1/include/stdlib.h:22 8: error: too many arguments to function 'void abort()'
writeTECfile.H:99: error: at this point in file
foamToTecplot.C:114: error: 'headerNames' was not declared in this scope
make: *** [Make/tru64GccOpt/foamToTecplot.o] Error 1



A find ~/OpenFOAM/OpenFOAM-1.2 -name fvCFD.H give me :

/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/lnInclude/fvCFD.H
/data2/beaubert/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/include/fvCFD.H

What's wrong with my configuration ?


All times are GMT -4. The time now is 09:17.