ChemApp -
The Thermochemistry Library for your Software

Light version

GTT-Technologies, Herzogenrath, Germany, 1996-2003

Programmer's Manual Edition 3.6
for ChemApp Versions 2.0.2 through 5.0.2

ChemApp was developed by Gunnar Eriksson, based in part on work done in the framework of a European Science project when at the Lehrstuhl für Theoretische Hüttenkunde at the RWTH Aachen, Germany ([Eri94],[Eri95],[Eri97]).

This manual is Copyright GTT-Technologies, 1996-2003. Unauthorised duplication and distribution both in printed and online form is prohibited. Original version by Gunnar Eriksson. Subsequent, extended editions by Stephan Petersen.



Table of Contents

Chapter 1: Introduction to the ChemApp Library

1.1: About this manual

1.1.1: How to use the Online Version of the Manual

1.2: Code examples

1.3: About ChemApp and ChemApp light

1.3.1: What is ChemApp light?
1.3.2: How does it differ from the regular version?
1.3.3: What are the terms and conditions of use?
1.3.4: What about support?
1.3.5: Do I need to register?
1.3.6: What about thermochemical data?
1.3.7: What else do I need to start working with it?
1.3.8: When should I opt for the regular version of ChemApp instead?

1.4: ChemApp is easy to program

1.5: Definition of terms

1.6: Introduction of concepts

1.6.1: Setting initial conditions
1.6.2: Target calculations
1.6.3: One-dimensional phase-mapping

1.7: Installation and use

1.8: Practical aspects

1.9: Language specific notes

1.9.1: FORTRAN
1.9.2: C/C++
1.9.3: Delphi
1.9.4: Visual Basic

1.10: ChemApp best practices

1.11: Thermodynamic data

1.11.1: User-defined solution models
1.11.2: ASCII data-files
1.11.3: Binary data-files
1.11.4: Transparent data-files

1.12: Example thermochemical data-files

1.12.1: COSI.DAT (System C-O-Si)
1.12.2: CNO.DAT (System C-N-O)
1.12.3: FEC.DAT (System Fe-C)
1.12.4: FEMGSIO4.DAT (System Fe2SiO4-Mg2SiO4)
1.12.5: PBSN.DAT (System Pb-Sn)
1.12.6: PITZER.DAT (System Na-Cl-C-O-H)
1.12.7: SUBL-EX.DAT (System Co-Cr-Fe)

Chapter 2: Initialising the Interface and Reading a Data-file

2.1: TQINI

2.2: TQCPRT

2.3: TQVERS

2.4: TQLITE

2.5: TQGTID

2.6: TQGTNM

2.7: TQGTPI

2.8: TQGTHI

2.9: TQGTED

2.10: TQSIZE

2.11: TQUSED

2.12: TQGIO

2.13: TQCIO

2.14: TQRFIL

2.15: TQRBIN

2.16: TQRCST

2.17: TQOPEN

2.18: TQWSTR

2.19: TQOPNA

2.20: TQOPNB

2.21: TQOPNT

2.22: TQCLOS

2.23: TQGTRH

2.24: TQGSU

2.25: TQCSU

Chapter 3: Handling System Data in ChemApp

3.1: Identifying phases, constituents, and components

3.2: TQINSC

3.3: TQGNSC

3.4: TQNOSC

3.5: TQSTSC

3.6: TQCSC

3.7: TQINP

3.8: TQGNP

3.9: TQMODL

3.10: TQNOP

3.11: TQINPC

3.12: TQGNPC

3.13: TQPCIS

3.14: TQNOPC

3.15: TQSTPC

3.16: TQINLC

3.17: TQGNLC

3.18: TQNOSL

3.19: TQNOLC

3.20: Changing the status of phases and constituents

3.21: TQGSP

3.22: TQCSP

3.23: TQGSPC

3.24: TQCSPC

Chapter 4: Subroutines for Defining Equilibrium Calculations

4.1: TQSETC

4.2: TQREMC

4.3: TQSTTP

4.4: TQSTCA

4.5: TQSTEC

4.6: TQSTRM

Chapter 5: Subroutines to Perform a Calculation and to Obtain Results

5.1: TQCE

5.2: TQCEL

5.3: TQCEN

5.4: TQCENL

5.5: TQMAP

5.6: TQMAPL

5.7: TQCLIM

5.8: TQSHOW

5.9: TQGETR

5.10: TQGDPC

5.11: TQSTXP

5.12: TQGTLC

5.13: TQERR

Appendix A: List of Error Messages

Appendix B: Advanced topics

B.1: Extensive properties of streams

B.2: When phase constituents are not elements

B.3: Equilibrium calculations at constant volume

Appendix C: Worked examples

C.1: Print data-file contents

C.2: Equilibrium composition of mixture phases

C.3: Phase equilibria and phase target calculations

C.4: A simple process using streams

C.5: One-dimensional phase mapping

Appendix D: Thermodynamic Data - Sources and Quality Considerations

D.1: Sources of thermochemical data

D.2: Quality considerations

D.3: Techniques for compiling a data-file

D.4: GTT data-file identification

Appendix E: Thermochemical Data-files - Structure and Handling

E.1: The format of a ChemSage data-file

E.2: Data-files with preset suppression of species

E.3: Definition of a stoichiometry matrix

Appendix F: FORTRAN example code (cademo1.f)

Appendix G: C example code (cademo1.c)

Appendix H: Example data-files and their contents

H.1: COSI.DAT

H.2: CNO.DAT

H.3: FEC.DAT

H.4: FEMGSIO4.DAT

H.5: PBSN.DAT

H.6: PITZER.DAT

H.7: SUBL-EX.DAT

Appendix I: Revision history

Appendix J: Alphabetical list of ChemApp subroutines

Appendix K: Bibliography



Aspen Plus is a registered trademark of Aspen Technology, Inc.
CFX is a registered trademark of AEA Technology plc.
Fluent is a registered trademark of Fluent, Inc.
Delphi is a registered trademark of Borland.
UNIX is a registered trademark of X/Open Company Ltd.
Microsoft Windows, Windows 95, Windows 98, Windows NT, Windows ME, Windows 2000, and Windows XP are registered trademarks of Microsoft Corp.
Microsoft Visual Basic and Visual C++ are registered trademarks of Microsoft Corp.

This document was created Thu Jun 5 15:36:19 MEST 2003 . Output of code examples has been produced with ChemApp V5.0.2.

GTT-Technologies
Telephone: +49-2407-59533
Telefax: +49-2407-59661
E-mail: info@gtt-technologies.de
WWW: http://www.gtt-technologies.de/