home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Lion Share
/
lionsharecd.iso
/
dos_misc
/
crest500.zip
/
CREST.DOC
< prev
next >
Wrap
Text File
|
1991-09-06
|
45KB
|
1,077 lines
.ft e10
.pn 0
DOCUMENTATION ON
CREST: CHEMICAL REACTIONS AND EQUILIBRIUM THERMODYNAMICS
VERSION 5.00
developed by
Dudley J. Benton
August 10, 1991
.pa
.pn 1
_CONTENTS_
Page
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Running the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Interpreting the Output . . . . . . . . . . . . . . . . . . . . . . . . . 8
Defining Elements and Compounds . . . . . . . . . . . . . . . . . . . . . 8
Creating a Plot of Mole Fraction . . . . . . . . . . . . . . . . . . . . . 10
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Appendix 1 Listing of Error Messages . . . . . . . . . . . . . . . . . . . 13
Appendix 2 Listing of Data File CREST.GAS . . . . . . . . . . . . . . . .
Appendix 3 Listing of Data File CREST.AQU . . . . . . . . . . . . . . . .
Appendix 4 Sample Program Output . . . . . . . . . . . . . . . . . . . . .
Appendix 5 Program OXMOLES (computes combustion products vs. moles oxygen)
Appendix 6 Program FINDENTH (computes enthalpy of combustion products vs. T)
Appendix 7 Sample Plots of Computed Mole Fraction vs. Temperature . . . .
.pa
_INTRODUCTION_
CREST is an interactive computer program designed to solve chemical reactions
using equilibrium thermodynamics. CREST can handle elements, compounds, and
ions. CREST can compute the thermodynamic properties of the elements,
compounds, and ions at a given state or it can compute the equilibrium
composition of the products of a reaction involving these. CREST solves the
simultaneous dissociation reactions implied by a reaction automatically. It is
not necessary to specify all of the possible dissociation reactions, CREST
will handle them for you.
CREST can handle many elements and compounds (currently set at 32 elements and
128 compounds). Each compound can be composed of several elements (currently
set at 16). CREST can handle complex reactions (currently set at 128 reactants
and 128 products). Each of the dissociation species counts as a product of the
reaction. CREST can solve any number of independent reactions although it will
only solve one at a time. Simultaneous, dependent reactions should be
specified as one reaction. Eventually, the capability of multiple sequential
reactions will be added (maybe Version 6).
You can specify the reaction to be solved interactively or in a data file. You
can have any number of data files. CREST will allow you to interactively
specify under what conditions (ie. temperature and pressure) you want the
thermodynamic properties evaluated and the constraints on the reaction (ie.
constant pressure or volume and specified temperature or heat transfer). CREST
will also allow you to interactively change the molar fractions of the
reactants.
Elements and compounds are defined in a database file (cf. CREST.GAS and
CREST.AQU) which cannot be altered by CREST. Any elements or compounds that
appear in your reaction must be defined in the database before running the
program. You can get a list of the available substances by selecting the
appropriate command from the main menu or from the built-in full-screen
editor. Additions to and modifications of the substances in the database will
be covered in the section "DEFINING ELEMENTS AND COMPOUNDS."
Throughout this manual and within the program, optional parameters are
indicated by brackets, []. For example, the command B[atch]= can be given as
Batch=, Batc=, Bat=, Ba=, or B=. If you use more than the first letter, it
must be spelled correctly and must not have any trailing extraneous
characters. Case (upper/lower) is immaterial.
You can have several database files. Two are supplied (CREST.GAS and
CREST.AQU). To access a different database file just specify it in the run
command: CREST D[atabase]=CREST.AQU or select the appropriate option in the
main menu. If none is provided, a file extension of ".DAT" will be assumed and
the file is not found without any extension.
CREST works in either English or SI units. The English units include the
lb-mole (pound-mole), the BTU, degrees Rankine, and psia (pounds per square
inch absolute). The SI units include the gm-mole, Joule, degrees Kelvin, and
atmosphere. The units for each quantity are given by the program when listing
results. You can select the units from the run command by adding U[nits]=S[I]
or U[nits]=E[nglish]. English is the default.
.pa
_RUNNING THE PROGRAM_
Do not attempt to run CREST from BASIC. On a PC you should be in DOS with the
DOS prompt. To run CREST just type CREST and hit Enter.
CREST will offer you a menu like the following...
Compute properties --> compute U,H,S,G for a given T,P
Database ------------> select another or list current database
Edit reaction -------> display or modify the reaction
File reaction -------> save the current reaction in a disk file
Graph ---------------> solve a series of reactions and plot results
Print=ON/OFF --------> begin/quit listing results to printer
Read reaction -------> open existing disk file and read contents
Solve reaction ------> determine equilibrium composition of products
Units=English/SI ----> select units for input/output
use ^v then Enter to select or Esc to exit
You may select any of these by touching a single key corresponding to the
first upper case character in the menu line or by moving the cursor/highlight
to the desired line with the arrow keys or mouse and then tap the Enter key.
If the menu entries begin with numbers (0-9) instead of upper case letters
(which is the case with the plot menu), then select using the numbers. If you
have a Microsoft compatible mouse, then the left button can be used for Yes
and the right button can be used for No or Esc. If you want to interrupt the
program during a long series of calculations then tap the space bar and wait a
few seconds. This will abort the current task. If you have a mouse, the same
thing can be accomplished by depressing both buttons at the same time. If you
wish to exit CREST, follow the instructions which appear on the screen.
Essentially, a few taps on the Esc key will get you out.
If you want the results to be printed select Print>ON from the main menu. .
You can later stop printing by selecting Printer>OFF. Note that Ctrl-PrtSc
will not work with CREST, nor will standard output device re-direct (CREST
>PRN). If you want to spool the output to a file instead of the printer, then
use the run command: S[pool]=spoolfile.ext. The spool file must not already
exist to avoid unintentional overwriting. If you use the S[pool]= command,
then CREST will automatically set Printer>ON. If you use the command
S[pool]=PRN, then CREST will send the output to the printer as usual; but it
will also turn Print>ON. This is a useful when running in the unattended mode
(ie., from a batch file or spawned by another program).
You can also specify the reaction file in the run command with the
R[eaction]=file.ext. If no file extension is given and the file is not found
without an extension, then CREST will assume .REA for the extension.
You can also specify the database file in the run command with the
D[atabase]=file.ext. If no file extension is given and the file is not found
without an extension, then CREST will assume .DAT for the extension.
You can run CREST interactively or unattended. In order to run in the
unattended mode, you must use either the B[atch] or P[lot] run commands. The
B[atch] command has several configurations as listed below, where:
Tr=temperature of the reactants (if zero --> 537R/273K)
Tp=temperature of the products (if zero --> 537R/273K)
Pr=pressure of the reactants (if zero --> 14.7psia/1atm)
Pp=pressure of the products (if zero --> 14.7psia/1atm)
Q=heat transfer
B[atch]=100:200 <--- here Tr=Tp=100, Pr=Pp=200 this will compute
and list the properties, then exit
B[atch]=P[ressure]:T[emperature]:100:200:300 <--- here P tells
CREST to assume constant pressure (open system), T means
specified temperature of the products (ie., compute the heat
transfer), Tr=100, Pr=200, Tp=300
B[atch]=V[olume]:T[emperature]:100:200:300 <--- here V tells
CREST to assume constant volume (closed system), T means
specified temperature of the products (ie., compute the heat
transfer), Tr=100, Pr=200, Tp=300
B[atch]=P[ressure]:Q:100:200:300 <--- here P tells CREST to
assume constant pressure (open system), T means specified
temperature of the products (ie., compute the heat transfer),
Tr=100, Pr=200, Tp=300
B[atch]=V[olume]:Q:100:200:300 <--- here V tells CREST to
assume constant volume (closed system), T means specified
temperature of the products (ie., compute the heat transfer),
Tr=100, Pr=200, Tp=300
The P[lot] command also has several configurations, where:
Tp1=initial temperature of products
Tp2=final temperature of products
dTp=step size (ie., do from Tp1 to Tp2 in steps of dTp)
device=graphics device - must be one of the following:
=CRT (CGA/EGA/VGA/HGA automatically selected by hardware)
=80 (HI-80 printer/plotter)
=7240 (HP-7240 printer/plotter)
=7470 (HP-7470 2-pen plotter)
=7475 (HP-7475 6-pen plotter)
=7550 (HP-7550 8-pen plotter)
=Star (Star dot matrix printer)
=Epson (Epson dot matrix printer)
=IBM (IBM dot matrix printer)
=Laser (HP LaserJet)
log=either L for log Y-axis (moles) or omit for linear Y-axis
P[lot]=P[ressure]:100:200:300:400:500:device:log <--- here P
tells CREST to assume constant pressure (open system),
Tr=100, Pr=100, Tp1=300, dTp=400, Tp2=500
P[lot]=V[olume]:100:200:300:400:500:device:log <--- here V
tells CREST to assume constant volume (closed system),
Tr=100, Pr=100, Tp1=300, dTp=400, Tp2=500
These run commands can be combined in any order. If either B[atch] or P[lot]
are specified, then CREST will run in unattended mode, otherwise CREST will
run in the interactive mode. Do not specify both the B[atch] and P[lot]
commands.
Two program (including source code in C) are provided which illustrate the
potential uses of the CREST unattended mode when spawning it as a process from
another program. The first of these is OXMOLES which uses CREST to compute the
products of combustion at constant temperature and pressure but with varying
moles of oxygen. The second is FINDENTH which uses CREST to compute the
enthalpy of combustion products with varying temperature. Listings of these
codes and sample results can be found in the Appendices.
_Computing Thermodynamic Properties_
There is a default reaction which is loaded into the 50 line reaction data
buffer. This happens to be the dissociation of water into hydrogen, oxygen,
and hydroxl. You can examine this reaction by selecting menu option to edit
reaction. CREST will list the reaction and some help information.
To solve the reaction you must first return to the main menu. This is
accomplished by pressing F10. The menu should reappear. Now select the menu
option to Compute thermodynamic properties.
CREST will run through a checking procedure and then look through the database
for the elements and compounds. It does this once every time you change the
reaction. CREST lists some information while it is checking your reaction. You
need not be concerned if it flies by too fast to read. You only need to read
it if you have made a mistake, in which case CREST will pause so you can read
it. It just throws the information on the screen in the event that it
encounters an error so that it will be there if you need it.
After a few seconds you should see a header listing the units and symbols and
a prompt to enter the temperature (T) and pressure (P). If you enter a zero
for either temperature or pressure CREST will assume the standard reference
values which are 537R/237K and 14.696psia/1atm. After you type these values
(try 1000 14.7) hit Enter and CREST should list the internal energy (U/RTo),
enthalpy (H/RTo), entropy (S/R), and Gibbs free energy (G/RTo) for each
reactant and product under the specified conditions. The same prompt will
return and you can do this as many times as you like. To return to the main
menu just hit blank Enter. If you select this option, CREST will assume an
equal number of moles for each product (as these are unknown without first
solving for the equilibrium.
If CREST takes more than one second to compute the properties, you probably
don't have a math coprocessor in your PC. CREST will work even if you don't
have one; but I must warn you that there is a speed difference of a factor of
30 to 120! Should you try to solve a long reaction without a math
coprocessor, I suggest you get a good book to read while you wait. Note that
if you don't know if you have a coprocessor and the program seems to be taking
forever to run, you can interrupt it at any time by striking the spacebar or
clicking both mouse keys at once.
_Solving a Reaction_
Now to solve the reaction select menu option to Solve a reaction. If you
haven't changed the reaction CREST will not go through the checking procedure
again. You should see a header listing units and symbols and a prompt. CREST
wants to know if you want to change the reactant mole fractions. That is,
something like:
C+O=CO
C+2O=CO
2C+3O=CO
You can change the coefficients in the equation as desired. If not, just
respond with a N.
Next you will be asked whether the reaction is constant pressure (open system,
steady-state reaction, etc.) or constant volume (closed system, bomb
calorimeter, etc.). Remember that for a closed system the conservation of
energy is based on internal energy (U); whereas, for an open system it is
based on the enthalpy (H). If you specify constant volume, CREST will compute
the resulting pressure of the reactants.
Then you will be asked whether you want to specify the final temperature of
the products or the heat transfer (Q). If you specify the temperature of the
products, CREST will compute the heat transfer per specified moles of
reactants. If you specify the heat transfer, CREST will compute the
temperature of the products.
For example, a bomb calorimeter would be a constant volume, adiabatic (Q=0)
reaction. An ideal furnace would be a constant pressure, adiabatic reaction.
Of course, real furnaces lose both pressure and heat. You can specify the heat
loss or addition, Q need not be zero.
CREST will flash messages on the screen as it solves your reaction. These
indicate such things as the number of simultaneous nonlinear equations that it
is solving, the iteration number, temperature, pressure, and heat transfer.
When these values and the mole fractions of the reactants "level-out" the
iterations will stop and the results will be listed.
You can enter as many temperatures and pressures as you like, then hit Enter
to return to the constant pressure/constant volume prompt. If you want to
change the reactant mole fractions just hit Esc. To get back to the main menu
just hit Esc again.
_Using the Edit Features_
CREST also has a built-in full screen editor. You get into edit mode by making
the appropriate selection from the main menu. The reaction can take up to 50
lines. Each line can hold no more than 78 characters making the maximum length
reaction 3900 characters. You can make whatever changes you want then exit to
the main menu by pressing F10. Use F1 to list the elements and compounds in
the database. Any lines in the stack that begin with an asterisk (*) will be
ignored as comments.
_Defining Reactions_
There can only be one reaction; but it can have many reactants and products.
You can read a reaction from a file (try COAL) and save a reaction in a file
(try MYREACT). You can have as many files containing reactions as you like.
The reaction is defined by a group of elements and compounds followed by an
equals (=) and another group of elements and compounds. The first group is the
reactants and the second is the products.
The mole fractions of the reactants need not be specified. You can
interactively change this later. This is done by preceding the element or
compound with a number (which may be a decimal fraction). The mole fraction of
the products must not be specified (determination of the mole fraction of the
products is the reason for running CREST in the first place).
One of the important applications of chemical equilibrium analysis is to
determine dissociation. Usually this requires specifying each of the
dissociation reactions separately. This is not necessary with CREST.
The combustion of one mole of carbon (C) with 1.5 mole of diatomic oxygen
(Odia), would result in carbon, oxygen (O), diatomic oxygen, carbon monoxide
(Cmonox), and carbon dioxide (Cdiox). This reaction could be represented in
proper CREST syntax as:
C+1.5Odia=C+O+Odia+Cmonox+Cdiox
There are actually several reactions represented by the above equation. These
are typically written as:
C+Od<=>Cd+Od
Cd<=>C+Co+O
Co<=>C+O
Od<=>O
It is misleading to represent each dissociation reaction separately because
they occur simultaneously and are interrelated. CREST solves all of the
reactions simultaneously to give you an accurate representation of the actual
chemical processes. Because CREST does all of this automatically, it reduces
your chances of forgetting a crucial reaction as well as making the process
much simpler than the classical approach.
An example of a more complex reaction would be the combustion of coal...
Coal+6.3Air+.2Cacarbonate=Ar+H+C+Smonox+Sdiox+Hdia+Ndia+Odia+Water+
Nmonox+Ndiox+Coal+Cdiox+Hydroxl+N+O+S+Cacarbonate+Cahydroxide+
Casulfide+Casulfite+Casulfate
_Non-Ideal Behavior_
CREST is able to treat the reacting substances differently depending on what
you tell it in the database and the reaction equation. There are five
different groups of substances which can be specified in the database (more on
databases later). These result in first order corrections to ideal behavior.
The five groups are:
1 = ideal gas (Z=1.00, F=1.00)
2 = ideal gaseous ion (Z=1.00, F=1.00)
3 = ideal aqueous ion (Z=0.10, F=1.00)
4 = ideal liquid (Z=0.10, F=1.00)
5 = ideal dispursed solid (Z=0.01, F=0.10)
where Z is the compressibility and F is the activity coefficient. Currently,
Z and A are the same for groups 1&2 and 3&4, there may be a distinction in
later versions.
Higher order correction can be specified by the ! operator. If a substance is
followed by a !, then it will be treated as a real substance. In the example
below, only CO and CO2 are treated as real (non-ideal) substances. All of the
rest will be treated as ideal gases.
Methane + 2.5 Odia = O + Odia + H + Hdia + Ho + C + Cmonox! + Cdiox!
If a ! is found before the first reactant (as illustrated below), then all of
the reactants will be treated as real substances.
! Methane + 2.5 Odia = O + Odia + H + Hdia + Ho + C + Cmonox! + Cdiox!
If a ! is found after the = and before the first product (as illustrated
below) then all of the products will be treated as real substances.
! Methane + 2.5 Odia = ! O + Odia + H + Hdia + Ho + C + Cmonox + Cdiox
Any real behavior is treated according to Redlich and Kwong's mixing rule.
The temperature dependence of compressibility and activity coefficient is
computed based on a modification of the method described by Fuller, which is
in turn an improvement upon Soave's modification to the Redlich-Kwong equation
of state.
Because of the versatility which CREST offers in being able to select the way
in which to treat each substance, it can be a powerful tool in learning how
reactions will occur and what difference the assumption of ideal behavior
makes in equilibrium calculations.
_INTERPRETING THE OUTPUT_
CREST computes several quantities, among these are: temperature, pressure,
internal energy, enthalpy, entropy, Gibbs free energy, heat (or energy)
transfer, number of moles, and mole fraction.
Temperature is in degrees Rankine or degrees Kelvin. Standard temperature is
537R or 237K.
Pressure is in psia (pounds per square inch absolute) or atmospheres. Standard
atmospheric pressure is 14.696 psia or 1 atm.
Internal energy is in BTU/lb-mole or Joules/gm-mole.
Enthalpy is in BTU/lb-mole or Joules/gm-mole and is the internal energy plus
PV or ZRT. The enthalpy listed includes the enthalpy of formation.
For ideal gases the difference between U/RTo and H/RTo will be one. For ideal
liquids and solids these will be essentially the same.
Entropy is in BTU/lb-mole/R or Joules/gm-mole/K and is referenced to absolute
zero as required by the Third Law of Thermodynamics. Occasionally CREST will
compute a negative entropy. Absolute entropy can never be negative. This is a
problem that arises from having a relationship for specific heat which is not
accurate over the range of temperatures.
The Gibbs and Helmholtz free energies are defined by:
G = H - TS or G/RTo = H/RTo - TS/RTo
A = U - TS or A/RTo = U/RTo - TS/RTo
and is a measure of the available or useful energy (although not a true
measure as is availability). These have the same units and reference as
enthalpy and internal energy.
Heat (or energy) transfer is defined as being to or from the reactants. It is
important to understand the concept of a system boundary as defined in the
thermodynamic sense. Here the system is the reactants and the surroundings is
everything else. In a furnace for example, the furnace itself is not part of
the system. Only the coal and air are in the system. Positive heat transfer
would be energy added to the coal and air from the surroundings and negative
heat transfer would be heat removed from the coal and air to the surroundings.
Heat transfer has the units of BTU or Joules.
_DEFINING ELEMENTS AND COMPOUNDS_
Any elements or compounds referenced in the reactions you intend to solve must
be in the database file before running the program. I have supplied two in
order to get you started. You may want to add more.
You must have an editor of some type in order to make changes in the database
file. If you are going to use a word processor (e.g. PC-WRITE or WordPerfect)
be sure to treat the file as ASCII.
When reading this next section it will be helpful to refer to the listing of
CREST.GAS found in Appendix and CREST.AQU found in an Appendix.
CREST allows you to define elements and compounds. Elements can't be composed
of anything else whereas compounds must be composed of elements. It is
necessary to distinguish between the two in order to determine the
conservation equations. Elements and compounds are identified by syntax. The
order in which you define them doesn't matter; but the syntax is critical.
_Defining Elements_
CREST allows you to define your own elements or isotopes. Each must be
identified by a unique 12-character symbol. The first character of the symbol
must be an upper case letter (A-Z) and the rest can either be lower case
letters (a-z), or blanks (e.g. H, He, N, Na, Calcium), or one of the following
#$%&:;@^`{|}~ (H#, Ca~, Na^). You cannot use numbers or parentheses (e.g. H2
and H(2) are not permissible). You should note that hydrogen (H) is an
element; but diatomic hydrogen (H) is a compound composed of two hydrogen
atoms. In order to reference diatomic hydrogen in a reaction you must define
the element hydrogen (H) AND the compound diatomic hydrogen (Hdia). Note that
H2 for diatomic hydrogen or OH for hydroxyl is not permissible.
Following the symbol defining an, element you must specify nine numbers.
These are to be in standard free format. That is, they can be in any column
and can have mixed floating-point, integer, and exponential notation. Again,
see the appendix for examples.
The first of these numbers is the enthalpy of formation in BTU/lb-mole. Most
often the enthalpy of formation is given in kilocalories per gram-mole (why
not kilogram-mole I have no idea). To convert to BTU/lb-mole multiply by
1800. Note that the enthalpy of formation of elements is zero by definition
(except diatomic gases).
The next number following the enthalpy of formation is the entropy at STP
(standard temperature and pressure which is 537R/237K and 14.696 psia/1atm).
This must have the units of BTU/lb-mole/R. This is usually given in
gram-calories per degree C per gram-mole. No conversion is required in this
case.
The next three numbers define the constant pressure specific heat (Cp) in
BTU/lb-mole/R. This is usually given in gram-calories per degree C per
gram-mole. This also requires no conversion. Cp is defined by the following
equation:
Cp = C1 + C2*T + C3*T*T
For constant specific heat C2 and C3 are set to zero. If Cp is given for
various temperatures, you must first curve-fit the data in order to determine
the constants in the above equation.
The next number must be an integer between 1 and 5 indicating the substance
groups listed in the previous section on Non-Ideal Behavior.
The next two numbers are the critical temperature (degrees R) and pressure
(psia). If you don't know the correct values, set it to and CREST will use an
empirical formula to estimate these properties.
The last number is the molecular weight.
_Defining Compounds_
CREST allows you to define your own compounds. Just as for elements, each must
be identified by a unique 12-character symbol. The elements composing the
compound must follow immediately and be set off by square brackets []. The
number of moles of each element per mole of the compound must follow each
element (viz. H2O2 for two hydrogen and two oxygen). These can be free format
real numbers and there can be any number of spaces. Elements can also be
repeated (e.g. OHOH will be interpreted the same as H2O2). You might define
coal using the following symbols:
Coal[C.2H.75S.05]
This would be Coal means coal and it is composed of 20% C, 75% H, and 5% S
(mole fraction). COAL[etc.] is not permissible because there is no way of
distinguishing this from 1 mole each of C, O, A, and L.
Carbon monoxide as a compound could be defined as:
Cmonox[CO]
MEK (methyl-ethyl-ketone) could be defined by any of the following:
Mek[CH3 CO C2H5]
Mek[CHHHCOCCHHHHH]
Mek[C4H8O]
All are equivalent in CREST syntax.
The enthalpy of formation, entropy at STP, specific heat, substance group and
critical properties follow as with the elements. No molecular weight should
be specified for compounds as this is computed based on the elements
comprising the compound.
_CREATING A PLOT OF MOLE FRACTION_
CREST will create several files in order to assist you in creating a plot of
mole fraction as a function of temperature. These files are designed for use
with my plot program TPLOT. CREST will run TPLOT for you and display the plots
if TPLOT.EXE can be found in the current directory or along the path. If
HPGL2PRN.COM is in the current directory or along the path, then CREST will
also use it to convert plots created by TPLOT to dot matrix or LaserJet form.
CREST will also let you edit the plot command file CREST.PLT if there is an
ASCII editor in the current directory or along the path named EDITP.EXE or
EDITP.COM (you must supply your own editor).
CREST creates a plot command file named CREST.PLT and at least one data file
containing the results of the equilibrium calculations. These files are named
CREST0.OUT through CREST8.OUT. The reason for creating more than one file is
because TPLOT (and most other programs for that matter) can only read some
maximum number of columns (for TPLOT this is 200 characters). Because each
product requires a space and 12 characters for the name or mole fraction in
exponential notation, it is necessary to break this up into several files,
each with no more than 15 products.
CREST by default removes the plot output files when it is finished. If you
want to keep them, then set an environment variable using the following
command at the DOS prompt:
SET CREST=O
Remember that unless you rename the output files, should you run CREST again
these will be overwritten.
.pa
REFERENCES
Abbott, M. M., 1973, "Cubic Equations of State," _AIChE Journal_ (19:596-601).
Benton, D. J., 1987, "FEAST: Fast Estimation of Thermodynamic and Transport
Properties," a computer code available on the ASME/CIME Bulletinboard
(608)233-3378.
Benton, D. J., 1988, "CREST: Chemical Reactions and Equilibrium Statistical
Thermodynamics," loc. cit.
Benton, D. J., 1991, "Applications of a Hybrid Derivative-Free Algorithm for
Locating Extrema," SIAM-SEAS, Cullowhee, NC.
Benton, D. J., 1991, "Solution of Complex Thermochemical Equilibria in
Symbolic Form," Proceedings of the ASME WAM.
Chung, W. K., S. E. M. Hamam, and B. C.-Y. Lu, 1977, Letter to the Editor
regarding paper by Fuller (1976), op. cit. 16:494-495.
Cruise, D. R., 1964, "Notes on the Rapid Computation of Chemical Equilibria,"
_Journal of Physical Chemistry_ (68:3797-3802).
Fletcher, R., 1987, _Practical Methods of Optimization_, John Wiley and Sons,
New York, NY.
Fuller, G. G., 1976, "A Modified Redlich-Kwong-Soave Equation of State Capable
of Representing the Liquid State," _Ind. Eng. Chem. Fund._, 15:254-257.
Liu, Y., M. Wimby, and U. Gren, 1989, "An Activity-Coefficient Model for
Electrolyte Systems," _Computers in Chemical Engineering_ (13:405-410).
More, J. J. and D. C. Sorensen, 1984, "Newton's Method," _Studies in Numerical_
_Analysis_, G. H. Golub, ed., The Mathematical Association of America, pp.
29-82.
Ortega, J. M. and W. C. Rheinboldt, 1970, _Iterative Solution of Nonlinear_
_Equations in Several Variables_, Academic Press, New York.
Pierce, F. J., 1968, _Microscopic Thermodynamics_, International Textbook
Company, Scranton, Pennsylvania.
Powell, M. J. D., 1977, "Restart Procedures for the Conjugate Gradient
Method," _Mathematical Programming_, Vol. 12, pp. 241-254.
Prausnitz, J. M., 1969, _Molecular Thermodynamics of Fluid-Phase Equilibrium_,
Prentice-Hall, Englewood Cliffs, New Jersey.
Redlich, O. and J. N. S. Kwong, 1949, "On the Thermodynamics of Solutions,"
_Chemical Review_ (44:233-244).
Smith, W. R. and R. W. Missen, 1982, _Chemical Reaction Equilibrium Analysis:_
_Theory and Algorithms_, John Wiley and Sons, New York.
Stadler, H. P., 1989, _Chemical Thermodynamics_, The Royal Society of Chemistry,
Cambridge, U.K. (available in the U.S. through CRC Press).
van Wylen, G. J. and R. E. Sonntag, 1973, _Fundamentals of Classical_
_Thermodynamics_, John Wiley and Sons, New York.
Wagner, H. M., 1975, _Principles of Operations Research_, 2nd Ed.,
Prentice-Hall, Englewood Cliffs, New Jersey.
White, W. B., S. M. Johnson, and G. B. Dantzig, 1958, "Chemical Equilibrium in
Complex Mixtures," _Journal of Chemical Physics_ (28:751-755).
Wylie, C. R., 1975, _Advanced Engineering Mathematics_, 4th Ed., McGraw-Hill,
New York.
.pa
APPENDIX 1
LISTING OF ERROR MESSAGES
.pa
ERROR#1: read error
You may have typed something in wrong, file is corrupt, or any other problem
which would result in a file read error.
ERROR#2: syntax error
This may be due to incorrect characters, use of parentheses, misplaced
+,=,[,] sign etc. A syntax error will also occur if something like the
following is found: "++", "+!", or "2!H".
ERROR#3: reaction has only one reactant and only one product
There isn't a reaction to solve.
ERROR#4: element does not appear on both sides of reaction
This error occurs if an element appears on the left side of a reaction then
it must also appear on the right side and vise versa.
ERROR#5: reaction has no products
This can be due to a missing "=" sign or nothing on the right hand side of
the reaction.
ERROR#6: unexpected EOF (end of file)
CREST was looking for something else and didn't find it before encountering
the end of data. Sometimes this error occurs when your reaction has no "="
sign in it or you have not specified a reaction.
ERROR#7: too many elements (max=24)
ERROR#8: redundant reactant/product
The more than one occurrence of the same substance was found on the same
side of the reaction, for example Air+Coal+Air=etc...
ERROR#9: too many compounds (max=128)
ERROR#10: reaction has no reactants
This can be due to an extra "=" sign or nothing on the left hand side of the
reaction.
ERROR#11: undefined substance
Every substance in the reaction must appear in the database as either an
element or a compound.
ERROR#12: unable to access database
This can be due to it not existing (e.g., you spelled it wrong), not
accessible (e.g., hidden or locked), too many files, or bad PATH=
environment variable.
ERROR#13: compound contains no elements
Each compound name in the database must be followed with the elements which
comprise the compound. These must be contained within brackets [].
ERROR#14: undefined mole fraction
You may have improper syntax resulting in CREST interpreting a negative or
zero mole fraction.
ERROR#15: unable to access data file
Either the file does not exist, you typed the name in wrong, the disk drive
is down, or the file is read protected.
ERROR#16: reaction equations unstable
This may be due to an "ill posed" reaction, extreme temperature or pressure
limits, or unreasonable specific heats.
ERROR#17: illegal file name
You cannot use spool or reaction filenames that begin with either CREST or
TPLOT. You can use data files that begin with either. In any case, never use
a filename of TPLOT.OUT as this will be destroyed by any graphics
operations.
ERROR#18: compound contains too many elements (max=12)
ERROR#19: reaction contains too many reactants (max=128)
ERROR#20: reaction contains too many products (max=128)
ERROR#21: break detected
You must have hit a key while processing was in progress.
ERROR#22: reaction contains no elements
ERROR#23: reaction contains no compounds
ERROR#24: more than 128 simultaneous equations
The total number of simultaneous equations that must be solved in order to
determine equilibrium is equal to the number of elements plus the number of
products. The number of elements adds to this total; because conservation
of these constitutes linear constraints which are implemented using Lagrange
multipliers. A 128x128 matrix of single precision (REAL*4) variables is
accessible through large memory addressing. Anything bigger than this
requires huge memory addressing and greatly increases the overhead and
subsequent runtime. For this reason, I don't even make this an option. You
will just have to make do with 128.
ERROR#25: unable to open plot data file CREST.OUT
ERROR#26: write error involving plot data file CREST.OUT
ERROR#27: unable to open plot command file CREST.PLT
ERROR#28: write error involving plot command file CREST.PLT
ERROR#29: illegal video mode... may be a hardware incompatibility
Your CRT should be in CGA or monochrome mode depending on the hardware. Try
setting the mode to "MODE CO80" if it is a CGA. If you have a CGA plasma or
LCD display and can't tell the highlighted or color lines from each other,
then try setting it to "MODE BW80".
ERROR#30: insufficient available memory
In order to solve the equations it is necessary to allocate a considerable
amount of memory. Your machine does not have sufficient available memory to
process the request. Either solve a smaller reaction or find another
machine.
ERROR#31: substance element/compound ambiguity
This error will occur if a substance which appears in the reaction is found
in the database as a compound and appears in itself or some other compound
as an element.
ERROR#32: undefined state code
The state code must be 0-5 which indicates respectively the following states:
unknown, gas, gaseous ion, aqueous ion, liquid, or dispersed solid. CREST
does not handle precipitated solids which have a vanishing activity
coefficient.
.pa
.pn 0
APPENDIX 2
LISTING OF DATA FILE CREST.GAS
.pa
.de
.ad CREST.GAS
.ee
.pa
APPENDIX 3
LISTING OF DATA FILE CREST.AQU
.pa
.de
.ad CREST.AQU
.ee
.pa
APPENDIX 4
SAMPLE PROGRAM OUTPUT
.pa
CREST/V5.00: Chemical Reactions and Equilibrium developed by Dudley J. Benton
TVA Engineering Lab, Drawer E, Norris, TN, 37828 (615)632-1887
G.... Gibbs free energy [BTU/lb-mole] H.... enthalpy [BTU/lb-mole]
S.... entropy [BTU/lb-mole/R] Q.... heat transfer [BTU]
R.... gas constant [BTU/lb-mole/R]
Po... reference pressure [14.7 psia] To... reference temperature [537R]
Pr... pressure of reactants [psia] Tr... temperature of reactants [R]
Pp... pressure of products [psia] Tp... temperature of products [R]
F.... activity coefficient Z.... compressibility (Z=PV/RT)
Y.... number of moles X.... mole fraction (X=Y/Ytotal)
Date: 08/10/91 Time: 2112 database: CREST.AQU reaction: CEMENT.REA
*********************************** REACTION ***********************************
* aqueous reactions with cement and asbestos - use with database CREST.AQU
*
1000Water .5Cdiox .00001Odia .1Tricaaloxide .1Casilicateb .1Cawollastoni
.1Mgchrysotile .005Ca^^ .01Clmonox~
=
Water Cldia Cdiox Hdia Odia Algibbsite Tricaaloxide Calcite Caoxide
Casilicateb Cawollastoni Mghydroxide Mgchrysotile Sioquartz H^ Al^^^ Ca^^ Oh~
Cl~ Clmonox~ Ctriox~~ Hcarbonate~ Mg^^
********************************************************************************
solving reaction
elements=8, products=23, equations=31
iterations=164, seconds=35, dY=0.0001, dE=0.0001
Tr=580, Pr=14.7, Tp=580, Pp=14.7, Q/RTo=-33 (Isobaric)
substance state Y X Z F H/RTo S/R G/RTo
--------------------------------------------------------------------------------
Water lqd1000.0000000 0.9990859 0.10 1.00 -114.5 9.11 -124.4
Cdiox gas 0.5000000 0.0004995 1.00 1.00 -158.3 33.67 -194.6
Odia gas 0.0000100 0.0000000 1.00 1.00 0.3 43.36 -46.5
Tricaaloxide sol 0.1000000 0.0000999 0.01 0.10 -1444.5 27.63 -1474.4
Casilicateb sol 0.1000000 0.0000999 0.01 0.10 -929.1 17.48 -948.0
Cawollastoni sol 0.1000000 0.0000999 0.01 0.10 -658.4 11.57 -670.9
Mgchrysotile sol 0.1000000 0.0000999 0.01 0.10 -1757.5 30.08 -1790.0
Ca^^ aqu 0.0050000 0.0000050 0.10 1.00 -218.9 5.82 -225.1
Clmonox~ aqu 0.0100000 0.0000100 0.10 1.00 -43.2 16.55 -61.1
--------------------------------------------------------------------------------
reactants 1000.9149170 1.0000000 0.10 1.00 -115077.9 9133.90 -124943.2
================================================================================
Water lqd 999.5754395 0.9987319 0.10 1.00 -114.5 9.11 -124.4
Cldia gas 0.0000000 0.0000000 1.00 1.00 0.3 61.67 -66.3
Cdiox gas 0.0003200 0.0000003 1.00 1.00 -158.3 41.03 -202.6
Hdia gas 0.0000000 0.0000000 1.00 1.00 0.3 44.79 -48.1
Odia gas 0.0000000 0.0000000 1.00 1.00 0.3 59.48 -64.0
Algibbsite sol 0.0999931 0.0000999 0.01 0.10 -1031.5 19.51 -1052.5
Tricaaloxide sol 0.0000000 0.0000000 0.01 0.10 -1444.5 30.16 -1477.1
Calcite sol 0.4803705 0.0004800 0.01 0.10 -485.8 12.70 -499.5
Caoxide sol 0.0000000 0.0000000 0.01 0.10 -255.7 8.44 -264.8
Casilicateb sol 0.0000000 0.0000000 0.01 0.10 -929.1 20.01 -950.7
Cawollastoni sol 0.0001326 0.0000001 0.01 0.10 -658.4 12.23 -671.6
Mghydroxide sol 0.0000000 0.0000000 0.01 0.10 -372.1 11.77 -384.8
Mgchrysotile sol 0.0999777 0.0000999 0.01 0.10 -1757.5 30.08 -1790.0
Sioquartz sol 0.1999004 0.0001997 0.01 0.10 -366.9 6.30 -373.7
H^ aqu 0.0000002 0.0000000 0.10 1.00 0.0 22.27 -24.1
Al^^^ aqu 0.0000000 0.0000000 0.10 1.00 -214.2 -4.16 -209.7
Ca^^ aqu 0.1245045 0.0001244 0.10 1.00 -218.9 2.60 -221.7
Oh~ aqu 0.2347642 0.0002346 0.10 1.00 -94.2 5.69 -100.3
Cl~ aqu 0.0100000 0.0000100 0.10 1.00 -67.4 18.31 -87.2
Clmonox~ aqu 0.0000000 0.0000000 0.10 1.00 -43.2 39.57 -85.9
Ctriox~~ aqu 0.0048516 0.0000048 0.10 1.00 -273.0 5.39 -278.8
Hcarbonate~ aqu 0.0144703 0.0000145 0.10 1.00 -279.0 22.12 -302.9
Mg^^ aqu 0.0000700 0.0000001 0.10 1.00 -188.2 -0.13 -188.1
--------------------------------------------------------------------------------
products 1000.8446655 1.0000000 0.10 1.00 -115110.8 9119.19 -124960.2
--------------------------------------------------------------------------------
difference -0.0702515 0.0000000 -0.00 -0.00 -32.9 -14.70 -17.0
.pa
APPENDIX 5
PROGRAM OXMOLES
(COMPUTES COMBUSTION PRODUCTS VS. MOLES OXYGEN)
.pa
.de
.ad OXMOLES.C
.ee
.pa
APPENDIX 6
PROGRAM FINDENTH
(COMPUTES ENTHALPY OF COMBUSTION PRODUCTS VS. T)
.pa
.de
.ad FINDENTH.C
.ee
.pa
APPENDIX 7
SAMPLE PLOTS OF COMPUTED MOLE FRACTION VS. TEMPERATURE