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. This is similar to the MDDP post-processing shown here (MDDP). 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 text spreadsheet load as the files of type, 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". The same process was done to add (mm/mm) to the True Strain axis. 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.
Probing the visualized data
The data can be visualized in Tecplot in a spreadsheet form by: --> Data --> Spreadsheet. After selecting the desired variable and plane, a two-dimensional table is displayed. The plane can be changed by changing the plane in the plane tab. For this example, the velocity that needed to be know was the velocity at the middle point as shown in Figure 11 (5.58E-7).
This value can also be probed if the i,j,k point is known by: --> Data --> Probe At. After specifying either the x,y,z position or the i,j,k index, -->Do Probe as shown in Figures 12 and 13. Note: the mouse can also be used to click on a desired point.
Dislocation Dynamics Example
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 14. 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 15.
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 16.
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. A tutorial to convert an .avi or video file to a .gif can be found here: How_to_Convert_to_GIF_and_Upload_to_ICME
One final example of Tecplot's post-processing is for 3D computational fluid dynamics (CFD). The following example is for pressure drive flow over a sphere placed at 0.25 H. The velocity in the x,y, and z-directions are the outputs to be visualized. The file type is HDF5 and is loaded similar to the 2D pipe flow data shown previously.
A 2D-slice can be take by clicking slice in the plot tool bar on the left hand side of the screen. The correct plane and location of the slice can be adjusted by --> Plot --> Slices. The resulting 2D slice is shown in Figure 17.
Streamtraces can be applied to the visualization by checking streamtraces in the plot tool bar and clicking "add a single or rake of streamtraces" button. Then, click to choose the starting point and release to choose the end point. This can be repeated until the desired stream lines are achieved as shown in Figure 18.
Finally, the iso-surfaces function can be used to see the solid surfaces, such as the sphere and the two walls. By clicking the iso-surfaces box and applying a 2D slice, Figure 19 shows the final visualization. This function shows the points below a specified value for velocity. This was just chosen by default for this case.