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/)
-   -   foamToTecplot 360 with OpenFoam v221 (https://www.cfd-online.com/Forums/openfoam-post-processing/121843-foamtotecplot-360-openfoam-v221.html)

eRzBeNgEl August 6, 2013 10:05

foamToTecplot 360 with OpenFoam v221
 
Hi guys,

i cannot use foamToTecplot 360 with OF v221 on Ubuntu. I tried to compile like in this thread here:
http://www.cfd-online.com/Forums/ope...ecplot360.html


but it did not worked cause of wrong versions, no download files, eg.!


Can u please help me?


Thanks a lot

wiedangel February 28, 2014 08:45

Hi,

I think there is no converter anymore as now there is a loader in tecplot which can directly read openfoam cases.

Regards

wyldckat March 1, 2014 05:12

Greetings to all!

Just for clarity on this topic:
  1. The current versions of Tecplot 360 are indeed able to load OpenFOAM cases directly.
  2. OpenFOAM 2.3 still carries the source code for compiling foamToTecplot360, but OpenFOAM 2.2 was the last major version that had building scripts in the "ThirdParty" folder for building "tecio".
  3. Even though Tecplot 360 has a built-in case reader for OpenFOAM, it seems that in some cases the foamToTecplot360 utility is able to provide some information that the built-in reader is unable to process. For this reason, I created some time ago this repository:https://github.com/wyldckat/localFoamToTecplot360 - it provides instructions on how to build this utility on any OpenFOAM installation, for personal use.
  4. edit: There is a wiki page that already explains all of this, since 21st of September, 2013 ;): http://openfoamwiki.net/index.php/FoamToTecplot360
Best regards,
Bruno

123 April 2, 2014 08:35

hello guys!

Bruno, sorry for my question. I am just a beginner in OpenFOAM.
Could you please explain step by step how to install foamToTecplot into the OpenFOAM 2.3.0.?

I have tried to use your link https://github.com/wyldckat/localFoamToTecplot360. But it was expected that it doesn't work.

wyldckat April 5, 2014 20:12

Quote:

Originally Posted by 123 (Post 483439)
Bruno, sorry for my question. I am just a beginner in OpenFOAM.
Could you please explain step by step how to install foamToTecplot into the OpenFOAM 2.3.0.?

I have tried to use your link https://github.com/wyldckat/localFoamToTecplot360. But it was expected that it doesn't work.

Quick answer: I've added the branch for OpenFOAM 2.3. Instructions have been updated.
The reason for the problem: They've changed the options in wmake, which is why Allwmake in my repository stopped working as intended :(

123 April 10, 2014 13:58

Quote:

Quick answer: I've added the branch for OpenFOAM 2.3. Instructions have been updated.
The reason for the problem: They've changed the options in wmake, which is why Allwmake in my repository stopped working as intended :(
thanx man! it works now.

Rophys September 23, 2014 11:03

How to use Tecplot to visualise surface values
 
Hi all,

After using the command foamToTecplot360 it creates to main main files, one corresponds to the grid and other one corresponds to the final results of the simulation (latest time step).

I am able to load both files using Tecplot; however, I want to "exclude" the computational mesh and just visualise the values at surface, i.e., temperature, heat transfer, etc.

I tried to change the surface at the zone styles, but I received the message "One or more selected zones are not IJK-ordered and will not be affected by the selected change".

Any idea in how it is possible to visualise just the surface values ?

Thanks :D

wyldckat September 28, 2014 15:59

Greetings Rophys,

Sorry, I have no idea, because I don't have Tecplot. Have you tried using the internal read that Tecplot has? For more instructions, see: http://www.cfd-online.com/Forums/ope...tml#post493214 post #36

Beyond that, you might want to ask this in the Tecplot forum: http://www.cfd-online.com/Forums/tecplot/

Best regards,
Bruno

Rophys October 16, 2014 13:49

Export surface values
 
Hi all,

There is any option that I can use together with foamToTecplot360 command to export just the surface data (pressure, heat flux, etc) and exclude the volume mesh?

Many thanks

wyldckat October 18, 2014 14:19

Greetings Rophys,
Quote:

Originally Posted by Rophys (Post 514691)
There is any option that I can use together with foamToTecplot360 command to export just the surface data (pressure, heat flux, etc) and exclude the volume mesh?

In theory, you can modify the source code for foamToTecplot360 to not export the volume mesh. The problem is: will Tecplot recognize such kind of data properly?

Best regards,
Bruno

Rophys January 23, 2015 13:02

Hi Bruno, thanks for your response. I totally forgot to say that I solved the problem. To extract the surface properties we just need to used the commands available in this website: http://openfoamwiki.net/index.php/FoamToTecplot360

Another question. I've installed the OpenFOAM 2.3 in my laptop, however the foamToTecplot360 instalation (as you described at: https://github.com/wyldckat/localFoamToTecplot360) is not working properly.

When I run the command ./Allwmake I got the following message:
Code:

Press Enter to continue...

+ [ ! -e tecio/tecsrc/Make ]
+ ln -s ../../tecioMake tecio/tecsrc/Make
ln: failed to create symbolic link `tecio/tecsrc/Make': No such file or directory
+ wmake libso tecio/tecsrc/
wmake error: could not change to directory 'tecio/tecsrc/'
+ wmake foamToTecplot360
Making dependency list for source file tecplotWriter.C
could not open file TECIO.h for source file tecplotWriter.C due to No such file or directory
could not open file MASTER.h for source file tecplotWriter.C due to No such file or directory
could not open file GLOBAL.h for source file tecplotWriter.C due to No such file or directory
Making dependency list for source file vtkMesh.C
Making dependency list for source file foamToTecplot360.C
could not open file TECIO.h for source file foamToTecplot360.C due to No such file or directory
could not open file MASTER.h for source file foamToTecplot360.C due to No such file or directory
could not open file GLOBAL.h for source file foamToTecplot360.C due to No such file or directory
SOURCE=tecplotWriter.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I -I/opt/openfoam230/src/lagrangian/basic/lnInclude -I/opt/openfoam230/src/finiteVolume/lnInclude -I/opt/openfoam230/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/tecplotWriter.o
In file included from tecplotWriter.C:26:0:
tecplotWriter.H:39:19: fatal error: TECIO.h: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/tecplotWriter.o] Error 1


wyldckat January 24, 2015 12:13

Hi Rophys,

OK, two details:
  1. Did you run the scripts as normal user? If not, you should have.
  2. Try running the following commands and tell me if any error messages are given:
    Code:

    cd $WM_PROJECT_USER_DIR
    cd localFoamToTecplot360
    ./getTecIO

    Because according to the error message, it should be the download step that failed to happen properly.
Best regards,
Bruno

Rophys January 26, 2015 06:55

Hi Bruno,

I manage to solve the problem at home. In the lab some internet websites are blocked and for this reason I was not able to download the required file. :mad:

Regards,

Rophys

matthi April 30, 2015 09:32

Thanks to Bruno
 
Dear bruno,
I shiftet to OpenFOAM 2.3.1 and I did not find out how to load the originally data into TECPLOT. There is the possibility to choose a data loader, but until now no explanations are in the help manual of TECPLOT. So I added your branch of foamToTecplot360 for OpenFOAM 2.3 (see https://github.com/wyldckat/localFoamToTecplot360). Now it works as before for older versions of OF.

Thanks a lot!!!

matthi

Garysimpson October 4, 2015 18:11

I encountered the same error. And inspired by you guys, I solved it by look into the ./getTecIO script and download the license library manually. : )

msahin.ae00 October 12, 2015 06:17

Foam to Tecplot converter
 
This is a F90 Foam to TECPLOT converter. You may need to modify directory locations and write format in same cases.

Good luck

Mehmet

Code:

!-----==================================================================
!    [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
!    [][][] FOAM TO TECPLOT 360 CONVERTER  [][][][][][][][][][][][][][]
!    [][][] POLYHEDRAL DATA FORMAT [][][][][][][][][][][][][][][][][][]
!    [][][][][][][][][][][][][][][][][][][][][][][][][][]15.04.2015[][]
!-----==================================================================
      IMPLICIT NONE
      INTEGER NP,NE,NF,NB
      REAL*8 , ALLOCATABLE :: X1(:),X2(:),X3(:)
      REAL*8 , ALLOCATABLE :: U1(:),U2(:),U3(:)
      REAL*8 , ALLOCATABLE :: PR(:)
      INTEGER, ALLOCATABLE :: FL(:),FR(:)
      INTEGER, ALLOCATABLE :: FP(:,:)
      INTEGER, ALLOCATABLE :: FaceNodeCounts(:)
      INTEGER, ALLOCATABLE :: FaceNodes(:)
      INTEGER  I,K,L
      CHARACTER(LEN=18) :: NUT1,NUT2,NUT3,NUT4
      CHARACTER(LEN=18) :: MUT1,MUT2,MUT3,MUT4
      CHARACTER(LEN=50) :: FILE_NAME


      FILE_NAME="ANIME_R.DAT"  !Tecplot output file name
 
!-----==================================================================
!    MESH VERTICES ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      WRITE(6,*) "--READING VERTICES...."
      OPEN(10,FILE='./constant/polyMesh/points',FORM='FORMATTED')
      DO I=1,18
      READ(10,*)
      END DO
      READ(10,*) NP
      READ(10,*)
      WRITE(6,*) "--NP=",NP
      ALLOCATE(X1(NP),X2(NP),X3(NP))
      DO I=1,NP
      READ(10,*) NUT1,NUT2,NUT3
      MUT1=NUT1(2:LEN(TRIM(NUT1)))
      MUT2=NUT2(1:LEN(TRIM(NUT2)))
      MUT3=NUT3(1:LEN(TRIM(NUT3))-1)
      READ(MUT1,'(D18.0)') X1(I)
      READ(MUT2,'(D18.0)') X2(I)
      READ(MUT3,'(D18.0)') X3(I)
!    WRITE(6,*) I,TRIM(NUT1),"  " ,TRIM(NUT2),"  ",TRIM(NUT3)
!    WRITE(6,*) MUT1,X1(I)
!    WRITE(6,*) MUT2,X2(I)
!    WRITE(6,*) MUT3,X3(I)
      END DO
      CLOSE (10)


!-----==================================================================
!    VELOCITY VECTOR DATA ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      WRITE(6,*) "--READING VELOCITY VECTOR...."
      OPEN(10,FILE='./6/U',FORM='FORMATTED')
      DO I=1,20
      READ(10,*)
      END DO
      READ(10,*) NE
      READ(10,*)
      WRITE(6,*) "--NE=",NE
      ALLOCATE(U1(NE),U2(NE),U3(NE))
      DO I=1,NE
      READ(10,*) NUT1,NUT2,NUT3
      MUT1=NUT1(2:LEN(TRIM(NUT1)))
      MUT2=NUT2(1:LEN(TRIM(NUT2)))
      MUT3=NUT3(1:LEN(TRIM(NUT3))-1)
      READ(MUT1,'(F18.0)') U1(I)
      READ(MUT2,'(F18.0)') U2(I)
      READ(MUT3,'(F18.0)') U3(I)
!    WRITE(6,*) I,TRIM(NUT1),"  " ,TRIM(NUT2),"  ",TRIM(NUT3)
!    WRITE(6,*) MUT1,U1(I)
!    WRITE(6,*) MUT2,U2(I)
!    WRITE(6,*) MUT3,U3(I)
      END DO
      CLOSE (10)


!-----==================================================================
!    VELOCITY VECTOR DATA ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      WRITE(6,*) "--READING PRESSURE DATA...."
      OPEN(10,FILE='./6/p',FORM='FORMATTED')
      DO I=1,20
      READ(10,*)
      END DO
      READ(10,*) NE
      READ(10,*)
      WRITE(6,*) "--NE=",NE
      ALLOCATE(PR(NE))
      DO I=1,NE
      READ(10,*) NUT1
      MUT1=NUT1(1:LEN(TRIM(NUT1)))
      READ(MUT1,'(F18.0)') PR(I)
!    WRITE(6,*) I,TRIM(NUT1)
!    WRITE(6,*) MUT1,PR(I)
      END DO
      CLOSE (10)



!-----==================================================================
!    FACE NODE NUMBERS ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      WRITE(6,*) "--READING FACE NODE NUMBERS...."
      OPEN(10,FILE='./constant/polyMesh/faces',FORM='FORMATTED')
      DO I=1,18
      READ(10,*)
      END DO
      READ(10,*) NF
      READ(10,*)
      WRITE(6,*) "--NF=",NF
      ALLOCATE(FP(NF,4))
      DO I=1,NF
      READ(10,*) NUT1,NUT2,NUT3,NUT4
      MUT1=NUT1(3:LEN(TRIM(NUT1)))
      MUT2=NUT2
      MUT3=NUT3
      MUT4=NUT4(1:LEN(TRIM(NUT4))-1)
      READ(MUT1,'(I10)') FP(I,1)
      READ(MUT2,'(I10)') FP(I,2)
      READ(MUT3,'(I10)') FP(I,3)
      READ(MUT4,'(I10)') FP(I,4)
!    WRITE(6,*) I,TRIM(NUT1)," ",TRIM(NUT2)," ",TRIM(NUT3)," ",TRIM(NUT4)
!    WRITE(6,*) FP(I,1),FP(I,2),FP(I,3),FP(I,4)
      END DO
      CLOSE (10)


!-----==================================================================
!    FACE ELEMENT OWNER ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      WRITE(6,*) "--READING FACE OWNER...."
      OPEN(10,FILE='./constant/polyMesh/owner',FORM='FORMATTED')
      DO I=1,18
      READ(10,*)
      END DO
      READ(10,*) NF
      READ(10,*)
      WRITE(6,*) "--NF=",NF
      ALLOCATE(FL(NF))
      FL=-1
      DO I=1,NF
      READ(10,*) NUT1
      MUT1=NUT1(1:LEN(TRIM(NUT1)))
      READ(MUT1,'(I10)') FL(I)
!    WRITE(6,*) I,TRIM(NUT1)
!    WRITE(6,*) MUT1,FL(I)
      END DO
      CLOSE (10)
     

!-----==================================================================
!    FACE ELEMENT NEIGHBOUR ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      WRITE(6,*) "--READING FACE NEIGHBOUR...."
      OPEN(10,FILE='./constant/polyMesh/neighbour',FORM='FORMATTED')
      DO I=1,19
      READ(10,*)
      END DO
      READ(10,*) NB
      READ(10,*)
      WRITE(6,*) "--NB=",NB
      ALLOCATE(FR(NF))
      FR=-1
      DO I=1,NB
      READ(10,*) NUT1
      MUT1=NUT1(1:LEN(TRIM(NUT1)))
      READ(MUT1,'(I10)') FR(I)
!    WRITE(6,*) I,TRIM(NUT1)
!    WRITE(6,*) MUT1,FR(I)
      END DO                               
      CLOSE (10)


!-----==================================================================
!    TECPLOT POLYHEDRAL DATA FORMAT ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!-----==================================================================
      ALLOCATE(FaceNodeCounts(1:NF))
      ALLOCATE(FaceNodes(1:4*NF))
      FP(:,1:4)=FP(:,1:4)+1
      FL(:)=FL(:)+1
      FR(:)=FR(:)+1
      L=0
      DO I=1,NF
      FaceNodeCounts(I)=4
      L=L+1
      FaceNodes(L)=FP(I,1)
      L=L+1
      FaceNodes(L)=FP(I,2)
      L=L+1
      FaceNodes(L)=FP(I,3)
      L=L+1
      FaceNodes(L)=FP(I,4)
      END DO
      WRITE(6,*) "--FNN=",4*NF,L
      OPEN (10,FILE=TRIM(FILE_NAME),FORM='FORMATTED')
      WRITE(10,*) 'TITLE="CAVITY"'
      WRITE(10,*) 'VARIABLES="X","Y","Z","U1","U2","U3","PR"'
      WRITE(10,*)'ZONE N=',NP,'Faces=',NF,'E=',NE,',DATAPACKING=BLOCK,',
    &  ' ZONETYPE=FEPolyhedron, VARLOCATION=([4,5,6,7]=CELLCENTERED)'
      WRITE(10,*) 'TotalNumFaceNodes=',L,
    &    'NumConnectedBoundaryFaces=0, TotalNumBoundaryConnections=0'
!-----WRITE POLYHEDRAL MESH VERTICES ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
      WRITE(10,12) (X1(I),I=1,NP)
      WRITE(10,12) (X2(I),I=1,NP)
      WRITE(10,12) (X3(I),I=1,NP)
!-----WRITE VERTICES VELOCITY VALUE ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
      WRITE(10,12) (U1(I),I=1,NE)
      WRITE(10,12) (U2(I),I=1,NE)
      WRITE(10,12) (U3(I),I=1,NE)
      WRITE(10,12) (PR(I),I=1,NE)
!-----WRITE ELEMENT CONNECTIVITY DATA ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
!    WRITE(6,*) '# node count per face'
!    WRITE(10,14) FaceNodeCounts(1:FN) !Stack Overflow problem with Intel and Visual Fortran
      WRITE(10,14)(FaceNodeCounts(I),I=1,NF)
!    WRITE(6,*) '# face nodes'
!    WRITE(10,14) FaceNodes(1:FNN)
      WRITE(10,14)(FaceNodes(I),I=1,L)
!    WRITE(6,*) '# left elements'
!    WRITE(10,14) FaceLeftElems(1:FN)
      WRITE(10,14)(FR(I),I=1,NF)
!    WRITE(6,*) '# right elements'
!    WRITE(10,14) FaceRightElems(1:FN)
      WRITE(10,14)(FL(I),I=1,NF)
      CLOSE(10)

      DEALLOCATE(X1,X2,X3)
      DEALLOCATE(U1,U2,U3)
      DEALLOCATE(PR)
      DEALLOCATE(FL,FR)
      DEALLOCATE(FP)
      DEALLOCATE(FaceNodeCounts,FaceNodes)           
  12 FORMAT(D20.12,2X,D20.12,2X,D20.12,2X,
    &      D20.12,2X,D20.12,2X,D20.12,2X,
    &      D20.12,2X,D20.12,2X,D20.12,2X,
    &      D20.12,2X,D20.12,2X,D20.12)
  14 FORMAT(I8,2X,I8,2X,I8,2X,I8,2X,I8,2X,I8,2X,I8,2X,I8)
      END


huangfei December 14, 2016 20:19

Thanks for Bruno Santos. It works well.


All times are GMT -4. The time now is 23:37.