« Back to Video Tutorials

Tecplot 360 Basics – Equations

This training session covers data alteration through equations in Tecplot 360, including:

  • Referencing Variables
  • Math syntax & Functions
  • IF conditions
  • Operating on subsets of zones
  • Use of I & J special values
  • Referencing zones in equations

Q&A from the Equations Training


Can I compute a time average over an interval?

This capability is not directly available in the Tecplot 360 user interface. But we do have a robust Python API for Tecplot 360. Scripts are available on the public GitHub, Tecplot Handyscripts, Python scripts. Scroll to find TimeAverage.py. This script uses another behind the scenes script called tpmath.py, which has a phased-average function available in it. It was written by a Tecplot customer, and we thank them for writing it! Because it is on GitHub, it’s supported by our user community.

Can contours be classified and generated based on categories?

The Tecplot 360 contour legend typically shows only numeric values. But sometimes you may want to show values that are string based. For example, if you have different material properties like sand or soil in a geoscience case, or in the case of a CONVERGE dataset where you have particles that may be in the fluid or have bounced or rebounded. You can show strings using our custom label set. We have blog, Creating a Materials Legend, that uses a bit of Tecplot Kung Fu to add a string-based custom label set. You can use that blog as a guide.

Can I do a while loop in specify equations?

In the Tecplot 360 user interface, the answer is no. But with our Python API, PyTecplot, the answer is yes! In the video example, Jared showed finding the difference between the two zones, with a blended wing body shape. If that were a time-dependent simulation, you could use our looping capability to compute that difference over time. The Tecplot 360 macro language has “for” and “while” loop capabilities. And Python, of course, has many logical and flow control operations. You can use these scripts in conjunction with equations.

Is there a discount for academic licenses for students and faculty? And how do I get one?

We have several academic license options for those at degree-granting universities or institutions. You can email Jared McGarry at sales@tecplot.com, and he can help you decide which type of license you need – single user, department, college, campus, or site licenses (with effectively unlimited seats). You can also visit us at Tecplot Academic Suite.

Can we get a PDF of the presentation to help remember the equations?

We don’t have a PDF of this presentation. But you can watch the recording (above). Also, click on the help button in the specified equations dialog. You’ll see a reference to the functions available.

Can an equation reference data in a different frame?

No – equations can only operate on data in the active frame. If you have to datasets that you want to compare, you’ll need to load both into the same frame.

What is the best way to calculate the difference between different zones that have different meshes?

In the video, the blended wing body example, those two zones have the same mesh and you can simply subtract one zone from the other. If you have different meshes, you will need to interpolate results onto a common mesh with the same number of points. See this video tutorial Comparing Grids: Interpolation of Differing Meshes.

Do you have license roaming, and how does it work?

License roaming is enabled for network licenses. You must be connected to your license server to roam your license. Go to Help>License Roaming.

Is there a quick way in alter equation to find a deviation from a node value?

Sure, let’s look at an example: I want to find the difference of U from its value at X=1, Y=1, Z=1. First use the Probe tool to find the value of U at that XYZ location. From the Probe results you can Copy the U value. Then in the Data Alter dialog you would use this equation:

{U_delta} = {U} – 1.234

Where 1.234 is the value you copied from the Probe dialog. This will create a new variable called “U_delta”.

Can we use alter equation to find max-min of a variable and its location?

The best way to find min-max is with a Python script available on our GitHub site: Tecplot Handyscripts on Github, and look for display_max_variable_value.py.

You supply the zone and the variable through Python. Then the script will, in Tecplot 360, point to the location of the maximum value on your plot and display it in a text box.

There are two options for polyline point extraction. Which one should I use?

There are several options for extracting data along a line in Tecplot 360. Which one to use depends on your use case.

  1. Use the menu option Data>Extract>Precise Line. This will allow you to enter two X, Y, Z locations. You can then extract data across a perfectly straight line between those two points.
  2. Use the menu option Data>Extract>Polyline Over Time. We also have the extract points from polyline, I think it is. Jared, can you go back to the data extract menu? Yeah, polyline over time.
  3. Select a polyline on your plot, right-click, and you can select Extract Points from the context menu.

Is there any plan in the future to duplicate a page like we do for a frame?

We have no immediate plans for this capability. We could create a Tecplot macro or a Python script that would mimic the behavior by looping over each individual frame on a page and copying and pasting it to a new page. If this is something you do frequently, contact support@tecplot.com, and we can create a custom solution for you.

If I extract the line across the wall, do I get wall quantities?

In the internal combustion case from the video [timestamp: 38:46], we have volume data representing the fluid, and boundary data representing the wall. When you extract across the line, Tecplot 360 will extract points from the first zone that it encounters. In this case, it will encounter the wall. If you want to make sure of that, open the Zone Style dialog and ensure the wall zone is the only active zone.

Related Videos