RTZ Range Tool to generate Circumferential Average

Using roughly the same Python tool posted in the previous entry (RTZ Range Tool), I modified this tool to loop through the theta range and report back the distribution in the circumferential sense. This is useful when looking at some type of an average quantity as you traverse in theta, rather than using a line (which only reports back the local non-averaged value). The added benefit of using this small pie slice volume is that you can look at a more average quantity, rather than an unique quantity at a finite single point.

This routine shares about 85% with the above interactive routine, including all of the logic for the creation of the RTZ range selection. This routine has the added “loop” at the end of the routine, were the resulting RTZ range clip is then swept around through 360 degrees and a query of a variable is made.

The Batch version differs from the previous Interactive RTZ Clip tool in the following manner:

  1. It is made for batch operation (settings at the top of the file for input).
  2. It uses a single axial value, and this ends up as a thin clip.
  3. It uses a theta sector (say 5 degrees for example), and loops through the entire 360 deg range.
  4. It queries a variable on this clip part, and builds a Query and Plotter as a result.

The main goal for this tool is to be used in batch, and query a particular variable as a function of theta (over a sector plane).

An example screencast tutorial, dataset, and python routine for this batch python routine can be found at :



The same example manifold model is used for this case. A sample output from this routine yields the following type of graph:

The intention for this type of code is to allow the user to query a value on a segment in theta (rather than a single theta value), and report this back as a query and plot. This routine also works in batch mode, with a few user inputs listed at the top of the python routine.

RTZ Range Tool — Interactive

The Box Tool in EnSight works great to Intersect or Select a portion of the domain by providing all three Cartesian X,Y,Z limits. However, when working on cylindrical problems, or problems involving some rotational axis, it would be equally useful to have a tool that works to select a portion of the domain via RTZ limits (radial, theta, axial).

This tool allows you to specify the range in both the radial, theta, and axial extent to select out a “pie slice” of the domain. This works equally well on 3D and 2D parts.

The RTZ Range Tool creates a new part for you, thus allowing you to utilize this RTZ range for analytical or visual analysis.

An example screencast tutorial on using this Tool can be found here:


The dataset used, along with the example Python routine for UserDefinedTool implementation can be found at:


The example model of a fuel manifold is a common example, where you are interested in particular sectors of the results. When you insert the tool into your UserDefinedTool area, you should then see the following entry in your UserDefinedTool:

When clicked, the tool will appear with the following GUI. The axis of rotation, along with the Min & Max values of Radius, Theta, and Axial location are entered.

The following picture denotes what you can expect for a newly created RTZ Range part (with the Parent as the Fluid Domain):


Time and System Info

In the good ole days, users of EnSight could execute the “test: start_timer” and the “test: print_timer” to attempt to retrieve information about the time that it took to perform the operations between those two commands. Well, that may be not really enough information, or information that you can easily use or report. Python to the rescue again, this time courtesy of Randy’s “snapshot” function.

You can now use EnSight’s Python “snapshot” function to store in a dictionary not only timestamp information, but also information about client and server application memory as well as client and server memory load.

In python, you can call:


“Info_t1” can be anything that you want. This creates a snapshot of client and server memory, as well timestamp information.

The call :


returns a dictionary of the snapshots, indexed by the name that you gave it (in this case “Info_t1”). If you then print this line, you would get the following information:

{ 'Info_t1': {'server_freeram': 5980388,
             'timestamp': 1310502681.3050001,
             'client_freeram': 5980388,
             'server_totalram': 10485092,
             'client_appram': 247852,
             'client_cores': 8,
             'server_appram': 14288,
             'server_cores': 8,
             'client_totalram': 10485092},

So, let’s put this together into something useful:

# Do something interesting here.
d = ensight.query(ensight.SYSINFO)['memory_snapshots']
print "="*36
print "Client Ram Increase " ,(float(d['Info_t2']['client_appram']) - float(d['Info_t1']['client_appram'])) / 1024.0, " Mb"
print "Server Ram Increase " ,(float(d['Info_t2']['server_appram']) - float(d['Info_t1']['server_appram'])) / 1024.0, " Mb"
print "Time to execute was    " ,float(d['Info_t2']['timestamp']) - float(d['Info_t1']['timestamp']), " sec"


Side by Side Animations

As an engineer working with multiple solutions, or comparing multiple variables, it is quite useful to be able to compare images side by side, but also animations side by side. Image comparison side by side is quite easily done with Word, or Powerpoint, or even image viewers. However, the comparison of multiple animations in a side by side layout is not quite so straight forward. Sure, there are probably some fancy, and/or expensive options out there for video editing, but there is a simpler solution —- EnVe from EnSight.

Given two animations of equal length (number of frames), EnVe’s multiple tiled movie format (.mtm) can be utilized to place two animations side by side, and a new single animation created.

Here are two example animations:

Case 1 AVI

Case 2 AVI

These two animations are each 826 pixels in X, and 574 pixels in Y, and each are 30 frames. In this example of side-by-side, both animations should be the same height (but could vary in width). You can also place the animations one on top of the other, in which case you’d want to have the animations the same width, but could vary each heights.

A Simple “Multiple Tiled Movie Format” file (.mtm) contains information about how to arrange these two animations together. Here is what that file looks like:

MTM 1.0
# This is a Multi-Tile Movie file.

nummovies 2

fullresolution 1652 574

   imageoffset 0 0
   format AVI
   file Case1.avi

   imageoffset 826 0
   format AVI
   file Case2.avi

You can see above that we set the total number of movies, and the total dimensions of the two movies together (1652 x 574). For each movie, you can therefore set the offset (from the lower left corner). Movie #1 will have a zero offset in X and Y, while Movie #2 will be offset by 826 pixels in X.

You can read this .mtm file into EnVideo, and view a live playing of two animation files, or you can read the .mtm file into EnVe, and simply save out a new single animation file which will have both animations playing side by side. This works great to control the comparison of different models, results, or different variables from separate single animations. Given the flexibility of the .mtm file, you can tile many animations together to make a multiple animation comparison easily and without cost.

Please see below a link which has the animation files, mtm file, and the combined movie example.

Multiple Animation Example

Please see the attached PDF file for similar other operations that can be performed using EnVe… Using EnVe to Create a Single Movie from Existing Movies that Play Simultaneously