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).

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:

  • using it for the development of application-specific programs; for example, for handling repetitive complex equilibrium calculations, for analysis, and for process control in well-defined technological areas,

  • linking it to third-party process simulation package for modelling new or optimising existing processes; for example, commercial CFD programs such as Phoenics, CFX®, etc., general simulation programs, including Aspen Plus®, and also a company's own process simulation program.

  • 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 (see the very beginning of this manual). If you are in doubt whether both match, 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 and 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. The last parts of this chapter (1.10 and 1.11) describe which thermochemical data can be used with ChemApp, and introduce the various example data-files that come with ChemApp.

    The actual ChemApp subroutines are described in Chapters 2 through 5, along with over 40 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 in both a FORTRAN (Appendix F) and a C (Appendix G) code of a ChemApp example program which demonstrates the use of every ChemApp subroutine.

    Finally, Appendix H lists the contents of all example data-files supplied with ChemApp, Appendix I contains a useful alphabetical reference of all ChemApp subroutines, to which the literature references Appendix J 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:


    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:

    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).
    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).
    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).
    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.4 © GTT-Technologies, 1999