CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Tecplot (https://www.cfd-online.com/Forums/tecplot/)
-   -   Tecplot question (3d) (https://www.cfd-online.com/Forums/tecplot/7532-tecplot-question-3d.html)

Jane May 10, 2004 22:39

Tecplot question (3d)
 
Hi, I have a 3d tecplot question, the x is 1:1:100,y=1:1:10,z=1:1:10,cc(x,y,z) is the 3d array with dimension (100,10,10). How should I organize the structure of the data so that I can plot it in tecplot? Anybody know how to plot the 3d contour in matlab? Thanks.

Jane

Praveen May 11, 2004 00:16

Re: Tecplot question (3d)
 
Please correct me if I am wrong. This should work for tecplot.

i - along x
j - along y
k - along z


print "Variables = x, y, z, cc"
print "Zone T = xyz, i=imax, j=jmax, k=kmax"
for k=1:kmax
for j=1:jmax
for i=1:imax
print x(i,j,k) y(i,j,k) z(i,j,k) cc(i,j,k)
end
end
end


Tecplot manual is available on their website.

Mike May 11, 2004 08:02

Re: Tecplot question (3d)
 
Tecplot User's Manual Version 9.2, Release 1

.............................

5.2.2.2. Example of FORTRAN Code to Generate IJ-Ordered Data in POINT

WRITE (*,*) īVARIABLES = "X", "Y", "Temperature", "Pressure"'

WRITE (*,*) īZONE I=', IMAX, ', J=', JMAX, ', 'F=POINT'

DO 1 J=1,JMAX

DO 1 I=1, IMAX

1 WRITE (*,*) X(I,J), Y(I,J), T(I,J), P(I,J)

5.2.3.3. An Example of FORTRAN Code to Generate an IJK-Ordered Zone in POINT Format.

WRITE (*,*) 'VARIABLES = "X", "Y", "Z", "Temp"'

WRITE (*,*) 'ZONE I=',IMAX,' J=',JMAX,' K=',KMAX,' F=POINT'

DO 1 K=1,KMAX

DO 1 J=1,JMAX

DO 1 I=1,IMAX

1 WRITE (*,*) X(I,J,K), Y(I,J,K), Z(I,J,K), Temp(I,J,K)

Jane May 11, 2004 10:57

Re: Tecplot question (3d)
 
Many thanks to Praveen and Mike, they work well.


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