Automatic generation of a stoichiometric matrix

    The Problem

    Has this happened to you?


    You are involved in the development of a new process.  At this early stage in the development, the catalyst developer has some indication of success, but there has been no kinetic study conducted.  Thus, the reaction network is only partly known, if that.  Because the development team is following the Scale Down development method (see earlier blog article), you have been assigned the task of creating conceptual process alternatives using a commercial process simulation program.  This early process study may reveal information that may help the catalyst developer "tweak" the catalyst toward the more economical set of selectivities.  Also, getting an early start on the entire process design will help prepare for more focused optimization later in the development.


    For the reactor model in the process simulation, you will be using the stoichiometric reactor option.  You have been given the list of reactants and known products and byproducts.  You now need a simple set of reactions that use all of the reactants and produce all of the products.  With a set of balanced reactions, you will provide individual conversions in a sensitivity study.


    The Solution

    The attached worksheet produces a simple stoichiometric matrix based on the molecular formulas and ionic charges of the reactants and products.  This worksheet is based on an algorithm by R. W. Missen and W. R. Smith (see reference in worksheet).  The resulting set of reactions satisfy all elemental and charge balances.


    The stoichiometric matrix assumes that rows in the matrix represent reactions and columns represent components.  In addition the Atom matrix has rows as components, columns as elements.  Missen and Smith and others use the opposite conventions: the worksheet has been developed to account for those differences in convention.  Choice of convention is just a matter of preference.  I prefer the "rows as reactions" convention because reactions are always written as horizontal lines, one reaction below another.


    The matrix "stoich" produces may show reactions going the wrong direction for your application.  Just multiply the entire matrix by -1 and it should useful.


    The Fine Print

    Use "stoich" at your own risk.  In particular, the stoichiometric matrix it produces most likely doesn't represent a kinetic mechanism.  One tipoff of a non mechanistic reaction is more than three molecules reactiing.  As the process development progresses, you will need to use a kinetic model based on a more representative reaction mechanism.


    The worksheet was written using the template for the "International J. of Chemical Reactor Engineering".  I probably haven't paid attention to the paragraph requirements of the journal, but the fonts specifications were met.


    A Workaround for M010 and Prime Users

    I've attached a second file, stoich_mod.xmcd that has a workaround for the later versions.  It uses a symbolic solution (all numbers?) for stoich which is correct.  They have determined that the numerical result is incorrect.  I have also removed the "key" parameter from the progam and the worksheet.