When a case is opened from the case browser, a case server starts up. A
directory tree appears in the case window as shown in A.14. The user can move
between the new case and case browser windows using the tags at the base of the
case window.
Figure A.14:
Case server window
The directory tree contains 3 entries at the top level:
Dictionaries
Contains the dictionaries for controlling the case and setting
physical properties.
Fields
Sets the initial and boundary values for the fields.
Mesh
Reads/imports a mesh and sets the boundary conditions for the
patches of the mesh.
The case requires a mesh, either created using the blockMesh utility described
in 5.3 or using third-party software combined with the OpenFOAM mesh
converters. A OpenFOAM mesh is stored in the constant/polyMesh directory of
the case as: either the files that constitute a OpenFOAM mesh -- boundary, cellsetc.; or, as a blockMeshDict file that blockMesh uses to create a OpenFOAM mesh;
or, both. The user may import all these files from an existing constant/polyMesh
directory into their case using the Import Mesh function as shown in A.15.
Once the mesh files exist in the constant/polyMesh directory, whether imported
directly or generated by blockMesh or one of the mesh converter utilities, they
can be read into the case server using the Read Mesh&Fields function.
Figure A.16:
Reading a OpenFOAM mesh
Should the reader wish to test this function, they can open one of the tutorial
examples and generate a mesh with the blockMesh utility as described in
A.4.8.
As shown in A.16, once the Read Mesh&Fields function executed,
the directory tree displays a list of the boundary patches for the mesh.
The user can then impose physical boundary conditions onto a patch by
highlighting the patch and selecting the Define Boundary Type function.
Figure A.17:
Selecting the physical boundary types
This brings up a patch description window inside the editing panel. As
A.17 illustrates, the physical boundary type can be selected by clicking
on the . . . button to the right of the Boundary Type descriptor. This
opens a new window listing the physical boundary types available to the
specific solver. The user make a selection from the list and click OK, which
closes the window and returns the user to the patch description window.
Beneath the physical boundary type descriptor is a table listing the primitive
variables that are present in the solver and their numerical patch types, or
boundary conditions, used in the solution. The user should select the physical
boundary types for all the patches noting that in 2D cases the front and back
patches, aligned in the 2D solution plane, should be assigned the empty
type.
Once all the physical patch types are specified, the Fields can be edited using
the Edit Field function, selected as usual by highlighting the field and
clicking the right mouse button or by double-clicking on the field icon.
Figure A.18:
Editing a field and setting patch conditions
The Edit Field function brings up a field window in the editing panel as
shown in A.18. The table lists a series of data values required for each field
as outlined in 4.2.8: internalField, referenceLevel and any values
corresponding to one or more patches required from the physical type
specification. Note that the patch list is updated to accommodate any
changes to the specification of a physical patch type. The user can click on
entries in the Value column to change values. In A.18 we demonstrate
the setting of a uniform velocity of on the patch named
movingWall.
The user can edit the data in the Dictionaries. The dictionaries include
controlDict, shown in A.19, fvSchemes, fvSolution, described in 4.3, 4.4
and 4.5 respectively, and those for material properties. The dictionaries
present the entry in tabular form with the data entry in the right column.
Clicking on the entry will allow the user to edit the value directly or open a
sub-dictionary whose values can be edited in the same manner. Note that
entries that are printed in grey, e.g. the applicationClass in A.19 are
non-editable. Also note that some entries are selected from a SelectionEditor; in this case the selected entry is that which is highlighted in
green.
The user can save any changes to the case by selecting the Save Case function
() from the button bar. The dictionary, fields and mesh data will be
saved.
The user can run the solver for which the case is written in one of
two ways. To run immediately in the foreground, the user should select
the Start Calculation Now function () from the button bar. The
OpenFOAM solver is immediately launched without prompting the user for more
information.
Alternatively, the user can select the Start Calculation function () from
the button bar. This brings up a Run Application window as shown in A.20.
Figure A.20:
Running a solver using the Start Calculation function
The user may select to run the case in the background by clicking the
background button, before pressing the Start Run button. For a case run in the
background, the progress history is written to a log file specified in the log text
box, which can be viewed by pressing the View Log button.
There are numerous utilities supplied with OpenFOAM that can be executed
by highlighting the case name icon in the case server window and clicking the
right mouse button which opens a hierarchy of menus containing the utilities, as
shown in A.21.
Figure A.21:
Running a utility
Selecting a utility, blockMesh in our example in A.22, opens up a window in
which the user can edit the dictionary associated with the utility, if one exists.
The mandatory command line arguments are set by default for the case that is
being edited. The user can select optional arguments accordingly from the table.