# 4.9.1. Output Reference

Output is divided into two major categories:

- Results Output contains binary format simulation results in a form suitable for visualization. While the Results output usually corresponds to the entire model, it can also be applied to portions of the model.

- Heartbeat Output is generally written to a text file and provides a convenient means of monitoring intermediate simulation results as well as outputting reduction variables.

This section describes how to use these two output functionalities. A detailed list of all possible commands can be found in the command reference.

## 4.9.1.1. Results Output

The results output block allows you to print simulation data to an output database. This database can then be visualized/postprocessed (e.g. in ParaView), used in subsequent simulations, etc. This data includes internal fields such as `SOLUTION->DOF`, user fields, or postprocessed quantities as well as global variables.

A list of the quantities available for output is printed to the log immediately after the mesh is read. This list can be previewed by running aria with the `--check-input` option which will verify the input syntax, read the mesh, print the variables available for output, and then exit.

    Aria Region "myRegion" has the following fields available for output:
      NODE_RANK Fields:
        * anti_time_derivative_at_time->TEMPERATURE
        * cht_H
        * cht_Too
        * model_coordinates
        * physical_coordinates
        * pp->HEAT_FLUX
        * predicted_solution->TEMPERATURE
        * solution->TEMPERATURE
        * solution->TEMPERATURE_STKFS_N
        * solution->TEMPERATURE_STKFS_NM1
        * time_derivative_at_time->TEMPERATURE
        * ...
      EDGE_RANK Fields:
        * face_coverage
      ELEMENT_RANK Fields:
        * current_element_volume
        * initial_element_volume
        * volume_change_ratio
      Global Variables:
        * avg_temperature
        * dt
        * max_temperature
        * number_of_elements
        * number_of_nodes
        * time

The available quantities are split by their entity rank. When specifying a field for output, the associated rank should be used. A quantity is added to the output database using a line of the form

    <entity> variables = <internal name> [as <output name>]

where the `entity` is the rank specified in the output list, and the `internal name` can optionally be overridden in the output database by specifying an `output name` e.g.

    # Scope: Sierra > Procedure > Aria Region
    begin results output myOutput
      # name of the output database
      Database name = results.e

      # Frequency information
      at step 0 increment = 1

      #Quantities to print
      nodal variables = someMissingField
      nodal variables = solution->TEMPERATURE as temp
      element variables = volume_change_ratio
      global variables = avg_temperature
    end

Note

It is worth noting that since the ExodusII format has no concept of vector/tensor quantities, Paraview deduces vectors by looking for the same variable with `X`, `Y`, and `Z` (for 3D problems) appended. For example if `Ux`, `Uy`, and `Uz` are all present in an output database, ParaView will group them into a vector called `U`.

Similarly if a field called `displacement` is found, it will be recognized by ParaView as the nodal displacements and the mesh will automatically be warped by the field.

Aria will handle naming of vector/tensor quantities that are requested for output, but it is worth keeping these facts in mind when specifying your own output names.

Note

It is not fatal to request an output quantity that does not exist. Instead, a warning is printed to the log stating that output is skipped since the field cannot be found. If a certain quantity is missing from your output, this can be a good first thing to check for.

    ******************************************************************************
    **  Warning:
    **  In region 'myRegion' Results Output block 'myOutput', Nodal variable
    **  'someMissingField' was not found and will not be output
    ******************************************************************************

## 4.9.1.2. Heartbeat Output

Unlike Results Output, heartbeats are used to view scalar data such as reduced quantities and running metrics. They can be useful to track progress of simulations, as well as for collecting reduced data for postprocessing.

Available output quantities include

- `TIME`/`TIMESTEP` - Current simulation time/timestep

- `STEP` - Current simulation step

- `NUMBER_OF_ELEMENTS`/`NUMBER_OF_NODES` - Mesh statistics

- `KILLED_ELEMENTS`/`TOTAL_DEAD_ELEMENTS` - Standard Element Death info

- Any postprocessed global variable

As was stated above, the list of the available globals will be printed to the log

    Aria Region "myRegion" has the following fields available for output:
      NODE_RANK Fields:
        * ...
      EDGE_RANK Fields:
        * ...
      ELEMENT_RANK Fields:
        * ...
      Global Variables:
        * avg_temperature
        * dt
        * max_temperature
        * number_of_elements
        * number_of_nodes
        * time

A quantity is added to the output heartbeat using a line of the form

    variable = <entity> <internal name> [as <output name>]

Note that similar to results output, the `internal name` can be overridden by specifying `as <output name>`

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb
      # name of the output stream
      Stream name = results.csv

      #Formatting of file
      Timestamp Format = ""
      Precision        = 8   # precision of output
      Format           = csv # delimeter
      Labels           = Off # qnty=123 format
      Legend           = On  # header row of labels

      # Frequency information
      at step 0 increment = 1

      #Quantities to print
      variable = global time as t
      variable = global avg_temperature
      variable = global max_temperature
      ...
    End

It is also possible to select a single value from a field by specifying the closest point

    variable = <entity> <internal name> nearest location <X> <Y> <Z> as <output name>

or a specified ID

    variable = <entity> <internal name> at <entity> <ID> as <output name>

For example:

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb
      ...
      Variable = Node solution->temperature nearest location 0.0 0.0 0.0 as tempOrigin
      Variable = Node solution->temperature at node 123 as temp123
      variable = element volume_change_ratio at element 1 as vcr1
      ...
    End

Note that this is similar to a data probe, with the key differences being that

1. The `nearest` specification snaps to the nearest node while the `data probe` interpolates to the exact point

2. The `data probe` is Eulerian (remains at a fixed point throughout the simulation), whereas the `nearest` specification is Lagrangian (sticks to a node and thus follows any deformation of the mesh at that node).

This distinction can be useful depending on what quantity you are interested in.

Note

Similar to results output, it is not fatal to request heartbeat of a global that does not exist. Instead, a warning is printed

    ***********************************************************************************
    **  Warning:
    **  In Heartbeat Output block 'THE_HEARTBEAT':
    **  Global variable 'someMissingGlobal' does not exist and will not be output
    ***********************************************************************************

The format of the heartbeat output is flexible, and is controlled by the parameters Precision, Format, Labels, and Legend. If no specific format is required, the following parameters

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb
      ...
      Timestamp Format = ""
      Precision        = 8   # precision of output
      Format           = csv # delimeter
      Labels           = Off # qnty=123 format
      Legend           = On  # header row of labels
    End

produce a csv file that is human-readable and can be read easily across applications

              time, avg_temperature, max_temperature
    0.00000000e+00,  3.50000000e+02,  4.00000000e+02
    1.00000000e-01,  3.60000000e+02,  4.10000000e+02
    2.00000000e-01,  3.70000000e+02,  4.20000000e+02
    ...

## 4.9.1.3. Output Scheduling

For both results and heartbeat output, the frequency of output is controlled by specifying either the time or step frequency using the following lines respectively

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb
      at time 0.0 increment = 0.1
      # or
      at step 0 increment = 1
    End

Note that multiple of these lines can be specified to define a more complex output schedule e.g.

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb # or results output myOutput
      at time 0.0    increment = 100.0
      at time 300.0  increment = 300.0
      at time 1800.0 increment = 500.0
    End

Additional times/steps can also be included using by specifying the respective command lines

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb # or results output myOutput
      Additional Steps = 1 2 3
      # or
      Additional Times = 0.1 0.2 0.3
    End

By default, the time closest to the requested print interval is written. It is sometimes desired, however, to output exactly at a given print interval. In this case, `Timestep adjustment interval = <N>` can be set, which allows the time step manager to modify the next `N` steps to attempt to exactly hit the desired output.

    # Scope: Sierra > Procedure > Aria Region
    Begin Heartbeat myHb # or results output myOutput
      ...
      Timestep adjustment interval = 4
    End

Finally, note that if a certain output pattern is desired to be used in multiple places, it can be defined as an output scheduler and given as input to the output block(s) in place of the arguments above. Note that the scheduler must be placed at Sierra scope:

    Begin Sierra Job
      # Scope: Sierra!
      begin Output Scheduler mySched
        at time 0.0    increment = 100.0
        at time 300.0  increment = 300.0
        at time 1800.0 increment = 500.0
        ...
      end

      ...
      Begin Procedure theProcedure
          ...

          Begin Aria Region Aria_Region
            ...

            # Scope: Sierra > Procedure > Aria Region
            Begin Heartbeat myHb
              Use Output Scheduler mySched
              ...
            End

            Begin results output myOutput
              Use Output Scheduler mySched
              ...
            End
          End Aria Region Aria_Region

        End Procedure theProcedure
    End Sierra Job

Note

In the case of steady solutions, Aria output will contain two “time” steps: an initialization output plane, and the steady solution output. Care must be taken to use the appropriate time if these results are used in subsequent analysis (e.g. to provide the initial condition from file for a transient problem).