I have updated the sample model of the CSTR using Prime 3.0. The sample page now has both the Mathcad 15 and Prime 3 versions. The link to the pdf file is for the Prime 3 version.
The main required changes were to the solve blocks and the plots. In addition, I made some changes that I hope improve the readability and make it easier to understand how to change conditions for the final design.
In the Mathcad 15 version, the model equations for the solve block were created in a residual vector function. In the new version, I have kept the model equations separated. In order to do that, I needed to convert the molecular weight vector to a diagonal matrix, as shown below.
The inverse of the MwD matrix, MwDI, is also computed and defined so that the inversion computation doesn't need to be repeated.
Using these matrices, the solve block becomes:
The above modifications could have been accomplished in Mathcad 15. The new solve block features are the box and the ability to have dimensional equations. The dimension of the first constraint, the energy balance, is J/kg. In Mathcad 15, that equation had to be divided by J/kg in order to make it dimensionless.
The diagonal molecular weight matrix was needed because the vectorization operation in Mathcad/Prime tried (and failed) to vectorize even the reactor rate expressions when all I needed was multiplication of the mass production rates, Rxn, by the appropriate molecular weight.
By writing the model equations individually in the solve block instead of as a residual vector, it can be seen more readily that the two equations (one scalar, one vector) can be used to obtain the two results, outlet temperature and outlet composition vector.
I think this example shows how the use of linear algebra and vector/matrix notation can make models compact and easy to read.