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 Figure 5.14. The user can move
between the new case and case browser windows using the tags at the base of the
case window.
Figure 5.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
section 6.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, cells etc.; 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 Figure 5.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 function.
Figure 5.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
subsection 5.4.8.
As shown in Figure 5.16, once the Read Mesh function has been 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 5.17:
Selecting the physical boundary types
This brings up a patch description window inside the editing panel. As
Figure 5.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 5.18:
Editing a field and setting patch conditions
The Edit Field function brings up a field window in the editing panel as
shown in Figure 5.18. The table lists a series of data values required for each field
as outlined in subsection 4.2.7: 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 Figure 5.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 Figure 5.19, fvSchemes, fvSolution, described in
section 4.3, section 4.4 and section 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
Figure 5.19 are non-editable. Also note that some entries are selected from a
Selection Editor; 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
Figure 5.20.
Figure 5.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 Figure 5.21.
Figure 5.21:
Running a utility
Selecting a utility, blockMesh in our example in Figure 5.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.