Turning the mesh toggle on the hand-set ON by clicking on the Grid mesh button causes
the current grid to be displayed on the graphics image:

Image: GRID

The grid is displayed on a plane at the probe location. By default the plane is normal to the
co-ordinate axis nearest the view direction. For example, if the view direction is along,
or close to, +Z, the X-Y plane will be displayed. As the probe is moved or view directions
are changed, the grid display will also change to follow.

To manually select the displayed plane, click the pull-down arrow next to the mesh toggle

and choose the required plane. This plane will now be displayed regardless how the view direction
is changed, until another direction or 'Auto' is chosen. The position of the plane is still controlled
by the probe location.

The orange lines shown in the above image are region boundaries. These are
automatically created to match the edges of the object bounding boxes (see VR-Editor
Object Dialogs - Object
Size, Object
Positioning). They are also grid lines.

As objects are introduced, removed and re sized, the region lines will adapt to match
the object layout.

The blue lines are 'ordinary' grid lines. By default, these are distributed by the
auto-mesher according to the current set of rules. These are:

The maximum cell size is not allowed to exceed a set fraction (0.05 by default) of the
domain size.

The ratios between the sizes of the first cell in the current region and the last cell
in the previous region, and the last cell in the current region and the first cell in the
next region, are not allowed to exceed a set limit (1.5 by default).

If the ratios are exceeded, the number of cells in that region is increased, and the
spacing is set according to a geometrical or power-law progression using a set expansion
ratio (geometrical 1.2 by default), until either the ratio criterion is satisfied at both
ends of the region, or the cells at both ends are below a set minimum fraction (0.005 by
default) of the domain size.

Note that if there are no region boundaries in a direction, the auto-meshing will
usually assume that only one cell is required in that direction. This is appropriate for
2D cases in which all objects cover the whole domain in the third direction.

If there is an INLET, FAN, OUTLET or PLATE object on the edge of the domain, the
auto-meshing will assume that grid is required in that direction, even if there is only
one region.

The user should always inspect the grid visually to satisfy themselves that it is
appropriate. The default auto-mesh settings give a fairly coarse grid which is suitable
for model-building purposes. In most cases they will require adjustment before a final run
is made.

Clicking anywhere in the image whilst the grid mesh display is on will show the Grid
Mesh Settings Dialog. By default, the auto-meshing feature is turned on, as shown in the
image below:

Image: GRID Mesh SETTINGS - Auto

The grayed-out values cannot be changed from this dialog unless the auto-mesh is turned
off for any direction, as shown here:

Image: GRID Mesh SETTINGS - Manual

Settings on this dialog which are common to auto-mesh on or off are:

Co-ordinate system:

Toggles between Cartesian, cylindrical-polar and Body-Fitted
(BFC).

Time dependence:

Toggles between Steady and Transient

Inner radius

(only for cylindrical-polar): Sets the inner radius for a
cylindrical-polar grid.

Time step settings (only for transient): Displays a dialog for managing
the time-step distribution.

Partial solids treatment: This activates the special treatment of
partially-blocked cells, PARSOL.

Partial solids treatment settings: This displays a dialog from which
the minimum and maximum fluid volume fractions for PARSOL can be set. Any cell in which
the fluid volume fraction is below the minimum value is considered fully-blocked, and any
cell in which it is above the maximum is considered full-open. The default values are
0.001 and 0.999. Resetting these to, say, 0.01 and 0.99 can eliminate very small fluid
cut-cells, which can lead to unrealistic pressures.

Domain size: Sets the total extent of the domain in the X, Y and Z
directions. In cylindrical-polar co-ordinates, the X size is set in radians.

Tolerance:

Sets the tolerance in each direction (in the same units as the domain dimension, usually
meters) used for matching the grid to objects.

To change the auto-mesh settings for any direction, click 'Edit all regions in' on the
Grid Mesh Settings dialog for the direction in question. The following dialog will appear:

Image: X Direction Auto-mesh Settings

The grayed-out values cannot be changed manually unless the auto-meshing is turned off.
They reflect the settings generated by the current auto-mesh control parameters.

The following settings influence the auto-meshing:

Auto grid settings: ON / OFF Toggles the auto-meshing on and off for this
direction. The default is on.

Set defaults: Resets all values to their defaults.

Min cell factor: This sets the smallest cell size allowed as a fraction of the
domain size in that direction. The default is 0.005.

Init cell factor: This sets the initial cell size as a fraction of the domain
size in that direction. The default is 0.05, which gives roughly 20 cells if the regions
are fairly equal in size.

Fractions: By default, the minimum and initial cell factors are set as
fractions of the domain size. This makes it easier to handle any domain size. When
clicked, the setting changes to 'Size'. The minimum and initial cell
sizes are now set as physical sizes in metres.

Max size ratio: When the ratio of the size of the first cell in the current
region to the last cell in the previous region, or the last cell in the current region to
the first cell in the next region, is greater than this (1.5 by default), the number of
cells in the current region will be increased until either:

the ratios at both ends are satisfied; or

the cells at both ends are smaller than the minimum fraction of the domain size.

As well as progressively increasing the number of cells in this region, the cells are
distributed using a geometric or power-law expansion. To keep the cell distribution with
the region uniform the expansion power should be set to 1.0.

The grid is expanded using a symmetrical expansion, except in the first and last
regions, where there is choice of symmetrical expansion or expansion from the internal
region boundary to the domain edge.

Expansion Power: This sets the expansion power used to adjust the grid with a
region so as to satisfy the cell-size ratios at the region ends. The default value is 1.2.

A power of 1 will keep the grid in the region uniform, but may use a lot of cells.
Powers > 1 will reduce the number of cells, but will introduce non-uniformity.

Form: The grid can expand using a geometrical progression, or a
power-law expansion. The default geometrical progression gives a faster change in
grid-size for the same power, thus keeping the number of cells down.

Boundary - Low: When set to OFF (default), the grid in the first region expands
backwards from the end of the first region towards the domain boundary. This would be
appropriate if the domain boundary were, say, a fixed-pressure zone, or a symmetry plane
where nothing much happens.

When set to ON, the grid in the first region expands
symmetrically from the domain boundary and the internal first region boundary. This would
be appropriate if the domain boundary were a plate or inlet, where changes in flow are
expected.

Boundary - High: When set to OFF (default), the grid in the last region expands
forwards from the start of the last region towards the domain boundary. This would be
appropriate if the domain boundary were, say, a fixed-pressure zone, or a symmetry plane
where nothing much happens.

When set to ON, the grid in the last region expands
symmetrically from the domain boundary and the start of the last region. This would be
appropriate if the domain boundary were a plate or inlet, where changes in flow are
expected.

When the auto-meshing for a direction is turned off, the number of cells in any region,
and the distribution within any region, can be set by clicking on the region to be
modified. The initial region settings will be those created by the auto-mesher. Clicking
on X region 3 and Y region 1 of the example shown previously, for example, brings up the
dialog box shown below:

Image: GRID Mesh SETTINGS - manual

Number of cells: Sets the total number of cells in the X, Y and Z directions. If
all regions are 'Set', this value cannot be changed directly as there are no 'Free'
regions to accommodate the change.

Tolerance: Sets the tolerance used for this direction. Object edges
closer together than this will not generate separate regions.

Number of regions: This displays the current number of regions in each direction.
This can only be changed by modifying objects or modifying the tolerance.

Modify region

:
This is the number of the region selected for modification. In the
diagram above, an X-Y plane is displayed, and the cursor was clicked into the third region
in X, and the first region in Y. To modify a different region, enter its number here
directly and click 'Apply', or click OK, then click on the new region.

Size:

This displays the size (in meters or radians) of the region selected for
modification. The size of a region can only be changed by modifying objects or modifying
the tolerance.

Distribution:

This toggles between Power law and Geometrical progression.
It controls how the cells within the region are spaced.

Cell Power:

This toggles between Free and Set. Free
means that the number of cells can be automatically adjusted as the total number of cells
is changed, so as to keep the grid as uniform as possible. Set means that
the number of cells in this region, and their distribution, have been set by the user and
cannot be automatically changed.

Cells in region:

This initially displays the number of cells allocated to this
region by the automatic meshing algorithm. The number of cells in this region can be
changed by typing in a different value. Cells will be taken from, or distributed amongst
other 'Free' regions to keep the total number constant.

Power/ratio:

This sets the expansion power, or geometric expansion common ratio. The
default setting of 1.0 gives a uniform grid. Positive values mean that the expansion goes
from the start of the region towards the end, negative values mean the expansion starts at
the end and goes to the beginning.

Symmetric:

This toggles between No and Yes. If Yes, the expansion
specified by Distribution and Power/ratio is applied symmetrically from each end of the
region.

Edit all regions:

This displays a dialog which shows all the region settings in a
particular direction and allows them to be changed. This is the easiest way to change the
settings for several regions.

The diagram below shows a simple three-part grid. Region 1 has 10 cells with a power of
-1.5. Region 2 has 10 cells with a symmetric power of 1.5, and region 3 has 10 cells with
a power of +1.5.

Image: DIAGRAM 1

The next diagram shows the same grid, but with geometrical expansions in all three
regions:

The user is advised to use the power-law or geometrical expansions to reduce the change
in grid-size between regions. This will assist convergence of the Earth solver. With the
auto-meshing turned on, this is controlled by reducing the minimum cell size and adjusting
the maximum size ratio. Reducing both these values will act to reduce the rate of change
of grid size across region boundaries, but also increase the number of cells.

The tolerance can be adjusted to eliminate very thin regions where objects nearly line
up.

Turning the mesh toggle on the hand-set ON by clicking on the Grid mesh button causes
the current grid to be displayed on the graphics image:

Image: BFC Grid

The grid is displayed on a plane at the probe location. The plane is normal to the
co-ordinate axis nearest the view direction. For example, if the view direction is along,
or close to, +Z, the X-Y plane will be displayed. As the probe is moved or view directions
are changed, the grid display will also change to follow.

In a multi-block grid, the grid will be displayed in the block containing the probe.

In BFC, the probe can only be moved from cell-centre to cell-centre. The probe location
is always in IX, IY, IZ.

In a multi-block case, these are shown in 'big' grid co-ordinates, not in local block
co-ordinates. Any cell can be moved to directly by typing the cell IX,IY,IZ values into
the hand-set.

Note the colouring of the block containing the probe:

The blue axis is the I axis

The green axis is the J axis

The yellow axis is the K axis

In a complex multi-block case, this will help in identifying which way to move the
probe.

To move the probe from one block to the next, move up to a linked face, and then step
through it by continuing to move in that direction.

The axis colouring will jump to the next block. If the Move probe button is kept
pressed, and the IJK orientation of the next block is different, the probe may take off in
an unexpected direction - it may even jump back to the previous block if the axes are
reversed!

Whichever external grid generator is used, the outcome will be a skeleton Q1, and at
least one grid file. If the case is a multi-block
case, there will be one grid file for each block.

The skeleton Q1 file will contain a READCO
command to read the grid file(s), and instructions for linking the blocks.

An example skeleton file for a single-block grid stored in the grid file grid1 must
contain at the very least:

TALK=T; RUN(1,1)
BFC=T
READCO(grid1)
STOP

It may also contain (M)PATCH
statements locating boundary conditions, and also COVAL commands setting inlet values.

In GeoGrid (Note: this software is no longer available, but the images are shown for
illustrative purposes) the name of the Q1 will be project.Q1, where project
is the name of the GeoGrid project.

To import this into PHOENICS-VR, click on File - Open existing case
from the top bar of the main VR-Editor/Viewer graphics window. Double-click on project.Q1
to open it in PHOENICS-VR.

The first image shows a very simple 3-block example in GeoGrid.

One inlet (purple, on the left) and one outlet (blue, on the right) have been
designated.

The second image shows the same case imported into PHOENICS-VR.

Note: The grid files must be in the current working directory, OR the
READCO(filename+) command must be modified to include the path to where they are.

If a grid generator other than GeoGrid is used, please ensure that the skeleton Q1 is
copied to the working directory as case.Q1, together with all the necessary grid
files. Use File - Open existing case to open case.Q1.

If the user is familiar with the PIL GSET suite of commands, the Q1 can be edited to
create the grid in any convenient way. PHOENICS-VR will recognise and retain all GSET
commands.

It does not recognise the older SETPT, DOMAIN, SETLIN or MAGIC commands. If the
grid is built with these, or some of these commands are used to smooth parts of the grid,
use the DUMPC(name) command to write out a grid file, and supply PHOENICS-VR with a
Q1 that just contains:

TALK=T;RUN(1,1)
BFC=T
READCO(name)
STOP

The final result should be a file called case.Q1, which either contains the required
GSET commands, or a READCO to read an existing grid file (or files).

In many cases, once a case has been set up and run, it becomes obvious that the
original grid is inadequate. It may be generally too coarse, or grid may be concentrated
in the wrong places.

If the grid was generated in the PHOENICS Grid Generator, this can be used to modify
the grid as required. On exit from the Grid Generator, most of the objects will have to be
re-located and re-sized , as they will still be in their original IJK positions.

If the grid was generated externally, in many cases this can be avoided. Re-enter the
grid generator, say GeoGrid, and modify the grid as required. Save the PHOENICS output
file with a different name to that used for the original grid.

In VR-Editor, click on Main Menu - Geometry - Read new geometry from file.
This will bring up a file browsing window, which will allow the selection of the new Q1
written by the grid generator. The new grid will be read in, and boundary condition
locations will be remapped to the new grid when Open is clicked. Note
that only boundary conditions common to both grids will be remapped.

To simulate transient behaviour, time is discretised in a similar way to the space
dimensions. The Earth solver produces a solution for each step in time before advancing to
the next step. An extra term is automatically added to the equations solved, which
expresses the influence of the previous time-step.

The default equation formulation is implicit, so there are no extra stability criteria
to satisfy when setting the size of the time-steps. If the steps are too large, the
details of the transient behaviour will not be picked up.

In Transient mode, objects representing sources will have additional dialogs
allowing start and end times to be set.

To save intermediate results for plotting in the VR-Viewer or any other post-processor,
click on 'Main menu', 'Output', 'Field dumping'. The following dialog will appear:

IMAGE: Transient Field dumping dialog

Set the first and last time steps to be dumped, and the step frequency for dumping. If
the first and last steps are left as zero, the program will assume the first and last
steps for the current run. Set a start letter for the intermediate output files. A start
letter of A, and a dump frequency of 1 will result in files called A1, A2, A3 etc being
dumped at the end of each time step.

The letter Q should not be used, as the file dumped on step 1 will
overwrite the Q1 input file!

The size of the intermediate files can be reduced by choosing not to dump each variable to the file.
Changing the Y to an N in the OUTPUT 3 DUMP line will prevent that variable from being written to the
intermediate file. If the property-marked variable, PRPS, is so excluded, Viewer will not be able
to determine which cells are blocked. Depending on which variables are excluded, it may not be
possible to restart the calculation from the intermediate files. All variables are written to the
final solution files (PHIDA or PHI and PBCL.DAT) regardless of the dump settings.

If the case is 2D in X and Y, the start letter can be left blank. In this case, a
special output file called PARADA or PARPHI is written, in which the results of each time step are
saved as a Z plane. In the viewer, sweeping through Z in effect sweeps through time.

To print flow fields to the RESULT file every time step, go to 'Main menu', 'Output',
'Field printout', and set NTPRIN to 1. Note that NTPRIN may be displayed on the next page
of the menu. Click 'Page down' to display settings on the next page.

Note that the intermediate output files are optionally saved by 'File', 'Save as a
Case', and restored by 'File', 'Open existing case'. The output files can be big and numerous, so it
may be better to either ZIP them up, or copy them to a CD for safe-keeping.

The intermediate files can be selected for plotting in the Viewer by choosing ‘Use intermediate
step files – Yes’ on the ‘File names’ dialog displayed when the Viewer starts.

To restart and continue the run, bring up the Time
step setting dialog. In the 'Time at end of last step' box, enter the new extended end time of
the run. Leave 'Time at start of step 1' at zero. In the 'Last step number' box, enter the new
total number of steps. In the 'First step number' box, enter the previous last step+1. A dialog
will appear asking if a restart is to be activated. Click 'Yes'. The restart will be activated, and
the names of the restart files will be deduced from the start letter chosen for
saving the intermediate fields.

Please check that the names are correct. To force a restart from the final solution files which
are guaranteed to contain all the solved and stored variables, set the 'Solution file' to phida (or
phi) and the 'Cut-cell file' to pbcl.dat.

For example, the original run did 100 steps from time 0.0s to 10.0s ( thus giving time
steps of 0.1s each). It is now desired to do the next 10.0s with the same time step size.
Set 'Time at end of last step' to 20.0, 'Last step number' to 200, and 'First step number' to 101.
To activate the restart, click on 'Yes' when asked about activating the restart.

To restart from an intermediate step, say step 50, just set 'First step number' to
51. A dialog will appear asking if a restart is to be activated. Click 'Yes'. The restart will
be activated, and the names of the restart files will be deduced from the start letter chosen for
saving the intermediate fields.

IMAGE: Time Step Settings dialog for restart

The names of the restart files are also displayed on (and can be set from) the 'Main Menu',
'Initialisation'
panel. An active restart is shown by all the initial values (FIINIT) being
shown as READFI.