The previous two posts discussed a means of converting the heat capacity relations in Prode Physical Properties to a polynomial formula. This post shows how the polynomial form is used in matrix form for both heat capacities and enthalpies.
The temperature function
The coefficients of the polynomials for each component were previously obtained as matrix cp. To obtain the heat capacities, these coefficients need to be multiplied by the appropriate power of temperature. A temperature function, in vector form, is first created.
The temperature argument in CpTf is assumed to have a temperature unit. Thus, the temperatures in the function definition have been divided by the unit, K, which was used in the determination of cp. This operation converts the temperature supplied to Kelvin values.
Obtaining the heat capacities
A simple dot product of cp and CpTf(T) produce a vector of the polynomial formulas with one element for each compound.
(The image below was created manually to show the symbolic result of the dot product operation.)
The dot product operation, combined with the units handling capability of Mathcad, is an efficient, flexible means of obtaining the heat capacities for the species in the problem.
Obtaining the enthalpy from the polynomial heat capacity formula is simple because the coefficients can be separated from the temperature function and the temperature function can be easily integrated.
The first term in the last line is the heat of formation vector for the compounds. The resulting enthalpy function involves only matrix operations (plus the temperature power operations) and no further integrations.