Note that the demos in this video use Tecplot 360. See the differences between the full version of Tecplot 360 and Tecplot for CONVERGE »
This video is the demo-only portion of a joint Webinar between Tecplot and Convergent Science. It shows you how to load and manipulate CONVERGE data in Tecplot 360. We will jump right into Tecplot 360, and for those of you who have not seen Tecplot 360 before, I’ll give you a quick tour.
When you first start Tecplot 360, you have what we call the Welcome Screen, with links to all of our documentation, online resources and version number at the bottom. On the left side, we call this the Plot Sidebar, which we will have more information about once I load a data set. We also have Pages. Think of Pages like a worksheet in Excel or a tab in Chrome. You can have multiple Pages in Tecplot 360.
We have here what we call our Quick Macro Panel, so if you have any custom scripts that you want to run, you can access them very easily. Then down here, Probing. If you need to find information about your data set, it is available using the Probe Tool.
Index of Topics Covered
- Post_convert Utility
- Loading Cell-Averaged Output Files
- Animation and Movie File Export
CONVERGE post_convert Utility
Before I dive into the Tecplot 360 demo, I want make a statement about the post_convert utility. Convergent Science has put a nice bit of effort into post_convert. An update to post_convert was released in early March (2018), which does a really great job with the Tecplot format. So if you are running CONVERGE and have tried Tecplot 360 in the past or the Tecplot output from post_convert, please do give it a try again. They’ve done a really great job with the tool.
Loading Cell-Averaged Output Files
We will start with loading a cell-averaged output file, emissions.out. To open this file, we are going to use our General Text Loader. We will select it to instruct Tecplot to use that specific loader. Now, we are presented with the user interface. This is a very general loader for any type of text file. What is really important here is to understand what that text file looks like in order to populate it with the proper instructions. Watch our video tutorial on the General Text Loader.
I’ll bring up Notepad++ with emissions.out. The important points on this file are the variables.
- Variables are listed on line 3.
- The data is listed on line 6 and goes through the end of the file.
- On the variable line, we have this hash mark that we need ignore.
Those are the three key points for loading this data. For those of you who have not run CONVERGE before, these .out files are produced as part of the run. Each one of these would represent an iteration of the solver.
- We will go into variables and we will say that variables start and end on line 3.
- In the data tab, we have this set up to start on line 6 and go through the end of the file.
- In general data filters, we are going to say ignore columns in position 1. That is how we ignore the hash mark.
If I want specific variables to load, I can go back into that variables dialog and say select variables to load. Here, let’s just load crank, NOx, and carbon monoxide.
Now we have our plot. You can see that we only have NOx on the y-axis. To see the carbon monoxide, you go into what we call the Mapping Style dialog. We can see that we have what Tecplot calls a Line Map. We will just activate this. It is off the screen, so I’ll do a CTRL-F to fit. This is also available under View > Fit to Full Size. Now, we can see my entire data set.
What I really want to do here is to compare this against another run. Let’s go ahead and append another data set. We will go to Run 2. Again, we will look for emissions.out. We will open this and we will say Append Data to Active Frame. All of these settings have been retained, except for this one. We will go back and we will say I just want crank, NOx, and carbon monoxide.
Now the data has been loaded, but it does not show up. Let us find out where it went. We go into Data > Data Set Info. This is a key dialog in Tecplot 360. It tells you all about the data that you have loaded. We see that we have Zone 1 and Zone 1. This is from our first run, so we will just double click on this and say Run 1. We will double click on my second zone and say Run 2. That way we can identify these and we can see the differences. Run 1 we did 8,200 iterations, Run 2 a little over 12,000.
To get these to display, we will go into the Mapping Style dialog. We will select these two maps. We can copy them. But, we now want these to point to Run 2. We will display those. Now, we can see both Run 1 and Run 2 here, but we can’t quite tell them apart. Let’s add a legend (Plot > Line Legend, check Show Line Legend). Then, we will rename these to include the zone name to help identify them. Then, finally, we will give Run 1 symbols that are a Delta and a Gradient. We can turn on the symbols. Because there were so many iterations, the symbols are quite dense. We can set up the symbol spacing. I like my symbols a little smaller and filled with the line color. Now, we have a really nice plot showing the differences between Run 1 and Run 2.
What I’m really trying to get across here, in this plot, is that Tecplot gives you a lot of control over line plots. It helps you create nice production quality plots that you can be proud of when you put them into a paper or communicate with your colleagues. If you do need to share this outside of Tecplot, we do have some very nice export tools. In particular, for line plots, using the vector-based outputs such PostScript or WMF make really, really nice plots when you put those into papers or into PowerPoint.
That covers line plots. We will just rename this page here to Emission. Let’s add a new page and load some additional data. Here we are going to move onto working with parcel information.
We will go back into Run 1 and the output folder. We are going to select our Tecplot Data Loader. I have already run post_convert to convert the CONVERGE output to Tecplot format. We can just select all of these and hit open. You see that the files opened fairly quickly. What does this represent here? If we go to the Data > Data Set Info, we have a total of 93 million elements spread over about 145 time steps. Quite a lot of data loaded very quickly into Tecplot.
Solution Time Is Crank Angle
You’ll notice that one of the nice things that Convergent Science has done with post_convert utility is solution time is actually your crank angle. One of the first things that users have asked me is, “How do I get that crank angle on the plot?” A simple way to do that is using our Text Insert Tool (). We have what we call dynamic text. We will just type CA:&(SOLUTIONTIME). As we step through, you can see this updates. Now, the formatting is a little bit longer than I want, so we can do some formatting here to shorten the string. Quite a lot of flexibility in how you can add text and format it.
Macros and Customizing Workflows
I talked about macros and customizing. If you don’t want to have to remember everything, you can register a macro on our Quick Macro Panel here. I can just double click. You can see that added a piece of text. If you’re doing some of these actions all the time, using this Quick Macro Panel can be really nice way to customize your workflows. Watch the video tutorial on Quick Macros.
On to parcels. In order to display parcels, we need to turn on our scatter layer. By default, scatters are turned on for all of our zones. To show scatters for the spray, go into the Zone Style dialog where all of the style settings about your data are set. Select all of our zones except for spray, then turn off scatter. It is left on just for spray. Let’s change this to scatter Points. Points render quite quickly and allow you to see all of your spray quite nicely. We will turn on scatter and we will advance time to where the spray is coming in. We can turn on Translucency and you can see the interior.
Understanding Attributes of Spray
This is quickly how you display scatter, but let’s say you want to understand some of the attributes of your spray. Let’s look at the DP_film_flag. This describes some attributes about your spray: whether it is in the wall film, whether it is in the volume, whether it is a rebounded parcel, etc. We can do that by turning on contour coloring. We will go here into Contour Details dialog and we will set up our contour coloring to use this DP_film_flag. See the video tutorial on Displaying Spray.
We know that CONVERGE uses the values from 0 to 5 to represent the film flag. We will say that we want levels from 0 to 5. Then, we will go back into the Zone Style dialog and we will tell this to use my contour group. Now, we can see the different coloring. If we want some more distinct coloring, we can choose a different color map. Qualitative Dark 2 works pretty nicely. You can see zero represents the parcels that are not in the wall film, blue now represents ones that are in the wall film. You can see how those change as you animate through your data set.
This is a really nice way to look at parcels and understand them.
Isolating Parcels with Value Blanking
Another thing you may want to do is isolate a certain set of parcels. Here we have quite a number of them. If I want to look at just the ones that are in the wall film, I can use what we call Value Blanking (Plot > Blanking > Value Blanking…). We will go into the Value Blanking dialog and we will select our DP_film_flag variable. We will say that we want value blanking to be included when it is not equal to zero. This is going to isolate just a single set of my parcels.
I can automate this in the Quick Macro Panel. We have a macro command called Prompt for Text String. Here I want to look at just the parcels that are in the wall film. The Quick Macro has adjusted that value blanking capability for me. We will rename this page to Spray.
We will add yet another page. Here we will just flip to 3D (In the Plot Sidebar, select 3D Cartesian). Doing this has shared the data set with the previous page. We have not actually loaded another data set, and are using shared memory in this case. It keeps Tecplot’s memory footprint quite low.
Now, we will look at using slices. To add a slice, it is quite easy. We have a Slice Tool () here. You can just click and place it. You can see that it slices inside the volume. Again, on our Quick Macro Panel, double click Clip Above Primary Slice to see what the slice looks like. All of the macros on the Quick Macro Panel are custom for this webinar. We will be sure to share out these items after the webinar. What I want to look at now is temperature. A nice way to do this is to simply double click on the Legend and then, we can just change it to temperature. A color map that I enjoy using is one called Viridis. This is not built into Tecplot yet, but you can incorporate your own color maps through the Import Color Maps, which is what I’ve done here.
I want to know what contour range to use here. Again, we will plot our maximum contour value over time. Our current contour value is temperature. I can simply double click on the quick macro, Plot Max Contour Over Time. You can see that we are advancing through time. The macro has just created a line plot showing the maximum temperature for my data set through time. You can see that prior to the combustion phase, temperature is fairly low. Let’s choose a contour range here of about … let’s use the Probe Tool() to find the range of temperatures. The temperature here is about 1200 and here it is about 2800. We will adjust our contour levels to about that range. We will say from 1000 to 3000.
Plot Layout Flexibility
Tecplot gives you a lot of flexibility in how you want the layout of your frame. What I have here is a multi-frame layout, multi-page layout. I like this view of my data.
One of the important things for people using CONVERGE is that it uses an adaptive mesh refinement. The first time you will see your mesh is when you bring in your data. If you want to put a mesh on your slice, you can see what the mesh that CONVERGE has created looks like. If we get a little bit closer to crank angle zero, where combustion is occurring, you can see how CONVERGE has refined that mesh and what a nice job it is done.
Multi-Frame and Multi-Page Layouts
Let’s create another view. I’ll just do a CTRL-C, CTRL-V, so now I have copied my frame. We will drag it over here. Now I have two frames of the same data, but let’s create a different view. Here I want to disable my clipping plane and I want to put my slice in a different position. I want to get it aligned right here with the valve. We will choose the Slice Tool again. I’m going to hit Y on the keyboard to make it Y-aligned. You can see how we got it aligned with the valves. Then, we will just put it in a planar position, turn off shade, and now I can see my slice in this position here. We will go ahead and animate. Now these frames are all linked through time.
Animation and Movie File Export
If I do need to save this out as a movie file, I can do that quite easily as well. Right here in solution time controls, I can go into details and just click on this film icon and select a couple of different movie formats. MPEG-4, AVI are probably your best bets for the movie formats. Antialiasing with a super sample factor of three makes for really nice, crisp lines and really nice, crisp text. You can also enter the width.
Let me just show you an animation that I produced with an earlier layout. As you can see here, nice looking animation, nice, crisp text, and a great way to communicate your data, especially when you’re dealing with this transient data that are produced by these internal combustion cases.
I have not hit isosurfaces or streamlines yet. I’ll just briefly talk about them. Isosurfaces are set up, again, through what we call the derived objects. A derived object is something that is created from your volume data. We can simply go into Isosurfaces > Details. One thing that often times can be difficult is figuring out what is a good value for my isosurface. That is where the Probe Tool comes in nicely. You can see that we have a color band change here. We can click right on that and see our temperature. It is 1265, give or take. We can use that value for my isosurfaces.
Let me disable clipping. We will turn on Translucency and let’s make that even more translucent. We will go into Zone Style > Effects tab and say 90 percent translucent. Now, you can see your isosurface in that volume more clearly. Using the Probe Tool is a great way to figure out a good candidate value for isosurfaces.
We have a couple of different types streamtraces (Streamtraces Details dialog). Volume Line is a line that is going to go through your volume. Volume Rods and Volume Ribbons are also very nice ways to display your streamlines. Let’s grab a ribbon and we will place a streamline right here. It is very easy to place streamlines in your data set just with point and click. If you have very specific locations, you can also define those by entering X, Y, Z positions, etc. Watch the video tutorial on Streamtraces on a Slice.
I’ve shown a couple of these capabilities that we put on the Quick Macro Panel. With the Python toolkits, PyQt, you can actually create custom user interfaces. Here, it took me about a few hours to write this custom user interface using the Python language. This has a lot of these capabilities that you have right here on the Quick Macro Panel as well. Again, if I want to show the crank angle or show RPM, just single click. If I want to jump to a specific crank angle, I can do that right here. Really, I’m centralizing a lot of the capabilities that you as a CONVERGE user might need in one nice easy to use dialog using the Python language.
Thanks for watching!