Encyclopaedia Index

The PHOENICS-to-TECPLOT Interface

Contents

  1. What is TECPLOT
  2. TECPLOT and PHOENICS
  3. How to Use the PHOENICS-to-TECPLOT Interface
    1. Introduction
    2. Running the Translator
    3. Changing Array Sizes
  4. In TECPLOT
    1. Data Storage Locations
    2. Zones
    3. Vector Plotting
    4. Blanking
    5. Geometry
  5. Compatibility
  6. Example plots

1 What is TECPLOT

TECPLOT is a powerful interactive plotting program for visualising and analysing engineering and scientific data. It integrates XY plotting with two- and three-dimensional surface and volume data- visualisation capabilities into a single easy-to-use program. The versatility of the program gives you power to create plots with limitless combinations and styles of contours, iso-surfaces, mesh lines, vectors, streamlines, light source shaded surfaces and scatter symbols.

Data can be subdivided into as many as 2048 subsets, or zones, and then selectively plotted. The zones may represent physical objects, different versions of the data, or parts of a larger plot. Plots can be simultaneously displayed in up to 16 windows.

Multiple plots can be overlaid for analysis. Test data can be super- imposed on a computed simulation.

The images created can be saved in a large number of formats, either for printing, importing into word-processors, or for the creation of slides or animated sequences.

TECPLOT is written by Tecplot, Bellevue, WA, and runs on most platforms.

2 TECPLOT and PHOENICS

TECPLOT's ability to plot data divided into multiple zones makes it simple to plot results generated by the Multi-Block and Fine- Grid-Embedding (MB-FGE) options of PHOENICS.

TECPLOT combines the functionality of PHOTON and AUTOPLOT in one menu-driven environment. It posesses many features that PHOTON users have been requesting, such as:

As well as being able to represent MB-FGE results, TECPLOT can just as well plot mono-block results from virtually any version of PHOENICS, be it ShareWare or the latest commercial release!

3 How to Use the PHOENICS to TECPLOT Interface

3.1 Introduction

The PHOENICS -> TECPLOT interface is a stand-alone program that reads the standard PHOENICS output files PHI (or PHIDA), PATGEO and, if required, XYZ (or XYZDA). It produces an ascii output file in TECPLOT format, suitable for processing into a TECPLOT binary file with the PREPLOT program supplied by Tecplot as part of the TECPLOT installation.

The translator uses the NEP library of the PHOENICS GENIE interfacing system.

3.2 Running the Translator

A batch file RUNTEC.BAT, is supplied as part of the PHOENICS installation. This will run the delivery version of the interface, which can be found in phoenics/d_intfac/d_tecplo. A batch file, test.bat can be used for testing and serves an example.

The translator produces the TECPLOT ascii file TECPLT.DAT. This must then be transformed into the TECPLOT binary input file by running the PREPLOT program supplied by AMTEC. The precise arrangements for this will depend on how TECPLOT has been configured on the particular computer.

3.3 Changing Array Sizes

It is possible that very large models may require some re-dimensioning of the translator's storage arrays. If this is required, an error message will be output indicating which parameter needs to be reset, and what new value is required.

The main program of the translator, TECMAIN.HTM, is supplied in phoenics/d_intfac/d_tecplo to allow for such resizing. This should be copied to the user's local directory and compiled. A new executable can then be created by running BLDTEC.BAT. This batch file will link the object of the main program with the object of the body of the code, and will also use the NEP library files from phoenics/d_intfac/d_genie/d_nep to create a local copy of TECEXE.EXE.

On UNIX systems, the directory structure will be the same, but all file names will be lower case, and some extensions may differ - e.g. .f instead of .HTM.

4 In TECPLOT

4.1 Data Storage Locations

Like many plotting packages, TECPLOT assumes that all data is stored at the coordinate locations specified. This poses a problem for PHOENICS, as in general scalars are cell-centered, velocities are at cell face centres, whilst the grid is defined by cell corners.

The GENIE interface embodied in NEP deals with this problem by suitably interpolating all values to the cell corners. For a general three- dimensional grid, eight scalars or four velocities are averaged to give a nodal value. Special practices are employed at domain edges, or adjacent to internal blockages. In MB-FGE cases, the averaging procedure takes into account values from adjacent blocks, and allows for many-to-one links.

4.2 Zones

Each block of a MB-FGE grid is written as a TECPLOT zone. As the above-mentioned interpolations change the data from its original values, each zone can optionally be written twice. The first NUMBLK zones contain the interpolated data. The second NUMBLK zones contain the original unaltered data, located at the cell centres.

Contours plotted from the interpolated data will fill the solution domain to the edges, without the half-cell gaps left by PHOTON. In MB-FGE cases, contours will be continuous across blocks for one-to-one joints. For many-to-one joints, the degree to which contours match will depend on how fine the refinement is, and how steep the gradients are.

Contours plotted from the cell-centred zones will appear like PHOTON plots, with half-cell gaps between the last contour (or vector) point, and the edge of the domain.

For reasonably fine grids, the interpolated and cell-centre values should give almost identical contours. If the two sets of contours are very different, this may be an indication that the grid is too coarse to resolve the flow properly anyway.

4.3 Vector Plotting

The velocities used to construct vectors are chosen according to the problem setup:

In all cases, the variables written to the TECPLOT file for the construction of vectors are named VEL1-X, VEL1-Y and VEL1-Z. In two phase cases, VEL2-X, VEL2-Y and VEL2-Z will also be written. NB. These are the ONLY variables guaranteed to have been interpolated correctly for staggered grid solutions.

Vectors plotted from interpolated values will include vectors on domain and blockage edges. At present this is inescapable, as no information regarding wall conditions, inlets or outlets is available in the PHI file. For aesthetic reasons, vectors may look better plotted from the cell-centered zones. However, streamlines created from these zones will not be able to cross MB-FGE block joints, as the cell-centre mesh is not contigous. Streamlines have to be plotted using the interpolated, nodal zones.

4.4 Blanking

The TECPLOT concept of value blanking is very similar to the PHOTON 'SET POR ON' command. This has been implemented by introducing an extra variable named BLANK. BLANK is set to 1.0 in every cell that has VPOR>0 and/or PRPS <100. Cells with VPOR="0" or PRPS>99 have a BLANK value of -1.0. If value blanking is ON, the blanking variable is set to BLANK and the blanking mode to CORNER, then TECPLOT will not draw inside any blocked cell, whether in the nodal or cell-centerd zones. When plotting TEM1, it may be better to turn blanking OFF, to allow plotting of temperature inside solids.

The user is of course free to use any other variable of his choice or construction, to blank cells. If a new variable is created in DATA/ALTER/EQUATION, with a value of -PRPS, then individual materials in a multi-material problem can be visualised.

4.5 Geometry

The contents of the PATGEO file named to the translator are written to TECPLOT as TEXT/GEOM items. Each GR OU (except the MBD and MBL patches which are used to determine the block structure) is written as a single LINE3D element, and is given the colour WHITE.

These are only visible when TECPLOT is in 3D mode, so if 3D is turned OFF for a two-dimensional XY plot, the geometry will disappear.

To view the geometry clearly, it is often best to turn the zone boundaries off.

5 Compatibility

GENIE-based systems are compatible with all versions of PHOENICS from 1.4 to 3.4, as the structure of the PHI and XYZ files has not been changed.

The TECPLOT interface has been written for TECPLOT Version 6, and tested with TECPLOT Version 7.

6 Example Plots

Example plots are shown from the results of a multi-block calculation in a duct. The geometry is shown in Figure.1. The geometry was created using the (now obsolete) CSI GeoGrid mesh generator, and the solution was obtained with PHOENICS 3.2.0.

The boundary conditions are:

Vectors (coloured by Temperature) along the duct centre-line are shown in Figure 2. Figure 3 shows streamlines from each of the three inlets, also coloured by temperature.

Temperature and pressure contours are shown in Figure 4 and Figure 5 respectively.

Finally, Figure 6 shows an iso-surface of temperature.