• No results found

Plotting Functions

In document Star CCM+ User Guide (Page 67-71)

2. You may alter both individual values and the number of such values for any independent variable. Click Save Modified Data to confirm the changes.

3. Changes to existing dependent variable entries are made by over-typing and confirmed by clicking Save Data.

4. At the end of the editing session, you should always save your updated table in a named file by clicking Write Table

Useful points

1. Only one table at a time may be loaded into the pro-STAR editor. If you need to access a second table, you must first save the current one to a named file (if you have made changes) before reading in the new one.

2. If you change your mind about the contents of your current table and wish to make drastic change, clicking New Table enables you to erase all entries and start afresh.

3. The scale factor applied when saving model geometry data (seeChapter 17,

“Data repository file (.ccm)”) is also applied to table coordinate data when they are accessed by STAR.

4. Apart from the table file itself, table data needed for the next STAR-CD analysis are also stored in the STAR problem file (seeChapter 17, “Problem data file (.prob)”) so that they are available to STAR during the run. The user specifies which tables will be needed as part of the boundary, initial condition or other model specification requiring the use of tables.

5. You may use command TBSCAN to scan a named .tbl file. Information about its contents is displayed in the I/O window.

Plotting Functions

Basic set-up

The basic hardware-related plotting features are set by a single command, TERMINAL. This command sets:

• The display mode of X-based terminals (use option ALTERNATE only for improving the plotting speed of certain older types of workstation). This setting may also be accessed from the menu bar by switching between options Plot > Standard Plot Mode and Plot > Alternate Plot Mode.

• The plot destination — this specifies whether plots are to appear directly on the screen or written to the neutral plot file (seeAppendix B in the

Post-Processing User Guide).

• The operating mode of the plotting device — a choice between raster, vector or extended (for high-performance workstations). It is also possible to toggle between raster and extended plot mode by clicking the X / GL button at the bottom left-hand side of the main window. Note, however, that this option is available only if you are working with the glm version of pro-STAR (see

“Running a STAR-CD Analysis”,Step 3).

The basic features of devices operating under one of the above modes are:

1. Vector devices, such as pen plotters, can draw lines in one or more colours, but are not generally capable of filling in closed polygons or erasing parts of the plot after drawing in them. When this mode is set:

Plotting Functions

(a) All hidden-line plot calculations are done by software.

(b) Large amounts of time may be required for large models.

(c) All contour plots displayed as line contours rather than filled colours.

2. Raster devices, such as most workstation screens, Postscript laser printers, etc. are capable of filling in polygons quickly and overwriting previously coloured-in regions with new colours. When this mode is set:

(a) Hidden-line plots are done by hardware.

(b) Contour plots are rendered in filled colours.

(c) VECTOR mode operation is still possible if, for example, the user wants fringe-style rather than filled-colour contour plots.

3. Extended mode devices offer additional functionality such as true (24-bit) colour, hardware Z-buffers, double-frame buffering, coordinate

transformation pipelines, Gouraud shading, etc. Machines with these high-specification graphics attributes can provide:

(a) Real-time rotation, translation and zooming of plots.

(b) Contour plots rendered in smoothly varying colour bands.

(c) Added lighting effects to enhance a user’s perception of the model geometry.

This style of plot is limited to machines that support the OPENGL standard and cannot be stored in the neutral plot file at present.

Appendix C in the Post-Processing User Guide lists all currently available

combinations of plot mode and plot characteristics. The same information can also be listed on line by choosing Help > pro-STAR Help from the menu bar and then selecting the COMBINAT item from the list shown at the bottom of the pro-STAR Help dialog.

Advanced screen control

Advanced screen control functions are implemented as follows:

Background/foreground colour reversal — from the menu bar, select Plot >

Background > Standard (for white lines and text on a black background) or Plot > Background > Reverse (for black lines and text on a white

background). Alternatively, use command CLRMODE.

Maximising the graphics area — from the menu bar, select Plot > Maximum Plot Screen to hide the GUI buttons surrounding the graphics area so as to make the plot as large as possible. The window is also enlarged to take up almost the entire screen. This is helpful when making animations since the largest number of pixels are used, thereby obtaining the highest possible plotting resolution. Select Plot > Standard Plot Screen to return the window to its default size and appearance. Alternatively, use command WHOLE.

• Restoration of the original screen settings — command RESET.

• Temporary, on-line storage of complete screen images — command SCROUT.

• On-line retrieval of screen images previously stored with SCROUT — command SCRIN. This command also provides an elementary animation facility, by replaying a sequence of screen images in quick succession.

Plotting Functions

• Deletion of screen images previously stored with SCROUT — command SCRDELETE.

• Customised scaling of text fonts used in pro-STAR — command TSCALE.

• Image display control — command PLTBACK. This enables images to be created and stored in memory and then popped onto the screen (as opposed to displaying them as they are being created).

For further details on using the above commands, refer to the pro-STAR Commands volume.

Screen capture

It is often very useful to be able to save the contents of the graphics screen as a picture file. The latter can then be pasted into a document created by another, say presentation or word-processing, application. pro-STAR provides this facility via the Utility > Capture Screen menu option (or by typing command SCDUMP). The result of this operation is the creation of a new window containing the picture currently displayed in pro-STAR’s main graphics area. The picture can be

subsequently saved in a file by choosing Utility > Save Screen As and selecting one of the following options for the file format:

XWD (X Window Dump) — X-Motif version of pro-STAR only

GIF (Graphics Interchange Format)

PS (PostScript, either Level 1 or Level 2 format)

EPSF (Encapsulated PostScript, either Level 1 or Level 2 format)

The user needs to make sure that the choice of format is appropriate to the end application. Selecting any of the above options opens the File Selection dialog shown below, enabling you to specify the name and destination directory of the picture file.

If you are working in OpenGL extended graphics mode (see page2-32), you also have a choice of saving a high-resolution screen dump (HRSD) of the extended mode plotting window. This appears as an additional option, High Res. Screen Dump, in the Utility menu (alternatively, use command HRSDUMP). Selecting this

Plotting Functions

option from the main menu opens the High Resolution Screen Dump dialog shown below:

The user input is as follows:

1. Select the required file format from the File Type menu as one of (a) png

(b) gif

(c) ps (PostScript)

(d) eps (Encapsulated PostScript)

2. Enter the file name in the box provided. Clicking the adjacent browser button opens the File Selection dialog shown above which helps locate the required file.

3. Clicking the Options button opens a secondary Image Options dialog that enables you to specify the required image resolution and/or page properties (for PostScript files). An example for GIF/PNG images is shown below.

It is also possible to use the HRSD facility in batch mode to produce high-quality plots using OpenGL style graphics (i.e. including translucency, special lighting effects, etc.). You do not require a special OpenGL graphics card on your machine to do this; the pictures can be made off-screen using the ‘mesa’ software emulation of OpenGL as follows:

• Run pro-STAR with mesa graphics in batch mode prostar mesa -b

• Set extended mode graphics term,,exte

In document Star CCM+ User Guide (Page 67-71)