Simulation methods in kinetics courses

This artirle contains short descriptions of computer pro- grams or hardware that simulate laboratory instruments or results nf kinetics experiment% Pr...
1 downloads 0 Views 4MB Size
computer d e ~17.

edited by JOHN W. MOORE Eastan Michigan Univerrily Ypoilsnti. MI 48197

Bits and Pieces, 5 Simulations T h i s artirle contains short descriptions o f computer programs or hardware that simulate laboratory instruments or results n f kinetics experiment% Provision can be made i n such simulations for students t o make the same kinds of derisions that thev would make i n a real lahnratnry, but a t far less cost and often much mare rapidly. Snmeof the instructional prngrams reported here are adaptations of major research t d s t h a t have heen used to nhtain fundamental data hvadiusting . . parameters in appropriate models of experimental systems. I n addition. a numher o f other lahoratarv simulations have Iwen p o l ~ l ~ ~ hr w e et ln t l v I1 7 ) . .V~Nn~tthorsu f HIIS and l'ieres w ~ lmakenvnilnhle l li.itings and tnr mnch~ne-readable versims of r h e ~ prugramu. r Please r e i d earh d r s r r ~ o t u mrarelull\. to determine n ~ m p n t i l r ~ l ~ t y w i t h your nwn cumputing environment hefore requesting materials from any o f the authors. Guidelines for authors of B i t s and Pieces appeared in the A p r i l 1980 issue of the Jnurn o / . They are also available frnm the editor.

Simulation Methods In Kimtics Courses

4 ) Hernu~erelatively small numhem 111m c h x l e are being rimuIated. the numher versus time curves have random rtetirtiral noise-generally with mean amplitude equal to the square r c * m of the individual p,polaticm numhen. Noise i s derrenrd hy increasing the n w n l ~ ~ ~ f i t ~ I molecules i v i d ~ d in thesimulatic,n,therr~theinp directly propvrtirmal 10 this. Thus. this uimulntor has an adjustable ~ o s t - r e s ~ l ~SCRIP. ti~n 5) Kinetics schemes involvinr raoidlv maintained eauiiihria are

eccmomically. 6 ) The program has the feature that rern reartion prohnhility will cause termination of the simulation, regardlesq of the total nurnher nf reartion evenL~originallyspecified. This heips toavuid the meaningless results often ohtained at the end of conventional limulslions. M S I M 4 was designed t o he useful for a wide variety of problems, and the appropriate choice o f options allows simulation of inoharic-isothermal, variable temperature-isobaric and variahle pressure and temperature systems. There are n o restrictinns o n the range o f relative concentrations or rate cumtan- outside o f the nhviousones o f computer memorysize and availahilitv o f funds. T h i s oroeram is onlv suitahle for .. homogeneous liquid- or gas-phase systems. There is n o provision at present for treating spatially resnlved chemistry. for example, prncesses occurring in flames or the stratosphere. Discrete simulation is particularly suitahle for underpraduate instructinn. T h e i n p u t requires only a mechanism, rate constank, initial concentrations, and specification o f the duration and size of the simulation, making the program particularly easy t o use. Furthermore. nther mtegratinn

.

Frances A. Houle' and Don L. Bunker2 Universily of California Iwine. CA 92717 I n respunse t o the need for an ecnnnmical simulation program suitable for a wide variety n f reaction mechanisms, we have developed M S I M 4 ( 8 )and used it a t U. C. I. in the i n troductory kinetics course. T h i s paper descrihes how the orupram .. works and oresent-samde exercises that r e w i r e that students use it. Most kinetics simulators work h v snlving the differential equatinns o f kinetics stepwise in time, propagating the concentration time-dependences from their derivatives in a complicated way.'l'he M S l M 4 p r w d u r e isentirely different. It may he thought o f as using a very small volume, containing a limited h u t adequate numher of mnlecules o f the various species involved in the reactinn, tn typify the course of events i n the much larger system that cont.ains it. Each reaction i n the mechanism isassigned a prohahility hased on its kinetic rate law. and m e reartion event at a time is selected randnmlv. o n the basis o f these r n r r e r t l y weighted prohahilities. After everv selertion of a reaction, the numbers o f the species i n volved and the time are updated. T h l s m t d e of operation has several characteristic features:

.

PIBC~S:' $0 mat readers wtm have appro plate computer systems can obtain and use the pqgrams described. The edita's intentm 4% that m8 CompUter Senel be

understandable IM beglnnerr but

at

me

%me tlme mlereslmg lor erpenr John W. Mmre recewed hls AB f r m Frankiln and Marshall Cotlegs

am ha PM) from Nmhwestern Univer.ilty. cmcentratlng m phystcal

II A mndom numher eenerator ia used 10 advance the reaction k ~ ~ m s85mwet as n-ws hma an c s5 1" 1977 ne roceor(ld a ~ ~ w n q u t l h dFacmy d ~ w r lrom d asl lorn M ~ m p untverwl n and

numher ha* to he supplied to b q i n the process. 2) Time does nor nd\.ance in uniform st~ps,as may he true with d i f f e r ~ n t i a l - ~ q o a t i ~ ~ n - rimulators. ~~~I~inp: :I1 A true steady-state concentration is usually indicated hy the sequence of populations 10.1,11,1.0.l,~l.. .) for the species in q u c tion. Volume 58

I

Number 5

May 1981

405

simulators having the flexibility of MSIM4 (7) involve algorithms that tend to use a lot of computer time, while a stochastic process employs fast-executing simple algebra. This difference in operation costs can become a very important consideration when classes are laree. P r o g r a m MSIMh noninteract&e ANSI-standard FORTRAN, 814 statements, 16 comments. The program is run using punched cards. Execution requires approximately 32 Kwords. MSIM4 was specificallv designed for transportability and has been tested on a variety i f processors,~including PDP10, CDC7600, and IBM370. Editing to eliminate some uptions and redurc orrtty size will minirnizt of the :~v:tilirl,I~~ core rc.quirrrnc.ntss~,that i h e p n ~ r : > m can be run on a smaller lahwltorv u m n u t e r having FOll'lXAK lV caoabilitv and o minimum word size of 16 hits. The program, sample executions, and detailed documentation are available from QCPE ( 8 ) for a nominal fee. Applications

c o m ~ u t e simulation r is not an exercise familiar to many underg;aduates. We have found it useful to organize assignments in a sequence that uses the technique in progressively --~-

~~~~

u

-

~~

~

and pool their results with those of the rest of the class to f o r k a hroad nicture of the reaction svstem in auestion. Written reports and in-class discussions provide a means for students to be creative in the analysis of their results. One of the first things a student learns in a kinetics course is how to apolv the steadv-state aowroximation to a mechanism in or& to obtain a i a t e law and then use the resulting expression to analyze experimental data. We can take these same mechanisms-for example, the Chapman mechanism for the thermal decomposition of 0 3 in the presence of Oz, or a mechanism for homogeneous catalysis in solution-and simulate them. This exercise serves to illustrate the point that the steady-state approximation is applicable in these cases. It can also he used to explore the catalysis and decomposition processes themselves. For example, the students can use varying proportions of 0 2 and 0 3 to determine the maximum fraction of Os which will give a controlled, steady-state reaction, rather than a thermal explosion. Havine eained familiaritv with the oroeram. the students u work with reaction mechanisms that cannot he significantly simdified hv usine the steadv-state aouroximation or that .. describe reactions in which a steady state is never attained. A good example of this type of system is the smog chemistry taking place in the local air basin. We started with following mechanism, a hyhrid of two that have been employed in partial steady-state analyses of the formation rate of air pollutants ( 9 ) .

-

N O ~ % N O+ O 0+0~-O3 O3 + NO NO* O2 0+N02-NO+02 o3+ G GO1 A OtG-GO GO + Oa GO, + A GO, + NO2 PAN

--

+ +

k~ = 0.004

k S = lo7

(1)

(2)

k a = 0.33

(3)

k4=130 kg = 0.012 h6 = 3.3 x 103 k7 = 1.4 X 10" ka = 6.7 X 103

(4)

(5) (6) (7) (8)

T h e rate constants are in s-' or liter mol-I s-' units, G = hydrocarhons, GO = oxidized hydrocarhons, A = aldehydes (causing reduced visibility), GO, = peroxides and PAN = peroxyalkyl nitrates (causing eye irritation). Initially, only Oz and uDm quantities of NO2 and G were present, and five diff e r e n t ~ ~ ratios ; / ~ were used. The class, after a lively discussion, came to the following conclusions: (1)Although the chemistm hanoened in the rieht peroxides 2 P ~ N )the , time scale order (Ox aldehyde:was unreasonahle. The mechanism oredicted that within 20 min after starting the decompositibn of NOz, all the NO2

-

406

Journal of Chemical Education

would have disappeared, leaving NO and 0 3 . This is aporoximatelv the rieht amount of time. However. it was orehicted t h a t the NO^ would not he regeneratedand that it would he a matter of centuries before the mountains began rc, disappear in the Iinzv i l l d eyes ctarted \ I . ; ~ I < T121 I I , The ~. llilslc chemistry nnl. ulvtirc;ted by the \ , l r i : ~ t ~ ~i nn initial i concentrations- the timr c u l t \\as merely wntrm tt,d o r ex!banded slightly. 13, 'l'hv mechnnism could he improved hy nddine stens for N O re