Specialized simulators often understand a rich input deck syntax, enabling the experienced user to formulate complex analysis tasks. From the process engineer's point of view, however, only a few variables in the input deck may be of interest. Therefore, a given simulator together with a specific input deck template that implements an analysis task may be defined as an application by itself. The template is derived from an existing input deck by simply marking relevant fields with enclosing them in <( and )> as shown in Figure 4.12. The simplest substitution statement just assigns a name and a default value to a field in the input deck, while additional statements are used to define units, value ranges, and numerical expressions to derive a field's value; Figure 4.13 gives some examples of template substitution statements. Table 4.3 gives a summary of currently implemented additional statements.
Figure 4.12:
Input deck template example.
Expressions enclosed in matching angle-bracket -
parenthesis pairs <(...)> are replaced by values supplied
by the simulation environment to generate the simulator input deck.
Figure 4.13:
Template substitution statements examples.
Table 4.3:
Template substitution expressions.
If the value of a parameter is to be used more than once in a template, a simpler syntax can be used: Names preceded by the dollar sign $ will be replaced by the current value of the parameter. Both the expression delimiters <( and )> and the substitution prefix $ can be replaced by other characters to avoid conflicts with a simulator's native syntax. Using substitution expressions with the :nooutput flag along with substitution prefixes in a template allows all variable parameters to be declared in the header of the template, making for a more easily readable file.
For interactive editing, a graphical user interface is automatically created from the field definitions in the template file (Figure 4.14). Both the template and the input deck derived from the template - after substituting the default values from the parameter definitions in the template - can be viewed alternatively (Figure 4.15). In this fashion, pre-existing process and device simulation input deck libraries can be easily integrated without need to rewrite them in a new language.
Figure 4.14:
Graphical template editor generated automatically
from template file.
Figure 4.15: Template editor in preview mode.