This manual contains several dozen code examples to illustrate the use of the ChemApp subroutines and to support the method of learning-by-changing. Virtually all example codes are part of the distribution of the online manual, and you should feel encouraged to take these examples and start changing and editing them to take your own steps in programming with ChemApp. After receiving your distribution of ChemApp, it is reommended though to first run the program CADEMO1 and compare the results it produces on your computer with the master results which are normally included in the distribution. If you are using a FORTRAN or C distribution of ChemApp, you might also want to have a look at Appendix F and G for that purpose.
The code examples have been designed to be both concise and easy to understand in terms of the ChemApp features involved. In terms of the application language used (FORTRAN and C), they require only basic knowledge. To keep these code examples short and easy to read, error handling has usually been neglected. In your own ChemApp programs, you should as early as possible adopt the policy to check the value of the error variable that every ChemApp subroutine returns.
The code examples used throughout this manual and the results they produce are not simply copied and pasted into the document. When the manual is produced, each code example is automatically compiled, linked to ChemApp, run, and checked for runtime errors reported by ChemApp. Only if no error occurred the code is mixed with the output produced during runtime, syntax-highlighted, and included into the manual. This guarantees that all example programs compile and run without problems with the ChemApp version that has been used to produce the manual. For the production of this edition of the manual Version 5.0.2 of ChemApp was used.
This is the documentation of the light version of ChemApp. It differs from the documentation of the regular version of ChemApp only by this chapter and by some additional notes relating to ChemApp light in the subsequent parts of this manual. Both ChemApp light (the library itself) and this online documentation are distributed free of charge for non-commercial uses through GTT's Technical Thermochemistry Web Page and are available to anyone. Before you start using it, please
If you have any questions or suggestions relating to ChemApp light and this documentation, please contact us by e-mail: firstname.lastname@example.org. Please also note that in order to receive technical support for ChemApp light beyond questions relating to the download and installation, you need to be registered, which is free (see below).
ChemApp light is a free version of ChemApp, and although it is restricted in two ways compared to the regular version, it gives you almost the same functionality.
To learn more about ChemApp in general, our programmer's library for the calculation of complex, multicomponent, multiphase equilibria, read through the following chapters of this manual. Also, our web site (GTT's Technical Thermochemistry Web Page) has its own section on ChemApp with lots of valuable information.
First of all, it is free of charge. This of course means that its power is restricted compared to the regular version. The restrictions are related to two aspects of ChemApp:
The description of the thermochemical system that is to be considered is read by ChemApp from a separate data-file. With the regular version of ChemApp, such a thermochemical system can consist of up to 30 system components (usually chemical elements). ChemApp light, on the other hand, can handle systems with 3 system components. Thus it is possible to handle ternary systems, even with this free version.
ChemApp light can handle up to 30 constituents (which is the sum of all mixture phase constituents and stoichiometric condensed phases) per thermochemical system. The regular version can handle up to 1500 constituents. A total of 150 Gibbs energy or heat capacity equations can be used to describe these constituents (regular version: 4500). ChemApp light can handle 5 mixture phases (regular version: 40). If one of the mixture phases contained in your data-file is modelled using a sublattice formalism, ChemApp light allows 3 sublattices in such a mixture phase (regular version: 6).
ChemApp light is not restricted in terms of the range of non-ideal mixture phase models it can use. In your thermochemical data-files, you can thus use any of the models listed in Table 2, including the new geochemical models.
In this respect, ChemApp light only differs in one point from the regular version: Target calculation are not possible. The regular version of ChemApp can perform two types of target calculations: phase targets (typical application: searching for the condition when a certain phase becomes stable), and extensive property targets (typical application: calculation of an adiabatic temperature of a process). For many applications, these types of calculations can still be performed with the light version by adding suitable code of your own.
As of version 3.0.0, ChemApp is capable of performing one-dimensional phase mapping calculations using the subroutines TQMAP/TQMAPL. This in turn also requires target calculations, thus one-dimensional phase mapping is not available in ChemApp light.
In all other calculational aspects, ChemApp light has the same capabilities as the regular version. This includes the calculation of thermochemical equilibria and their associated extensive property balances, the calculation of thermochemical function values, and the choice between using global conditions or streams (see Chapter 1.6.1), to name just a few.
It exhibits the same speed and ability to converge that the regular version of ChemApp is famous for.
Also, this online documentation is virtually the same as the one for the regular version of ChemApp, apart from the present chapter.
Both ChemApp light and this manual are only available from GTT's Technical Thermochemistry Web Page, though it might be distributed through other selected channels in the future. This manual of ChemApp light is only available in online form, not as a printed version.
You are free to use ChemApp light for private, non-commercial purposes.
You may not use ChemApp light (or anything produced with it or including it) within an educational or academic institution for fee-charging consultancy services. If you distribute programs that make use of ChemApp light (or any work based on it) in any way, no fee must be charged. You are free to determine whether or not ChemApp light is suitable for designing programs which are used in a curriculum. You may however not use ChemApp light or work derived from it in this way on a regular basis.
If you are using ChemApp light (or any work based on it) in a commercial environment, you may only evaluate its suitability and applicability for use with your existing or new software. You may not use it for fee-charging consultancy services and may not distribute it with your programs. You may also not use ChemApp light or results created with its help for promotional purposes. You may furthermore not use ChemApp light in programs that are used on a regular basis.
Your program must display a ChemApp light copyright notice. For this purpose, the copyright notice given by the ChemApp subroutine TQCPRT should be used.
You must include a copy of this license with all your programs which make use of ChemApp light, stating that using your programs means accepting this license of ChemApp light and its terms and conditions of use.
Note: This does not mean that the above ways of distribution are prohibited or unwanted, it just means that you need to get the prior written consent of GTT-Technologies.
If you have any questions relating to ChemApp light, you should first consult the ChemApp FAQ, which is available at http://gttserv.lth.rwth-aachen.de/~sp/tt/chemapp/ca-faq.htm. It addresses a multitude of standard questions about ChemApp, ChemApp light, and related topics. If you cannot find the answer to your questions there, contact us by e-mail.
To receive e-mail support for ChemApp light beyond questions relating to download and installation, you must register. Registration is free. While registration is not absolutely necessary, we strongly encourage you to do so, since support is not the only benefit from registration (see below, Do I need to register?).
All your support issues relating to ChemApp light, this documentation, as well as the data-files and programs that come with it should be directed by e-mail to email@example.com.
GTT-Technologies cannot guarantee that every technical question about ChemApp light or its application for the project you have in mind can be answered, and is answered in a timely fashion.
If you want or need full support for ChemApp, we will be happy to quote you for the regular version of ChemApp, which includes extensive support.
While you do not necessarily have to register your free copy of ChemApp light, we would very much like you to do so. You will benefit from registration in several ways:
To register, either
register.txtthat comes with the ChemApp light object code distribution (it is also available from our web site) using an ASCII editor. Send it by e-mail to firstname.lastname@example.org.
register.txt, fill it out and fax it to GTT-Technologies: +49-2407-59661.
ChemApp itself is the engine that performs the equilibrium calculations. The thermochemical data that describe the chemical system in terms of its system components, phases, and phase constituents, are contained in a separate thermochemical data-file. These ChemSage-compatible data-files can come from various sources (see Chapter 1.11), and can also be assembled by you.
ChemApp light, like the regular version of ChemApp, comes with a selection of example data-files, which give you everything you need to start doing real-life equilibrium calculations right away. See Chapter 1.12 for a list of example data-files that are included, and what their potential application areas are.
Apart from the version of ChemApp light suitable for your system, you just need your compiler and linker and you are ready to go. Use any of the code examples to verify that you are compiling and linking correctly. A suitable program for this purpose is cademo1, either the FORTRAN (cademo1.f) or the C (cademo1.c) version. Compile any of these programs, link it against your version of the ChemApp light library, and compare the results with those in Chapters F and G.
You should consider stepping up to the regular version of ChemApp, if you experience any of the following:
|ChemApp Programmer's Manual, Edition 3.6||© GTT-Technologies, 2003|