Reading in Files

Time Histories

Because Review is a separate post-processor for use after a OnScale run, it is necessary to read in information generated from the run which is stored in various types of output files. The most common type of output file is the history file, <jobname>.flxhst, which contains information on individual element or nodal responses at all times, selected using the pout command in OnScale . A typical examples is the time history of the voltage on a transducer electrode, which is analogous to the time trace on an oscilloscope.

When using Review, the first step is usually to read in the aforementioned history file. To do this, direct the external history file into a local file in Review by using the read command:

read  f1  <jobname>.flxhst

This reads the time history data into a local file (here called "f1"). You can use up to 8 characters to name the local file. Remember that the history file is a series of arrays specified during the model-building phase:

c Which time histories to save?
    hist func /* Input function 1
    hist pize 1 2 1 /* Volt/charge on ceramic 2 - 3
    hist pres $i4 $i4 1 $j3 $j3 1 /* Pressure output at top 4
    hist ydsp $i4 $i4 1 $j1 $j1 1 /* Y displacement on bottom 5

In this case, the local file f1 has five entries, all concerning time:

  1. Input or drive function applied to the piezoelectric material
  2. Voltage on the drive electrode
  3. Charge on the drive electrode
  4. Pressure output at top of the device
  5. Displacement in the y direction at bottom of device

Time histories are saved in the order in which the OnScale pout command requests them. These time histories are now referred to by the local filename (f1) and the record number in that local file (in this case, 1-5). Use of the list command in Review details the time histories in order, with full information on the information stored.


Time-history data are a collection of responses from individual points across the entire simulation time. Snapshot data is the opposite - a collection of responses from many points (e.g. a slice through the model, or even the entire model) at various times. A common snapshot series, for example, would be of pressure in a water-loaded transducer, watching the output pressure wave propagate away from the device. Again, OnScale saves these data when requested to do so by the data command. By default, they are stored in a file with the "flxdato" extension.

To work with the external snapshot file, it must be read into a local Review file. As with time histories, use the read command:

read f2  <jobname>.flxdato

The snapshots are loaded into Review in the order in which they were saved. Multiple snapshots are stored in subfiles, i.e. f2/1, f2/2, and so on, and data can be accessed through a combination of this file/subfile structure and the snapshot field name. To plot the second snapshot pressure response, for example, enter:

plot f2/2 pres

ASCII Text Data

In Review, in addition to  input files, it is possible to read in external files (for example, experimental results from an oscilloscope for comparison with simulated results). The data in the external files first must be stored in columns, in tab-delimited format. It is best to format the data in a spreadsheet package such as Excel before attempting to read the information into Review. To read an external file "experimental.dat" into Review, enter the command:

read  f3  colm  experimental.dat

This reads the external file experimental.dat into the local file f3; "colm" tells Review that it consists of columns of ASCII data.