Part 1: General settings

The simulation_input.dat file contains information about the gas and adsorbed species, the conditions of the simulation, as well as instructions about sampling over the course of the simulation and stopping criteria. One can also set the seed of the random number generator, so that different runs with the same seed produce the same results. The random seed is set as:

random_seed               953129

The conditions of the simulation are specified by expressions such as:

temperature               500.0
pressure 1.0

Next comes the information about the gas phase species. In our simulation we have three gas phase species, CO, O2 and CO2. We have to specify the energies, molar fractions and molecular weights (the molecular weights are not used currently in the simulation, the corresponding keyword is there for future development purposes).

n_gas_species             3
gas_specs_names CO O2 CO2
gas_energies 0.000 0.000 -2.337 # in eV
gas_molec_weights 28.0102 31.9989 44.0096
gas_molar_fracs 0.450 0.550 0.000

The names of species can be whatever the user wants. It helps to use names indicating chemical formulas for simple species. Also, as a convention, the * character should be reserved to only adsorbed species, as discussed below. The information about the gas energies can be found by density functional theory (DFT) calculations (note that comments in the input files are preceded by the character #). Zacros uses this information to compute the reaction energy (ΔErxn) and subsequently the activation energy via Brønsted-Evans-Polanyi relations. In the context of the ZGB model, these energies are not important, since the rate constants of the elementary events are given explicitly, so we will take all activation energies equal to 0. Consequently, the actual simulation temperature defined above, will not change the simulation results. The molar fractions are important though, as they determine the relative frequency of CO versus O2 adsorption, which in turn shapes system behaviour (regimes where poisoning versus sustained reactivity is observed).

The specification of adsorbed species is a bit simpler. Here we have only 2 adsorbates, CO and O. In naming these species, we conventionally use one or more * characters in the end of the name, to indicate how many sites this species is bound to. For instance, a monodentate species would be A*, a bidentate B** etc. In our case:

n_surf_species            2
surf_specs_names CO* O*
surf_specs_dent 1 1

The last keyword surf_specs_dent, indicates the denticity of each species, namely the number of sites occupied. In our case we have only monodentate species.

The sampling behaviour of the programme is controlled by the keywords: snapshots, process_statistics, species_numbers. Keyword snapshots controls how often Zacros saves lattice configurations to the history_output.dat file, process_statistics pertains to the statistics of elementary event occurrence saved in file procstat_output.txt, and species_numbers pertains to the numbers of gas species produced or consumed, as well as the number of adsorbed molecules/atoms found on the lattice, which are reported in file specnum_output.txt. Each of these keywords can be followed by the expression on event, in which case, Zacros logs down a new entry in the corresponding file every time an elementary event is executed. On the other hand the keywords can be followed by the expression on time and a real number, in which case saving occurs after a fixed time interval Δt. The sampling modes or the Δts for each output file need not be the same, for instance, one might want to save snapshots every 1 s of simulated time, but report species numbers at every event occurrence. In our case, we will use the following options:

snapshots                 on time 5.e-1
process_statistics on time 1.e-2
species_numbers on time 1.e-2

Note that too frequent sampling can result in huge output files, so the on event sampling mode should typically be restricted to short exploratory simulations, rather than production runs.

The KMC simulation can stop when a fixed number of events has been simulated, or when the simulation time has reached a given value. Thus, stopping criteria can be defined by the keywords max_steps or max_time, which can be followed by an integer or real, respectively; or by the keyword infinity. The latter immediately sets the maximum number of steps or the maximum time, to the biggest allowed value (about 9.2e+18 steps, or 1.8e+308 units of simulated time on GNU fortran). Here we will use:

max_steps                 infinity
max_time 25.0

Another stopping criterion has to do with the actual (real) time the simulation has run for, and may come in handy when running in computational clusters with walltimes. The keyword is walltime, and is followed by an integer specifying the number of seconds the simulation is allowed to run. In the end of the simulation, Zacros will write a restart.inf file (unless the keyword no_restart appears in simulation_input.dat), and exit normally. If Zacros is invoked from a directory where a restart.inf file appears, it will disregard any input files (*_input.dat) and attempt to resume the simulation saved in the restart file. In our example here, we will specify a walltime of 1 hour:

wall_time                 3600 # in seconds

The simulation_input.dat file ends with the keyword finish.

Download simulation_input.dat.

Sorry, this website uses features that your browser doesn’t support. Upgrade to a newer version of Firefox, Chrome, Safari, or Edge and you’ll be all set.