A new package, Thermath, for the automatic implementation of thermodynamic
models was developed in the Mathematica(R) programming language. Starting f
rom an excess Gibbs free energy (G(E)) model or an equation of state (EOS),
Thermath can be used to derive expressions for several thermodynamic prope
rties and to analyze the structure of these expressions, generating a code
that implements them in a computer language (Fortran77 is used in this pape
r). Using the package, procedures that implement properties derived from co
mmonly used G(E) models could be rapidly generated. For EOSs, two situation
s occurred. Properties from simple EOSs could be readily derived and implem
ented. For more complex EOS, lengthy expressions may result, and their anal
ysis can be very demanding in terms of computer time. To overcome this diff
iculty, a strategy to split this problem in tasks of feasible computational
demand is presented. Although the applications of this paper deal with the
implementation of thermodynamic models, most of the procedures developed h
ere can possibly be used to implement models in other fields of science and
engineering. (C) 1999 Elsevier Science Ltd. All rights reserved.