Here is a test problem a little larger than the example given in the
distribution for REACT.
============================= problem.m===================================
.2500e-05 no2m -> no + om
.5556e+10 om -> oh + ohm
.1000e+10 oh + ohm -> om
.1000e+10 oh + no2m -> no2 + ohm
.2500e+09 om + no2m -> no2 + ohm + ohm
.2500e+10 om + o2 -> o3m
.5500e+04 o3m -> o2 + om
.1000e+09 no2 + no2 -> n2o4
.1300e+04 n2o4 -> no2 + no2
.1200e+04 n2o4 -> no2m + no3m
.3000e+03 no2 -> x
.1000e+09 no2 + x -> no2m + no3m
.1000e+09 no2 + no -> n2o3
.2000e+04 n2o3 -> no2 + no
.2000e+04 n2o3 -> no2m + no2m
.1000e-00 x + no -> no2m + no2m
============================= problem.m===================================
and here are the parameters.
============================= problem.p===================================
0 .36e+04 .06e+04 1.0e-03
no2m 0.1e-0 1.0e-8 1.0e-03
o2 .3e-03 1.0e-8 1.0e-03
ohm .1e-06 1.0e-8 1.0e-03
============================= problem.p===================================
The solution is found by
...............................................................
%react problem
1) .2500e-05 no2m -> no + om
2) .5556e+10 om -> oh + ohm
3) .1000e+10 oh + ohm -> om
4) .1000e+10 oh + no2m -> no2 + ohm
5) .2500e+09 om + no2m -> no2 + ohm + ohm
6) .2500e+10 om + o2 -> o3m
7) .5500e+04 o3m -> o2 + om
8) .1000e+09 no2 + no2 -> n2o4
9) .1300e+04 n2o4 -> no2 + no2
10) .1200e+04 n2o4 -> no2m + no3m
11) .3000e+03 no2 -> x
12) .1000e+09 no2 + x -> no2m + no3m
13) .1000e+09 no2 + no -> n2o3
14) .2000e+04 n2o3 -> no2 + no
15) .2000e+04 n2o3 -> no2m + no2m
16) .1000e-00 x + no -> no2m + no2m
...............................................................
6.340u 0.340s 0:12.26 54% 0+22k 0+2io 0pf+0w
(6.34 seconds run time)
I can look at the results using select (here I have a file problem.e
with only the words
no2 no no3m
rather than everything to reduce the amount of output)
...............................................................
% select no2aq
16 reacions involving 12 species
no2m no om oh ohm no2 o2 o3m n2o4 no3m x n2o3
time no2 no no3m
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
6.0000e+02 8.5578e-11 4.5160e-05 2.1075e-05
1.2000e+03 6.7257e-11 6.5957e-05 3.1552e-05
1.8000e+03 5.2981e-11 8.3997e-05 4.0644e-05
2.4000e+03 4.6293e-11 9.9261e-05 4.8192e-05
3.0000e+03 4.1795e-11 1.1373e-04 5.5295e-05
3.6000e+03 3.8639e-11 1.2502e-04 6.0946e-05
...............................................................
Now how do I know that the tolerance values are ok? I could rerun
with smaller values and look for an effect. But in this case I was
carefull to write reactions conserving all 'n' containing species (not
so with o an h, in this sample I make OH- readily (ohm) but not H+
where I should!). If I add up all the 'n's in the result I should get
what I started with (0.10 == no2m initial, see problem.p). Here is
the problem.e file to extract all the species with 'n's:
=============================problem.e===================================
no2m no no2 n2o4 n2o4 no3m x n2o3 n2o3
=============================problem.e===================================
notice n2o4 and n2o3 are in the list twice so they get counted twice!
I just pipe the output to Gary Pearlman's dm to add them up!
(recall that the first column is time)
%extract problem | dm ' x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 '
to get:
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
You could also use an awk script
% extract problem | awk '{a= $2+$3+$4+$5+$6+$7+$8+$9+$10; print a}'
.1
.1
.1
.1
.1
.1
.1
...............................................................
You may have noticed that since I use '-' as a token in the reaction
arrow I designate charge with a lowercase m or p appended to the name.
Tokens parsed as word delimeters in the mechanism file are:
"$,+;:(){}[]" and "->"
That is
[CH3] + (CH2) -> {stuff}
is equivalent to
CH3 + CH2 -> stuff
In a future release I may remove the "(){}[]" from the token list after
I decide what if anything I want to do with automated invocation of
the steady state approximation (I was thinking about enclosing
variables in {} if they could be approximated by ss).
___________________________________________________________
|Mike Whitbeck | whitbeck@unssun.unr.edu |
|Desert Research Inst. | whitbeck@wheeler.wrc.unr.edu |
|POB 60220 | whitbeck@sanjuan.UUCP |
|RENO, NV 89506 | 702-673-7348 |
|__________________________|______________________________|
All academics have the potential for being insatiable...
but the chemists are the most expensive and insatiable among the
expensive and insatiable. - J. Martin in "To Rise Above Principle"
|