This article discusses various ways to export EnSight particle trace data.
Since EnSight particle trace parts are client-side parts(a), their resulting data does not reside on the server; and thus; can not be exported as regular (server-side) parts via the >(b)File >Export >Geometric Entities feature(c). However, there are a number of ways to export trace data which include
- listing to the EnSight Message window(d) via >Query >Show information >Part,
- saving to an ASCII text file via a simple python script. 'export_trace_data.py' (see below),
- saving to both an ASCII text file as well as another set of EnSight case files (for more advanced study) via a python scripted user-defined tool called "Particle Trace Analyzer" (see below),
- saving to an ASCII text file 'p_trace_dump.file' via "test: trace_dump" (to be deprecated).
1. Listing to the EnSight Message window(d) via >Query >Show information >Part
Trace x, y, z, time, and all active variable information can be listed to the EnSight Message window by
- first toggle-on this capability by executing >File >Command >Command entry: "test: full trace query ON" in the corresponding text field (press Enter key to execute it),
- selecting the Particle trace part in the main part list, and then
- selecting >Query >Show information >Part.
One only needs to issue the "test: full trace query ON" command once. Although this conveniently displays the trace information to the EnSight Message window, it can be very, very slow if you have lots of traces; because it uses a general purpose GUI output function. Therefore it is probably not practical for more than a few hundred traces. More efficient options are discussed below.
2. Saving to an ASCII text file via a simple python script 'export_trace_data.py'
Trace x, y, z, time, and user specified variable information can be saved to a file by way of a simple python script like 'export_trace_data.py' (see respective attached file).
Before executing this file, you must appropriately edit the 'trace_part', 'trace_variables', and 'output_file' python variables as outlined in the file. Once edited, execute this function by
selecting the file, i.e. >File >Command >Python (tab) >Edit Python File... >Filename: "export_trace_data.py", which opens an editor dialog containing this file, and then
selecting the editor's >File >Run script (exec file) option.
This exports trace data very quickly, and also provides a useful example which you can change and edit to your needs. A more hands-on approach that requires some editing, but allows you to modify the output as well.
3. Saving to files using "Particle Trace Analyzer" python script.
Another script is available that will retrieve the particle trace from the client, save it to a case gold file, and then re-read it into EnSight as a separate case which will allow server-side particle trace analysis (clipping, calculations, and filtering elements). The interface and functionality of this user-defined python tool is outlined in the attached power-point presentation "particle_trace_analysis_KEC.pptx" with resulting examples provided in the attached "trace_movies.tar" file. As a side, this script can also save out a simple text file similar to the other examples. Please contact email@example.com if you are interested in acquiring this script.
4. Saving to an ASCII text file 'p_trace_dump.file' via "test: trace_dump" (to be deprecated)
This method will eventually be deprecated, but was the original way to export trace data. By executing
- >File >Command >Command entry: "test: trace_dump" in the corresponding text field (followed by Enter key to execute it),
this execution will create an ASCII file "p_trace_dump.file" similar to the listing in the EnSight Message window by the first method described above. The location of this file on Linux systems is located in the directory from which you executed EnSight (or the ensight client program if doing a remote execution). On Windows systems, the location of this file is typically under your Documents directory under your user account folder. Again, this function will eventually be deprecated.
(a). EnSight 10 User Manual, Ch. 1 Overview, Created Parts, Table 1-2 Part Creation and Data Location
(b). ">" = to click or select menu item or entity.
(c). EnSight 10 User Manual, 4.1. File Menu Functions, Export, Geometric Entities...
(d). EnSight 10 User Manual, 2.14 Saving Query Text Information, From EnSight Message Window