Dynamic Range Plotter

Suppose that you have a transient domain, where you have some information at a high temporal frequency, but your time domain is relatively large. If you make a default plotter, the temporal range is too large to see the high frequency information. But, if you zoom in the time range, you are “fixed” to a particular time. Suppose you’d like to see both the higher frequency information, but also the whole time domain?

Python to the rescue again. Using Python, we can dynamically adjust the time range of the graph at each timestep… and thus create a plotter with a relatively small time “window”, but that window moves with the current timestep, so that you can see the whole time domain.

Here is a short example of what such a “dyanmic range plotter” would look like:

dynamic_range_plotter

Here is a short tutorial on using this python tool:

http://www.ceisoftware.com/wp-content/uploads/screencasts/dynamic_range_plotter/dynamic_range_plotter.html

And here is the tool itself:

dynamic range plotter python

Importing Converge .out files

The Converge Solver exports out additional quantitative information into various “*.out” files. The information contained within these .out files can be very useful in visualizing along with the fluid domain in EnSight, to quantify against other extracted values in EnSight, qualitative comparison, or just to easily visualize versus time in EnSight.

This very small/short routine was developed to work on the spray.out file which contains information regarding the spray computed by the solver (injection pressure, injected mass, spray penetration, etc). The routine reads the .out file, along with the user specified engine RPM (to calculate time in seconds), and places all of the values from the .out file into EnSight Queries.

The User Defined Tool should appear as :

The user simply needs to specify the Converge .out file, along with the Engine RPM, so that the routine can correctly tie the query with time.

Once executed, you should see a number of additional queries within EnSight. The name of the Query is taken from the .out file, along with the units. Each query is associated with “Time” in seconds, and should therefore play correctly and appropriately within EnSight, as well as¬†synchronizing¬†with the timesteps of the main dataset.

The resulting Queries can easily be plotted with the Right Mouse Button, or drag/drop onto current plotters. Query-on-query operations can also be performed to further inspect rate of change, comparisons (differences between queries).

You can download the current User Defined Tool here. Once downloaded, unzip the file, and place the contents into your .ensight100/extensions/user_defined/Tools/ directory, and restart EnSight.

Click here to download Converge .out file reader

Tool and Script to Plot Probe Values on a Graph

An interesting request came in today: Can I plot the values from my interactive query probe in a graph?

Good question. Currently, you can see the values reported next to the query probe in the viewport, and you can click on “display values” to get a window pop up with the values in tabular form. But, you can’t populate a Query for a Plotter and get a graph of the values.

Python to the rescue again. Through python, you have direct access to a list of those Interactive Probe Queries and their values. With that information, we can utilize Python to populate those values into a Query Register and make a Plotter (or graph) of them.

This small Python macro will create 4 queries actually: one for X coordinate vs Variable; one for Y coordinate vs. Variable, one for Z Coordinate vs. Variable; and one of Distance (from first probe) vs. Variable. The default plot is chosen as “Distance Vs. Variable”. However, the user can easily drag any of the other 3 queries into the plotter (or make their own plotter) in EnSight. Here is what it looks like when I have 6 probe values:

You can see that you have 4 queries generated, and 1 plotter.

Download the following python and setup as a macro perhaps (assign it to a memorable keystroke sequence) and be able to quickly and easily plot the values from your multiple interactive probes…. Voila.

Python Code for Plotting Probes

Another option is a python tool that will do this.

 

query_probe_example