Skip to main content
12-Amethyst
December 18, 2011
Question

Automatic generation of a stoichiometric matrix

  • December 18, 2011
  • 15 replies
  • 6625 views

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.

15 replies

24-Ruby III
January 2, 2012

Just tested the file in version Mathcad 11a, everything works fine:

MC_11a.PNG

12-Amethyst
January 2, 2012

It appears that the errors that some people are having may be due to version.  I see that PTC made a change to rref function for version M010, so it may have caused the problem.

I am going to log this as a case with the support group.

12-Amethyst
January 4, 2012

The support group has determined that the rref function is getting different answers in version M005 and M010 (and Prime).  That is the source of the problem.  When I hear more, I will post an update.  Until then, this program will not work with anything later than MC 15, M005.

24-Ruby III
January 4, 2012

Harvey,

Thanks.

12-Amethyst
January 5, 2012

I've posted another worksheet in the original document above, stoich_mod.xmcd.  It is the workaround that the support team has provided.  They will have to correct rref in a later release.

5-Regular Member
April 16, 2024

Did they correct it?  Does it work for symbolic calculation of rref for a complex matrix?