From the JAVA GUI, a case browser may be opened for a licensed host
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
Figure 5.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 licensed host as an argument
runFoamX [host]
Starting the case browser on a licensed host produces a directory tree list of
root path directories in which OpenFOAM cases are stored as shown in Figure 5.5.
The case roots specified in the user’s $HOME/.foam2.3/controlDict file; for
information on adding or removing case roots, please refer to subsection 5.5.2.
Figure 5.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 5.6:
Case browser functions.
The case browser offers a range of functions as shown in Figure 5.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
Figure 5.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 Figure 5.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 Figure 5.8. A small window
appears with data entry boxes for the Class, Case Name and Case Root as shown
in Figure 5.8.
Figure 5.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 section 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
section 5.4.
The Open Case function () opens an existing case in a case server as shown in
Figure 5.9. The case server allows the user to edit case files, run solvers and
utilities, etc. as described in section 5.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 Figure 5.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 Figure 5.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
Table 5.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 5.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 subsection 5.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 Unlock Case function () therefore
provides the option of deleting the lock file. As shown in Figure 5.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 $OpenFOAM_LIC_DIR directory of the installation.
(a) Running jobs table.
(b) Finished jobs table.
Figure 5.13:
The process editor.
It consists of a window as shown in Figure 5.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 Table 5.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 Table 5.2.
Main buttons
read
Re-reads the jobs in the runningJobs and finishedJobs directories
status
Contacts licensed 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 5.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
Table 5.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 section 5.4.