Encyclopaedia Index

Contents list

VR-Viewer

VR Viewer Overview
Selecting the Files to Plot
VR-Viewer Environment

VR-Viewer Toolbar

VR-Viewer Hand-set and Toolbar Icons
The Main Menu dialog
The Object Dialog Box
VR-Viewer Scripting (Macro) facility

The function of the VRV Macro
Saving MACROs
Running MACROs
MACRO Commands
PHOTON USE Files

Saving Animations

Short cuts to Viewer functions:

Contours Surface contours and vectors Vectors Iso-surfaces Streamlines Line plots Time history plots

Short cuts to Viewer Macro commands:

Setting the File Name, Setting the View, Setting the Position of Screen Items, Setting the Variable to be Plotted, Controlling the Plot Elements, Setting the Colour Palette, Line Plots, Time History PlotsX Cycle Options, Controlling Slices, Probe Position, Low and High Spots , General Display Toggles, Controlling the Display of Objects, Clipping Plane Options, Saving Images, Progress Controls, GENTRA Particle Tracks, PHOTON 'USE' Files, Extracting multiple data points


VR Viewer Overview

The VR-Viewer is the solution visualisation counterpart of the VR-Editor. It is accessed from Run - Post processor - GUI Post processor (VR Viewer) on the main VR-Editor window. It can display;

Typical plots showing all graphics elements are shown below:

 

Viewer screen and hand set

Typical line plot

At first glance, the VR Viewer looks very similar to the VR Editor. There are however differences in the controls and graphics-window annotations that facilitate viewing results on the flow domain, for example:

Further details of all the hand-set buttons and main window menus are given below.


Selecting the Files to Plot

The files to be plotted are selected during the VR-Viewer start-up sequence. If another set of results is to be plotted, clicking on the F6 icon or pressing the F6 function key will display the file selection dialog without changing any of the display settings. Clicking on 'File' - 'Open existing case' or 'File' - 'Reload working files' will restart the Viewer and reset all the display settings to default.

Steady-State Cases

When the VR-Viewer starts, or when F6 is pressed, it displays this dialog box:

IMAGE: File names

dialog- default files

To plot the most recent results, click 'OK' and the VR-Viewer will read the default files and display the first image. If intermediate dumps have been selected, 'Latest dumped files' will display the name of the most-recently written file. If the solver run has finished, the name will be phi (or phida) as shown.

Pressing F9 or clicking the F9 icon will load the most recently-dumped files and refresh the screen image with the new results.

The Use intermediate sweep files button is displayed if intermediate dumps have been selected in the VR-Editor Main Menu - Output - Dump Settings panel. When Use intermediate sweep files is selected, the following dialog is displayed:

IMAGE: File names

dialog - Use intermediate files

The > symbol advances to the next stored sweep,>> to the last stored sweep. Similarly, < and << go back to the previous and first stored sweeps. Clicking or pressing F7 or F8 will also load the previous or next sweep files. Clicking or pressing F9 will load the most recent files.

To plot the results of a different case, click on 'No' next to User-set file names to produce this dialog:

IMAGE: File names

dialog - User files

Click on 'Select files' to bring up a dialog which allows the selection the files it is desired to plot. These may or may not have any connection to the current case.

IMAGE: User file

names dialog

This dialog allows the specification all the files the VR-Viewer might want to read - it is only required to specify those, which are to be different from the default. The BFC grid file is only required if a BFC case is to be plotted, the PARSOL file only if a PARSOL case is to be plotted.

If a name of the form 'name.q1' is specified for the input q1 file, the VR-Viewer will assume that it is required to plot the results of that case, and will change the names of the other files in line with the table shown in VR-Editor - File - Save as a case.

Transient Cases

In a transient case, the dialog is slightly different.

IMAGE: File names

dialog - Transient

The Use intermediate step files button is displayed if intermediate dumps have been selected in the VR-Editor Main Menu - Output - Dump Settings panel. When Use intermediate step files is selected, the following dialog is displayed:

IMAGE: File names

dialog - Use intermediate files

The > symbol advances to the next stored time-step,>> to the last stored time-step. Similarly, < and << go back to the previous and first stored time-steps. Clicking or pressing F7 or F8 will also load the previous or next time-step files. Clicking or pressing F9 will load the most-recently dumped set of results.


VR-Viewer Environment

The VR-Viewer has a reduced set of pull-down menus, as can be seen above. Only the File, Settings, View, Run, Options and Help menus are active.

File

These work as in the VR-Editor.

Settings

IMAGE: VR-Viewer

Settings menu

Domain Attributes, Probe Location, Add Text, New Clipping plane, New Plotting Surface, Object Attributes, Find Object, Editor Parameters, Contour Options, Vector Options, Iso-surface Options, Plot Limits, Xcycle settings, Plot variable profile, Near Plane Rotation speed, Zoom speed, Depth effect, Adjust lighting

The Add Text, Editor Parameters, View Direction, Near plane, Rotation speed, Zoom speed, Depth effect and Adjust lighting dialogs are the same as in the VR-Editor.

View

This leads to the Options tab of the Viewer Options dialog.

These are as in VR-Editor.

 This will mirror the domain and all plot elements in either X, Y or Z. It is not possible to mirror in several directions at once. The following image shows the domain mirrored in the Z direction

Run

The VR-Viewer Run menu contains the same options as the VR-Editor, with the exception that in the Pre processor sub-menu, the 'GUI Pre processor (VR-Editor)' is enabled, and in the Post processor sub-menu, the 'GUI Post processor (VR-Viewer)' is inactive. The Utilities sub-menu only contains 'Any'.

This is how to return to VR-Editor.

Options

This is as in VR-Editor.

Help

This is as in VR-Editor.


The Tool Bar

The Viewer toolbar includes the same General, Domain, Object and Movement toolbar icon groups as the Editor. In these, only the Start a new case icon is inactive. In addition, there are four further icon groups.

Slice toolbar, Animate toolbar, Variables toolbar, Function key toolbar

Slice toolbar

Slice tool bar

These lead to the Slice Toggle, Slice Direction X/Y/Z, Contour Toggle/Contour Options, Vector Toggle/Vector Options, Iso-surface Toggle/Iso-surface Options, Streamline Management/Stream Options, Graph Options and Slice Management dialogs described below.

Animate toolbar

Animation toolbar

These lead to the Macro, Animation Toggle/Animation Options and Record animation dialogs described below.

Variables toolbar

Variables toolbar

These lead to the Select Pressure, Select Velocity, Select Temperature and Select a Variable dialogs described below.

Function key toolbar

Viewer function key toolbar

The F3-F5 icons are used to control the VR-Viewer macros.

F6 - F8 control the plotting files, as described above.

F9 loads the most-recently written set of results, preserving the current view and display settings.

The tool bar also displays the name and type of any selected object. If no object is selected, it will display the name of the domain (usually CHAM).

The Status Bar

The status bar displays information regarding the progress of the current plot. When reading files, it shows the percentage of the file that has been read. The current working directory is displayed in the status bar when it is not showing other information.


VR Viewer Hand-Set Toolbar Icons

The VR-Viewer hand-set is shown below:

Image: HAND-SET

The top two rows of buttons, Axis toggle through to Bounding Box toggle, are exactly the same as in the VR-Editor, except for the Macro and Record animation buttons, which are described in detail later.

The movement controls are also the same as in the VR-Editor, including Fly-through Mode.

The remaining hand-set buttons are described here.

Object Management, Contour Toggle/Contour Options, Vector Toggle/Vector Options, Iso-surface Toggle/Iso-surface Options, Streamline Management/Stream Options, Streamlines from GENTRA Tracks, Slice Toggle, Slice Management, Animation Toggle/Animation Options, Slice Direction X/Y/Z, Select Pressure, Select Velocity, Select Temperature, Select a Variable, Probe position hand-set controls, Show Probe Location, Display Minimum and Maximum Values, Viewer Options 'Options' Dialog, Plot Variable Profile

The object management panel has similar functionality as in the VR-Editor, although the options which allowed the objects to be modified have been disabled. This includes the facility to create or delete objects. There are four additional items on the Action and Context menus. These are:

These are described in VR-Viewer Object context menu


Line arrows with line width 3


3D vectors with line width 3

Image:

  Streamline Management Panel - Action Menu

Actions will apply to all currently selected streamlines. When creating streamlines or groups of streamlines, there are occasions when not all are desired in the final plot. The first three actions therefore give the ability to turn individual streamline visibility on or off or to delete the streamline altogether. The Streamline location item brings up a dialog which enables the starting location for individual streamlines to be modified. The last three menu items enable the streamline type to be changed.

Image:

  Streamline Management Panel - Animate Menu

Once generated, the streamlines can be animated to give a better impression of the flow pattern. The default animation display (balls radio button active) is to send a single grey sphere along the length of each streamline. The length of the animation will be 100 frames and will repeat until the animation is terminated. The animation control dialog is shown here:

Image:

  Streamline Animation Control Dialog

Increasing the number of frames makes the animation smoother, but will slow down the refresh rate. Increasing the number of balls per streamline gives a clearer impression of the path, but also slows the animation down. The best result is a compromise between the number of frames and the number of balls for the particular graphics card in question.

When the Show streamline checkbox is unticked, only the balls (or vectors) will be drawn.

The streamline balls are usually grey. When the Colour by value checkbox is ticked, they will be coloured in the same way as the streamline itself. The size of the balls is controlled by the 'Animation ball size' input box.

When the vector radio button is active, the balls are replaced by moving vectors, which show the local flow direction and speed. The 'Animation ball size' input box is replaced by 'Vector scale'. Vectors look best with the streamline display turned off.

When the line segments radio button is active, the balls are replaced by line segments denoting a set time period. The default time period is 10% of the total flight time. The 'Animation ball size' input box is replaced by 'Segment length'.

The Save button opens a dialog from which an animated GIF file or an AVI of the animation can be saved. The file will contain all the frames chosen for the animation - these can be a sub-set of the frames making up the full animation. For example 1000 frames may be needed for smooth movement, but only 100 frames need be saved to AVI, making a movie lasting 10 seconds at the default 10 frames per second.

GENTRA particle tracks can be displayed as streamlines in the VR-Viewer. The track information is written to a particle history file called, by default, ghis. To display the tracks, click the Macro button on the handset, and enter the name of the history file as the name of the 'RUN macro' file. Click OK to close the Macro functions dialog.

All the track information in the file will be read, and a streamline will be generated for each track in the file. If only selected tracks are required, create a file with any convenient name, and insert into it the lines:

history read

ghis m [n]

where ghis is the name of the history file, m is the number of the (first) track to read, and n, if present, is the number of the last track to read. The file can contain any number of such pairs of lines. This file can now be used as a VR-Viewer macro file.

The new streamlines will appear in the Streamline management panel, and can be operated on as normal streamlines, except:

In a transient case, particle tracks will only be displayed for the time steps which fall within their flight time.

The Slice Management Panel offers a limited subset of facilities described for the Streamline Management Panel described above (it has no Options or Animation items).

This makes a copy of the contours and vectors on the slice plane. When the slice plane is moved, the copied image will remain until deleted.

In this way, it is possible to build up a composite image with many planes. The saved slices have an orange border to differentiate them from the current slice, which has a white (or black) border. The image below shows two X slices, a Y slice and a Z slice.

The contour and vector display in the saved slices always follows that of the current slice.


The Main Menu dialog

IMAGE:

    Graph options Dialog

The Main Menu in the Viewer is much simpler than in the Editor.

SI Units   FPS UnitsCGS Units

Note that it is only the contour scale, probe value and average value which are changed - the data is left untouched. The probe location is also shown in the selected unit set.


The Object Dialog Box

Just as in the VR-Editor, double-clicking on an object will display the object dialog box.

IMAGE: Object

  dialog in VR-Viewer

Unlike in the VR-Editor, the values in the size and position boxes cannot be changed - they display the size and position of the current object. Similarly, the Geometry button on the Shape page is inactive, although textures can still be modified.

The Go To and Hide buttons work as in the VR-Editor. The Colour button allows the colour and/or transparency of an object to be temporarily changed. Permanent changes can only be made in the VR-Editor, and become permanent when the working files are saved.

The Show nett sources button on the Options page has several functions, depending on the object selected. The possibilities are:

'Show nett sources' can also be found on the Object Management Dialog action menu, and on the right-click context menu.


Contours and Vectors on the Surfaces of Objects

To colour an object by the current plotting variable, select the object, right-click on it and select 'Surface contour' from the context menu.

Alternatively select the object or objects from the Object Management Dialog, and then select 'Surface contours' from the Action Menu.

To plot contours or vectors on an arbitrary surface, create a Plotting Surface object. This can be done in the Viewer (or Editor) from 'Settings - New Object - Plotting surface', or from the Object management Dialog, 'Object, New, Plotting Surface'. Double-click the new object to open its Specification dialog, set any desired shape and place it where required.

 

In the Viewer, select the new object, right-click and select 'Surface contours'.

Now select 'Surface vectors'

Note that surface contours and surface vectors cannot be displayed simultaneously on the same plotting surface. To do so, copy the surface then plot contours on one and vectors on the other.


VR-Viewer Object context menu

IMAGE: Viewer Object context menu

When an object is selected, the right mouse button will bring up a context menu for the current object. Most options which allow for the modification of an object have been disabled, except 'Modify Colour'. However, there are five items which are only available in the viewer

Both .csv files can be easily imported into Excel for further processing. They are also compatible with AUTOPLOT.


VR-Viewer Scripting (Macro) Facility

The function of the VRV Macro

A typical use of a VRV macro is to record a particular view and magnification, and then restore it whenever required, for example when preparing images for a report. Using a macro in this way will guarantee that a sequence of images from different phi files, perhaps generated on separate occasions, can all use the identical view and magnification settings.

A macro file can contain a single image, or a sequence of images separated by PAUSE commands.

Macro command files are ASCII text files, and can be edited (or created) using any convenient text-file editor.

Saving VR-Viewer Macros

Macro files can be created by the following means:

Running VR-Viewer Macros

The macro commands can be copied into the Q1 input file, by placing them between the statements VRV USE and ENDUSE. These two lines, and all the macro lines, must start in column 3 or more to ensure that they are treated as comments by the VR-Editor.

Macros can be run by as follows:

IMAGE:

  MACRO Functions dialog (run)

The default file name is Q1.

VR-Viewer Macro Commands

The commands set the state of the VR-Viewer settings. The screen image is updated when a PAUSE command is encountered, or the end of the file is reached. The image is the outcome of the final states of all the settings.

The commands making up the macro language can be divided into a number of groups. Only those commands that change a default or change an existing setting need be placed in the macro file.

The individual commands can be shortened, as long as the remaining part is unique.

Short cuts to commands

Setting the File Name, Setting the View, Setting the Position of Screen Items, Setting the Variable to be Plotted, Controlling the Plot Elements, Setting the Colour Palette, Line Plots, Time History PlotsX Cycle Options, Controlling Slices, Probe Position, Low and High Spots , General Display Toggles, Controlling the Display of Objects, Clipping Plane Options, Saving Images, Progress Controls, GENTRA Particle Tracks, PHOTON 'USE' Files, Extracting multiple data points

Setting the File Name

FILE name [xyz name for BFC case]  Sets the name of the PHI (and XYZ file) to plot

FILE + Read the next saved PHI file (equivalent to F8)

FILE - Read the previous saved PHI file (equivalent to F7)

USE file    Read commands from another file. Use files can be nested to a depth of 5.

Setting the View

VIEW x, y, x                  Sets the View direction
UP x, y, z                      Sets the Up direction

VIEW CENTRE x, y, z   Sets the Cartesian co-ordinates of the view centre - the point about which the image rotates.
[VIEW DEPTH depth     For the Windows Viewer, sets the View Depth. The default is 3.0. A value of 100000 makes the view isometric]
[VIEW TILT angle         For the DOS/Unix Viewer, sets the perspective angle. The default is 0.8. A value of 0.0 makes the view isometric]

SCALE scalex, scaley, scalez   Sets the overall domain scaling factors

NEARPLANE depth    Sets the near plane position.

The View Centre, Scale factors and View Depth/Tilt settings can be seen by clicking on 'Reset'.

Setting the Position of Screen Items.

The primary keyword POSITION is followed by a secondary keyword to identify which item is under consideration. The two integers represent the normalised location in the range 0.0 - 1.0 for the first character of the item. [The origin is at the top left hand corner of the client area.]  Each item also has an associated ON / OFF switch to indicate whether it is to be drawn or not.

POSITION CELL x, y          Shows the current probe position in terms of cells
CELPOS ON / OFF

POSITION CONTOURKEY x, y  Positions the contour colour scale
CONTOUR SCALE ON / OFF

POSITION TITLE x, y             Positions the run title
TEXT ON / OFF

POSITION PROBE x, y        Positions the echo of the probe value
PROBE ON / OFF

POSITION AXIS x,y               Positions the location of the axes
AXIS ON / OFF

Labeling the Plot

TEXT CLEAR                        Deletes all previous text items
TEXT size, colour               
Sets size (1=large, 4=small) and colour, immediately followed by
string                                       
Sets the actual text to be placed on the plot
Xpos Ypos                           
Sets the normalised position of the first character as above

Setting the Variable to be Plotted

VARIABLE name                  Sets the name of the current plotting variable
VARIABLE RANGE min max Sets the minimum and maximum values for the plot.

If the minimum/maximum values are changed from the default (i.e. the current field values), the set values will be used for all subsequent plots for this variable. Setting specific minimum and maximum values ensures that contour plots from different PHI files are scaled consistently.

Controlling the Plot Elements

Contours

CONTOUR ON / OFF / CLEAR   Clear also deletes all saved slices.
CONTOUR FILL ON / OFF       Controls the display of the filled contour bands.
CONTOUR LINE ON / OFF       Controls the display of the contour lines between bands.
CONTOUR LINE COLOUR index / MULTI       Controls the colour index of the contour lines between bands. MULTI indicates using contour band colours.
CONTOUR LINE WIDTH ncwid       Controls the width in pixels of the contour lines between bands.
CONTOUR SCALE ON / OFF       Controls the display of the contour scale.
CONTOUR OPAQUENESS iopaq     Sets the contour opaqueness to iopaq.
CONTOUR BLANK ON / OFF           Sets the out-of-range transparency.
CONTOUR AVERAGE ON / OFF      Sets contour averaging on or off.
CONTOUR CONTINUOUS ON / OFF Sets the contours to use smooth shading
CONTOUR INVERSE ON / OFF         Inverts the colour scale so that red is low and blue is high
CONTOUR GREYSCALE ON / OFF  Switches the contour colours to greyscale. Note that this will also affect vectors and iso-surfaces.

Vectors

VECTOR ON / OFF / CLEAR    Clear also deletes all saved slices.
VECTOR SCALE vscal               Sets the vector scaling factor
VECTOR REFERENCE vref       Sets the vector reference velocity
VECTOR INTERVALS intx, inty, intz Sets the vector plotting frequency
VECTOR PHASE 1 / 2                 Sets the phase for the vectors
VECTOR COLOUR n                 Sets the vector colour to colour number n
VECTOR WIDTH ipixel              Sets the vector width to ipixel pixels
VECTOR TYPE type                      Sets the vector type to TOTAL or IN-PLANE
VECTOR MAXLENGTH maxlen     Sets the maximum vector length (m/s)
VECTOR COMPONENTS var1, var2, var3 Sets the names of the vector component variables.

If the vector scale or reference is changed from the default, this value will be used for all subsequent vector plots. Setting a specific vector reference will ensure that vectors from different PHI files are scaled consistently.

Iso-surfaces

SURFACE ON / OFF
SURFACE VALUE surfval         Sets the surface value, otherwise uses the probe value if not set.

Streamlines

STREAM DELETE / CLEAR        Clear also deletes all saved slices.
STREAM x y z                            Start a streamline at (x,y,z)
STREAM MODE line/arrow/ribbon Set stream mode
STREAM DIRECTION downstream/upstream/both Set stream direction
STREAM COLOUR variable/track/total Set stream colour mode
STREAM ORIGIN probe/line/circle  Set stream start point
STREAM START x y z    Set start of line for start along line
STREAM END x y z        Set end of line for start along line
STREAM RADIUS rad    Set radius for start around circle
STREAM TIME tmin tmax  Set minimum and maximum track flight time
STREAM TRACKS ntrack  Set number of tracks for line or circle mode
STREAM WIDTH ipixel     Set the streamline width to ipixel
STREAM DRAW      Create streamlines based on current mode settings

Streamline Animations

A secondary keyword, ANIM, is added to streamlines. By default the animation will be with a grey ball. Optional keyword COLOURED for animation balls to be coloured appropriately. Alternatively VECTOR will produce coloured vectors.

STREAM ANIM BALL [COLOURED]  Animate as balls
STREAM ANIM VECTOR 
Animate as vectors
STREAM ANIM SEGMENT seg_length Animate as segments with length seg_length

The secondary keyword FREQUENCY has two integers, the first is the number of frames per cycle, the latter the number of balls or vectors .

STREAM FREQUENCY nframe nball   Set number of frames and number of balls or vectors.
STREAM VISIBILITY [ON/OFF] Determines the streamline visibility during animation.

The ball size and vector scale are set as shown below.

Setting the Colour Palette

Although the keyword CONTOUR is used to control this feature, the same palette is used for all plotting elements - contours, vectors, iso-surfaces and streamlines.

CONTOUR NUMCOLS numcols sets the number of colours used to numcols. If the line is absent, the current number of colours will be used.

CONTOUR PALETTE iRed, iGreen, iBlue sets the red, green and blue values. Values are in the range 0 - 255. There must be numcols lines, one to define each colour. If these lines are absent, the current palette will be used.

If the number of colours is set to 4, the colours will red (255 0 0), yellow (255 255 0), green (0 255 0) and blue (0 0 255).

As an alternative, the name of a palette file can be specified by using:

CONTOUR PALETTE filename where filename is the name of the palette file. A palette file can be saved from the 'Update palette' option of the Contour Options dialog. The format of the file matches the 'CONTOUR NUMCOLS','CONTOUR iRed, iGreen,iBlue' format described above. The default 16-colour palette is given here:

VR Contour palette
16
255 0 0
255 66 0
255 128 0
255 176 0
255 224 0
255 255 48
192 255 0
100 255 0
0 255 0
0 232 72
0 220 160
0 200 220
0 160 240
0 120 255
40 40 255
0 0 255

Line Plots

LINE START x,y,x              Sets the start point of the line
LINE END x,y,z                   Sets the end point of the line
LINE NPOINTS np             Sets the number of points to extract along the line
LINE XLABEL label           Sets a label for the X axis (must be only item on line)
LINE YLABEL label           Sets a label for the Y axis (must be only item on line)
LINE TITLE title                  Sets a title for the plot (must be only item on line)
LINE DUMP SIZE nx,ny    Sets the size in pixels of the saved image file
LINE DUMP file_name     Sets the name of the GIF file of the time plot. To save pcx, bmp or jpg add the required extension  (must be only item on line)
LINE FILE file_name        Sets the name of the saved data file (must be only item on line)
LINE PLOT                         Creates the plot and saves files using latest settings

The variable plotted is the current plotting variable, set with VARIABLE name, as above.

Time History Plots

TIMEPLOT OBJECT name          Sets the name of the POINT_HISTORY object to take data from
TIMEPLOT VARIABLE name     Sets the name of the variable to be plotted. It must be one of the variables selected for storage at the named POINT_HISTORY object.
TIMEPLOT YLABEL label            Sets a label for the Y axis. X axis label is always 'Time'. (must be only item on line)
TIMEPLOT DUMP SIZE nx,ny     Sets the size in pixels of the saved image file
TIMEPLOT DUMP file_name      Sets the name of the GIF file of the time plot. To save pcx, bmp or jpg add the required extension (must be only item on line)
TIMEPLOT FILE file_name          Sets the name of the saved data file (must be only item on line)
TIMEPLOT PLOT                          Creates the plot and saves files using latest settings

X Cycle Options

XCYCLE CLEAR  Clears any previous X Cycle settings
XCYCLE REPEAT [n]  Indicates domain is to be repeated n times
XCYCLE REPEAT [GEOMETRY] [CONTOUR] [VECTOR] [STREAM] [ISOSURF] [GRID] [MINMAX] [SLICE]   Indicates which plot components are to be repeated

Controlling Slices

SLICE X / Y / Z                           Sets the slice direction
SLICE SAVE / DELETE / CLEAR  Saves, deletes and clears slices
SLICE OUTLINE ON / OFF           Turns the slice toggle on and off
SLICE LIMITS XYZ xmin,xmax,ymin,ymax,zmin,zmax Sets the plotting limits in physical co-ordinates
SLICE LIMITS IJK ixmin,ixmax,iymin,iymax,izmin,izmax Sets the plotting limits in cell numbers

Probe Position

PROBE x, y, z              Places the probe in Cartesian co-ordinates
PROBE Theta, r, z       Places the probe in Polar co-ordinates
PROBE i, j, k               Places the probe in BFC co-ordinates

Low and High Spots

MINMAX ON/OFF         Turns low/high spots on or off
BALLSIZE rad                Radius to be used for low high spots

General Display Toggles

PROBE ON / OFF
WIREFRAME ON / OFF
AXIS ON / OFF
TEXT ON / OFF
GRID ON / OFF
DOMAIN ON / OFF

Controlling the Display of Objects

OBJECT SHOW ALL / NONE    Show or hide all objects
OBJECT SHOW NAME name    Show named object
OBJECT SHOW TYPE type       Show all objects of the given type
OBJECT SHOW LIST                Show objects listed in following list
[LIST name1, name2, name3.....]  List of names to show.
[LIST namen, namen+1...]

OBJECT HIDE ALL / NONE      Hide or show all objects
OBJECT HIDE NAME name      Hide named object
OBJECT HIDE TYPE type         Hide all objects of the given type
OBJECT HIDE LIST                   Hide objects listed in following list
[LIST name1, name2, name3.....]  List of names to hide.
[LIST namen, namen+1...]

OBJECT PAINT ALL / NONE    Colour all objects by the surface value of the plotting variable
OBJECT PAINT NAME name ON / OFF  Colour the named object
OBJECT PAINT TYPE type ON / OFF [or ALL / NONE]  Colour all objects of the given type
OBJECT PAINT LIST ON / OFF  Colour the listed objects
[LIST name1, name2, name3.....]  List of names to colour.
[LIST namen, namen+1...]

OBJECT WIREFRAME ALL / NONE    Draw all objects in wireframe
OBJECT WIREFRAME NAME name ON / OFF  Draw the named object in wireframe
OBJECT WIREFRAME TYPE type ON / OFF [or ALL / NONE]  Draw all objects of the given type in wireframe
OBJECT WIREFRAME LIST ON / OFF  Draw the listed objects in wireframe
[LIST name1, name2, name3.....]  List of names to draw in wireframe.
[LIST namen, namen+1...]

Clipping plane options

If clipping planes are present, they are written to the macro file separately, after the other objects. The settings read from the macro will override any current clipping plane settings. If there are no current clipping planes, they will be created.

CLIP SHOW object name                    Display this clipping plane
CLIP POSITION xpos, ypos, zpos    Set position
CLIP SIZE xsiz, ysiz, zsiz                    Set size
CLIP ROTATION alpha, beta, theta  Set the rotation angles
CLIP TYPE low / high                           Set clip type

Saving Images

DUMP SIZE [nx] [ny] Set the size (in pixels) for subsequent saved images
DUMP filename       Generates a GIF file of the current screen image. To save pcx, bmp or jpg add the required extension

Images of line and time plots can also be saved.

Progress Controls

PAUSE                      Displays a 'Press return to continue' dialog
UPAUSE n                Pauses for n seconds, where n is an integer
REWIND [n]             Rewinds the macro file an optional n times.
MSG text                   Displays the text in a subsequent PAUSE dialog
ANIMATE [DUMPALL] FILE filename sets the name of the file to be dumped by the subsequent ANIMATE line. The file type, AVI or GIF, is determined by the extension given to the filename e.g. mymovie.avi. If DUMPALL is present, each frame will also be saved to a JPG file. The names will be mymovie1.jpg, mymovie2.jpg etc. The pixel size of the animation is set by a preceding DUMP SIZE command if present.
ANIMATE [START m] [END n] [INTERVAL o] [DUMP] the image defined by the macro is regenerated in an animation sequence starting at time step m, ending at step n every o steps, and optionally dumping an animated GIF or AVI file containing each frame of the animation. If there is no preceding ANIMATE FILE command, the filename and type will be requested.
ANIMATE       Starts the animation using the current settings

To create an AVI file called mymovie.avi with a pixel size of 640 * 480, the following commands would be needed:

DUMP SIZE 640 480
ANIMATE FILE mymovie.avi
ANIMATE

Other items

PROFILE objnam       Write a profile file for object objnam

GENTRA Particle Tracks

To read GENTRA particle tracks from the GENTRA particle history file:

HISTORY READ
filename m n     filename is the name of the history file. All tracks are read unless;
                     if m is present, it is the track to be read
                     if n is present, all tracks in the range m-n are read

Extracting multiple data points

Viewer can extract data values at multiple locations read from a file, and output the probe values at these locations to another file.

PROBE READ file1     file1 is the name of the file containing the X,Y,Z coordinates at which the data values are required. The file should be an ASCII text file, with three columns of numbers in free format.

PROBE VARIABLE name     name is the name of the variable whose values are required.

PROBE WRITE file2     file2 is the name of the file to be created. The file will contain a header line followed by lines of four numbers. The first three are the X,Y,Z coordinate of the point, and the fourth is the value of the requested variable. There is no limit to the number of points handled. If contour averaging is on, the values will be interpolated in the averaged data field. If contour averaging is off, the value will be the value in the cell containing the data point.

As an example, let us assume we wish to know the pressure and velocity values at the points (0.475,0.475,0.24), (0.775,0.450,0.24) and (0.772,0.275,0.24). We create a file called, say, pos.txt which contains the lines:

0.475 0.475 0.24
0.775 0.450 0.24
0.772 0.275 0.24

We now create a macro file called, say, extract.mac, which contains the commands:

probe read pos.txt
probe variable pressure
probe write pres.csv
probe variable Velocity
probe write vel.csv

When this macro is run, two files will be created:

pres.csv containing

XP, YP, ZP, pressure
4.750000E-01, 4.750000E-01, 2.400000E-01,-1.772031E+01
7.750000E-01, 4.500000E-01, 2.400000E-01,-8.381842E+01
7.720000E-01, 2.750000E-01, 2.400000E-01,-2.149323E+01

and vel.csv containing

XP, YP, ZP, Velocity
4.750000E-01, 4.750000E-01, 2.400000E-01, 1.116307E+01
7.750000E-01, 4.500000E-01, 2.400000E-01, 4.566224E+00
7.720000E-01, 2.750000E-01, 2.400000E-01, 2.221509E+01

The use of the .csv extension for the output files means they can be read directly into Excel without any further conversion. The values come from the first example in Starting with PHOENICS-VR; TR324.

PHOTON 'USE' Files

For compatibility, VR-Viewer can also read a limited range of commands in the PHOTON command language. This enables it to display images from PHOTON USE files, which may be embedded in the Q1.

The commands it can interpret are:

PHI (+ scale +XYZ) filename
VIEW dir, UP dir
VECTOR plane number(+ MVECTOR)
SET VECTOR REFERENCE vref
SET VECTOR PHASE 1/2
CONTOUR variable plane number(+ MCONTOUR)
SURFACE
GEOMETRY READ
filename     (restricted to PLINE)
DUMP filename
MSG text
PAUSE + UPAUSE
USE
filename


Saving Animations

Animations can be saved in a number of ways. These are:

From the Animation Options dialog recanim.gif (1038 bytes)

This is reached by a right-click on the Animation toggle . The file saved will contain one frame for each time-step of the transient animation (or each sweep of the steady animation). This is the only way to capture a transient animation correctly.

From the Streamline Animation Control dialog

This is reached from the Animate menu of the Streamline Management Dialog. The file saved will contain all the frames making up the streamline animation.

From the Record animation button recanim.gif (1038 bytes).

Clicking this button on the hand-set brings up the dialog shown below:

Image: Movement

  Animation dialog

Record: starts recording the screen image. The frame counter (left input box) shows the current frame number. Recording will start from the current frame number. This can be changed by moving the frame slider, or entering a number in the frame counter box. Any existing frames with higher numbers will be overwritten. The right input box is the maximum number of frames. This can be increased if required by typing in a larger number.

Play: plays back the recorded image. Playback starts from the current frame. This can be changed by moving the frame slider, or entering a number in the frame counter box.

Pause: pauses recording. Click Record to continue. Any movements made during a pause will not be captured.

Stop: stops recording. The frame counter will be reset to zero for playback.

Save: saves the entire recording as an animated GIF or AVI file.

Image: Save Animation file

The dialog has similar options to the 'Save window as ...' dialog. As well as setting the size of the animation image, it is possible to set the delay time between the display of each frame in the animation. The default delay is one tenth of a second for animated GIF, and 10 frames per second for AVI. When saving AVI the Microsoft Video 1 compression is a good compromise between size and quality.

The 'Start' and 'End' boxes set the first and last frame to be saved. It is often required to have 1-2000 frames for a streamline animation to run smoothly, but it is rarely needed to save all these frames to AVI - the file would be huge. With these settings a much shorter and smaller file can be made.

There is also an option to save the individual frames in the animation as separate image files; these frames may be saved in either the gif, jpeg, bmp or pcx file format.

The name of the current plotting variable is not recorded, so on playback the entire scene will be played with the plotting variable in force at the end of the recording. If animated streamlines are active during the recording, each frame of the streamline will also be captured.

This method of recording is the most general, as it will capture whatever is on screen during the recording period.

Note that when recording transient animations this way, the change of time-steps will not be captured, so on playback the entire scene will be played using the final results. Transient animations must be captured from the Animation toggle dialog.


Contents list