Tecplot can read in several data formats, including structured, unstructured or one dimensional(for Graphs) . These are ascii files that
tecplot converts to binary using a program called "preplot". Tecplot can read
binary files that have been created by "preplot" or created by your programs.
Your progams should call FORTRAN or C functions supplied by Tecplot to write
the data.
Structured Data
Structured data may be either 1, 2 or 3 dimensional. We will go through the
2-D data formats. The others are similar. You may use your favorite editor to
add the headers to your data.
Spaces and blank lines are ignored by Tecplot and there are some short
cuts that will eliminate a line or two from the header. See the manual if you
are interested in the shortcuts. You may use either upper or lower case
letters. Here is a mesh and the simple data file that produced it.
title = "sample mesh" variables = "x", "y", "z" zone i=5, j=4, DATAPACKING=POINT 2.000000 5.000000 -19.178485 4.000000 7.000000 26.279464 6.000000 9.000000 24.727109 8.000000 11.000000 -79.999217 10.000000 13.000000 42.016704 2.000000 8.000000 19.787165 4.000000 10.000000 -21.760844 6.000000 12.000000 -32.194375 8.000000 14.000000 79.248588 10.000000 16.000000 -28.790332 2.000000 11.000000 -19.999804 4.000000 13.000000 16.806681 6.000000 15.000000 39.017270 8.000000 17.000000 -76.911799 10.000000 19.000000 14.987721 2.000000 14.000000 19.812147 4.000000 16.000000 -11.516133 6.000000 18.000000 -45.059235 8.000000 20.000000 73.035620 10.000000 22.000000 -0.885131
The line "zone i=5, j=4, DATAPACKING=POINT" states that we have 20 points in our mesh, the mesh is 5 x 4. Note that the i index corresponds to the inner loop (the fast loop). That is we read the data points (suppose they are stored in the array A) as follows
C Notation Fortran Notation
i=1, j=1 A[1][1] A(1,1)
i=2, j=1 A[2][1] A(2,1)
i=3, j=1 A[3][1] A(3,1)
i=4, j=1 A[4][1] A(4,1)
i=5, j=1 A[5][1] A(5,1)
.
.
.
The first line contains the x,y, and z coordinates of the first point and so
on.
Tecplot accepts other formats. If we change "DATAPACKING=POINT" to "DATAPACKING=BLOCK", then tecplot expects all the x coordinates, then all the y coordinates and finally all the z-coordinates. Here is "DATAPACKING=BLOCK" format of the above mesh.
title = "sample mesh" variables = "x", "y", "z" zone i=5, j=4, DATAPACKING=BLOCK 2.000000 4.000000 6.000000 8.000000 10.000000 2.000000 4.000000 6.000000 8.000000 10.000000 2.000000 4.000000 6.000000 8.000000 10.000000 2.000000 4.000000 6.000000 8.000000 10.000000 5.000000 7.000000 9.000000 11.000000 13.000000 8.000000 10.000000 12.000000 14.000000 16.000000 11.000000 13.000000 15.000000 17.000000 19.000000 14.000000 16.000000 18.000000 20.000000 22.000000 -19.178485 26.279464 24.727109 -79.999217 42.016704 19.787165 -21.760844 -32.194375 79.248588 -28.790332 -19.999804 16.806681 39.017270 -76.911799 14.987721 19.812147 -11.516133 -45.059235 73.035620 -0.885131In this format, the number of entries per line does not matter.
Spaces and blank lines are ignored by Tecplot. You may use either upper or lower case letters. Here is a simple data file.
title = "Sample finite-element data" variables = "x", "y", "a","b" zone n=5, e=4,DATAPACKING=POINT, ZONETYPE=FETRIANGLE 0.0 0.0 1.0 2.0 -1.0 -1.0 0.0 2.2 -1.0 1.0 0.0 3.0 1.0 1.0 0.0 3.4 1.0 -1.0 0.0 1.1 1 2 3 1 3 4 1 4 5 1 5 2In this example, the elements are triangles. You may also use "fequadrilateral" ("fetetrahedron" or "febrick" in 3D). The "n=5, e=4" means that there are 5 points and 4 triangles. Each point has 4 numbers associated with it, the variables called "x", "y", "a" and "b". The entry "DATAPACKING=POINT" means that the points in the data file are arranged as follows
x y a b
x y a b
x y a b
That is, there is a line for each point and each line contains 4 numbers.
If we had used "DATAPACKING=BLOCK" instead, then Tecplot would expect all the x-coordinates first, then all the y-coordinates, followed by the a's and finally the b's. That is,
x x x x .... x y y y y .... y a a a a .... a b b b b .... b
The title may be omitted.
One Dimensional
For graphs, tecplot has several data formats. Only the simplest one is
described here.
The simplest data format that tecplot for graphs is a list of points. For example:
x1 y1 x2 y2 x3 y3 . . .No header is necessary. You may have more than two coordinates per line. For example
x1 y1 u1 v1 x2 y2 u2 v2 x3 y3 u3 v3 . . .From within tecplot, you can then select the variable to use for the x-axis and the variable for the y-axis.
| URL: http://www.msi.umn.edu/software/tecplot/tutorial |