lab9


MAIN TECPLOT PAGE


The main Tecplot link has the following items:
  1. Stencils for various types of outputs
  2. plot3d format in ascii and unformmated form
  3. Volume and Surface plot stencils in f90
  4. Airfoil Database
  5. Example plots and layouts

ATTENTION!

In $HOME/aero361/

  1. In your aero361 directory create a tecplot directory; in the tecplot directory create a lay, plt and mcr sub directories Follow the same procedure in the projects!
    • save all layouts in the lay dir
    • save all .plt data files in the plt dir
    • save all macros in the mcr dir
  1. Download the macro file into the mcr sub-directory  you just made

<bash> tecplot10 -qm[path]/stencil.mcr

In $HOME/

DOWNLOADING THE CONFIG FILE FOR TECPLOT

Need to download this modified config file so that the help browser works. There is a bug in the script since the default browser is Firebird and we forgot to modify it to mozilla. In the mean time this is a safe work around to get the help browser working. Follow the steps

  1. In your $HOME create a directory called tecplot.
  2. In this $HOME/tecplot directory download the config file
  3. In your .bashrc create the following alias

alias tec10="/usr/local/tecplot10/bin/tecplot -c $HOME/tecplot/tecplot.cfg"
  1. source the .bashrc and from now on you can access tecplot10 using the command
    • <bash> tec10
  2. If you want to use the macro file then type
<bash> tec10 -qm[path]/stencil.mcr

WARNING:

Avoid printing flooded contors for reports. Reports with flooded contours will back up the printer queue for a long time. This is not what you want on the day a report is due. And it will kill your social life! It will also bloat your disk usage and before you know it you will be out of space! Here is the remedy
  • Use the Mapping or Zone menu in tecplot to select contours by lines option
  • If the printer is black and white then do not use color
Tecplot is a powerful post processor program popular in the engineering and science community. Proficiency in using this tool is required and highly encouraged.

Download the following files into your tecplot directory
  1. naca0012
  2. naca0014
  3. naca2412
  4. naca6713
  5. naca6716
Download the specialized multicolumn files into the tecplot directory
SPECIAL AIRFOILS use the special options button on the load data menu
These two airfoils have their directions opposite to what you have been taught in class. They are also in a data file with many more columns. The special options button in the load data file menu will be required. Load only the "x" and "y" columns
  1. 2001 point super critical airfoil : Linear Solver's nightmare (A beauty of an airfoil)
  2. naca747a314


Download the coarse mesh and the kutta results for aoa=0 and 5. Using a V=10 m/s and rho=0.00238
21 pts 9 pts
naca0012 naca0012 9 pts
results 0 aoa results naca0012 9 pts 0 aoa
results 5 aoa results naca0012 9 pts 5 aoa

Download the data sets for a circle

21 pts 201 pts
circle.plt circle.plt


Select the link Getting started
This link will step through the various steps required to create a tecplot plot, save the layout and export the file as an .eps for Latex.




GETTING STARTED IN TECPLOT

Some snapshots of basic menu items in tecplot10


BASIC REQUIREMENTS FOR GOOD PLOTS

  1. All axis' must be labelled and if dimensional  items are used then units must be present
  2. Remove the Tecplot banner
  3. legend must be present if more than one plot is in a graph
  4. the caption should contain pertinent details regarding the flight conditions under which the results were obtained
  5. Make sure it is pretty and relevant!



THE FILE MENU

Bring up tecplot from the shell
  • <bash> tecplot10
Click on the menu button called "file" as shown below

EDIT THE FRAME

When the plots are inserted in a report the tecplot banner needs to be removed. This is done by editing the frame

LOADING A DATA SET

Click on the "load date files menu button"
Select the dat file you would want to load. All data files should have either .dat or .plt suffix. If the data file has more that two columns and you want to choose which columns to load then select the specify options button

LATEX

To insert the plot in latex the files needs to be exported in eps format. In latex mode only the eps format will work. Select the "export" option from the "file" menu and then
EPS FORMAT OPTION
In the export menu there is a file format option select the eps format

LOADING DATA WITH OPTIONS

In the load data options menu you will see 2 columns. The column on the right contains all the data sets tecplot has loaded. On the left would be the data sets that you would not want tecplot to load. If you select an item by its variable name on the right column and then select the "remove" button that set of data will not be loaded. For the airfoil only the x and y coordinates is needed so for some data sets you could use this option:
Removing an Item from a data Set. In this example the "pts" variable has been highlighted and then the remove button will remove the data pertaining to this data set.

SAVING THE LAYOUT

When you are done customizing the file you should save the layout or else you will have to start all over again. There are two types of save options
  1. as a .lay file
  2. as a .lpk file
  • The .lay is just a script that customizes the file as you last left it. It relies on the dat file that you used. So if the data file is removed or changed the layout file will differ
  • The .lpk packages the data file and the customization into one lpk file and therefore it no longer requires the .plt file. This is the safest in case you are worried you may lose or overwrite the data.
OPEN LAYOUT
Once a layout file has been created you can open it by clicking the OPEN LAYOUT option in the file menu

MAPPING MENU

All your selected data sets enters a menu called the MAPPING menu. The mapping menu allows you to edit the data sets and the way they are represented. The Mapping menu can be opened by double clicking a line

SAMPLE .lpk file

Save all these files in the scratch directory, please. You should all have a scratch directory associated with your username e.g.,
  • /remote/scratch/joeusr
If you do not have one then you can make one by
  • <bash> mkdir /remote/scratch/joeusr

Sample plt files: 1d, 2d and 3d

Be sure to download these files into your /remote/scratch/joeusr dir. If have not made a scratch dir then do
  • <bash> mkdir /remote/scratch/joeusr
where joeusr is your username


NAMES OF VARIABLE SETS

The names of the variables in the data set can be altered in the data  menu conting the data set info menu

CIRCLE WITH MORE GRID PTS TEST CASE

SAMPLE PLOTS and RESULTS

LEGEND

If there are multiple plots on a graph then a "legend" differentiating between the plots is required.

SAMPLE F90 FILE

Sample file that will output the airfoil coordinates and the aerodynamic results into 2 different files in the dat dir

PLAYING A MACRO

In the file menu select the Macro option. The macro that you just downloaded (stencil.mcr) can be played by selecting the play button.





READING THE NUMBER OF ENTRIES IN A FILE OF UNKNOWN ENTRIES

Ref: Chapman's F90 book!

PROGRAM read
INTEGER :: nvals = 0                                                                                                                                              ! Number of values read in
INTEGER :: status                                                                                                                                                   ! I/O status
REAL(kind=8):: value                                                                                                                                              ! The real value read in
OPEN (UNIT=3, FILE=filename, STATUS='OLD', ACTION='READ', IOSTAT=status )

readloop: DO
      READ (3,*,IOSTAT=status) value                                                                                                                      !  Get next value
      IF ( status /= 0 ) EXIT                                                                                                                                      ! EXIT if not valid.
      nvals = nvals + 1                                                                                                                                             ! Valid: increase count
      WRITE (*,1010) nvals, value                                                                                                                             ! Echo to screen
      1010 FORMAT (' ','Line ', I6, ': Value = ',F10.4 )
END DO readloop
rewind(3)
allocate (x(1:nval)
allocate (y(1:nval)
! Read the file again and store the x and y coordinates. May want to check which column is the x and y columns in the file before reading the values in.
readloop2:do i = 1,nvals
       read(3,*) x(i),y(i)
enddo readloop2