Appendix V. Temp and Time Computer Programs

This appendix contains computer programs for the cyclic running of SENKIN for different (a) temperatures, Temp, and (b) reaction times, Time.  The programs are written in FORTRAN and are run on the Grendel computer system, as described in Section 4.10.

(a) Temp

The following example is for the running of SENKIN over the temperature range 1000‑3000 K for a pressure of 20 Torr, a reaction time of 5 s and a 1%CS2/H2 gas mixture.

#!/usr/bin/perl

my \$i, \$conc1, \$conc2;

my \$rc;

for (\$i=10000000; \$i<=30000000; \$i = \$i+300000) {

\$conc1 = \$i/10000;

open (SENKIN, ">senkp.inp") or die "Can't open senkp.inp: \$!";

print SENKIN "CONT\n";

print SENKIN "PRES 0.0265\n";

printf SENKIN "TEMP %8.5f\n", \$conc1;

printf SENKIN "TIME 5.0\n";

print SENKIN "DELT 1.E-4\n";

print SENKIN "REAC CS2 1\n";

print SENKIN "REAC H2 100\n";

print SENKIN "END";

close SENKIN;

printf STDERR "%8.5f\n", \$conc1;

\$rc = 0xffff & system "senk <senkp.inp >senkp.out";

if (\$rc != 0) { die "senk did not run:\$rc"; }

open (SENKOUT, "tail -10 tign.out|")  or die "Can't open tign.out:

\$!";

my \$line = "";

while (<SENKOUT>) {

chomp;

if ( /=/ ) { \$line = \$line . \$_; }

}

close SENKOUT;

printf "%8.5f ", \$conc1;

print \$line, "\n";

}

(b) Time

The following example is for the running of SENKIN over the reaction time range of 0‑50 s for a pressure of 40 Torr, a temperature of 2000 K and a 50%CH4/50%CO2 gas mixture.

#!/usr/bin/perl

my \$i, \$conc1, \$conc2;

my \$rc;

for (\$i=0; \$i<=5000000; \$i = \$i+50000) {

\$conc1 = \$i/10000;

open (SENKIN, ">senkp.inp") or die "Can't open senkp.inp: \$!";

print SENKIN "CONT\n";

print SENKIN "PRES 0.053\n";

print SENKIN "TEMP 2000\n";

printf SENKIN "TIME %8.5f\n", \$conc1;

print SENKIN "DELT 5.E-1\n";

print SENKIN "REAC CH4 50\n";

print SENKIN "REAC CO2 50\n";

print SENKIN "END";

close SENKIN;

printf STDERR "%8.5f\n", \$conc1;

\$rc = 0xffff & system "senk <senkp.inp >senkp.out";

if (\$rc != 0) { die "senk did not run:\$rc"; }

open (SENKOUT, "tail -21 tign.out|")  or die "Can't open tign.out:

\$!";

my \$line = "";

while (<SENKOUT>) {

chomp;

if ( /=/ ) { \$line = \$line . \$_; }

}

close SENKOUT;

printf "%8.5f ", \$conc1;

print \$line, "\n";

}