The Ziff-Gulari-Barshad (ZGB) model.¶
This tutorial is intended to show how to use pyZacros from a Zacros perspective. Thus, we will literally show how to translate the Zacros input files to a pyZacros script. To do that, we use the system described in the Zacros tutorial Ziff-Gulari-Barshad Model in Zacros. All physical/chemical description of the system is described in detail there. We invited you first to get familiar with the tutorial cited above to quickly appreciate the parallel between the Zacros input files and the pyZacros objects. This will allow you to follow line-by-line the example’s python script easily.
You can download the example’s python script from this link ZiffGulariBarshad.py
.
If everything is working well, you should get the following information in the standard output and the figure shown at the end.
1$ amspython ZiffGulariBarshad.py
2[14.02|17:20:01] PLAMS working folder: /home/user/pyzacros/examples/ZiffGulariBarshad/plams_workdir
3---------------------------------------------------------------------
4simulation_input.dat
5---------------------------------------------------------------------
6random_seed 953129
7temperature 500.0
8pressure 1.0
9
10snapshots on time 0.5
11process_statistics on time 0.01
12species_numbers on time 0.01
13max_time 25.0
14
15n_gas_species 3
16gas_specs_names CO O2 CO2
17gas_energies 0.00000e+00 0.00000e+00 -2.33700e+00
18gas_molec_weights 2.79949e+01 3.19898e+01 4.39898e+01
19gas_molar_fracs 4.50000e-01 5.50000e-01 0.00000e+00
20
21n_surf_species 2
22surf_specs_names CO* O*
23surf_specs_dent 1 1
24
25finish
26---------------------------------------------------------------------
27lattice_input.dat
28---------------------------------------------------------------------
29lattice default_choice
30 rectangular_periodic 1.0 50 50
31end_lattice
32---------------------------------------------------------------------
33energetics_input.dat
34---------------------------------------------------------------------
35energetics
36
37cluster CO*-0
38 sites 1
39 lattice_state
40 1 CO* 1
41 site_types 1
42 graph_multiplicity 1
43 cluster_eng -1.30000e+00
44end_cluster
45
46cluster O*-0
47 sites 1
48 lattice_state
49 1 O* 1
50 site_types 1
51 graph_multiplicity 1
52 cluster_eng -2.30000e+00
53end_cluster
54
55end_energetics
56---------------------------------------------------------------------
57mechanism_input.dat
58---------------------------------------------------------------------
59mechanism
60
61step *-0:CO-->CO*-0
62 gas_reacs_prods CO -1
63 sites 1
64 initial
65 1 * 1
66 final
67 1 CO* 1
68 site_types 1
69 pre_expon 1.00000e+01
70 activ_eng 0.00000e+00
71end_step
72
73step *_0-0,*_1-0:O2-->O*_0-0,O*_1-0;(0,1)
74 gas_reacs_prods O2 -1
75 sites 2
76 neighboring 1-2
77 initial
78 1 * 1
79 2 * 1
80 final
81 1 O* 1
82 2 O* 1
83 site_types 1 1
84 pre_expon 2.50000e+00
85 activ_eng 0.00000e+00
86end_step
87
88step CO*_0-0,O*_1-0-->*_0-0,*_1-0:CO2;(0,1)
89 gas_reacs_prods CO2 1
90 sites 2
91 neighboring 1-2
92 initial
93 1 CO* 1
94 2 O* 1
95 final
96 1 * 1
97 2 * 1
98 site_types 1 1
99 pre_expon 1.00000e+20
100 activ_eng 0.00000e+00
101end_step
102
103end_mechanism
104[14.02|17:29:40] JOB plamsjob STARTED
105[14.02|17:29:40] JOB plamsjob RUNNING
106[14.02|17:29:41] JOB plamsjob FINISHED
107[14.02|17:29:41] JOB plamsjob SUCCESSFUL
108[14.02|17:32:01] PLAMS run finished. Goodbye
