Simulation Settings Page

The parameters displayed on this page control how the simulation engine carries out a simulation.

After setting these parameters, you initiate a simulation by clicking the (Start simulation) push button at the top of the page; the simulation may also be started by clicking the equivalent push button on the Scheme Page.

The Simulation Settings Page has three tabbed panels:

General Settings Panel

The first two parameters on this panel control the "granularity" of the simulation. Optimum values for these depend on details of the reaction scheme and reaction conditions, and can vary over a wide range. These are likely to be modified as you test and develop your reaction scheme.

Total Number of Particles
specifies the initial number of particles allocated in the simulation. The total number is apportioned among all species with non-zero initial concentration. This number should be large enough to accommodate the dynamic range of concentrations expected in the simulation.

As a guide, the number of molecules each particle represents is indicated in parentheses to the right of the data entry field.

Larger numbers will reduce stochastic noise in the simulated data, but will also increase the computer time required to reach a given point in the simulation (see the example simulation Parallel reaction steps). Simulation of realistic noise can be an advantage at times - as a teaching tool, for example.

The magnitude of the time step at a particular stage of a reaction is also linked to the total number of particles used in the simulation. If the total is large, the time steps will be proportionately smaller, and more events will be required to reach a particular elapsed time in the simulation.

In general, programmed temperature/voltage/external stimulus calculations will require larger numbers of molecules than in corresponding calculations with non-programmed parameter in order to keep the program steps small.

The largest allowed value for the Total Number of Particles is 9,223,372,036,854,775,807. For typical values, see the example simulations listed in the section entitled Example Simulations.

If you wish to set the number of particles to be exactly equal to the number of molecules currently specified in your reaction scheme, click the 1:1 push button. If the number of particles is calculated to be within the allowed range, then the entry field will be updated.

If you wish to set the number of particles to be equal to the minimum valid value based on the species concentrations specified in your reaction scheme, click the min push button. This ensures that each species with a non-zero concentration in any compartment in the reaction scheme is represented by at least one particle.

Record State at Intervals of ... events
specifies the number of events that occur before saving the state of the system to disk. (Note that the state is accurately maintained at all times in memory). The smallest number is 1, which results in the simulator saving the system state after every event.

The largest allowed value is 9,223,372,036,854,775,807. The magnitude of the corresponding time step will vary.

Random Number Seed
is an integer between 1 and 32,767 used to initialize the random number string which propagates the simulation.

You may manually enter any valid value for the seed. If you would like Kinetiscope to choose a different random number seed, click the # push button. The entry field will be updated with a new valid value for the seed.

Limits Panel

The parameters on this panel define an optional termination condition for the simulator. If both of these parameters are left at their default values of zero, then the simulation will stop when the sum of all probabilities in the reaction scheme is zero, or when you click Interrupt Simulation on the simulator window.

Maximum Number of Events
is the total number of events which can occur in a given simulation. When this maximum is reached, assuming no other condition has stopped the simulation, the simulation will end. It cannot be resumed.

The largest allowed value is 9,223,372,036,854,775,807. A value of zero disables this termination condition.

Maximum Time in Simulation
is an optional setting which automatically stops the simulation when a particular elapsed time is reached, even if the maximum number of events has not been exceeded. It is entered in the time units you selected when the reaction file was created. A value of zero disables this option.

Options Panel

The options on this panel can improve the calculational efficiency of the simulation. The degree of improvement will vary depending on the specific details of the simulation system you have constructed, and the recommended approach is to test the impact of each option on a short simulation run as you build up your reaction scheme. Some reaction schemes may show no improvement, or even a slow-down in execution.

To enable an option (shown as the checked state), click on its check box.

Use fast probability calculation
enables a more efficient method for calculating the probabilities of steps in the reaction scheme under simulation. Reaction schemes which contain a large number of compartments and transfer paths (e.g. the example reaction scheme Calculation of a Photoresist Latent Image") are likely to show substantial (up to several-fold) improvement in execution speed when this option is enabled. When this option is disabled, the standard algorithm for calculating probabilities is applied.
Use fast random number generator
enables a faster formula for random number generation. The impact of selecting this option is modest (up to ~10-20% improvement in execution speed). When this option is disabled, the standard random number generator is used.
Use fast event selection
enables an alternate method for selecting the reaction or diffusion step to advance during each cycle of the simulation. Reaction schemes containing a large number of compartments and transfer paths (e.g. the example reaction scheme Calculation of a Photoresist Latent Image") are likely to show substantial (up to 1-2 orders of magnitude) improvement in execution speed when this option is enabled. When this option is disabled, the standard algorithm for selecting the step to advance is applied.
Use Equilibrium Detect

The event selection process used by Kinetiscope can lead to inefficient direct simulation of partial equilibria, should they arise during a reaction. Most of the computer time would be spent maintaining the equilibrium, with only occasional selection of other steps. The Equilibrium Detect Option's detection and emulation routines make simulation of equilibria more efficient. Their use is illustrated in the Example Simulations.

The equilibrium detect option is for systems with reversible reaction steps which may come into equilibrium during a simulation. It enables Kinetiscope to use special algorithms to handle these steps, which Kinetiscope would otherwise simulate inefficiently. Any steps which are to be monitored for equilibrium must be written as reversible steps.

Kinetiscope makes no assumptions about the existence of equilibria. When equilibrium detection is enabled, the identity of the reaction events which occur is monitored. At specific intervals (given by the equilibrium test cycle length), the list of these events is examined to determine how frequently reversible steps are being selected. If one or more pairs of steps is judged to be in equilibrium, Kinetiscope invokes special algorithms to enable selection of rare, non-equilibrium events. The system is then returned to normal simulation mode, and a new equilibrium detect cycle is initiated.

This option preserves the accuracy of the simulation while improving the efficiency of the calculation. This generally results in substantial savings in computer time. To use this option, you must check the check box, and two parameters must be set:

Test Cycle Length
sets the number of events which elapse between examination cycles. This optimum length for the cycle will depend on the reaction scheme, i.e. the number of reversible steps, relative rates of reversible and non-reversible steps, and so on. Typically, values between 100-500 are good starting points.
Selection Frequency
is used to diagnose whether a particular reversible reaction is currently in equilibrium. Equilibrium is found if:
  • one or more reversible pairs is found to occur at least a certain percentage of the total number of events in the current text cycle, and
  • the forward and reverse steps of each pair are selected with frequencies at least a certain percentage of each other.

This percentage is the selection frequency. Typically values of 80-90% provide sufficient accuracy.

The equilibrium detect can be left on even if no equilibrium occurs or if no steps are reversible in the reaction scheme. The simulation may be slowed down slightly by the detect cycle.

For a working example, see the Example Simulation Gas phase chemistry in a CVD reactor (I), and compare it to Gas phase chemistry in a CVD reactor (II).