From the JAVA GUI, a case browser may be opened for a machine
listed in the case panel by: either double-clicking on the host icon; or,
highlighting the host with a single-click and selecting Open Case Browser ()
from a the menu buttons or right mouse button. This operation makes a
call to the FoamXHostBrowser to open a FoamXCaseBrowser as shown in
A.3 b). The FoamXCaseBrowser reads the ns.ref file to get a reference to the
name server and registers itself. The JAVA GUI can then look up the
FoamXCaseBrowser and make calls to it, e.g. to start up a FoamXCaseServer to
start working on a case. The FoamXCaseServer registers itself on the name server,
and so the process continues of registering services and making calls to
them.
Note that a case browser may be opened automatically at launch
of the JAVA GUI by executing runFoamX with the host as an argument
runFoamX [host]
Starting the case browser on a host machine produces a directory tree list of
root path directories in which OpenFOAM cases are stored as shown in A.5.
The case roots specified in the user’s .OpenFOAM-1.5/controlDict file;
for information on adding or removing case roots, please refer to A.5.2.
Figure A.5:
Case root directory tree.
For the remainder of the manual:
It will be assumed that any operation in FoamX, described in the text, is
selected either from the menu bar or button, or by a right button click on
the mouse unless otherwise stated.
(a) Case directory selection.
(b) Case name selection.
Figure A.6:
Case browser functions.
The case browser offers a range of functions as shown in A.6. By selecting a
root directory icon, the user may open the directory, create a new case, import a
case or run some utilities; by highlighting a case name icon, the user may
open, delete, clone or unlock that case or run OpenFOAM utilities on the
case.
The current set of cases within a case root directory can be viewed
by selecting the the Open Root function by placing the cursor over the
root directory and clicking the right mouse button to reveal the menu as
shown in A.6 a), or by a double-click on the root directory icon. The
directory opens to reveal a case tree for that root directory as shown in A.7.
A new case is created by selecting the Create Case function () either
from the menu buttons or by placing the cursor over the host icon or a case
directory and clicking the right mouse button as shown in A.8. A small window
appears with data entry boxes for the Class, Case Name and Case Root as shown
in A.8.
Figure A.8:
Creating a new case.
The Class provides a scroll menu containing OpenFOAM solver names, such
as icoFoam and turbFoam. FoamX generates the necessary data entries
in the case files required by the selected solver; hence, it is essential to
choose the correct solver. Case Name and Case Root are the directory
path and directory name respectively, in which the case data is stored
according to the file structure described in 4.1. Once the correct entries have
been made, click OK. A case server for the new case is opened allowing
the user to edit case files, run solvers and utilities, etc. as described in
A.4.
The Open Case function () opens an existing case in a case server as
shown in A.9. The case server allows the user to edit case files, run solvers and
utilities, etc. as described in A.4.
The user may highlight a case and select the Delete Case function () to
delete the case directory from the hard disk. As shown in A.10, the function
prompts the user with a window asking whether he/she wishes to delete the case
which the user may accept by clicking the Yes button or decline with the No
button.
The Clone Case function () creates a new case into which existing files
from a selected case are copied. As shown in A.11, the user must first highlight
the case that is to be cloned and select the Clone Case function. This opens a
table in which the new case name must be specified and the root path and the
applicationClass may be changed to something different to those of the case
being cloned. Finally the times entry allows the user to choose the time
directories that are copied during the clone operation. The options are listed in
A.1.
Option
Description
firstTime
Copies the earliest time directory
latestTime
Copies the most recent time directory
allTime
Copies all time directories
noTime
Copies no time directories
Table A.1:
Options for copying time directories in a Clone Case operation.
On entering the correct information and clicking the Close button, the user is
prompted to complete the clone operation. The new case can then be opened as
described in A.3.3.
When a case is created or opened, a lock file is created to prevent the case
being opened in a separate server. When the case is closed, the lock file is removed
to allow it to be opened once more. In a few circumstances the lock file may not
be deleted even though the case is no longer being processed in a case server, e.g.
if the host browser is killed while the case is open in the case server. The UnlockCase function () therefore provides the option of deleting the lock file. As
shown in A.12, it presents a window warning the user that the case may be being
processed by another user. It is then the user’s responsibility to ensure that it is
not being processed elsewhere before accepting to delete the lock file.
The Start Process Editor function () opens an editor in which the user
can monitor all the OpenFOAM jobs that are finished and currently running. The
editor is simply a GUI that reads the files in the runningJobs and finishedJobs
directories, located in the $FOAM_LIC_DIR directory of the installation.
(a) Running jobs table.
(b) Finished jobs table.
Figure A.13:
The process editor.
It consists of a window as shown in A.13. Tags allow the user to move between
a runningJobs table and a finishedJobs table. The tables contain the details of jobs
which are fairly self-explanatory. There are buttons above and to the left of the
runningJobs table that perform the tasks listed in A.2. The user may select a job
by clicking on it in the runningJobs table, which activates the buttons above right
of the table. These buttons allow the user to control jobs as listed in A.2.
Main buttons
read
Re-reads the jobs in the runningJobs and finishedJobs directories
status
Contacts host machines to update the status of jobs
purge
Removes jobs that are no longer running
Running jobs buttons
Info
Displays an information panel about the job
endNow
Forces the job to stop at the end of the next time step
end
Forces the job to stop next time step the job outputs field data to file
kill
Terminates the job immediately
suspend
Suspends the job immediately
cont
Restarts a suspended job
Check boxes
My Jobs
Only shows the jobs of the current user
Compact
Removes the jobs relating to FoamX from the list
Table A.2:
Process editor buttons.
The finishedJobs table is an archive of information of jobs that were running in
OpenFOAM but were terminated for one reason or another. The user is free to
store the entries they find useful and delete those that are not. There are 2
buttons for deleting entries in the table: the purge button deletes finished jobs
that are older than 7 days; the remove button simply removes a selected entry
from the table.
There are two check boxes at the bottom of the process editor window that
govern which jobs are listed in the runningJobs and finishedJobs tables as listed in
A.2.
The Foam Utilities function allows the user to run OpenFOAM utilities.
This function is also offered in the case server and is more commonly used there;
it is therefore described in A.4.