« Back to Video Tutorials

Extracting Variables in Tecplot Chorus


The process of extracting variables includes recording a macro to calculate the integral of surface pressure, then communicating the value back into Tecplot Chorus.

This video demonstrates extracting variables from a Tecplot 360 data set into Tecplot Chorus. This process uses a macro recording to calculate the integral of surface pressure, then uses Frame Aux Data to communicate the value back into Tecplot Chorus.

Let’s start in Tecplot Chorus by opening a PLT data set into Tecplot 360 EX. To do this, right-click on a case and select View Data. (Because the goal of this video is to extract values from a data set, there is no need to change the style of the plot.)

To get familiar with the Aux Data, go to Data > Data Set Info…, and click on the Aux Data tab. Then show the auxiliary data for the Frame. Here all of the Chorus data associated with this case is shown (CaseID, Mach, Alpha, etc.)

Next, record a macro that will integrate the surface pressure and extract the values from Tecplot 360 EX into Tecplot Chorus. Select Scripting, and then Record Macro…. Name the macro Integrate. Save this macro in the chorus-derived > macrotemplates folder so that it can later be found by Tecplot Chorus.

The macro begins recording immediately. Select the Analyze menu and choose Perform Integration…. To find the total pressure on the whole body, select the Pressure in the Scalar Variable list, and click All to integrate all zones. Finally click Integrate and a window pops up showing the results of the integration.

These integration values are also deposited into the Frame Aux data and we can ensure this by looking at the Data Set Info again.

Once this is done, the macro recording can be stopped.

Now, let’s go back into Tecplot Chorus and extract the auxiliary data via the macro. Choose all of the cases, right-click and choose Extract Variables… Select Macro > Integrate.mcr to run the macro we just created on all of the selected cases and get the extracted value.

Once the job is complete, as indicated by the number in the bottom corner, the job results must be deposited into the Project. Do this by selecting Manage Jobs. In this window, click Deposit and rename the variable Pressure Integration.

Now that the variable has been extracted, you can view it in the Table View by scrolling all the way to the right to see that a new column, labeled Pressure Integration, with the extracted variable has been added.

Finally, you can visualize the trends in the resulting data in a 2D scatterplot. Create a scatter plot, and then change the y-axis to the new Pressure Integration variable.

Thanks for watching!
Try Tecplot 360 for Free