Appendix C: Worked examples

In this section, a few 'worked examples' of ChemApp applications will be introduced.

The code examples presented in this section are intended to show how ChemApp is used to solve a specific thermochemical problem, with each example focussing on a different aspect of ChemApp's calculational capabilities. By working through these examples, anyone who is new to ChemApp will get an imprintion of what ChemApp can be used for, and how, and will hopefully get ideas on how to take the first steps toward solving his or her own problems.

The aim of these programs is to keep the code focussed on the use of the ChemApp subroutines, and to keep everything else simple, in order to not distract from the main issue.

The description of each example is divided into four sections:

Definition of goals:
states what the purpose of the example program is.

Tools and concepts used:
describes the basic concepts employed in the subsequent implementation, and which ChemApp subroutines are used.

presents the commented source code of the resulting program.

lists suggestions for enhancements to the example that you can add yourself, to gain further understanding of the matter by adding your own code.

The worked examples presented here are:

  1. Print data-file contents
  2. Equilibrium composition of mixture phases
  3. Phase equilibria and phase target calculations
  4. A simple process using streams
  5. One-dimensional phase mapping

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