src/OpenFOAM logo
The Open Source CFD Toolbox
  Search
  
  Back to OpenFOAM Home
 
  OpenCFD
  Company profile
  OpenFOAM support
  OpenFOAM development
  OpenFOAM training
  Solutions
  Contact OpenCFD
  Recruitment
  Recommended links
 
  OpenFOAM
  Features
  Download
  Documentation
  * User Guide
  * C++ Source Guide
  * README file
  * Release notes
  * Upgrading to 1.5
 
  © 2000-2008 OpenCFD Ltd
SourceForge.net Logo
OpenCFD Solutions Contact OpenFOAM
OpenFOAM 1.5 User Guide © 2000-2008 OpenCFD Ltd

A.4 The case server

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.


\special {t4ht=


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.

A.4.1 Importing an existing 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, 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 A.15.


\special {t4ht=


Figure A.15: Importing a OpenFOAM mesh


A.4.2 Reading a mesh

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.


\special {t4ht=


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.

A.4.3 Setting boundary patches

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.

                                        Physical patch type selection

   Patch description window








Primitive fields
Numerical patch conditions
\special {t4ht=


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.

A.4.4 Setting the fields

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.


\special {t4ht=


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 (1,0, 0) m/s  \special {t4ht= on the patch named movingWall.

A.4.5 Editing the dictionaries



\special {t4ht=


Figure A.19: Example dictionary window: controlDict

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 Selection Editor; in this case the selected entry is that which is highlighted in green.

A.4.6 Saving data

The user can save any changes to the case by selecting the Save Case function (  \special {t4ht=) from the button bar. The dictionary, fields and mesh data will be saved.

A.4.7 Running solvers

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 (  \special {t4ht=) 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 (  \special {t4ht=) from the button bar. This brings up a Run Application window as shown in A.20.


Click to start the run     Select to run job in background
\special {t4ht=


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.

A.4.8 Running utilities

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.


\special {t4ht=


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.



\special {t4ht=


Figure A.22: Opening the utility dictionary


A.4.9 Closing the case server

The user should click the Close Case button (  \special {t4ht=) to close the case server window and return the user to the case browser.