Unit Model Development

The following sub-sections provide guidelines for preparing STELLA models for import into the SME. Similar guidelines should be followed when using other graphical modeling tools.

3.1 STELLA Model Guidelines


  1. The STELLA importer is compatible with STELLA II v. 2.2 (and later) or any version which generates equivalent equations. If you are using an earlier version that saves equations in a different format you may run into problems.

  2. There are some limitations to the SME's implementation of STELLA models: 1) although we have implemented the most commonly used STELLA built-in functions, it is unlikely that all the functions in all versions of STELLA will be implemented, 2) Converters (as of 6/99) have not yet been implemented, 3) The SME support for STELLA arrays is limited to map-dependent parameters (see section 13), and 4) the STELLA DELAY function must take a single variable as an argument (not an equation).

  3. One can write equations that access values in neighboring cells (in the spatial model) via the following convention: Any variable vName@N (or @E, @W, @S) is interpreted to represent the value of the variable vName in the cell directly to the North of the current cell. Except for this usage, no variable names should contain the character '@'. More generally, the notation vName@(x,y) is used to access the the value of the variable vName in the cell x cells to the North and y cells to the East of the current cell. In a 3D simulation, 3 dimensional coordinates can be used and the notations @U and @D may be used to denote the cells up and down from the current cell.

  4. Boundary conditions can be specified using the notation vName@D:BC, where D is a relative coordinate (as described in 2) and BC is a boundary condition notation. Possible values for BC are:

  1. No special characters 1 should be used in STELLA variable names, e.g., ?, #, &, unless specifically permitted above.

3.2 Specifying Order of Outflow Calculation

The order of calculation of outflows in STELLA is determined by the order in which they were created. This may be overridden by the introduction of flow dependencies in the equations for flow. In the SME, the order of calculation of outflows from state variables is ordered by dependency, if no inter-flux dependencies exits then the ordering is undefined (random). The user may define the order of calculation by placing "dummy dependencies" in the outflow equations of the STELLA unit model. For instance if outflow B is to be calculated before outflow A, then make A dependent upon B by inserting the kludged dependency "+B*0" into the equation for A.

3.3 Creating the STELLA Equations File

The user must create an equations file from the STELLA unit model that will be translated into SMML by the MCP application. To display the equations in proper format, bring up the equation window and display the equations in order of sector with the 'show documentation' switch turned off. Due to a bug in STELLA II, you may have to cut and paste these equations into a text file in order to create the equations file (otherwise equations may be randomly deleted).

1 Special characters are any other than numbers ( 0 - 9 ) or letters ( a - z ). Compatiablity problems may result with the C code.