Introduction

IMOC is an Interactive implementation of the Method Of Characteristics for supersonic irrotational flow in a two-dimensional geometry. As at Version 0.1.2, IMOC is a completely new implementation of the Turbo-Pascal program described in the journal article:
Jacobs, P. A. & Gourlay, C. M. (1991),
An interactive method-of-characteristics program for gas-dynamic calculations.,
The International Journal of Applied Engineering Education, Vol.7(3),pp242--250.

The flow field is described as a mesh of nodes with flow-field data known only at the nodes and adjacent nodes being connected to each other along the C-minus and C-plus characteristic directions. For details on the method of characteristics as implemented in IMOC, refer to a text on gas dynamics. For an introductory discussion, try
J. D. Anderson, Modern Compressible Flow, McGraw-Hill;
for more detail on the axisymmetric formulation, try
H. Liepmann & A. Roshko, Elements of Gas Dynamics, Wiley;
and, for lots of detail, refer to
M. J. Zucrow & J. D. Hoffman, Gas Dynamics, Robert E. Krieger Publishing.

Since the geometry of the mesh evolves as the flow field is computed, it is often easier to decide what operation to perform next based on the state of the characteristic mesh. The IMOC software does the house-keeping and provides some basic computational functionality which can be used directly or can be augmented by user-written procedures.

The old MOC program was written as a single Pascal program and all interaction with the user occurred via its menu system. If a new feature was needed, the core of the program had to be edited and recompiled. In contrast, the new IMOC software consists of several layers:

  1. A binary loadable module (imoc.so or imoc.dll) which provides the basic functions for data storage, house-keeping and unit processes.
  2. A module wrapper generated by SWIG. This provides Tcl command-line access to the functions of the binary module.
  3. Tcl procedures for interactions with the basic module functions. This layer repackages some of the basic functions in a more convenient form and also provides a simple way of customising IMOC. Since all of the user interaction is via the Tcl interpreter, the user has the full Tcl language available and may write procedures that provide further specialized functions.
  4. A set of graphical user-interface functions that sets up a graphical representation of the characteristic mesh and provides access to the IMOC procedures via GUI elements such as menu selections and data-entry fields.
This form of construction allows the user to easily change the boundary between what is done manually and what is done automatically by the program. Initially, the user might experiment with the flow field solution via the GUI. If a particular set of operations is repeated often enough, a script could be written (in the Tcl language) to automate the procedure. If the script executes too slowly because of the interpreter, the same functionality could be implemented in C and become part of the loadable module.

For an introduction to the Tcl scripting language, see the URL http://dev.scriptics.com/scripting/primer.html. There are also a number of good books on the language and its graphics toolkit.


PJ, 24-Jan-2000, updated 14-Oct-2000.