Chapter 1: Introduction to the ChemApp Library

ChemApp is a programmer's library consisting of a comprehensive set of subroutines, based on the thermodynamic phase equilibrium calculation module of ChemSage. It permits the calculation of complex, multicomponent, multiphase chemical equilibria and their associated extensive property balances. ChemApp is available as object code for a wide range of platforms and as a Dynamic Link Library (DLL) on Windows systems.

Potential applications for the use of ChemApp are almost limitless and can cover an extremely diverse range of applications. Two distinctly different groups of applications of ChemApp are possible:

By embedding it in appropriate code, ChemApp can be employed to investigate time-dependent and kinetic effects using the concept of "local equilibria".



1.1: About this manual

Before starting to work with this manual, make sure the version of ChemApp you have matches the version of this documentation. This manual describes the use of ChemApp versions 2.0.2 through 5.0.2. If you are in doubt whether this is the right one in your case, please contact GTT-Technologies.

The use of the online version of the ChemApp manual is explained in the next section (Chapter 1.1.1).

The subsequent sections (Chapter 1.3) describe the concept of ChemApp light, how it differs from the regular version, and what you have to know if you are planning on using it.

The next sections of the first chapter (1.4 to 1.9) deal mainly with the definition of terms, the introduction into concepts which are important to understand when using ChemApp, and some practical aspects in using the ChemApp library, including language-specific notes.

Section 1.10, ChemApp best practices, is recommended reading for everbody who is looking at implementing anything but the simplest projects with ChemApp. It lists a number of very important programming issues to consider, which should be implemented as early in the stage of a ChemApp project as possible. If you encounter problems in your ChemApp programs and would like to contact GTT-Technologies' support, please make sure your code implements all of the "best pratices" outlined in this chapter before you send your code to GTT-Technologies' support.

The last parts of this chapter (1.11 and 1.12) describe which thermochemical data can be used with ChemApp and introduce the various example data-files that are supplied with ChemApp.

The actual ChemApp subroutines are described in Chapters 2 through 5, along with several dozen code examples in both FORTRAN and C, demonstrating their use.

A list of ChemApp error messages and their associated numbers is given in Appendix A.

Some advanced topics are discussed in Appendix B. While the issues mentioned might not be vital for ChemApp programmers taking their first steps, anybody who is seriously interested in application programming using ChemApp should not omit reading it.

Appendix C presents a list of worked examples. Each example focuses on a different aspect of ChemApp and provides a good way to learn how ChemApp is used to solve a thermochemical problem.

Thermodynamic data and the handling of thermochemical data-files are treated in Appendix D and E.

The next two parts of the appendix contain the documented source as both FORTRAN (Appendix F) and C (Appendix G) codes of a ChemApp example program which demonstrates the use of practically every ChemApp subroutine.

Finally, Appendix H lists the contents of all example data-files supplied with ChemApp, Appendix I provides a revision history of this manual, and Appendix J contains a useful alphabetical reference of all ChemApp subroutines, to which the literature references (Appendix K) are added.

1.1.1: How to use the Online Version of the Manual

This online version of the ChemApp manual consists of a set of HTML files which can be viewed with an appropriate reader (usually your World Wide Web browser). The table of contents provides links to all chapters. The text itself contains links and references to other parts of the manual wherever possible. Some links throughout the text refer to web pages which are not part of this documentation, mainly linking to web pages which are part of GTT-Technologies' web site. In case you are not hooked up to the Internet, your web browser will report problems with these links. You can try on the following link whether you can access web pages in the outside world: GTT's Technical Thermochemistry Web Page

The description of the individual ChemApp subroutines make up the biggest part of this manual. Each subroutine entry begins with a header that contains the name of the subroutine and a navigation bar. The header for the subroutine TQINI is shown below:

TQINI

TOCGroup 1TQERRTQCPRTGroup 2A-ZGroup 1

The buttons of the navigation bar have the following meaning, which is also indicated by the text written in small letters underneath:

TOC
When clicked, this button takes you back to the very top of the document, to the table of contents.
Group 1
This button links to the beginning of the chapter that describes the current group of commands. In the present example of TQINI, this is group one (Initialising the Interface and Reading a Data-file).
TQERR
Clicking this button will take you to the entry for the ChemApp subroutine preceding the current one. Since TQINI is the very first one, this button links to the very last one (TQERR).
TQCPRT
Similarly, this button will take you to the next entry (TQCPRT).
Group 2
This button links to the beginning of the chapter that describes the next group of commands. In the present example of TQINI, this is group two (Handling System Data in ChemApp).
A-Z
Use this link to jump to the alphabetical list of ChemApp subroutines.
Group 1
This button links to the table which lists the subroutines belonging to the same group of commands as TQINI does.


ChemApp Programmer's Manual, Edition 3.6© GTT-Technologies, 2003