Changeset 794

Show
Ignore:
Timestamp:
01/22/07 13:41:22 (23 months ago)
Author:
rjrw
Message:

source/mole_h_step.cpp:

Initial conversion of reaction species into strings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/newmole/source/mole_h_step.cpp

    r789 r794  
    4949 
    5050#define ABSLIM  1e-12 
     51#define NBUF 256 
    5152 
    5253typedef struct COmole_reaction_s reaction; 
     
    5859        /* reaction index, a number to reference current reaction */ 
    5960        int rindex,  
    60         /* vector of ints that are incoming species, the reactants */ 
    61         int *in,  
    62         /* number of reactants */ 
    63         int nin,  
    64         /* same for products */ 
    65         int *out,  
    66         /* number of products */ 
    67         int nout,  
     61        char *in,       char *out,  
    6862        /* rate determining species if they are not the same as the reactants, 
    6963         * these are non-null in cases where a part of the chemical network 
    7064         * acts as a catalyst in the reaction  
    7165         * as H2g + H2g -> H2g + H2* or where */ 
    72         int *rate,  
    73         /* number of these */ 
    74         int nrate) 
     66        char *rate) 
    7567{ 
    7668        static reaction *list = NULL, *r; 
    77         static int poolsize=1, index = 0; 
    78         int i; 
     69        static unsigned int poolsize=1, index = 0; 
     70        int nin, nout, nrate; 
     71        char buf[NBUF], *s, *t; 
    7972 
    8073        /* this routine is called only to initialize structure with information 
     
    9386         * when not null then the rate determining species are not the 
    9487         * same as *in */ 
    95         if(rate == NULL || nrate == 0)  
     88        if(*rate == '\0')  
    9689        { 
    9790                rate=in; 
    98                 nrate=nin; 
    9991        } 
    10092 
    10193        /* space for the linked list "list" */ 
    102         /*lint -e701 shift left of signed quantity */ 
    10394        if(list == NULL || index == poolsize)  
    10495        { 
     
    10798                index = 0; 
    10899        } 
    109         /*lint +e701 */ 
    110100 
    111101        /* fprintf(ioQQQ,"Getting element %d+1 of %d\n",index,poolsize); */ 
     
    114104        r->next = NULL; 
    115105        r->index = rindex; 
     106 
     107        strncpy(buf,in,NBUF); 
     108        nin = 0; 
     109        for (s = buf; ; s = NULL)  
     110        { 
     111                t = strtok(s,","); 
     112                if (!t) 
     113                        break; 
     114                r->reactants[nin++] = findspecies(t); 
     115        } 
     116        strncpy(buf,out,NBUF); 
     117        nout = 0; 
     118        for (s = buf; ; s = NULL)  
     119        { 
     120                t = strtok(s,","); 
     121                if (!t) 
     122                        break; 
     123                r->products[nout++] = findspecies(t); 
     124        } 
     125        strncpy(buf,rate,NBUF); 
     126        nrate = 0; 
     127        for (s = buf; ; s = NULL)  
     128        { 
     129                t = strtok(s,","); 
     130                if (!t) 
     131                        break; 
     132                r->rate_species[nrate++] = findspecies(t); 
     133        } 
     134 
    116135        ASSERT(nin <= MAXREACTANTS && nout <= MAXPRODUCTS && nrate <= MAXREACTANTS); 
    117  
    118136        r->nreactants = nin; 
    119137        r->nrates =     nrate; 
    120138        r->nproducts  = nout; 
    121  
    122         /* incoming reactants */ 
    123         for(i=0; i<r->nreactants; i++) 
    124                 r->reactants[i] = mole_h_species[in[i]]; 
    125  
    126         /* rate determining species */ 
    127         for(i=0; i<r->nrates; i++) 
    128                 r->rate_species[i] = mole_h_species[rate[i]]; 
    129  
    130         /* outgoing products */ 
    131         for(i=0; i<r->nproducts; i++) 
    132                 r->products[i] = mole_h_species[out[i]]; 
    133139 
    134140        return r; 
     
    820826        if(r == NULL)  
    821827        { 
    822                 int in[]={-1},out[]={-1}; 
    823                 r = rlist = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     828                r = rlist = newreaction(rindex,"","",""); 
    824829        } 
    825830        rindex++; 
     
    837842         * there already. 
    838843         * 
    839          * >>>> ONLY CHANGE the elements of the in[] and out[] vectors and 
    840844         * the rate constant, keep the rest fixed for all reactions  
    841845         * */ 
    842846        if(r->next == NULL) { 
    843                 int in[]={ipMH},out[]={ipMHm}; 
    844                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     847                r->next = newreaction(rindex,"H","H-",""); 
    845848        } 
    846849        r = r->next; 
     
    872875         
    873876        if(r->next == NULL) { 
    874                 int in[]={ipMHm,ipMHp},out[]={ipMH2p}; 
    875                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     877                r->next = newreaction(rindex,"H-,H+","H2+",""); 
    876878        } 
    877879        r = r->next; 
     
    902904        hmi.h2phmh2h = 1.4e-7*co.lgUMISTrates*17.305/phycon.sqrte; 
    903905        if(r->next == NULL) { 
    904                 int in[]={ipMH2p,ipMHm},out[]={ipMH2g,ipMH}; 
    905                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     906                r->next = newreaction(rindex,"H2+,H-","H2,H",""); 
    906907        } 
    907908        r = r->next; 
     
    919920        h2phmhhh = 1.4e-7f*17.3205/phycon.sqrte; 
    920921        if(r->next == NULL) { 
    921                 int in[]={ipMH2p,ipMHm},out[]={ipMH,ipMH,ipMH}; 
    922                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     922                r->next = newreaction(rindex,"H2+,H-","H,H,H",""); 
    923923        } 
    924924        r = r->next; 
     
    933933        hphmhhpe = 4.75e-30*pow(phycon.te,3.1); 
    934934        if(r->next == NULL) { 
    935                 int in[]={ipMHp,ipMHm},out[]={ipMH,ipMHp}; 
    936                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     935                r->next = newreaction(rindex,"H+,H-","H,H+",""); 
    937936        } 
    938937        r = r->next; 
     
    949948        h2hmhh2e = 6.74e-17*co.lgUMISTrates*phycon.tesqrd*sexp(19870/phycon.te); 
    950949        if(r->next == NULL) { 
    951                 int in[]={ipMH2g,ipMHm},out[]={ipMH,ipMH2g}; 
    952                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     950                r->next = newreaction(rindex,"H2,H-","H,H2",""); 
    953951        } 
    954952        r = r->next; 
     
    960958 
    961959        if(r->next == NULL) { 
    962                 int in[]={ipMHm},out[]={ipMH}; 
    963                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     960                r->next = newreaction(rindex,"H-","H",""); 
    964961        } 
    965962        r = r->next; 
     
    1001998 
    1002999        if(r->next == NULL) { 
    1003                 int in[]={ipMHm},out[]={ipMH}; 
    1004                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1000                r->next = newreaction(rindex,"H-","H",""); 
    10051001        } 
    10061002        r = r->next; 
     
    10121008 
    10131009        if(r->next == NULL) { 
    1014                 int in[]={ipMHm},out[]={ipMH}; 
    1015                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1010                r->next = newreaction(rindex,"H-","H",""); 
    10161011        } 
    10171012        r = r->next; 
     
    10231018 
    10241019        if(r->next == NULL) { 
    1025                 int in[]={ipMH},out[]={ipMHm}; 
    1026                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1020                r->next = newreaction(rindex,"H","H-",""); 
    10271021        } 
    10281022        r = r->next; 
     
    10511045        /* this one is into ground H2 */ 
    10521046        if(r->next == NULL) { 
    1053                 int in[]={ipMH, ipMHm},out[]={ipMH2g}; 
    1054                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1047                r->next = newreaction(rindex,"H,H-","H2",""); 
    10551048        } 
    10561049        r = r->next; 
     
    10621055    /* this one is into excited H2 */ 
    10631056        if(r->next == NULL) { 
    1064                 int in[]={ipMH, ipMHm},out[]={ipMH2s}; 
    1065                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1057                r->next = newreaction(rindex,"H,H-","H2*",""); 
    10661058        } 
    10671059        r = r->next; 
     
    11521144        /* >>chng 03 sep 11, resolve H2 and H2*, use fraction determined above */ 
    11531145        if(r->next == NULL) { 
    1154                 int in[]={ipMH2g},out[]={ipMH,ipMHm}; 
    1155                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1146                r->next = newreaction(rindex,"H2","H,H-",""); 
    11561147        } 
    11571148        r = r->next; 
     
    11671158        /* >>chng 03 sep 11, resolve H2 and H2*, add new destruction process for H2* */ 
    11681159        if(r->next == NULL) { 
    1169                 int in[]={ipMH2s},out[]={ipMH,ipMHm}; 
    1170                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1160                r->next = newreaction(rindex,"H2*","H,H-",""); 
    11711161        } 
    11721162        r = r->next; 
     
    12021192 
    12031193        if(r->next == NULL) { 
    1204                 int in[]={ipMHm,ipMHp},out[]={ipMH,ipMH}; 
    1205                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1194                r->next = newreaction(rindex,"H-,H+","H,H",""); 
    12061195        } 
    12071196        r = r->next; 
     
    12301219 
    12311220        if(r->next == NULL) { 
    1232                 int in[]={ipMH,ipMH},out[]={ipMHm,ipMHp}, ratesp[]={ipMH,ipMHp}; 
    1233                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1221                r->next = newreaction(rindex,"H,H","H-,H+","H,H+"); 
    12341222        } 
    12351223        r = r->next; 
     
    12651253        if(r->next == NULL) { 
    12661254                /* >> chng 05 jul 14, TE, H2s gets destroyed */ 
    1267                 int in[]={ipMH2s},out[]={ipMH,ipMHm}; 
    1268                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1255                r->next = newreaction(rindex,"H2*","H,H-",""); 
    12691256        } 
    12701257        r = r->next; 
     
    12941281                /* This goes to excited H2 */ 
    12951282                if(r->next == NULL) { 
    1296                         int in[]={ipMH,ipMH},out[]={ipMH2s},ratesp[]={ipMH}; 
    1297                         r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1283                        r->next = newreaction(rindex,"H,H","H2*","H"); 
    12981284                } 
    12991285                r = r->next; 
     
    13061292                /* This goes to ground H2 */ 
    13071293                if(r->next == NULL) { 
    1308                         int in[]={ipMH,ipMH},out[]={ipMH2g},ratesp[]={ipMH}; 
    1309                         r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1294                        r->next = newreaction(rindex,"H,H","H2","H"); 
    13101295                } 
    13111296                r = r->next; 
     
    13241309                /* This goes to excited H2 */ 
    13251310                if(r->next == NULL) { 
    1326                         int in[]={ipMH,ipMH},out[]={ipMH2s},ratesp[]={ipMH}; 
    1327                         r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1311                        r->next = newreaction(rindex,"H,H","H2*","H"); 
    13281312                } 
    13291313                r = r->next; 
     
    13371321                /* This goes to ground H2 */ 
    13381322                if(r->next == NULL) { 
    1339                         int in[]={ipMH,ipMH},out[]={ipMH2g},ratesp[]={ipMH}; 
    1340                         r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1323                        r->next = newreaction(rindex,"H,H","H2","H"); 
    13411324                } 
    13421325                r = r->next; 
     
    13621345        /* Possible that changing to a rate proportional to ipMHp would be more consistent */ 
    13631346        if(r->next == NULL) { 
    1364                 int in[]={ipMH,ipMH},out[]={ipMH2g},ratesp[]={ipMH,ipMHp}; 
    1365                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1347                r->next = newreaction(rindex,"H,H","H2","H,H+"); 
    13661348        } 
    13671349        r = r->next; 
     
    13731355        /* >>chng 00 nov 25 factor of 0.1, assume pump is total, and 10% distroy H2 is 21*/ 
    13741356        if(r->next == NULL) { 
    1375                 int in[]={ipMH2g},out[]={ipMH,ipMH}; 
    1376                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1357                r->next = newreaction(rindex,"H2","H,H",""); 
    13771358        } 
    13781359        r = r->next; 
     
    13881369        /* >>chng 00 nov 25 factor of 0.1, assume pump is total, and 10% distroy H2 */ 
    13891370        if(r->next == NULL) { 
    1390                 int in[]={ipMH2s},out[]={ipMH,ipMH}; 
    1391                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1371                r->next = newreaction(rindex,"H2*","H,H",""); 
    13921372        } 
    13931373        r = r->next; 
     
    14081388         
    14091389        if(r->next == NULL) { 
    1410                 int in[]={ipMH2g},out[]={ipMH,ipMH}; 
    1411                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1390                r->next = newreaction(rindex,"H2","H,H",""); 
    14121391        } 
    14131392        r = r->next; 
     
    14281407 
    14291408        if(r->next == NULL) { 
    1430                 int in[]={ipMH2g,ipMHp},out[]={ipMH3p}; 
    1431                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1409                r->next = newreaction(rindex,"H2,H+","H3+",""); 
    14321410        } 
    14331411        r = r->next; 
     
    14421420        /* Rate is catalyzed by an additional H */ 
    14431421        if(r->next == NULL) { 
    1444                 int in[]={ipMH2g},out[]={ipMH,ipMH},ratesp[]={ipMH,ipMH2g}; 
    1445                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1422                r->next = newreaction(rindex,"H2","H,H","H,H2"); 
    14461423        } 
    14471424        r = r->next; 
     
    14591436 
    14601437        if(r->next == NULL) { 
    1461                 int in[]={ipMH,ipMH,ipMH2g},out[]={ipMH2g,ipMH2g}; 
    1462                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1438                r->next = newreaction(rindex,"H,H,H2","H2,H2",""); 
    14631439        } 
    14641440        r = r->next; 
     
    14821458 
    14831459        if(r->next == NULL) { 
    1484                 int in[]={ipMH2g,ipMH2g},out[]={ipMH,ipMH,ipMH2g}; 
    1485                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1460                r->next = newreaction(rindex,"H2,H2","H,H,H2",""); 
    14861461        } 
    14871462        r = r->next; 
     
    15001475 
    15011476        if(r->next == NULL) { 
    1502                 int in[]={ipMH,ipMH},out[]={ipMH2g},ratesp[]={ipMH,ipMH,ipMH}; 
    1503                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),ratesp,NELEMS(ratesp)); 
     1477                r->next = newreaction(rindex,"H,H","H2","H,H,H"); 
    15041478        } 
    15051479        r = r->next; 
     
    15671541         * so H2 secondary ionzation rate is 5e-17 s-1 */ 
    15681542        if(r->next == NULL) { 
    1569                 int in[]={ipMH2g},out[]={ipMH2p}; 
    1570                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1543                r->next = newreaction(rindex,"H2","H2+",""); 
    15711544        } 
    15721545        r = r->next; 
     
    15921565        /* >>chng 04 apr 22, add H2 + cr -> H+ H + e, TH85 table 10 */ 
    15931566        if(r->next == NULL) { 
    1594                 int in[]={ipMH2g},out[]={ipMH,ipMHp}; 
    1595                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1567                r->next = newreaction(rindex,"H2","H,H+",""); 
    15961568        } 
    15971569        r = r->next; 
     
    16191591        /* H2s + CR -> H+ H + e, TH85 table 10 */ 
    16201592        if(r->next == NULL) { 
    1621                 int in[]={ipMH2s},out[]={ipMH,ipMHp}; 
    1622                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1593                r->next = newreaction(rindex,"H2*","H,H+",""); 
    16231594        } 
    16241595        r = r->next; 
     
    16411612         * Cosmic ray ionization of H2s added*/ 
    16421613        if(r->next == NULL) { 
    1643                 int in[]={ipMH2s},out[]={ipMH2p}; 
    1644                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1614                r->next = newreaction(rindex,"H2*","H2+",""); 
    16451615        } 
    16461616        r = r->next; 
     
    16661636         * h2crphh = 1.3e-18f */  
    16671637        if(r->next == NULL) { 
    1668                 int in[]={ipMH2g},out[]={ipMH,ipMH}; 
    1669                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1638                r->next = newreaction(rindex,"H2","H,H",""); 
    16701639        } 
    16711640        r = r->next; 
     
    17031672 
    17041673        if(r->next == NULL) { 
    1705                 int in[]={ipMH2s},out[]={ipMH,ipMH}; 
    1706                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1674                r->next = newreaction(rindex,"H2*","H,H",""); 
    17071675        } 
    17081676        r = r->next; 
     
    17191687 
    17201688        if(r->next == NULL) { 
    1721                 int in[]={ipMH2g},out[]={ipMHp,ipMHm}; 
    1722                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1689                r->next = newreaction(rindex,"H2","H+,H-",""); 
    17231690        } 
    17241691        r = r->next; 
     
    17321699 
    17331700        if(r->next == NULL) { 
    1734                 int in[]={ipMH2s},out[]={ipMHp,ipMHm}; 
    1735                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1701                r->next = newreaction(rindex,"H2*","H+,H-",""); 
    17361702        } 
    17371703        r = r->next; 
     
    17501716 
    17511717        if(r->next == NULL) { 
    1752                 int in[]={ipMH2g},out[]={ipMHp,ipMH}; 
    1753                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1718                r->next = newreaction(rindex,"H2","H+,H",""); 
    17541719        } 
    17551720        r = r->next; 
     
    17621727 
    17631728        if(r->next == NULL) { 
    1764                 int in[]={ipMH2s},out[]={ipMHp,ipMH}; 
    1765                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1729                r->next = newreaction(rindex,"H2*","H+,H",""); 
    17661730        } 
    17671731        r = r->next; 
     
    17831747        hmi.h3phm2h2 = 1.3e-7 / (phycon.sqrte/31.62278) * co.lgUMISTrates;/*pow(phycon.te/1000., -0.5);*/ 
    17841748        if(r->next == NULL) { 
    1785                 int in[]={ipMH3p,ipMHm},out[]={ipMH2g,ipMH2g}; 
    1786                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1749                r->next = newreaction(rindex,"H3+,H-","H2,H2",""); 
    17871750        } 
    17881751        r = r->next; 
     
    18161779 
    18171780        if(r->next == NULL) { 
    1818                 int in[]={ipMH3p},out[]={ipMH2p,ipMH}; 
    1819                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1781                r->next = newreaction(rindex,"H3+","H2+,H",""); 
    18201782        } 
    18211783        r = r->next; 
     
    18491811 
    18501812        if(r->next == NULL) { 
    1851                 int in[]={ipMH3p},out[]={ipMH2g,ipMHp}; 
    1852                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1813                r->next = newreaction(rindex,"H3+","H2,H+",""); 
    18531814        } 
    18541815        r = r->next; 
     
    18661827         *  bh2h2p and rh2h2p are not in detailed balance,astro-ph/0404288*/ 
    18671828        if(r->next == NULL) { 
    1868                 int in[]={ipMH2g,ipMHp},out[]={ipMH,ipMH2p}; 
    1869                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1829                r->next = newreaction(rindex,"H2,H+","H,H2+",""); 
    18701830        } 
    18711831        r = r->next; 
     
    18821842        /* >> chng 05 jul 13, TE,  
    18831843         * this process populates v=4,no J information assume into J=0 -> H2s not H2g */ 
    1884                 int in[]={ipMH,ipMH2p},out[]={ipMHp,ipMH2s}; 
    1885                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1844                r->next = newreaction(rindex,"H,H2+","H+,H2*",""); 
    18861845        } 
    18871846        r = r->next; 
     
    19031862 
    19041863        if(r->next == NULL) { 
    1905                 int in[]={ipMH,ipMH3p},out[]={ipMH2g,ipMH2p}; 
    1906                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1864                r->next = newreaction(rindex,"H,H3+","H2,H2+",""); 
    19071865        } 
    19081866        r = r->next; 
     
    19211879        hmi.h3phmh2hh = 2.3e-7f*pow(phycon.te/300 , -0.5)*co.lgUMISTrates; 
    19221880        if(r->next == NULL) { 
    1923                 int in[]={ipMH3p,ipMHm},out[]={ipMH2g,ipMH,ipMH}; 
    1924                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1881                r->next = newreaction(rindex,"H3+,H-","H2,H,H",""); 
    19251882        } 
    19261883        r = r->next; 
     
    19351892 
    19361893        if(r->next == NULL) { 
    1937                 int in[]={ipMH2g,ipMH3p},out[]={ipMH2g,ipMH2p,ipMH}; 
    1938                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1894                r->next = newreaction(rindex,"H2,H3+","H2,H2+,H",""); 
    19391895        } 
    19401896        r = r->next; 
     
    19491905 
    19501906        if(r->next == NULL) { 
    1951                 int in[]={ipMH2g,ipMH3p},out[]={ipMHp,ipMH2g,ipMH2g}; 
    1952                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1907                r->next = newreaction(rindex,"H2,H3+","H+,H2,H2",""); 
    19531908        } 
    19541909        r = r->next; 
     
    19851940 
    19861941        if(r->next == NULL) { 
    1987                 int in[]={ipMH3p},out[]={ipMH,ipMH2g}; 
    1988                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1942                r->next = newreaction(rindex,"H3+","H,H2",""); 
    19891943        } 
    19901944        r = r->next; 
     
    20101964 
    20111965        if(r->next == NULL) { 
    2012                 int in[]={ipMH3p},out[]={ipMH,ipMH,ipMH}; 
    2013                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     1966                r->next = newreaction(rindex,"H3+","H,H,H",""); 
    20141967        } 
    20151968        r = r->next; 
     
    20672020 
    20682021        if( r->next == NULL) { 
    2069                 int in[]={ipMH,ipMHp},out[]={ipMH2p}; 
    2070                 r->next = newreaction(rindex,in,NELEMS(in),out,NELEMS(out),NULL,0); 
     2022                r->next = newreaction(rindex,"H,H+","H2+",""); 
    20712023        } 
    20722024        r = r->next; 
     
    20852037 
    20862038        if(r->next == NULL) { 
    2087                 int in[]={ipMH2p},out[]={ipMH,ipMHp},ratesp[]={ipMHp,ipMH2p}; 
    2088                 r->next = newreaction(rindex,in,NELEMS(in),out