12.15.1. Editing in the Table Viewer


Note:  When multiple cases are loaded, the Default Case field enables you to specify which case the table values apply to. If the cases are in case-comparison mode, you have the option of creating a table that uses values from the differences in values between cases 1 and 2.

Changing the Default Case field removes all unsaved values and definitions from the table.


To enter data into a cell, select a cell and type in the information you want. To edit the current contents of a cell in the cell itself (rather than in the cell definition field), double-click the cell.

The cell contents can be formatted with bold, italic, and underline fonts; left, center, and right justification; word wrapping; font sizes; and text and background colors. Multiple cells can be merged into a single larger cell to enable large items (for example, titles) to span multiple cells. For details, see Table 12.2: Table Viewer Tools Toolbar.

To perform a formatting operation on multiple cells, click in the upper-left cell of the group and, while pressing Shift, click in the lower-right cell of the group. While the group is highlighted, toolbar operations are applied to all cells in the group.

Numeric data, (that is, numbers alone, numbers with units, and expression results), can be formatted to display in scientific or fixed notation with a specified number of significant digits.

Table contents can be cut (Ctrl+C) and pasted (Ctrl+V) into Microsoft Excel documents and vice versa.

12.15.1.1. Shortcut Menu

To access the shortcut menu for a table, type = into a cell and right-click the cell, or right-click the field for the selected cell above the table. The shortcut menu has all of the commands listed in Table 12.1: Shortcut Menus Toolbar, plus an Edit submenu that has the standard editing commands.

For faster expression entry, there is also a Shortcut Menus toolbar above the table with the following items. Type = into the cell and click the given menu to display a variety of items that can be inserted automatically at the current cursor location. All, except Annotation, are also available in the details view for expressions.

Table 12.1: Shortcut Menus Toolbar

Type of Item to InsertDescription
 

Select from the following submenus:

  Enables you to specify CFD-Post expressions or expressions that you have created with the Expressions workspace. For an example of using the Expressions workspace, see Expressions Workspace: Example.
  Select from a list of existing variables to insert into the cell.
  Select from a list of existing locations to insert into the cell.
  Select from a list of mathematical constants to insert into the cell.
 

Select from the following menu items/submenus:

  • Time Step

    Inserts the value of the current timestep.

  • Time Value

    Inserts the value of the current time value.

  • File Name submenu

    • Name

      Inserts the name of the current results file, including the extension.

    • Path

      Inserts the file path of the current results file.

  • File Date submenu

    Select from a list of different date formats to insert into the cell. The inserted value represents the date that the file was created.

  • File Time submenu

    Select from a list of different time formats to insert into the cell. The inserted value represents the time of day that the file was created.


12.15.1.2. Expressions

Tables in CFD-Post have the ability to evaluate and display expression results and update those results when variables and/or locations they depend on change.

To enter an expression, edit a cell and prefix a valid CFD-Post expression with an equals sign (=). For example, you may enter the following into a cell:

=2*areaAve(Pressure)@inlet

When the focus leaves the cell, the table displays the evaluated result of that equation in the cell. When selecting a cell containing an expression, the expression is displayed in the cell editor box immediately above the table. You can edit the expression in the cell editor box. Alternatively, you can double-click the cell and edit the equation from the cell itself. For details on how to enter common expressions and functions quickly, see Shortcut Menu.

If there is an error in evaluating the expression contained in a table cell, the cell will be colored red.

Units for expression evaluations that return a temperature will always be displayed in K or R. For details, see Function Calculator.

The toolbar above the Table Viewer contains the following icons:

Table 12.2: Table Viewer Tools Toolbar

IconDescription
 

Creates a new table.

 

Opens the Load Table from file dialog box.

Tables can be loaded from files in two different formats:

  • CFD-Post State Files (*.cst) - Loads the table CCL from the given state file. If the file contains tables with names that already exist, numbers will be added to the end of the names of the imported tables to differentiate them from existing tables.

  • Comma Separated Values Files (*.csv) - Loads the values in the CSV file into a new table. You can specify the table name in the Load Table dialog box.

 

Opens the Save Table to file dialog box.

Tables can be saved to several formats:

  • CFD-Post State (*.cst) - Saves the current table to a state file. Tables saved in state files will maintain expressions and formatting and, when reloaded, will exactly reproduce the original table.

  • HTML (*.htm, *.html) - Saves the current table to an HTML file. Note that the saved HTML table will contain expression results, and not the expressions. All formatting will be converted to the HTML equivalent. Word-wrapping is always on. The Save Table dialog box contains additional formatting options including table title, caption, borders, margins, spacing, and gridline visibility.

  • Comma Separated Values (*.csv) - Saves the current table to a CSV file. Note that the saved table will contain expression results, not the expressions. No formatting information is saved to the file. The Save Table dialog box provides the option to clear the output of trailing separators for table rows that have fewer columns than other rows. If this option is on, extra commas will appear on some lines so that all rows in the CSV file will contain the same number of columns. This format can be directly imported to Microsoft Excel.

  • Text (*.txt) - Behaves identically to the CSV option, except that you can specify the separator.

 

Edit operations for contents of cells: Cut, Copy, and Paste.

To select a rectangle of cells for an operation, click in the cell in the upper-left corner, then Shift-click the cell in the lower-right corner. The cells become highlighted and can be operated upon as a unit.

 

Font operations for text in cells: Bold, Italic, and Underline.

 

Text-alignment operations: Left, Center, and Right.

 

Makes all cells in the table wrap text.

 

Launches the Cell Formatting dialog box, where you can specify scientific or fixed notation, the precision, and whether to show the value or the units (at least one of the value or units must appear).

 

Changes the size of the font used in the cell.

 

Opens the Select color dialog box for setting the background color.

 

Opens the Select color dialog box for setting the text color.

 

Causes a cell to span rows or columns (Merge Cells) or reverses that operation (Unmerge Cells).


Here is an example of formatting applied to a table:

Figure 12.1: Sample Table Formatting

Sample Table Formatting

To format the table shown above:

  1. Cells A1-D1: Applied bold font, background color, and text centering. Manually resized cell widths individually.      

  2. Cell A1: Applied text wrapping and resized cell height manually.  

  3. Cells A2-D6: Right-justified text.  

  4. Cells A2-A3: Manually changed the font color.  


Note:  To perform a formatting operation on multiple cells, click in the upper-left cell of the group and, while pressing Shift, click in the lower-right cell of the group. While the group is highlighted, toolbar operations are applied to all cells in the group.