This file contains information on OpenCalphad (OC) version 6 and
earlier.  This log started 2016-03-03.

For general information please read the intro-OC6.pdf and the
OC6-macros.pdf.

There is now a (very old) precompiled installation of OC on Windows
on the OpenCalphad web page.  It includes an introduction, on-line
help and examples with macro files and some small databases.  For
graphics the free GNUPLOT software must be installed separately from
Sourceforge or a similar website.

On Linux, MacOS and other OS the installation requires some general
knowledge about compiling and linking of software.  There is an
installation manual (and an old mainly redundant video on You Tube)
but if you are not familiar with such procedures please ask a local
guru for help.  Installation problems depend on your local
envirionment and we who provide this software for free do not have the
time to answer such questions.

In the list below the most recent changes come first.

2022.07.15 OC version 6.055: Modified reading TDB files to accept
longer input lines (120 characters) and to handle some odd terms in
functions prevously not accepted.

2022.07.13 OC version 6.054: Summer vacation, some more fixes of the
MQMQA model, new macro map19.OCM added for the MQMQA model in the
examples/macro directory.  The converter of DAT files to TDB files
developed by Nathalie Dupin has been tested and works although some
DAT file seems to contain a lot of redundant phases.

2022.06.10 OC version 6.053: A redundant debug message removed.

2022.05.16 OC version 6.052: Just some more bugfixes.  MQMQA tested
with three cations, some problems with reciprocal system.

2022.05.13 OC version 6.051: Friday 13th version with a minor bugfix
in MQMQA model.  I have added a sleep function after submitting a plot
to GNUPLT from OC for my own testing of the graphics as sometimes a
plot was overwritten by the next plot.  Normal plotting should not be
affected.

2022.05.11 OC version 6.050: The OC implementation of the MQMQA model
can now handle some of the excess parameters.  As this model is
different from anyone previously implemented in OC and its
documentation is involved and fairly cryptic there has been some
difficulties to understand some "hidden" model parameters in the way
the Gibbs energy is calculated.  A second problem is that most systems
used with this model are quasi-binary or -ternary system where the
amount of one of the components is is given by the ratio of the amount
of the other components.  This works also in OC but will proably
require some modificatons to improve the convergence.

2022.04.19 OC version 6.049: The declaration of gx%bmperr has been
moved to METLIB4 in a first step to unify error codes.  Some strange
problems compiling with OpenMP for parallel had to be fixed.  Some
more general routines has been moved from gtp3 to metlib4.F90.  The
TDB reader in gtp3.F90 has been prepared to handle reading encrypted
databases but such options are outside the scope of the free version
of OC.

2022.04.07 OC version 6.048: A number of minor bugfixes and other things.

2022.04.02 OC version 6.047: I have now implemented a binary version
of the TISR model for SRO, (see a recent Calphad journal).  I have
also made additional changes to prepare for reading encrypted
databases with OC.  This means changes in datastructures that I have
not touched for many years and this may cause trouble for some
applications, please report problems!

2022.04.01 OC version 6.046: The Makefiles have now been updated for
all the changes made.

2022.03.30 OC version 6.045: In order to prepare OC to read encrypted
databases some restructuring of the data structures and subroutines
has been made.  There should be no change for using unencrypted
databases.  Please report any problems!

2022.03.26 OC version 6.044: The war in Ukraine has made me think
developing thermodynamic software is not very important.  But work
goes on, the reading of TDB files has been simplified by reading
all TYPE_DEF first, before any other keyword.  The reason is that in
OC a TYPE_DEF character had to be defined before it was used in a
PHASE keyword.  But many TDB files are organized differently and as it
is accepted by other software it is now finally accepted also by OC.
This should not affect anything in the calculations but please report
problems!  Additionally a parameter identifier "BM", used as
abbreviation for BMAGN (for the Bohr magneton number), will be
interpreted as BMAG, which is the coresponding OC parameter
identifier.

There is a new command "LIST ESTIMAT_ACCURACY" which can be used after
an equilibrium calculation to obtain error estimates of the results.
This is done by calculating mumltiple equilibria varying the value of
the conditions with +/-5%.  It can be useful to understand how the
system will behave in a production situation when it can be difficult
to keep compositions and temperatures at the optimal values.

2022.02.21 OC version 6.043: Clement Introini and his colleagues at
CEA Cadarache have worked extensively with the grid minimizer and
various other parts of the code and has allowed that to be shared by
all users of OC.  The integration is still ongoing and there are some
examples that may fail until all is finished as well as some which
work better.

2021.12.15 OC version 6.042: Working with Nathalie Dupin to make it
possible for OC to read MQMQA databases using a TDB format.  The
converter from DAT format written by Nathalie.  Update with some
bugfixes.

2021.12.12 OC version 6.041: Restored using the fraction of the
reference state of an MQMQA FNN endmember and removed the irrelevant
reference state from listing of MQMQA SNN parameters.  Now the way to
transform endmember parameters from DAT to TDB should be stable.  But
there are still problems to be solved for excess parameters.

2021.12.11B OC version 6.040: Fixed one more bug for the reference
state.  Now the excess parameters ... and some peace of mind during
Christmas.

2021.12.11 OC version 6.039: There is no nobel price in thermodynamics
but maybe there should be ... . The MQMQA model is a bit more stable
and spurious lines for tracing removed. 

2021.12.03 OC version 6.038: First calculation with MQMQA with SRO and
correct reference state.  Still fixing minor bugs and the data
structures can be improved.  This model violates almost all principles
I have had developing models and I have not tried reciprocal models
yet.  It is still just the basic MQM but include the possibility to
have several constituents on both sublattices.

2021.11.26 OC version 6.037: Even more bugfixes in the MQMQA routines.
Collaborating with Nathalie Dupin to convert FactSage DAT files to TDB
files.

2021.11.15 OC version 6.036: More bugfixes in the MQMQA routines.

2021.11.07 OC version 6.035: A version of the SGTE unary database
adapted for OC is available on exaples/macro. Some problems with 
converting a TDB file to a SOLGAS DAT file has been fixed but there
may still be problems.

2021.11.01 OC version 6.034: Finally the MQMQA model works for some
simple examples such as SRO in a system A-B-AB.  Further testing and
calculations on real systems are needed but as OC cannot read DAT
files we have to wait for some files to be converted a TDB format
extended with some bond parameters.  Thanks to the people developing
Thermochimica for all the help.

2021.10.13 OC version 6.033: Some progress with MQMQA to be saved
before I make a mess of it again.

Working on the implementation of MQMQA model has revieled some
problems within OC.  The first was the fact that a species containing
Va, which may occur in a "quadrupole" in this model, is counted as a
real atom and this upset the calculation of mole fractions.  This has
been fixed temporarily but needs further attention if the vacancy mix
with other species in a sublattice.  Secondly the amount of formula
units of a phase is upset when the total amount of atoms in a phase is
less than unity.  This occur regularly in MQMQA because most
quadrupoles, which are treated as real species in OC, normally contain
less than 1 atom, often 1/3 or even less.

The reason is that in OC and FactSage the "amount of a phase" means
different things, in FactSage there is no specific "amount of phase",
only the amount of atomes in a phase, whereas OC (and TC) has defined
a property called "Formula Unit" (FU) of a phase and normally one has
values of properties "per FU" as well as "per mole of atoms".  The
difference can be big as phases such as sigma has 30 atoms per FU and
23-catbide contains 29 atoms.  The FU simplifies slightly the modeling
of phases because the Gibbs energy of a phase in OC is defined per
mole formula unit wheras in FactSage it is defined per mole of atoms
in the phase.  Thus in OC there is a property "amount of phase per
formula unit" which is used in the "list result" whereas the property
NP(phase) is the "amount of atoms" in the phase.  These can differ if
there is not 1 atom/FU.

The value of the FU of a phase can vary if there are vacancies or
species with different number of atoms in a phase (for example in a
gas phase or an interstitial phase with vacancies).  Using FU normally
simplifies writing the Gibbs energy formula for the phase as it is
independent of the actual amount of the phase.  But the MQMQA model is
defined using the amount of atoms in the different quads and initially
I tried to follow this but it became incompatible with the rest of OC.
The simplest is to use the formula unit 1 for the MQMQA liquid.  The
sublattices in MQMQA can contain vacancies but they have no charge (in
contrast to the I2SL model where the number of sites are adjusted to
make the phase neutral).  The actual number of atoms per sublattice
can vary in MQMQA, normally it seems to be less than unity.  The
sublattice occupancy is calculated from the quad fractions and as
several quads contain the same species on the different sublattices
the fraction of the identical species fractions in a sublattice are
added together.  In the case of the same species with different
valency (such as Fe+2 and Fe+3) they will be be treated as different
and give a contribution to the configurational entropy in the
sublattice.

I have also found that there are some restrictions in OC when the
amount of atomes per FU is less than one to avoid dealing with phases
with an excess of vacancies, this may have to be modified.

2021.10.01 OC version 6.032: More time with no work, or rather very
little progress.  The MQMQA model is still refusing to work but some
light in the end of the tunnel.  I wish to save the current status on
the github server as I continue.

2021.08.04 OC version 6.031: Long time no work ... the problem using
mass % for mapping seems to be fixed, I am not sure why it occured.

I have added a directory examples/TQ4lib/F90/parallel-alnipt with a
new example for the TQ interface simulating diffusion in an AL-Ni-Pt
system in parallel.  There are instructions in the directory how to
compile, link, run and plot.  There is also a slideshow explaining the
example.

For database managers looking for errors in the database there is a
DEBUG TRACE command which can turn on a listing of rejected
parameters.

I have added a new command that can be useful for assessments.  It
copies the phase amounts and constitutions from one specified
equilibrium to the current one.  When assessing miscibility gaps using
several equilibria with tie-lines the miscibility gap frequently fails
in some (or all) equilibria during an optimize run.  To restore the
constitutions in several equilibria can be a pain.  Now, after
restoring the model parameter and recalculated the miscibility gap in
one equilibrium "eqnum", one can select another experiental
equilibrium with the miscibility gap and transfer the phase amounts
and constitutions from eqnum to this using "AMEND START_CONST eqnum".
In PARROT this was the "TRANSFER" command.

My main task is still to implememt the MQM model but ...  I am also
working on adding a new STEP variant called STEP FAST which is a
Scheil-Gulliver solidification model with one or more fast diffusing
elements.  The fast diffusing element has the same chemical potential
in the liquid as in the already solidified sections.  Typical examples
is solidification of steels with C.

2021.04.25 OC version 6.030: It seems there are difficulties to
calculate diagrams using mass percent, w%.  No such problems uing mole
or mass fractions.  Until I have had time to look into this please use
fractions as axis variables in all calculations of diagrams.  For
plotting it is possible to use mass percent.

I have fixed that the axis conditions used during step/map are now
restored after the step/map has finished (unless there is an error).

2021.04.25 OC version 6.029: A few corrections in the new magnetic
model have been made, evidently the new magnetic model still uses the
disordered paramagnetic state at high T as reference state except(!)
corrected for the pure elements in the new unary database.  This may
cause some non-zero or even negative entropies for alloys.

I also changed the "model-parameter-id" VS to be VD because the "S" in
VS can be misunderstood as the SER reference state suffix.  The
restoring of conditions after STEP and MAP has also been removed as it
caused problems.  I will check it it can be restored later.

2021.04.15 OC version 6.028: In the Makefile for Linux I have changed
to use X11 plot driver in GNUPLOT by default.  For MacOS the qt plot
driver is the default and for Windows the wxt.  The user can change
this interactivly also for each plot.

The "model-parameter-identifier" for the Einstein T, hithero known
as THET has changed to LNTH as it is the value of LN(theta) which
is used.  The reason to use LN(theta) is that the composition dependence
is better expressed using the logarithm.

The Inden-Hillert-Qing-Xiong model for magnetism has been corrected
according to the paper 2001 by Qing and Sundman.  It is now possible
to include this magnetic model as well as the Einstein low T heat
capacity model in TDB files.  Up to know it was only possible to enter
these models interactively or from macro files.

2021.04.07 OC version 6.027: Finally it is possible to enter symbols
that include values of model parameter identifiers.  This may not be
something everyone does every day and I had never tested it but
sometimes it may be useful.  I have also fixed that one can use
conditions on constituent fractions in phases with ionic constituent.
I was surprised it was not already allowed but it is true I had never
had any reason to test it.  A number of minor bugs fixed.

I have had a look at TQlib and slightly updated the crfe example.
Note that on Github there are several Python-OC libraries which may be
simpler to use for those not familiar with Fortran.

2021.04.02 OC version 6.026: Some new interest in the 3rd generation
unaries, I have fixed some problems with the composition dependent
THETA (the Einstein temperature) for the low T model.

I have also added some new facilities for plotting results from
isopleth calculations, previously one could not plot the phase
compositions, only the composition on the lines separating phase
regions in the plane of the calculation.  Evidently such diagrams
(they are not phase diagrams!) can be useful in some cases.

2021.03.25 OC version 6.025: User guide (prerelease version 7) and
news-OC7 added.  User Guide and online help system slightly improved
and help added for some new (sub)commands and questions.

An attempt has been made to fix several spurious bugs in the plotting
but as previously noted the step/map/plot routines are still very fragile.

A bug handling expressions used as conditions, for example
y(bcc,Al#2)-y(bcc,Al#3) used in macro map17 has been fixed.

2021.03.14 OC version 6.024: Some minor improvement of the
Scheil-Gulliver and paraequilibrium calculations and plotting made.

2021.03.14 OC version 6.023: A very fragile facility to calculate and
step paraequilibria has been implemented.  This time it was mainly the
non-linear solver that caused problems, when eventually there was
something to plot there were no extra problems.  Except to append a
plotfile that already contained an appended file.  There is a new
macro "step-epz" which calculates a stable isopleth for the Fe-Mn-Si-C
system and then overlays that with a paraequilibrium section for
bcc/fcc and overlays that with a tzero line between bcc/fcc.  It may
be useful to understand transformations in low alloyes steel.  I am
grateful to Bengt Hallstedt who provided a new free steel database,
"iron4cd.TDB" intended for cast irons.

The calculate/step NPLE will be put on the shelf for a while, in the
macro testcond1 there is an example how to calculate a single NPLE
equilibria which can be more intructive than just mechanically repeat
set/calculate/step/plot.

2021.03.07 OC version 6.022: Finally I have implemented some new STEP
commands useful to simulate some limiting cases of phase transformations:

- STEP TZERO to calculate a curve where to phases have the same Gibbs
energy.  Such a curve can be taken as a limit of a diffusionless
transformation.  

- STEP SCHEIL_GULLIVER to calculate a solidification curve assuming no
diffusion in the solid phases and a homogeneous liquid.

One more step option will hopefully be implemented soon.

- STEP NPLE to calculate a "No Partitioning Local Equilibrium" line
which describe the limit of fast ferrite/austenite transformation in a
steel, assuming that only carbon can diffuse and the ferrite inherits
the alloy composition of the austenite.

Neither of these simulations describe an equilibrium situation and
must be used with care.  There are new macros, step-tzero and
step-scheil explaining how to use tese commands.  As always please
report problems.

A main problem I have with the diagams is the plotting because I wrote
most of the step-map-plot package some 5 years when I was learning the
new Fortan and knew nothing about GNUPLOT.  Hopefully I will get time
to rewrite the whole graphical interface sometime, as well as update
documentation and help files.  Luckily Chunhui Luo is working hard to
make OC more user friendly with the OC-CAE program.

2021.02.26 OC version 6.021: An attempt has been made to improve
mapping of phase diagram.  As a first step several startpoints are
now allowed for a map calculation and in a second step automatic
startpoints will be generated.  The phase diagram calculation is very
sensitive to the start points and any manipulation of the code for
mapping creates havoc in some diagrams.

The command to add a second or third start point is "SET AS_START"
after calculating the equilibrium with a new set of conditions.
Additionally one can invoke a global minimizer at regular intervals
during mapping with the command "SET ADVANCED MAP" followed by a
number.  The global grid minimizer will check the equilibria along the
calculated lines at regular intervals according to this number and may
prevent metastable extrapolations.

2021.01.27 OC version 6.020: On request from a user I have added a new
list command, "LIST CSV-TABLE" which will generate a table with "Comma
Separated Values" (CSV) of the result of a STEP command.  This can be
read by excel for further manipulations.  The user can select the
independent variable and the property or properties to be tabulated in
the same way as for the PLOT command (note that the ocgnu.plt file,
generated by the PLOT command, has a similar table).  The rows will be
in the order the equilibria were calculated, not sorted in order of
the independent variable value.  Excel itself should have facilities
to handle that.

The implementation of the MQMQA model has progressed a bit and a new
method to enter and store the necessary data of the "cluster"
information has been created.  Many of the clusters have fractional
stoichiometry and the listing of the species stoichiometry has been
modified to be max 6 digits (including a decimal point).  Internally
the stoichiometry is stored as a 64 bit real number and should be
entered as exact as possible.

2020.12.14 OC version 6.019: Modified input/output of data for models
of phases to handle and list a bit more information.  I have also
added a new wildcard, "#", to allow plotting the driving force, DGM,
of metastable phases.  The wildcard "*", ignore metastable phases.
Still working on understanding the MQMQA quasichemical model (the -QA
suffix means including quadrupol clusters). A new model parameter
identifier, ZMQM, has been added to define the variable coordination
factor for the elements in the liquid but maybe it is not needed.

2020.11.19 OC version 6.018: Some more fixes for the TDB2DAT
facilities.

2020.11.13 OC version 6.017: The facility to write thermodynamic data
in the FactSage DAT file format has been improved and has been tested
for a fairly complex 21 component system.

GNUPLOT is a very nice software but also very complex and not until
now I have finaly figured out how to plot lines with symbols.  In OC
the PLOT subcommand "EXTRA LINE-TYPE 2" plots a symbol at each
calculated point along each line.  "EXTRA LINE 0" gives a dotted line,
and "EXTRA LINE 1" a full line without symbols.  A number higher n>2
means every every (n-1)th calculated point has a symbol.  See the
macro files step1 and map18 for an example.  By giving the command
twice, once with n=0 and once n>1 one will dashed lines with sysmbols.
To have full lines back one must use n=1.

2020.11.08 OC version 6.016: Any inline argument provided when
starting OC has been extended to 256 characters to cater for long file
paths.  The output from "list short p" do not longer include the quite
meaningless status bits, I will add some other useful information
later.  A hidden option "list short d" mimics the old version.  After
consulting Guillaume Vareille about problems opening a new file for
writing a small modification in tinyopen.c has been made.

The command AMEND PHASE name#set ADDITION GADDITION allows to shift a
Gibbs energy of the phase "name#set" by a constant value.  This can be
used to represent a nucleation energy for example.  From this version
of OC one can set a different GADDITION value for each composition set
of the phase.  This simplifies when one wants to simulate nucleation
of an cubic carbide (MC) from austenite because they represent
different composition sets of the same FCC phase.  And Joe Biden is
called as as president-elect in USA.

2020.10.26 OC version 6.015: In SMP2A I sudenly got a division by zero
error in the Fortran "mod" function using gfortran 10.2.0.  If the second
argument of "mod" is 0 this means a division by zero.  The part of the
code where the error occured is very old and it was my own fault as I
checked if the argument was 0 and used the mod in the same IF
statment.  In Fortran there is no guarantee the arguments of an IF
statement are tested in the order they are written.  Now I test for 0
in a separate IF before using mod.

Still working with the Toop/Kohler excess method.  The data structure
works but the numerics are not correct but it can wait because I am
enjoying a vacation in Bretagne and writing a paper trying to explain
how the STEP and MAP procedures work in OC for multicomponent systems.

I added a new READ option SELECTED_PHASES which allows the user to
specify a subset of phases to be read from a TDB file.  I also
corrected counting the number of parameters read from the file.  I
have also introduced a check that the elements selected by the user
really exist in the database.

A problem plotting a "dot derivatve" such as H.T (heat capacity) from
a step/map calculation created a segmentation fault when the number of
composition sets are not the same for equilibria in different regions
(because new sets can be created when needed during step/map).  To
calculate a dot derivate OC must create a matrix for each equilibrium
which has been calculated and in the "dynamic" memory of such an
equilibrium one may have less composition sets than in the "static"
memory (because the number of composition sets in the "static" memory
reflects the last calculation made).  OC will now ignore non-existant
composition sets in the "dynamic" memory (which anyway would never
contribute) when calculating a dot derivative.  Normally a
non-existant composition set would be a serious error but the plot
routine use a global variable¨"special_circumstances" to indicate this
calculation is for plotting.

The length of some character variables used for reading files has been
extended.

2020.09.23 OC version 6.014: Interaction with users always provides
information of bugs.  Thanks Romain and Christine for testing a system
with an ionic liquid model without any vacancies which exposed a long
time bug calculating its Gibbs energy.  Clement had also discovered
that the keyword DATABASE_INFO must not be abbreviated DATA_INFO in
TDB files ...

2020.09.22 OC version 6.013: A new version of the file browser
TINYFILEDIALOGS has been provided by by Guillaume Vareille because
the previous generated a lot of warnings when compiled with gcc-9.2
using MinGW32.  Please give feedback if there are any problems.

The datastructure needed for using the Toop/Kohler method for ternary
extrapolations is now working but testing is still needed.  A few more
errors calculating with the new unary models have been fixed.

2020.09.11 OC version 6.012: Several problems related to the
Equi-Entropy Criterion (EEC) has been solved.  If a phase has higher
entropy than the liquid (the EEC) the routine which calculate G and
all its derivatives during an equilibrium calculation will replace the
values of G and all its derivatives with respect to fractions with an
ideal entroy expression with zero enthalpy.  This will ensure the
phase is never stable but still allow it to have reasonable chemical
potentials.  Just replacing the Gibbs energy with a high value created
convergence problems.  But calculating and plotting Gibbs energy
curves may still be difficult in a T and composition ranges where the
EEC is active.

I had a message from Ebert Alvares about problems assessing data for a
sigma phase because OC crashed with segmentation fault.  Looking into
this problem I found that when the sigma phase is modeled with a
disordered fraction set, the links between this disordered set and the
ordered phase was not set correctly when additional equilibrium
records are created, for example to assess experimental data.  This
was the first time anyone had tried to assess such a phase and needed
to calculate equilibria in other equilibrium record than the first
"default" one.  It took some time to find the error and actually there
were several.  The initial bug was that no fraction records were
allocated for the disordered set and there were no result records
allocated during the equilibrium calculation.  There were also
problems assigning records rather than assigning pointers to records,
this part of the code was written when I was learning the new Fortran.
But all of that has now hopefully been fixed.  I also found and fixed
a bug entering a disordered fraction set interactively (reading from a
TDB worked).  Feedback is important to find and fix such tings.

2020.08.06 OC version 6.011: Added an option to the liquid two-state
model allowing an element fixed G2 parameter (called GD in
Thermo-Calc).  The composition dependence created problems when mixing
elements with very different G2 values such as Al-W.  The command
AMEND PHASE LIQUID ADD TWOSTATE has an additional question if G2
should be composition independent.  If you answer Y the G2 parameter
will be treated as composition dependent.  Composition dependent THET
value (the Einstein temperature) is now implemented correctly.  It
should also work to use THET parameters for phases when the number of
atoms/formula unit varies (for example when C dissolves interstitially
in FCC).

Work on the Kohler/Toop implementation is continuing.

2020.08.06 OC version 6.010: Corona virus times and a long time
without updates.  I have stared implementing the Kohler and Toop
ternary extrapolation models.  This require a minor extention of the
data structure which may cause some problems.  A new subcommand,
TERNARY-EXTRAPOL has been added to the command AMEND PHASE.  This is a
first step in adding the MQM model to OC but nothing works at the
moment.

The previously useless command SET ADVANCED WORKING-DIRECTORY has been
modified to use the file browser.  This means you can use the browser
to a directory you want to use and if you select a TDB file the
working directory will be changed to the directory with this file.
Nothing will happen with the TDB file.  The working directory is
important because by default any ocgnu.plt files will be written
there.  You can also change this by the "output" subcommand in PLOT.

The code handling entering and listing of additions such as magnetic
has been slightly modified.  For example if a phase had a
disordered¨fraction set (i.e. a separate phase) in a TDB file but the
ordered had not, in OC the ordered phase remained without this
addition whereas in TC the ordered were automatically also magnetic.
This is now corrected which required several minor modifications.

2020.06.18 OC version 6.009: A subtle bug in my modified version of
LMDIF fixed.  It only appeared on the Mac version.  Another subtle bug
was found decoding a constituent dependent model-parameter-identifier
such as MQ&O-2#2(C1,U+4:O-2,Va) where O-2, or rather any constituents
with "-" could not be found because "-" was treated as a "_".  Some
additional changes were made for interactive entering of such
parameters.

2020.06.16 OC version 6.008: I have changed to use the firefox browser
for help on Windows.  This involved some tricky handling of the double
quote needed to hide the space characters in the path when using the
intrinsic INQUIRE and EXECUTE_COMMNAD_LINE.  I also reinstated saving
the date of linking which is listed when starting OC and fixed some
problem with the save/read unformatted files.

2020.05.29 OC version 6.007: Added a few changes in the model package
suggested by Clement Introini.

2020.05.08 OC version 6.006: A small bug fixed for the "output file"
option when plotting.  When using the filebrowser, the extension .plt
is added if missing.

2020.05.07 OC version 6.005: Due to some confusion with subversion
numbering version 6.004 and 6.005 are the same.

2020.05.02 OC version 6.004: The first update of version 6.  Guess
what ... a small fix in mapping to handle invariants in isopleths ...

************************
* This is OC version 6 *
************************

2020.04.30 OC version 6.003: In the isopleth phase diagrams the
invariats are finally calculated correctly and the map7 macro is
reasonable (even if parts of some lines sometimes are missing using a
single start point).  Some corrections made in the new filestructure.

2020.04.10 OC version 6.002: The directory structure for OC has been
changed to be similar to other GNU software.  Thanks to Peyman Davvalo
Khongar for the help with this.  In the src/ directory the source code
and in examples/macros/ all the macro files for teseting and learning
to use OC can be found.  The manual is in doc/manual/.  The Makefile
for Linux and the "linkpara/linkmake" for Windows has been updataed
for this structure and the final executable will be found in the bin/
directory.  The other directories are mainly of interest for those who
use OC in their own software.

2020.04.14 OC version 6.001: The Coronavirus epidemy is changing
the world as we know it.

An automatic installation of OC6 for Windows is now available on the
opencalphad.org website.  This creates the directories and the OCHOME
environment variable and installs the executable, on-line help files,
macro files, the macro manual and an introduction.  Many thanks to
Chunhui for the help with this.  The macro manual and the informative
text has been updated.

The calculation of invariant equilibria for isopleths was added in the
previous version but the handling of the many exit lines was not
elaborated.  This has been improved, for example in map7 and map16,
but there are still some problems to find the set of fix phases
defining each line exiting rom the invariant.

The "c n" (calculate no-global) actually called the grid minimizer
after the iterative calculation if the conditions did not allow using
the grid minimizer initially.  Now "c n" never call the grid
minimizer.

I have also fixed that the STEP command can handle invariant
equilibria, previously it stopped there because it is necessary to add
and remove a phase at the same node.  Now it should discover by itself
which phases to exchange.  As always step and map are fragile and may
require several startpoints to be complete.

****************************************
* This is a prerelease of OC version 6 * 2020
****************************************

2020.03.15 OC version 6.000: Note the linkpara and Makefiles are
changed to use the name oc6p for the executable.  I will update the
"stable" version on http://www.opencalphad.org soon.  The handling of
isopleth diagrams has improved and now I have added colors to the
lines, indicating which phase has zero amount, i.e. becomes stable
along the line.  The isopleth invariants are now calculated correctly
but there are still problems generating the correct set of stable
phases at the exit lines from the invariants.  There is a new macro,
map16, featuring an isothermal invariant in the C-Cr-Fe system.
Macros 6 and 7 also features the colors but there are some incomplete
or missing lines.

I intend add automatic start points for phase diagram mapping but one
problem is that sometimes metastable lines are calculated.  There are
also numerical problems when following a line and some lines may end
in the middle of nowhere.  A complete diagram may require several
independent start points but such a routine may generate lines
representing metastable equilibria.

********************************************************************

2020.03.05 OC version 5.060: I am working on STEP/MAP and have made
several canges in the datastaructure and I want to save an
intermediary version not to blow up the whole thing.  The invariants
for isopleths are just around the corner and the rest seems stable.

Some problems with the two-state liquid model has been fixed.  All the
"additions" to the Gibbs energy are based on some physical model and
the equation used is normally for one mole of atoms.  But the Gibbs
energy expression, to which they are added, is for one mole of
formally units.  Many phases have a variable number of atoms/formula
units (for example vacancies or constituents with several atoms) and
thus the addition has to be multiplied with the actual number of atoms
in the phase.  This is implemented in OC and there is a question for
the "AMEND PHASE <name> ADDITION" command.  The derivative of the
addition with respect to the composition for the 2-state model has
also been corrected.

In the previous version of OC I added a macro, map17, where the first
calculated diagram is plotted with a dashed line (representing a
second order transition).  Then the full phase diagram is calculated
(in several steps) but when the first diagram is appended to this all
lines became dashed.  Now I have modified the "line types" (GNUPLOT
language) so an appended OC diagram will not have the same "line
types" as used for the currently calculated diagram.

2020.02.24 OC version 5.059: The next relase 6 of OC will soon be
reday, also on the http://opencalphad.org web page.  I have spent more
than 2 years gradually improving version 5.  But as usual the
documentation lags behind.

I am working on implementing all lines exiting from invariants when
mapping isopleths, at present only three of them are created (two of
which are wrong) but there should be 2*(number of stable phases)-1.  I
hope to finish that in the release of version 6.

LOG files are useful to keep a record how to make a complicated
calculation and also to report errors or problems using OC to the
support team.  There has been troubles opening a LOG file but that
should now be fixed.

It is now possible to select the font used for plotting.  However,
only fonts supported by your GNUPLOT installation will work, other
fonts will be replaced by a default.  I have also added a possibility
to draw dashed lines with the plot subcommand EXTRA LINE, see the new
macro map17.

As always, editing the ocgnu.plt file after plotting (do not forget to
rename it as it is overwritten each time you plot!) is necessary for
plots to be published.  GNUPLOT has a lot of facilities that OC cannot
provide when used interactivly.

There are some updates in the TQlib/Cpp directory for those interested
in using OC as a library in an application software.  I have tried to
update the Cpp/Scheil example.  For Windows a new command file,
"makeocasi" has been added to create a library "libocasi.a" (excluding
the "tinyfilesialogs").  This library must be created before trying to
link the Scheil program.  Probably a similar change is needed for
Linux but I cannot test that.

2020.02.04 OC version 5.058: Finally some improvement of mapping but
as always some diagrams are worse.  There is many things still to fix.

A stronger check of ambiguous phase names in TDB files has been
introduced.  At present only as a warning but in a future version
phase names that are not unique will cause errors.  Do not forget to
change the phase name also in all parameters!  There are several
changes related to database management that will be documented
sometime in the future.  I working on a new database format which is
more flexible and less cryptic than the current TDB format.

2020.01.14 OC version 5.057: I am still trying to improve mapping of
binary and ternary diagrams with "tie-lines in the plane" as such
diagrams are the ones most frequently calculated by students and for
assessments but I have not managed to improve much.  Calculating
multicomponent isopleths is usually much easier unless you have many
phases with fixed composition.  But I have changed many things and I
want to update the github version as a backup if I make things even
worse.

For the future I have decided to abandon the "direct" format for
saving and is preparing to extend saving of step/map results on the
UNFORMATTED file, OC seems to cope with quite large results without
the need for intermediate storing on files.

I am changing the commands for plotting also but I have not yet
decided on a final set of command.  Be careful with macro files!

I you need to set a logfile give the name of the file on the same line
as the command, for example "set log mylogfile.log".  The file browser
does not always manage to open a file for writing.

The output during an equilibrium calclation has changed to give the
name of the phase that is added (+) or removed (-) at an iteration.  I
hope it will make it easier to improve this tricky part of the code.

The routine to calculate the stability of a phase has changed (used in
macro step2).

2019.12.02 OC version 5.056: If you mainly use OC to calculate binary
and ternary phase diagram DO NOT INSTALL THIS VERSION.  I have worked
with the equilibrium calculations to make them more stable and faster
but the step/map now fails in some cases, in particular when there are
several stoichiometric phases, for example the O-U phase diagram (map4
macro) or complex ordering (map13 macro).

The reason for these problem is that several additional features has
been added to calculate multicomponent (>10 elements) equilibria with
better convergence and speed.  I will to work to improve the mapping
next but I have only two hands and one head so it may take same time.

The terminal "X11" has been added as optional GNUPLOT terminal for
Linux systems, you can select this in the Makefile.  Some confusion in
pmon6/smp/smp2 source code about the plot devices has been sorted out.

I provide a special makefile for MacOS (because Apple has removed the
/usr/include directory) which I forgot in the last update.

One can remove stop in macros at "@&" with the command
"set advanced no_macro_stop Y".  Anything else than Y will restore the
stop.

The linkocdate program has been removed as I can compile the date for
linking the program directly in the main program.  This changes the
Makefiles and linkmake and linkpara on Windows.

A subtle problem is what reference state to use for integral
properties like H and G if the elements have different referaence
states.  By default SER (the stable state at 298.15K and 1 bar) is
used as reerence state but often the reference state for C or O is set
to graphite or gas at the current T in order to have aa reasonable
chemical potential.  But such a change should not affect the value of
the enthalpy, H.  But if one has measured the enthalpy of mixing of a
phase in a binary system the reference state for all elements is set
to that phase.  In OC I have now added that if the reference state is
different for the elements I use SER for the integral properties.
Only if all elements have the same reference state the values of an
integral properties like H will be relative to the pure elements in
that phase at the specified T.

Some problems with normallized state variables like NPM and BPW has
been fixed.

2019.11.07 OC version 5.055: After installing MacOS Catalina on my Mac
the Makefile I provide with OC broke.  The GNU C compiler could not
find the necessary systems files /usr/include because Apple evidently
does not like software they do not provide themselves.  So now there
is a special Makefile-MacOS which uses Apple's "cc" compiler.

For application software developers I have also updated some files in
the application directory TQ4lib/F90/.  The liboctq.F90 now contains
two extra dummy modules that are used in the interactive program but
not needed for applications.  The F90/crfe directory example is
updated, the other will be soon I hope.  I am not able to update the
Cpp examples as I do not know C++, anyone who does is welcome to help.
The TQ3lib-clean has been removed.

2019.10.10 OC version 5.054: I have introduced a command DEBUG SYMBOL
<symbol> <value> used in my test macros to have a hard stop if the
value of a symbol is not the same (6 significant digits) as in
previous versions.

The set of stable phases is now restored after "step separate".

I have made an attempt to speed up calculations but unless you
calculate with 10 or more elements it will have very little influence.

2019.09.30 OC version 5.053: A new command to calculate the
equilibrium for a system with many components and phases which has
convergence problem: CALCULATE BOSSES_METHOD (or c b).  This command
requires that the grid minimizer can be used, (i.e conditions on T, P
and the amounts or fractions of components only) because the first
step is to use just the grid minimizer.
- In the second step all phases except those set as stable by the grid
minimizer are suspended and the equilibrium calculated with the
iterative algorithm.  Normally this will not be any problem.
- Step 3 is to set all suspended phases as dormant and calculate again
with the iterative method.  Any phase which is dormant but should be
stable will then have a positive driving force.
- In step 4 the dormant phase (if any) with the most positive driving
force will be set as entered and the equilibrium calculated again with
the iterative method.  Step 4 is repeated until no dormant phase has a
positive driving force.

The remaining dormant phases will then be set as entered and the
equilibrium calculation has hopefully converged.  This should be a
more stable way to calculate a complex equilibrium.

The save/read unformatted feature has been changed to make it possible
to save direcly to some allocated memory.  It should make it a bit
faster using this feature in a simulation.  For saving on files it
works as before.

The minimum number of iterations between changing the set of stable
phases is decreased from 5 to 4.  It may speed up some cases but
report problems!

2019.09.16 OC version 5.052: Chasing a bug: I am trying to implement a
connection between symbols and TP functions needed for assessments.
But suddenly my tests using OC crashed inside lmdif without it having
been touched.  I naturally belived this had to do with my other
changes but finally it turned out to be a bug I introduced in lmdif
many years ago in order to have regular outputs from lmdif.  I had
misspelled a variable (I forgot this routine had not IMPLICT NONE as I
had converted it from an F77 version).  Evidently for several years
this mispelled variable had been assigned an arbitrary value which had
no influence but now it suddenly created a crash that took 6 intense
hours to find and fix.

The symbol properties and the amend symbol command is changing.  The
change is still being tested but if you have problems please report.
The intention is to be able to transfer values from TP functions (or
optimizing parameters to state variable symbols and vice versa.

Finally I was told that I must use Garamond Bold for the OC logo, not
Garamond bold... very subtle.

2019.08.26 OC version 5.051: Finally a new facility for the users, I
have implemented calculation of the T-zero point where two phases have
the same Gibbs energy at the same T, P and composition.  This is
interesting as a limit of a diffusionless transformation like
martensite.  To simulate a nucleation energy the T0 temperature of one
phase can be offset by a certain energy with the command "AMEND PHASE
<phase name> GADD" to add a Gibbs energy to one of the¨phases.

To do this I needed a solver for non-linear equations and I use HYBRD
from the MINPACK package.  I already use the LMDIF routine from the
same package for the assessments.  Thanks to ANL and the University of
Chicago to provide these.  There were some difficulties to merge these
routines as I originally had not managed to use "external" subroutines
in calls (partially because the MODULE concept makes it impossible to
call routines outside the module or in a submodule).  It was a bit
trial and error until I managed to link everyting in correct order and
run all the tests.

This has required changes in the Makefile and the files to compile and
link on Windows.  I have test this on Windows, 2 Linux dialects and
MacOS but please give me feedback on any problems.

Otherwise there are some minor fixes with the user interface and
manuals, I have even updated the help files for the T-zero command!

2019.08.26 OC version 5.050: A few minor changes mainly for the popup
help facility.  The User Guide and some of the installation guides
have been updated.  With the popup help it is worth while to improve
this.

2019.08.14 OC version 5.049: A revision of the PLOT command has been
made.  The option were very confusing and badly organized.  Now a
"submenu" EXTRA has been added for less frequent plot options like
Gibbs triangle, logscale and some others.  Please use the new online
help facility to explore this.  With the new subcommand feature it
will be easier to extend the plot options without creating confusing
combinations.

For the online help facility you must create an environment variable
OCHOME which should be the path to the directory where you have the
ochelp.html file.  In the download this file is in he manual/
directory.

To understand the new plot commands you can also look at some of the
macro files, for example map10.OCM.  Basically the change is that some
of the plot options require a subcommand EXTRA in front of the
previous option, for example "extra Gibbs-triangle y"

2019.08.11 OC version 5.048: A major change in the online help has
been made.  Previously a complicated way trying to keep trace of the
commands was used to provide help and the help text was written on the
same screen as the program.  Now each question for user input is
associated with an HTML "hypertarget" to find the position in the user
guide that can provide relevant help.  The help text is provided in a
separate browser window using Windows explorer or firefox.  The user
may seach the whole user guide in this window.  But it requires a
proper installation of the help facility and the environment
varaiable, there is a separate installation guide for the help.

At present the update of the user guide is not complete but most
features should work.  On the command level a simple ? gives the manu
but two ?? will open the browser at the same menu.  The user can
scroll this back and forth in the browser window to find additional
information.  If you have any problems or suggestions using the new
online help please give feedback.

2019.08.03 OC version 5.047: The metlib package has now been updated
completely to the new Fortran standard and for example uses IMPLICIT
NONE in all routines.  There are still things to fix but it is now
possible to trace changes.  I was worried that some of the WPACK
routines would create difficulties as I sometimes transfer argument
with the wrong types.

PLEASE REPORT ANY PROBLEMS!

2019.08.03 OC version 5.046: In this release there is a new metlib
utility package called metlib4.F90.  Please check that all things you
need is still working!  I have modified the Makefile and
linkpara/linkmake but there can still be things which does not work.

I am trying to clean up a lot of things in the code when I am
documenting it and one headache has been the metlib package which is
basically written in F77 and just polished up a little to fit in the
new Fortran standard as a module.  Several strange problems poped up
when I tried to remove old code such as having to rename the "getkey"
routine (used on Linux to allow command line editing by providing
character by character input).  This routine calls a C routine written
by John S. Urban in 2009 together with an iso-C interface.  I have not
touched that routine but with the modifications made in metlib (to be
conforming with the new Fortran) the Makefile on Linux refused to find
this routine.  Not until I got the idea to rename the routine to
getkex (and declare it as a character function in the interface) I
could link the "getkex" routine with the rest of OC.  On Windows I had
no problems as it is not used, Windows provides command line editing
by default.  In metlib4 I have got rid of all ENTRY statements which
are depreciated but I may have introduced new (and old) errors.

I also discovered a bug I introduced in the previous release, it is
now fixed.

2019.07.31 OC version 5.045: The possibility to set a condition on a
constituent fraction has been extended to allow axpressions which is
necessary to calculate a 2nd order transition when the fractions of
the same element in two sublattice has a small difference.  I have
added a macro for this, step9.OCM, where I also test a new expression
for the SRO parameter.  This is still not perfect but it can be
improved.

I have also spent some time to improve my documentation software as it
is now almost 3 years since I updated the OC documentation and I am
beginning to forget things.  The model package, gtp, is the largest
and most complicated part of OC and there is now a new PDF file which
is (almost) up to date.

2019.07.22 OC version 5.044: I have added a possibility to set a
condition of a constituent (site) fraction of a phase.  An example
using this has been added to the STEP8 macro, setting the constituent
fraction of H2O in a gas phase.  Note that in an ideal gas phase the
fraction of a molecule should be equal to its partial pressure.  At
present it does not work to redefine the components in order to make,
for example, a species such as H2O1 to a component.  But setting a
condition the fraction of a gas molecule is the same as to set its
partial pressure when the gas is ideal.

A minor bug setting reference states has also been fixed.  I have also
added a function MAX1(X) that can be used in a TP function or
parameter.  This function will be equal to X as long as X is less or
equal to one.  If X is larger than 1.0 then MAX1(X) will be 1.0.  If X
is a function of T and P the derivatives of MAX1(X) will be 0.0 if X
is larger than 1.0.  The intention is to prevent extrapolations of
parameters that may make a metastable phase stable at very low T.
Great care must be taken to avoid that the MAX1 function affects the
properties of a stable phase.

Maybe it will be a useful to implement a feature that prevents phases
with negative configurational entropy to become stable?

2019.07.03 OC version 5.043: The metlib library which is used for the
user interface and many other utilities in OC was written more than 30
years ago in the old F77 standard.  It contains features that are
depreciated in the new Fortan and I am trying to remove them when I
have time.  But sometimes these cause errors compiling with different
Fortran compilers and please let me know about this. I just removed 3
cases of "computed goto" reported by Benjami Sabatini because in the
2018 standard they are no longer allowed.

A bug that caused phase fractions not to be plotted if the phase was
not the only stable one was detected by Frank Niessen has been fixed.
Fractions of components or constituents of a phase are only plotted in
the stable range of the phase.  I will add that such fractions will be
plotted with dashed lines in the metastable range (when I have time).
See the macro STEP1 for an example.

2019.06.04 OC version 5.042: The gridminimizer will now try to merge
gridpoints in the same phase to speed up the following iterative
calculation and to avoid creating unnecessary composition set.  There
is a risk this change will mean that some miscibility gaps are not
detected, please report if you have any problem with this!  The
merging can be turned off by the commands:

set advanced level Y
set bit global 4

NOTE also: the command "set level" has been removed but there is
instead an identical "set advanced level".

Many other minor changes has also been made, for example if you enter
an addition by the "amend phase" command you will now be asked if the
addition is "calculated per mole atoms" and if you answer Y the
addition will be multiplied with the current number of moles of the
phase.  This is important for the "magnetic" and "lowT CP" additions.

Finally a routine used to index a symmetric array, has in some
time-critical places been replaced by a simpler mechanism.

2019.05.16 OC version 5.041: Disscussions with Clement Introini,
Romain Le Tellier and Jean-Christophe Dumas at CEA, Cadarache have
thrown some light on the functions of the the grid minimizer and a
number of changes has been made, maybe even a paper published.
Several updates of the grid minimizer and other things will come in
the following weeks.

The command SET ADVANCED SMALL_GRID has been replace by SET ADVANCED
GRID 0.  This command now has 3 levels, 0, 1 and 2.  The value 2 is
for a dense grid with about 5 times more gridpoints than level 1.
Level 1 has about 5 times more gridpoints then level 0 (when there are
many gridpoints).

I am very grateful to Matthias Stratman at RUB, Bochum, Germany to
provide updates of the examples of OCASI on the TQ4lib directory.
Including a Makefile to simplify compiling and linking on Linux.

Finally I have changed and modified the LIST ACTIVE-EQUIL command which
should be useful in assessments.  It lists the equilibria with
weight>0.0, i.e. those which are currently used for optimization.

2019.05.07 OC version 5.040: The filebrowser in OC works reasonably on
Windows but there are problems on other OS.  I hope I have fixed a
small problem with captial letters for the extension, by default all
OC file extentions are assumed to be CAPTIAL LETTERS except Gnuplot
"plt".  On Windows that is not important but on Linux it makes a
difference.  If anyone can provide a better, simple and free platform
independent filebrowser please let me know.

I have added "save unformatted" of some new additions like liquid
2-state model and Einstein solid.  I also added a warning if a
parameter for an addition is entered but no "amend phase" for such an
addition has been made.  A phase with an addition but without any
associated parameter is no longer listed with the "list data" command.

2019.04.21 OC version 5.039: I have now modified plotting with several
dependent functions like STEP but also MAP when there are tie-lines in
the plane.  Previously I repeated all data for each line plotted which
made the ocgnu.plt file very large and difficult to handle.  With help
from "stackoverflow" I learned that I can write the matrix with data
once in the ocgnu.plt file with a name which can later be used several
times in a "plot for" command in GNUPLOT.

THIS CHANGE REQUIRES GNUPLOT 5.0 or later for plotting.

A problem with this change is that appending a plotfile I will not
have the same scaling on the data in the append file.  After some
reading of the GNUPLOT manual forwards and backwards I found that I
can save the autoscaled X and Y values from the first plot with a
"writeback" option to "set x/yrange" and then set these as scaling for
the next plot of the appended data.  Very smart and quite difficult to
dig up.

There has also been some interest to use OC for teaching and as I
mainly thought of skilled users while OC has been developed I will add
some facilities to simplify calculations of phase diagrams (several
automatic start points).  I have also added a DATABSE_INFO in the
multicomponent databases provided with OC which will be written when
reading these database to warn against calculation of unassessed
systems.

2019.04.15 OC version 5.038: I plan to make a major change plotting
and that requires version 5 of GNUPLOT or later.  PLease make sure you
use that for plotting, it has been around since 2017.

A number of minor changes for assessments has been made generating
better graphics for the plot_data overlays of experimental data.

I am also going to put some efforts into improving the grids for the
grid minimizer to allow more flexible setting of the grid densities.
For some cases with ionic constituents the grid has been far too
dense.  There has also been some tests showing it will be possible to
speed up the iterative calculations.  The improvements of step and map
is also high on the list of things to do but this time there are none.

2019.03.28 OC version 5.037: The correlation matrix and the Relative
Standard Deviation (RSD) now seems to work during assessments.  I have
also added a new command LIST NONZERO_EQUIL to list only equilibria
with weight>0, the command LIST EQUIL lists all equilibria.  Some
problems with uncertainties for experiments fixed.

2019.03.24 OC version 5.036: For assessments the correlation matrix
and the Relative Standard Deviation (RSD) for each parameter are
important and I think they now are calculated correctly.

2019.03.22 OC version 5.035: A bug that made results from STEP
calculations disappear when several STEP commands were made without a
plotting in between has been fixed.  Thanks Nath to discover this.

2019.03.17 OC version 5.034: My presentation of OC at the TMS
conference recieved some nice attention.  But I also got some
feedback about things missing or that does not work and fixing that
sometimes crashes some of my test macros.  Suck.  I have changed the
command SET T_AND_P as it was easily misunderstood, now it is SET
INITIAL_T_AND_P because it can only be used to provide start values
when there is no condition on T or P or when using CALC PHASE.

I have also added a possibility to have a scaling factor for the
property on the axis to be plotted, simply add a factor in front of
the state variable to plot like "plot x(mo) 0.001*gm(*)" and the
values plotted will be kJ/mol rather than J/mol.

For future extensions I have also added a command SET SYSTEM_PARAMETER
although there are none as yet ... and such parameters must be saved
on any unformatted file used and the unformatted file is VERY fragile.
And such a file should be backward compatible like the POLY files in
Thermo-Calc.  Luckily it is not possible to save step/map results
(yet) but the unformatted files are useful for assessment
(corresponding to a PAR file in PARROT).  A bug that one had to SET
RANGE before saving any coefficients to be assessed has been fixed.

I have modified the equi-entropy criterion implementation that is
needed for the new unary database.  It requires a new command, SET
ADVANCED EET.  We are writing a paper to explain this method of
handling the extrapolation of the Gibbs energy of the solid phases to
high T.

2019.03.07 OC version 5.033: A few more fixes for the plotting.
Please note that the "ocgnu.plt" file generated by OC for a plot can
be edited and a lot of thing can be changed or added manually to
obtain a satifactory plot.  After using GNUPLOT 7 years I also noted
that one can generate a PDF file from the screen window!

2019.03.05 OC version 5.032: GNUPLOT is a very nice and flexible
software proving graphics output for OC and I am still learning its
facilities.  The fonts used for the graphics has been small, OK on the
screen but too small for publications.  Now I have learned how to set
larger fonts and changed the default font to "ariel,16" which I think
is better for publications.  You can select font and size yourself
using the "enter gnuplot-terminal".  For plotting texts and labels of
lines it is possible to select different size of the text, see the
examples.

2019.02.18 OC version 5.031: A working version of the UNIQUAC model
for fluides and polymers has finally been implemented.  There is a new
macro file which explains how to enter this phase and its model
parameters.  As usual there are difficulties with step and map
commands.  A number of minor bugs have also be removed.

2019.01.15 OC version 5.030: A test version of the corrected
quasichemical model from 2009 has finally been implemented.  There are
still problems but they will be addressed shortly (hopefully).

2019.01.07 OC version 5.029: A test version of the uniquac model for
polmeric solutions has been implemented.  The list of model parameter
identifiers has been changed again.

2018.12.20 OC version 5.028: A number of minor modifications to
accomodate the UNIQUAC model.  However, this required changes of the
"model parameter identifiers" and the "unformatted" saving of data
which make older unformatted files no longer readable.

2018.12.09 OC version 5.027: A whole month without updates!  A new
compiler option for compiling on LINUX for the smp.F90, -Dnotwin in
the Makefile.  Remove this if you use the Makefile on Windows.  The
intention is to allow spawning plots.  Some bugfixes and a first step
has been made to implement the uniquac model.

2018.10.24 OC version 5.026: The default when plotting has been
changed to KEEP so you no longer has to click in the diagram to
continue giving commands in OC.  This means you can have several plot
windows at the same time.  If you click in the plot window it will
close.  If you want to change back to the old way you can use the plot
option "miscellaneous" or dig into the source code of the
userif/pmon6.F90 and commenting away the line:
graphopt%status=ibset(graphopt%status,GRKEEP) in two places.

OC gives a warning if you have not set a browser for on-line help.
On Windows the browser is by default explorer, on LINUX firefox.  You
can change these in the userif/pmon6.F90 file.  Search for "browser="
to find the place to change.  On Windows you must provide a full path.

I have corrected a problem pointed out by Jan Herrnring in
enter\_equilibrium and its TQ equivalent, tqcceq, that sometimes two
equilibria were created.

2018.10.03 OC version 5.025: I have modified the opening of the
browser window for help so one can continue running the program
without closing the window.  Asking for help again opens a new browser
tag on Linux but a new window on Windows (of course).

I have adopted this feature also for spawning plots, the plot option
"miscellaneous" has a question if the plot should be spawned and if
the answer is Y the plot window will be kept and the user can continue
calculate or generate several plots.  The window is kept until
explicitly closed by clicking in the window.  The miscellaneous option
also allows adding a text in the lower left corner of a plot.

2018.09.19 OC version 5.024: Another very quick update for the
calculation of isothermal section.  Two new macros added, one for an
isothermal section of Cr-Fe-Mo and the other for Mo-Ni-Re at 3
temperatures (using the EBEF model).  However, the diagrams are not
always perfect.

As I have found there are strong feelings about the color of
monovariants and tie-lines, the plot option "font_and_color" now
allows the user to select the color of the monovariant triangles and
the tie-lines.  See the new map14 and map15 macros.

Some other minor bugs fixed, for example that if you mapped twice
keeping the first map results it was not possible to plot both
together.  I also added some information in the ocgnu.plt file to
facilitate editing away wrong extrapolations from the plot.

2018.09.16 OC version 5.023: A very quick update to provide a
significant improvement when mapping isothermal sections.  It is still
not perfect but I want to provide this version for testing.

2018.09.14 OC version 5.022: OC now allows calculations down to T and
P values of 0.01 K/Pa.  I am also working with the online help
facilities and will provide the ochelp file in 3 versions, LaTeX, PDF
and HTML on the directory manual/ but this is still not finished.  It
requires that the user creates an environment variable OCHOME pointing
to a specific directory and he/she must copy the help files to this
directory.  There is a new "install-help-popup" PDF file in the
installation directory because it is not trivial to add an environment
variable for many users.

2018.09.07 OC version 5.021: Still changing the color of monovariant
areas ... now dark green.  I have also made small modifications of the
installation files both on Windows and on UNIX type systems.

I have implemented a facility to open a browser window for online help
and am fairly happy with this.  At present it is turned off by default
as there are some problems and the user guide is not updated.  The
intention is that when you type a question mark "?" at a prompt or
whenever OC asks you a question you do not know how to answer, a
browser window will open and show you the relevant section of the user
guide.  Most answers are in the User Guide but no one reads it
voluntarily so better provide it in small pieces.  The user guide is
still not finished (as OC it will never be) but gradually it should
work.  On Windows I use the Explorer browser and on other system I
will use the firefox browser.  Three versions of the user guide,
ochelp.tex, ochelp.pdf and ochelp.html are initially in the manual/
directory but should be copied to the driectory your OCHOME
environment variable points to.

2018.09.03 OC version 5.020: The coloring of monovariant areas in
isothermal sections has now an established set of colors.  The borders
are drawn with a tick line with the same color as the tie-lines
(green) and the interior is filled with a light green.  Of course any
user/programmer can change this.  The mapping itself has not improved
very much in spite of serious efforts to make it more stable.  A
number of errors fixed and a few minor features added.

Someone tried to use the Scheil-Gulliver application in
TQ4lib/Cpp/Scheil and had some problems so this has been updated.  The
other OCASI/TQ applications are still on the (long) waiting list to be
be improved.

2018.08.19 OC version 5.019: The file selector window is now used also
for the options /output= and /append= that can be used after any
command to redirect output from that command.  I forgot those in the
previous release.

The installation procedure has been changed slightly, there is an
updated installation guide.  On Windows the "linkmake" and "linkpara"
now include the popup windows feature for open file.  To avoid these
use "linkmake-notinyfd" or "linkpara-notinyfd".  For UNIX systems the
"Makefile" include the popup windows, "tinyfd", and "getkey" to have
command line editing features.  The latter feature require that you
MUST remove a comment character "#" for your UNIX dialect.  Use
"Makefile-nogetkey" if you do not want the line editing feature.

I have changed some commands:
>> SAVE UNFORMATTED/DIRECT have no question "Comment" before asking
for the file name.  Having such a question made it impossible to
provide a file name on the same line as the command and thus the file
selector window was always activated even when running a macro where
the file name was provided.
>> SET BIT <global> bitnumber requires a final Y to set the bit.  If
you specify anything except Y the bit is cleared.  Previously this
command toggled the value so the result depended on the previous
setting of the bit.

Please tell me as aoon as possible if there are features in the user
interface you dislike.  It will be increasinly difficult to change
this as the number of users (creating macro files) increases.

It is difficult to provide a "default" behaviour that makes everyone
happy.  But if you dislike the the popup window you can supress it
with the command "set adv popup".

The opttest1 macro is completely revised and now show how to enter en
enthalpy difference between two or more equilibria and symbols for
experimental uncertainties.  A number of bugs had to be removed to fix
that of course.

The example of using the OCASI interface on the TQ4lib/F90/crfe
directory has been modified and the a Makefile added which should work
on linux platforms.  Note that one must have installed OC and created
the liboceq.a library before implementing the OCASI examples.

2018.07.25 OC version 5.018: In this version of OC I have added a
cross platform read/save popup window so the user can search
directories to find databases and other files.  I am happy for any
feedback.

In general I do not like GUI but providing full paths to files on a
command line is a pain so better to browse in a separate window.  I am
using a small C program called TINYFILEDIALOGS by Guillaume Vareille.
I have some problems with the Linux version, I use CentOS and I am not
really happy with the layout of the popup window.  I had to use
iso-c-binding to link it to my Fortran code and this limits the
flexibility a bit.

The compiling and linking is also a bit complicated on Linux as you
have to run a separate Makefile on the utilities/TINYFILEDIALOGS
directory, similar as for the GETKEY feature.

If you have problems with the popup window you can turn off this
feature with the command SET ADVANCED POPUP.  You can use the same
command to turn it on again.  The popup window is disabled when you
run a macro file.

There are subtle complications for example if you open a macro file on
another directory using the popup window and this macro opens files
then you must prefix the file name (with possible directory prefix) in
the macro with "./" if the file is on the same directory (or on a
lower directoty) as the macro file.  When OC finds the "./" prefix it
will replace this by the path to the macro file (which is saved inside
OC when you open the macro file).  Without the "./" OC will try to
open the file on the "working directory" where you started OC.  If the
file to be opened inside the macro is on a higher directoty you will
prefix that with "../" and in that case OC will prefix this with the
saved path to the macro file.  You can of course always give the full
path to the file but that is clumsy.

2018.06.30 OC version 5.017: Thanks to the inspiration from Catalina
Pineda, an MSc student at ICAMS at RUB in Germany, there is now a OC
logo on all OC plots.

I have also a new calc_dgdyterms routine which saves intermediate
values for all phases (previously only the 5 with most constituents
were saved) in a new allocatable array in the phase_varres record.  It
speeded up the allcost macro (with 20 components) some 20% (I noted
75% of the CPU time was spent in this routine, now just 25%).  The
fuelcalculations (with 15 components) were also slightly faster.  For
most calculations this change has no effect.

Finally a strange segmentation fault required half a days work to make
it disapper by itself.

2018.06.23 OC version 5.016: Mobilities are among the many different
kinds of model parameters that is available in OC but for simulating
diffusion they must be converted to diffusion coefficients.  I am
currently developing a new addition to calculate these using the
themodynamic factor.  This is to simplify the use of OC for simulation
of phase transformations, next week I will go to Bochum and meet Ingo
and Matthias.

I have spent some time deriving derivatives for the UNIQUAC model.
This model, contrary to most fluid models, has an integral Gibbs
energy expression even if I think the derived "activity coefficients"
are the most used and modeling activity coefficients leads to
inconsistencies.  Probably many modifications has also been made since
the model was published 1975.

I have also found and fixed a rather dangerous bug in the TPPFUN
package.  This package should be rewritten completely when I have
time.  One has to be very careful and not use complicated TP functions
and check that the TPFUNs are listed correctly!

2018.06.11 OC version 5.015: I have stared working on things needed
for assessments, like calculating a correlation matrix and relative
standard deviations (RSD) for the model parameters with the help of
Eva who is working on a thesis about assessments.  In the middle of
this I got strange segmentation errors at many different places but
after compiling with -lefence and -fcheck=all on my Linux version it
turned out that all was due to the fact I had given the wrong
dimensions to the MDINV subroutine in a call in pmon6.F90 for the
inverting a matrix to obtain the correlation matrix.  After correcting
this the faults disappeared (for this time).  Lesson: an programming
error can cause problems anywhere in the software.  However, the
correlation matrix is wrong so Eva has to teach me more about
statistics.  I have also added a few more commands to list results of
an assessment.

I also made a change for plotting isothermal sections when using
several start points but I had to revise this as plotting with a
single start point failed.  Strange ... I have to look at this again.

2018.06.06 OC version 5.014: A very quick update due to a demo.  Some
arguments to LMDIIF changed and increased storage in the grid
minimizer for a system with 19 elements and a phase with 48 charged
endmembers requiring more than 60000 gridpoints!  I have to look again
at the gridminimizer sometime.

2018.06.05 OC version 5.013: A long time without updates!  I have
worked on the unary models but there are still problems but I got some
nice feedbacks from the Calphad meeting in Mexico.

In this update I have modified the AMEND PHASE command separating out
all the ADDITIONS like magnetism, Einstein solid, liquid twostate
model etc so if you have macro files with AMEND PHASE you may need to
edit them.  There is no change reading TDB files but it is not
possible to enter an Einstein model or liquid two-state model from a
TDB file because the way to do this has not been defined in the TDB
file.  Just having a THETA or GD parameter in the TDB file is not
enough.

The number of additions seems to grow very fast with the development
of new unaries.  The reading of TDB files has not changed but the TDB
files cannot cope with these new models.  I will make an update of the
PDB format to include these.

Some convergence problems have been reported and I have increased the
convergence criterium related to detecting if unstable phases will
become stable.  I have also made it possible for the user to change
this by adding a 3rd question in the command SET NUMERIC_OPTION.  The
default is now 0.004.  Previously it was 0.05 but this value failed to
find the stable set of phases in some cases.  The lower value will
lead to a few more iterations.  You may restore the old value if you
have no problems using that.

The change also affects the UNFORMATTED save file, you will not be
able to use UNFORMATTED files written with previous versions with the
new version.  Always keep macro files to replace files that you want
to save and read UNFORMATTED.

The table with MODEL_PARAMETER_ID has also changed again and a new
function has been added to obtain the index of a model parameter
identifier, mpi=GET_MPI_INDEX(char) where char is a 4 character string
with the model parameter identifier.  The value of "mpi" is needed to
find the value of the model parameter in the
ceq%phase_varres(lokph)%gval array.  The change makes it easier to
handle future changes in the list of identifiers as this list will
certainly grow.  Note that "mpi" for parameters with constituent index
should be mulitiplied with 100 as the constituent index is stored in
the first two digits.

2018.04.18 OC version 5.012: A small but very irritating bug for the
user i/f and another bug plotting isothermal sectione fixed.  But no
fear, there are a lot of more bugs to fix when mapping and plotting
with tie-lines in the plane.

2018.04.17 OC version 5.011: The convergence criteria has been changed
slightly again because there were troubles with some macros.
Otherwise I have worked with the unary models and the mapping, without
much success for the moment.

2018.04.03 OC version 5.010: I have increased the convergence criteria
slightly due to a case Nathalie showed me, it means a few more
iterations in some cases when the Gibbs energy surface is rather flat.
I have also improved the way OC finds startpoints for mapping in
isothermal sections and changed some of the colors used for plotting,
tie-lines and monovariant lines in isothermal sections are now golden.
But one can still not start a mapping inside an invariant isothermal
section, maybe in next release.

2018.03.23 OC version 5.009: With the help of Nathalie Dupin I found
and fixed a bug in the grid minimizer which set the wrong constitution
of the metastable ordered BCC.  The bug made it completely empty with
vacancies on all sublattices.  This change may cause converge problems
in other systems so please check and report any problems.

2018.03.21 OC version 5.008: I have learned a bit more about GNUPLOT
and managed to romve the line at zero in some STEP and MAP diagrams.
It made figure 3 of step1 macro (plotting Cr content in stanle phases)
slightly worse though as some lines ends without decending to zero.
So there is more to learn ...

I have also made the last fixes (I hope) of the TDB2DAT converter and
tested converting the whole TAFID database (41 elements) with no
obvious errors and even managed to calculate an equilibrium.  But
there are certainly minor bugs here and there.  Entropy must never be
zero.  As the TDB file may contain many unassessed endmember
parameters there is a special check added to indicate missing
endmembers.  But these must be added by someone knowing the database.

2018.03.10 OC version 5.007: A minor bug concerning composition
dependent ternary excess parameters in the ionic liquid fixed.  There
is still a problem with composition dependent ternary cation
interactions.  Another bug plotting constituent fractions also fixed.

There is also an unfinished problem with the delete equilibrium
routine, if there are "holes" in the eqlista array these may cause
trouble.  Be careful and always delete equilibria from the end!

The workspace allocated for UNFORMATTED save has been adjusted to the
size of the current system as the large default size sometimes created
memory problems.  If this causes problem you can modify the size,
"miws" in the gtp3E.F90 file.

2018.03.01 OC version 5.006: A visit at CEA Cadarache gave inspiration
as they were happy with the speed of calculations and in particular
the possibility to save/read complex calculations on UNFORMATTED
Fortran files during simulations of nuclear fuels with more than 15
components.

I have managed to reduce the memory loss during STEP/MAP using
valgrind.  Evidently the Fortran compiler allows and the run time
system manages to deallocate data that has been allocated by a pointer
variable, a few years ago I was told that was not possible.  That
simplifies eliminating memory leaks as I must sometimes allocate
records for a pointer when creating lists.

But running all tests I had strange crashes with the NEW command when
releasing allocated memory.  I had to make some careful modifications
also in the command monitor.  It crashed differently on Windows and
Linux but finally I managed to run all tests on both machines without
running out of memory and no segmentaton faults.  Previously I always
had "allocation larger than available memory" at the end of the new
large opttest2 macro.  But reducing memory leaks during assessments is
still on the to-do list.

2018.02.26 OC version 5.005: Running valgrind again shows a lot of
problems that have to be fixed, in particular memory leaks when using
STEP and MAP.  It will take some time but some are corrected in this
release.  The opttest2 macro has been extended.  LIST RESULT has two
additional options, 10 and 11, to list a phase constitution based on
the amount of the phase similar to FactSage output.

2018.02.23 OC version 5.004: Many changes has been made in the
assessment part of OC as a PhD student at Toulouse, Eva Lawraene, has
started to work on this with support from Christine Gueneau at CEA.
Finally there is hope to have a better software for developing
thermodynamic databases.

2018.02.20 OC version 5.003: Some contributions from Clement Introini
eliminating uninitiated variables added.  The TDB to DAT file
converter tested to convert correctly Ce-O-Pu-U from the TAFID
database.

2018.02.18 OC version 5.002: Several tests using for example
-Wmaybe-uninitiate and -lefence compiler directive on Linux has cleand
up some spurious errors and increased the stability.  The assessment
macro has also been extended and modified.

2018.02.14 OC version 5.001: For this first update I have added new
versions of the "getting-started", "news-OC5" and the "OC5-Macros".
The remaining documentation is still old.

I have also implemented the "dot derivative" MU(A).T to calculate the
T derivative of the chemical potential of A.  This is also known as
the (negative of the) partial entropy.  The partial enthalpy is
property that can be measured and is obtained as "MU(A)-T*MU(A).T"
(the same as H = G+T*S = G-T*G.T).  I am looking at implementing
X(LIQ,A).T which can be useful simulating phase transformations.
These dot derivatives can be calculated without numerical derivation
using the second derivatives from an equilibrium calculation.

For LINUX users I have also included the arrow keys on most modern
keyboard to be used for command line editing. Arrow up means previous
line in history, down means next history line, arrow forward means
forward one step on current line and arrow backward means back one
step on current line.  On modern keyboards these keys give a sequence
of characters, not a single one.  On older computers they may not
work.  If you have redefined your keyboard you may have surprises.

2018.02.10 *** OC version 5: This is a prerelease of version 5. ***
With the significant improvements of calculation of phase diagrams
with tie-lines in the plane, the new SHOW command, the possibility to
write DAT files for FactSage, command line editing on Linux and many
other things it is time to release a new version.  Most of the
documentation has not been updated.

******************************************************************** 2018

2018.02.02 OC version 4.044: By popular demand the SHOW command has
now been implemented.  It combines 3 commands, "LIST STATE_VARIABLE",
"LIST MODEL_PARAM_VALUE" (i.e. properties like Curie T) and "CALCULATE
SYMBOL".  The original commands remain.  After SHOW you can give
several symbols, state variables etc on the same line (separated by
spaces NOT commas) and get their values listed on separate lines.  You
can also use state variables with wildcards like X(FCC,*).  However, I
discovered a problem that I am not sure I can fix very quickly, the
command "SHOW X(*,CR)" (and similar) asking for the composition of CR
in all phases lists the CR content in all stable phases but the
heading with state variable symbols sometimes lists all phases.

By request I also changed the prompt of OC to be --->OC4: to make it
easier so separate the input lines on the screen from output.  This is
for a test, if you do not like it is easy to change in the
userif/pmon6.F90 file.

I am now almost satisfied with the mapping of phase diagrams with
tie-lines in the plane but there are always things to improve.  The
mapping is sensitive to the startpoint and I have not implemented
automatic start points.  For the graphics there is nore to do and
feedback is nice to have.

2018.01.31 OC version 4.043: I have improved the mapping of phase
diagrams with tie-lines in the plane (i.e. most binary diagrams and
isothermal sections).  However there are still problems and I will try
to improve these diagrams in the next releases.  The previous mapping
is used for isopleths and can be selected by setting global bit 21 if
you are an expert.

There has been many other changes and bugfixes.

2018.01.17 OC version 4.042: IMPORTANT! Change for the STEP command!
I have changed the order of questions for the STEP command.  Now the
program will first ask if the stepping should be
NORMAL/SEPARATE/CONDITIONAL/QUIT
before asking if any previous results should be kept.  The conditional
step is not yet implemented.

Many changes and bugs fixed in order to run the complete CuMg
assessment example (opttest2 is the start of that).

2018.01.09 OC version 4.041: There is a new ochelp.hlp and an
ochelp5.pdf.  This verson is rather a prerelease of version 5.

When I started on the udate of the user guide I realized that the
commands are quite messy, in particular about entering phases with
some specific model features.  So I moved many things that were set by
"set phase ... bit X" to "amend phase ... X".  It concerned things
like BCC/FCC_PERMUT in my macro files as most other macros calculate
systems read from a database.  The users may have to modify their
macro files entering data.

I have also cleaned up some of the code related to symbols.  I added that
"dot derivatives" are only calculated when requested explicitly and
fixed some problems with symbols that should be evaluated for a
specific equilibrium.

Finally the Linux/Mac command history function has been corrected.

2018.01.08 OC version 4.040: Plotting Gibbs Triangles has been
implemented during a delayed train trip.  It is still very rudimentary
but gives at least some indication of what is possilble.  The map10
macro now includes some triagular ternary isopleths.  The size of the
smp2.F90 file has also forced me to split it in two.

A spurious segmentation fault error in matsmin has been corrected.  It
was caused by some code introduced to speed up the calculation of new
fractions of the phases at each iteration in the subroutine
calc_dgdyterms1p.  This speedup should be further tested.  An error in
metlib3 when saving the first line of history has been corrected also,
it occured sometimes when starting OC followed by a macro file name.

On LINUX I have found that plotting several diagrams after each other
without a pause often are overwritten.  Thus I have modified the macro
files to have a pause (@&) in the macro file after each plot.  This
means one has to press RETURN in the command window after each plot.

2018.01.05 OC version 4.039: Handling some Linux/Windows pecularities:

When testing OC on a Linux computer with GNUPLOT 5.2 indicate the
terminal "wxt" used on Windows is unknown.  On Linus the "qt" terminal
can be used but my Windows antivirus program prevents me to use the
"qt" terminal.  This forced me to add preprocessor #ifdef statements
in the pmon6.F90 file.  Linking on Windows should use the "linkmake"
or "linkpara" command files which select -Dwin for the compilation of
pmon6.F90.  Linking on Linux using any of the Makefiles will
automatically include the qt and pdfcairo terminals.

Using Makefile-simple is the simplest way to compile and link OC.  For
those who understands makefiles (I do not) one can select various
compiler options in this file, default is -O2.

A new Makefile called Makefile+getkey includes emacs-style line
editing of the command line including history (ctrl-P/ctrl-N).  But it
requires a separate compilation of the getkey routine in the
utilities/GETKEY directory editing the Makefile according to your UNIX
dialect.  An expert can handle that.

The Makefile-sequential and Makefile-parallel are now obsolete but
will be kept for a while.  They include the option -Dwin when
compiling metlib3,F90 to avoid the emacs-style command editing.

2018.01.01 OC version 4.038: A small change in the user interface to
handle "," between commands and answers. It is recommended to just use
a space to separate a command and argument but questions where you
accept the default answer can be answered by a "," on the command
line.  But the treatment of a "," between the command and argument has
not been correct.  You may have to change some of your macro files to
fit the new way the user interface works.

I have also added names for the "additions" to the Gibbs energy from
magnetic, volume, liquid 2-state, low temperature heat capacity models
and others.  The contribution for those which are included for a phase
are listed with the command "CALCULATE PHASE ... ONLY-G".

For the graphics the user may now define his prefered plot devices
using the command "ENTER GNUPLOT_TERMINAL".  This allows you to modify
the defaults and add new devices.  I have also tried to improve the
graphics a bit but there are many things in GNUPLOT I have not
understood.  Anyone who knows how to make triangular diagrams are
welcome to help.

2017.12.12 OC version 4.037: a large number of bugs most of them
connected with creating and copying equilibrium records corrected.
These caused spurious segmentation faults.

2017.11.26 OC version 4.036: After my PC crashed I worked with OC for
a month on my Mac but I have now installed all on a new DELL.  Several
modifications for Linux and Mac has been made, some maybe not
consistent with previous versions.  Be careful when installing this
version.  There is now two versions of the metlib library, metlib3.F90
is the same as before but metlib4.F90 includes the GETKEY routine to
allow editing of the command line on Linux/MacOS.  This also requires
compilation of the getkey.c routine in the utilities/GETKEY
directory.

I am still working on problems converting TDB to DAT files, I hope to
finish that soon.  All other changes are minor.

2017.10.20 OC version 4.035: After a few weeks of work and vacations
a small bugfix in the TDB2DAT code for excess parameters.

2017.09.13 OC version 4.034: This time I have added a possibility to
edit the command line a la emacs and also to keep a short history of
commands.  That is always possible on Windows and as I am frustrated
with the fact that my MAC does not have the same I managed to find a C
routine that can read input character by character and allow editing.
To have this you have to follow the guide Why-and-Howto-stall-getkey
that is provided in the documentation directory.  Do not attempt this
unless you are an experienced UNIX user.

Otherwise some bugs has been fixed and modifications of the
quasichemical model.  I have also added possibilities to define more
GNUPLOT terminals, both in the source code and interactivly.  I am a
bit disappointed that the MAC does not have so many.

2017.09.13 OC version 4.033: A whole month without updates!  This time
there is a big thing, the "corrected quasichemical model" for liquids
has been implemented (adding some new bugs).  The model was published
2009 in Acta Mat by Hillert, Selleby and myself but it has never been
available in any software as TC never approved of it.  Now we will try
to use this model to assess a real system this time.  

OC is now being compiled and used on several different
hardware/OS/Fortran compilers by different users.  In some cases there
are errors like "segmentation faults" that I cannot reproduce running
the same macro file on my DELL with Windows and GNU Fortran.  I have
also discovered differences with the GNU Fortran on my MAC/Linux and
on Windows.  As you have access the source code please try to detect
more precisely where the error occurs so I can fix the code to avoid
also bugs in the compilers and OS.

2017.08.10 OC version 4.032: Added that one can change the relative
lengths of the plot axis and the axis labels.  The texts in the plot
can also be written at an angle.

2017.08.10 OC version 4.031: I found that changing an optimizing
parameter did not automatically force a recalculation of all TP
functions and model parameters depending on this but that is now fixed.

Alex van der Walle pointed out some non-standard Fortran statements
that has now been corrected.  He also provided a Makefile that should
be simpler to use, it is included as Makefile-simple.

2017.08.02 OC version 4.030: Started modifying the plotting to improve
STEP/MAP.  The call to ocplot2 simplified as most data are now stored
in the graphopt record.  BEWARE: the sub-commands to set the range of
an axis is now called SCALE_RANGES and asks for the axis, previously
there were individual sub-commands for the x and y axis.

I have added a map13 macro to calculate the Al-Ni system using the 4
sublattice model with partitioning and permutations.  There are
spurious segmentation faults when plotting after using several
STEP/MAP commands.  If you find this please send me a macro that
reproduces the error and necessary data file.

The speed pf calculations with OC 4.030 has been compared with the
first release of version 3 in 2016 and the current version is almost 3
times faster to calculate an equilibrium, without using
parallelization.  When parallelization can be used the clock time is
further reduced by a factor 3.

This is now a prerelease of version 5, I do not plan to make any
significant additions.  The rest of the year will be devoted to update
the documentation, the user guides and related things.

2017.07.26 OC version 4.029: Fixed a small bug dealing with ordering
and permutations.

2017.07.26 OC version 4.028: I have finally managed to handle the
phase diagram for Al-Ni with the 4 sublattice model for FCC and BCC
ordering.  There has been an error calculating the second derivatives
of G that have cause severe convergence problems.  I am not sure they
are correct but the convergence is now good.  Option B is also
finished although some parameters are still not allowed but I added a
few more parameters for option F (permutations in 4 sublattice
ordering model for FCC and HCP).  Beware, there may be errors!! Check
that the disordered state is properly disordered, exactly the same
constituent fractions in all sublattices and report problems (before I
forget the code).

2017.07.21 OC version 4.027: The implementation of option B is now
almost finished but beware of bugs and that I have not implemented all
possible parameters, only those that seems most useful.  I also found
that many parameters for option F (for FCC and HCP) ordering are
missing.  

Using a partitioned description for a phase in a TDB file requires
that the TYPE_DEF with the DISORDERD_PART must come before the
disordered phase is listed in the file.  If not that will also give a
warning but if not corrected the calculations will be wrong.

I have added a check for unknown keywords in the TDB file as some are
using TDB files from MatCalc and these include keywords related to
diffusion and interface energies that I cannot handle (yet).  If I get
a documentation how they should be implemented I will try.  Anyway
this check will often give warnings that can be ignored when reading a
TDB file.

2017.07.18 OC version 4.026: A number of minor changes and bugfixes.
Mapping should be a bit better.  I have also started implementing
option B for handling permutation of parameters in BCC phases with 4
sublattice ordering.  This means one only has to enter the unique
pararameters which significantly reduces the number of parameters in a
TDB file for example.

2017.06.20 OC version 4.025: Refined the check of external charge
balance.  Previously phases like (La+3)2(O-2)3 had the external change
balance bit set which sometimes caused "phase matrix ill-conditioned"
due to round off errors.  Phases which cannot be electrically neutral
due to the selection of elements, like (Cs+2)2(O-2)3 are automatically
suspended when read from the database.

2017.06.04 OC version 4.024: Many small changes.  The main addition is
a video how to install OC on Windows and Linux at:
https://www.youtube.com/watch?v=rsBDRJ-LYvI

2017.05.19 OC version 4.023: There was a severe memory leak as the
memory used by the TP functions was not deallocated with the NEW
command.  This has now been removed.  Applications that used repeated
NEW commands could crash due to lack of free memory.

A number of bugs has also meen eliminated, some caused by uninititiated
variables where valgrid again proved to be a useful tool.

2017.05.10 OC version 4.022: I have added a new calculate subcommand
"calculate with_check_after" or just "c w" which means the grid
minimizer will not be used before but after the iterative calculation.
As start values the iterative algorithm will use the previously
calculated results.  If the grid minimizer finds a phase with a
gridpoint below the calculated equilibrium that phase is automatically
added as stable and a new calculation made to find the global
equilibrium.  The "set advanced" command can now be used to set a
smaller grid.

2017.04.30 OC version 4.021: When the conditions does not allow using
the global gridminimizer before an equilibrium calculation there is
normally a test AFTER the calculation using the grid minimizer.  If
this test finds a gridpoint below the calculated equilibrium then
there is now automatically a new calculation made with this gridpoint
added as a stable phase.  The grid calculation after can also be
forced by setting the global bit 18 for example when using the "c n"
command (the "c n" command will use the previous results as start
point).  One can prevent this recalculation by setting the global bit
20. (These things will be added to the "SET ADVANCED" command when I
have time...).  One must be expert to set these bits, to become expert
set the global bit 2.

This feature is available also in the OCASI/TQ interface.  During a
simulation one normally does not use the gridminimizer at each
calculation but setting bit 18 now and again makes it possible to
detect if an equilibrium is correct.

2017.04.22 OC version 4.020: I have added that OC can have a macro
file name as "inline" argument when started.  Thus invoking OC with a
line "OC4 dothis" where "dothis" is a macro file with extention OCM
this macro file will start executing directly (after executing an
inital startup macro if you have any).  

I have also fixed the rather subtle bug when entering reciprocal
parameters and some more minor things.

2017.04.17 OC version 4.019: I have managed to make OC significantly
faster for multicomponent systems, in some cases a factor of 4, by
saving some intermediate values while generating the equilibrium
matrix.  However, this may cause some troubles when running in
parallel and maybe there are some memory leaks, I have not tested.  It
is possible to restore the old way to calculate by changing the
logical variable NOSAVE in the subroutine meq_sameset to TRUE, around
line 2866 in minimizer/matsmin.F90

I have problems entering some reciprocal parameters for the 4
sublattice FCC ordered phase.  I hope to fix that for the next
release.

2017.04.05 OC version 4.018: I am trying to make OC a bit faster for
some interested users, if OC is compiled with the "-O2" option it is
about 5 times faster compared with using "-finit-local-zero" and
"-fbounds-check".  But it also creates some problem, the macros "step5"
and "map5" fails.  I will look into that later.

I also fixed a problem whith the minimizer changing the set of stable
phases when the change involved the change of a stoichiometric phase
to a allotrope.  Adding the new allotrope ment to have two stable
phases with exactly the same composition which made the minimizer
crazy.  So now there is a check removing the other allotrope at the
same time.  It is a particular problem when dealing with a database
with many stoichiometric phases.  The version is now included in the
plot title and I added some lectures about OC in the documentation
directory and changed some other small things.

2017.03.24 OC version 4.017: The command "enter phase" is changed and
now requires a model specifed, reading from TDB files not changed.
Implementation of a new liquid quasichemical model has started an many
minor changes, the convergence using the 4 sublattice FCC ordering
model should be improved.  The format for save/read unformatted
changed so old files cannot be read.  The linkpara and
Makefile-parallel has been changed to compile without bound check and
with optimization.  Thus they are more likely to crash, it is a way to
discover bugs!

2017.03.04 OC version 4.016: Tested a few variant of factors for
generating the grid.  By request there is a global bit 19 that can be
used to select the original grid minimizer.  This can be considered as
a "less dense" grid.  I also added in the user interface and in
liboctq.F90 that if a calculation fails due to "too many iterations",
it calculates once again not using the grid minimizer.  For some
reason that seems to work better than just increasing the number of
iterations.

2017.03.02 OC version 4.015: Some problems using save/read unformatted
corrected and I modified the calculation of the second derivaties for
a phase with an order/disorder transition.  This seems to improve the
convergence but more testing needed.

2017.02.24 OC version 4.014: I have fixed the dense option for the
grid minimizer (NOTE ionic liquid and charged crystalline phases has
no dense grid (yet)).  The SET STATUS PHASE command is slightly
changed.  If a user gives just a phase name and no specific
composition set all composition sets for that phase will be given the
new status (unless FIX).  A few other minor bugs fixed.  This should
also work for the OCASI/TQ interface.

2017.02.16 I reallize that the model package is still version 3, not 4
so I have changed it to 3.20 rather than 4.10, although the text
documentation still calls it version 4.  It is only the OC version
number that is 4.  GTP is still waiting for the complete revision that
I have hoped to do for several years...

2017.02.15 Some major and many minor changes to make OC work with a
multicomponent fuel simulation for CEA.  A large memory leak when
reading databases was also removed using valgrind.

2017.02.09 I have written a new gridminimizer which is easier to
understand and fine-tune than the one I wrote 4 years ago.  I am not
sure it is better but at least I can now vary the intervals between
the gridpoints.  

2017.01.31 I have added a simple volume model using two paramaters
V=V0(x)*exp(VA(x,T)) same as in TC but without the bulk modulus
parameter.  I have also modified the reading of TDB files to be more
compatible with TC. A number of small bugs fixed also and I must start
rewriting the grid minimizer.

2017.01.26 Corrected a severe bug in the gridminimizer for ionic
liquid.  Version 4 of OC is now finished and I will start in version 5.

2017.01.25 I have worked with the ordering models to prepare a
discussion with Roger Reed and his student.  I have problems
calculating the 2nd derivatives of the ordered phase "as disordered"
which causes a converge problem when I use the 4 sublattice model.  I
tried a fix but then the calculations did not converge for the 2
sublattice model so I must derive the correct expression for the 2nd
derivatives.  TC has also problems with the same cases.

2017.01.17 Fixed a bug calculating ionic liquid with interactions
between vacancies and neutrals and another bug that one could not use
STEP several times to have several curves.  Some fixes when reading
the TDB files also.

2017.01.09 Many small and large changes.  Reading TDB files has been
improved so it handles some more TYPE_DEFS and also parameters for
neutrals in the ionic liquid model and phases with a disordered phase
set better.  But it is still necessary to have the typ_defs in a
specific order (which is also acceptable to TC itself).  The
gridminimizer has some changes but if they are improvements I am not
sure.  A bug calculating excess parameters with neutrals in the ionic
liquid has been removed.

2017.01.04 Fixed a bug that the amount of the set of stable phases
generated by the grid minimizer were wrong when the number of atoms
varied a lot in the phases. 

2017.01.01 There is a new grid minimizer for the ionic liquid that
works well for the 15 component system.  It treats the cations and
anions separately to limit the number of gridpoints generated.  Some
progress also for writing the DAT file format.

2016.12.05 Problems calculating the equilibrium for a 15 component
system has required several small modifications to find the correct
results.  I have fixed a problem when a phase with charged species did
not need external phase balance because all cations and anions had the
same change.  I discovered a problem that deleted composition sets did
not restore the free list for phase_varres records.  That is not fixed
as it is a bit complicated.  Markus Piro has helped me to understand
the DAT format but that part is not yet finished.

2016.12.05 I have stated writing code for output in DAT
(ChemSage/Solgasmix) formats.  It is a bit complicated with the TDB
functions that can call each other and have different temperature
ranges.

2016.11.30 It is now possible to save (unformatted) several equilibria
and the assessment record.  It means OC now can save an assessment on
a file similar to the PAR file for PARROT.  It is possible to continue
the assessment from the saved file.  The NEW command does not remove
the assessment record, it gives a warning but it seems not to cause
problems.

2016.11.23 A new macro to test SAVE is included.  Many small changes
and bugixes in particular I now use the old WPACK storc/loadc routines
rather than a new feature in Fortran 2003/8 to allocating a character,
which is not avalable in GNU Fortran 4.8.  I have also fixed some
problems calculating dot derivatives.

2016.11.18 The unformatted save is now almost finished.  I can save
the static data structure except some minor things and the first
equilibrium record with all calculated results and read all back and
continue calculating.  The first use of this feature is to save copies
of assessments when one has several equilibria and also weights and
model parameters.

Later I will try to extend it also to save results from STEP and MAP
calculations but for that I probably have to use direct (random) files
as I may run out of memory.

2016.11.15 I have started implementing save unformatted/direct by
converting the Fortran datastructure to the old integer format and
then write that on a file.  So far elements, species and TP functions
can be saved.  I think this is an absolutely necessary feature in
order to use OC in assessments.

2016.11.03 A general cleanup, the old macro directories have been
removed and the macro files for version 4 are directly on the maros/
directory.  The reading of parameters from TDB and PDB files have been
made more flexible.  Some problems using the order/disorder model have
also been fixed.  Work on the OCASI subroutines is ongoing but not yet
finished.

Christophe Sigli has provided an update of his Scheil simulation and
was happy that the new LAPACK/BLAS routines made his calculations
faster.  I have also added a second F90 example using TQ.

2016.10.22 Several updates have been made for the new PDB database
format.  There is a separate documentation for that available at the
github repository SGTE-PDB.  The macro map12 use this format.

I have also added the Inden-Xiong magnetic model with the "effective"
magnetic moment and separate Curie and Neel temperatures.

2016.09.22 Small fix in SMP and some changes in the documentation.

2016.09.20 Hard work on updating the documentation, I have done all
except the step/map/plot which I want to edit like a paper and the
OCASI documentation where I have to write some new code.  I have
started writing installation guides for different OS with the help of
Philippe Zeller.

An environment variable OCHOME has been introduced and on the directory
indicated by this variable one should have the ochelp.hlp file and one
can have a start.OCM file that is executed when the program starts and
an OCHOME/database directory which is searched for TDB databases if
user start the database name with "ocbase/" or "ocbase\"

Whenever I find a something difficult to explain in the documentation
I try to change the code but that will affect other parts of the
documentation.  Updating OC and the documentation in parallel is a bit
like playing a piece of 4 handed piano music all alone.

2016.09.13 The amend phase command can now add a constant G to a phase.

2016.09.10 A major change of the numerics has been made.  Now LAPACK
and BLAS are used for all numerical operations.  This has decreased
the computation time with almost 20%.  I provide a subset of LAPACK
and BLAS with OC compiled without specific adjustments to your
hardware.  If you have access to a LAPACK and BLAS library fitted to
your hardware please replace compiling the file oclablas.F90 by your
own library.

There are changes in all files compiling and linking OC.  If you want
to use your own LAPACK and BLAS routines you must make additional
changes to link that library and also changes in the ocnum.F90 to use
that library.

There is now also a possibility to calculate the eigenvalues of the
stability matrix using using Q(phase) and if the lowest value is
negative it means the calculation represents an unstable equilibrium
inside the spinodal.  Some minor improvements of STEP and MAP has also
been made.

2016.08.29 It is now possible to define other components than the
elements and calculate.  However, quasi-binary and ternary are still
problematic.  But I think the OC datastructure is now stable.  Time to
implement the unformatted save/read command.  And all documentation...
The paper about OCASI has been accepted for publication.

2016.08.29 A new directory TQ4lib has been added with updates of the
OC/TQ application software interface.  As yet only one test program
for F90 and one for C++ has been updated.

2016.08.26 A profiling showed that the routine to invert the phase
matrix takes 25% of the calculation time.  A test has been made to use
LAPACK/BLAS and the time of calculation an equilibrium has decreased
almost 20%!  Additionally several minor things has been changed.

2016.08.22 The record gtp_phasetuple has been modified.  Originally it
had only two indices, the phase index and the composition set number.
Later it has been extended to include the phase location, index of the
result record and an index to higher composition sets.  Unfortunately
I named the phase index "phaseix" and the location "ixphase" and I
have messed up which is what myself several times.  So now I renamed
the phase location "lokph" and have made all necessary changes in the
OC code EXCEPT for OCASI/TQ.

Thus those who use the OCASI interface must test if they have any
problems.  There are several subroutines using the phase tuple in
OCASI and some of them may need modifications.  I will test OCASI as
soon as possible but the application software may also need changes.

2016.08.22 It is now possible to enter a new set of components but
there are some problems not yet solved, in parts of the code the
elements are still used, for example the size of the system is still
calculated as the number of moles of elements.  But I leave such
things until I am 69 years old.

2016.08.20 I have added the possibility to use expressions for
conditions on the total amount of an element.  It is sometimes
interesting to keep the ratio of the amounts of two elements fixed
when changing the overall composition.

2016.08.17 It is now possible to use parameter identifiers including
characters like & and # in expressions for symbols.  I have also added
in a macro file how to enter mobility data and calculate the matrix of
derivatives of the potentials, dmu_i/dx_j, needed to convert the
mobilities to diffusion coefficients.

2016.08.08 A major step to complete the OC software, P can be used as
variable and V can be set as condition, provided there are volume
data.  The macro step8 include some calculations with variable P.  A
complex bug with reference state also removed.  And probably new
added.

2016.08.06 Still adding some minor features and bugfixes.  I am
looking for some unexpected trouble occuring when P is variable.  The
big thing to implement next is user defined components.

2016.07.30 A number of small features added.  Isothermal ternary
diagrams have their invariants plotted.  One can select a point in a
phase diagram and add a text, by default the stable phases from an
equilibrium calculation at that point.  When plotting the constitution
of a phase all other phases are ignored, previously they added spurios
lines.  A bug when calculating the constitution of an ordered phase
for a given composition fixed.

2016.07.19 I have implemented that the MAP command checks if the
equilibrium at a node point is a global minimum and if not the line
leading to this nodepoint is inactivated and no exit lines generated.
With this change the map7 macro works (almost) perfectly (the isopleth
for the HSS steel).  Calculating isothermal sections are almost
finished, the plotting is still rudimentary but there is a test macro.
The next big thing is to save results on file.  And then 1000 minor
things to fix.

2016.07.13 I have decided that this update is now a prerelease of OC
version 4.

********************************************************************** 2016

2016.07.10 With a lot of help from Jacques Lechelle and others the
mapping now seems to work much better, also the multicomponent
isopleths.  I have even started to think about how to calculate and
plot isothermal ternary diagrams.  But there are still things to fix
with the step command also.  And with assessments and with ...

2016.07.04 I have finally started to improve the calculation of phase
diagrams and this version has some significant improvements.  Main
changes has been to determine the step axis and length to avoid
problems. The mapping is still very fragile and depend a lot on the
starting point but now miscibility gaps are almost closed (Cr-Mo) and
the mapping can cross a congruent melting point (U-O).  I discovered
that most lines are calculated twice so I will remove that and
implement a global minimization at nodepoints to check they are
stable.  The isopleth calculations are also better but require global
tests.  I have tried to add a command AMEND LINE to remove lines that
are wrong but if one has made two or more maps it crashes.  I should
not delete mapnodes.

2016.06.17 A major revision of the datastructure has been made with
help of valgrind to avoid uninitiallized variables and memory leaks.
In particular the array eq_tpres was changed from pointer to
allocatable.  This had some unexpected consquences as the memory used
during step and map increased.  I do not really understand why.  But
it required that I improved the cleanup of memory for the NEW command
and I now delete all memory used to store equilibria during step/map.

A good consequence of this is that I can now run all macro files with
the same supermacro all.OCM, I do not run ot of memory any more.  I
also added that I do not store more than 1500 equilibria during
step/map, if more I must write results on a file which is still not
implemented.  This affects the step7.OCM macro which terminates due to
too many equilibria calculated.  So I have to implement save on
files... some time in the future.

2016.06.17 I have run valgrid on a few examples and found and
corrected several cases where uninitiated variables were used.  I also
found several cases of lost memory and I reallized I have to rethink a
bit about using pointers.  When I started writing OC I did not know
that one should never allocate pointer variables ... . But these
allocations are only in the static memory, they do not eat memory
while calculating.  Hopefully the code is a bit more stable.  And I
have to start fixing the problems with step and map.

2016.06.14 Most of the problems setting conditions on chemical
potentials in combination with other conditions should now be solved.
It is also possible to set a reference state.  There is a new macro
file for testing this.

2016.06.07 Some development for new STEP/MAP routines made but no real
improvements.  Fixed a bug setting chemical potentials together with
conditions on mole fractions.  There is still a bug changing the
reference state of a component.

2016.03.17 A rather complicated bug related to deleting redundant
phase tuples after an equilibrium calculation (probably) fixed.  It
occured for an FCC phase with a disordered fraction set.  In the macro
opttest2.OCM I have added an example of plotting an appended figure
with data.  I have also added a command "calulate phase ... const-adj"
to calculate the constitution of the phase when the mole fractions are
known.  This is a test for a subroutine intended for OCASI
applications.

2016.03.16 Some minor changes in all documentation files.  For
plotting there is now a possibility to APPEND a GNUPLOT command file
to be superimposed on a calculated diagram.  This should be useful for
assessments.  An attempt to implement the Flory-Huggins model for
polymers has been made but it is not finished.

2016.03.08 Some commands have been modified, set fixed and set
variable now accepts ranges of coefficients.  There is a command "list
opt coeff" which list just the coefficients.  You can specify an
abbreviated TP function name to be calculated.

2016.03.07 There are several problems entering TP functions, please be
careful and check the listing of the functions, the listing is true to
the way the function is calculated.  You cannot use parentheses except
around arguments to EXP and LOG and negative powers.  Complicated
functions should be entered as several separate functions.  Never have
more than two symbols multiplied together.

2016.03.12 Removed extention on linkmake and linkpara to make it easier
to rename these files.

2016.03.03 Fixed some errors when entering TP functions interactivly.
Modified slightly the listing of many equilibria.  Empty lines in the
enter_many_equil command and TAB characters in the row lines are accepted.

Start documenting OC incremental updates ...

Before this I had a worklog (as PDF)

