Tecplot 360 is a powerful visualization tool with the capability of line plotting, 2D and 3D surface plots, and 3D volumetric visualization. The data loader for Tecplot can read a variety of different files such as, HDF, HDF5, Excel, FEA files, and a general text loader. This tutorial will go through the process of generating plots using some of the previously mentioned file types and plot types.
The user's manual can be found at http://www.tecplot.com/support/documentation/
For a Windows machine, Tecplot is started my simply running the executable. For a Linux machine, such as the ones at CAVS, Tecplot can be executed with the following commands:
> swsetup tecplot > tec360
The Tec360 user's manual has a complete list of functionality for the line plots. Only a few of these capabilities will be shown here.
Loading a text (.txt) file
For a general text file, the visualization is pretty straight forward. In this example, stress-strain data of a tension simulation was output to a text file (stress-strain.txt). After starting Tec360, the welcome screen shown below appears shown in Figure 1,
To open the text file, go to --> File --> Load Data File, and the data file loader box appears. Next, navigate to the directory of the file, (i.e. /scratch/dhj21/tec360), select *.txt as the files of type, and be sure to check the advanced option. The advanced option allows the specification of the type of spacing for the text file. For this text file, tab spacing was used. This is shown by Figures 2 and 3.
Tec360 automatically plots the first column versus the second column for this case and reads the first two cells as the x-axis and y-axis respectively. This is shown in Figure 4.
Tec360 offers a variety of plot customizations. To increase the thickness of the line, click "Mapping Style..." in the plot toolbar, under the lines tab right-click "0.02%" to change it to the desired value (0.4% for this case). The color, line pattern, and pattern length can all be edited here. Next, to add a border on the top and right sides of the plot area, --> Plot --> Axis --> Line and check show grid border. You can manually edit the grid labels under the "Title Tab". For example, the True Stress y-axis label does not have units. This can be manually changed by, --> Plot --> Axis --> Title --> clicking on the "Y1" axis --> Use text --> "True Stress MPa". Figure 5 shows the current plot.
After, the plot is customized to the desired layout, the layout can be saved by --> File --> Save layout. Now, another text file can be appended to the current file by following the earlier steps for importing data. -->File -->Load data file --> Load "stress-strain_2.txt" --> Advanced options. A dialog will pop up asking for cancel, append, or replace. After clicking append, the new data is added, but not displayed. In order to display the new data, -->Plot --> Mapping Style --> Create Map. In the create Mappings dialog box, select X-variable versus Y-variable for all linear zones. Then, deselect the duplicated first curve and change the second curves weight to match the first one as shown in Figure 6.
2D Surface Plots
Loading HDF5 Files
After starting Tec360, select load data files. Then under file type select "HDF5 Loader (.h5)". Then click open then select the file. This process is shown in Figures 7-9.
Surface plot visualization
After the data has been loaded, this make take some time for large files, you can visualize the data. For this example, a Newtonian fluid is flowing in a rectangular duct, and the velocity profile in the x-direction is being visualized. By checking slice, a 2 dimensional planar slice is placed in the domain and shows the velocity profile as shown in Figure 10.
You can change the slice placement, orientation, and other features under --> Plots --> Slices. There is much customization available now and is thoroughly explained in Chapter 14 of the user's manual.
The data used for this 3D plots tutorials is from MDDP_Post_Processing, a homework assignment for the ICME class. This assignment page gives a walk through for using Tecplot for the assignment. This tutorial will show examples on how to visualize 3D data.
First, the files are moved to the Tecplot working directory. For this example, 7 files (tech002, tech004, ... tech014) are all loaded together by --> File --> Load Data File(s) --> Selecting Tecplot Data Loader as the Files of type --> Typing tec* in the file name --> Selecting all files --> Open. This is shown in Figure 11. Note: This make take a lot time if there are a lot of time steps present.
The default plot type is XY line, so this need to be changed to 3D Cartesian by clicking XY Line and changing it to 3D Cartesian. The first thing to do is to make sure the X,Y,Z data points correspond to the input position data --> Plot --> Assign XYZ and making sure X, Y, and Z correspond to the correct data. Then to make the axes appear --> Plot --> Axis, select show axis for the X,Y, and Z axes. Be sure to reset the range to smart values in order to have good axis values, or if you know the minimum and maximum values, you can specify them. If you prefer, go to the Line tab and select show axis box. The size of the number labels can be specified under the labels tab, the values look good with a size of 5. This is illustrated in Figure 12.
The next step is to make sure the correct vector data is being loaded by --> Plot --> Vector --> Variables, for this case the U,V,W variables are V1,V2,V3. The vectors need to be normalized by -->Plot -->Vector --> Lengths and setting 1 grid unit / magnitude. To apply this for every time step given -->Data --> Edit Time Strands, select constant delta and apply. Note: For many time steps, this will take a very long time. Finally select the vector box in the plot tool bar to visualize the vector data as shown in Figure 13.
This data can be visualized for each time step by pressing the play button in the plot tool bar or --> Animate -->Time. This can be plotted on the screen or to a file by selecting the destination to file. This will take a long to make a video file for a lot of data. After converting to a .gif file, the animation is shown below in Animation 1.