====================================================================
Notes for use of the axfiles

 tc-mb47NCKFMASHTO.txt and
 tc-mb50NCKFMASHTO.txt,

the 'metabasite set' of HPx-eos, for use with version 6.2
of the Holland & Powell (2011) dataset.

The following are some brief notes about issues related 
specifically to the use of these x-eos for calculations 
with the Thermocalc software (Powell & Holland, 1988).

---------------
updated:  30/01/22 by E.C.R. Green
          08/12/19 by E.C.R. Green (eleanor.green@unimelb.edu.au)          
original: 27/05/16 by E.C.R. Green 
====================================================================

1. Compatibility with the Holland & Powell dataset and Thermocalc
2. Relationship to metapelite set of HPx-eos
3. Which x-eos to use when
4. Calculating solvi
5. Idiosyncrasies of order parameters: clinoamphibole, ilmenite, omphacite
6. Citing the x-eos and ensuring reproducibility

---------------
1. Compatibility with the Holland & Powell dataset and Thermocalc

These x-eos were calibrated with version 6.2 of the Holland & Powell 
(2011) dataset (ds6). 

The two axfiles contain the same sets of x-eos, for different
versions of Thermocalc:
  - tc-mb47NCKFMASHTO works with Thermocalc version 3.47
  - tc-mb50NCKFMASHTO works with Thermocalc version 3.50.

Due to changes in the way that Thermocalc handles reference states
and the application of the pressure dependence of ∆G terms (formerly DQF), 
versions 3.47 and 3.50 produce calculations that are non-identical, though 
the differences are not significant.


---------------
2. Relationship to metapelite set of HPx-eos

Many of the x-eos in the metabasite set are identical to those
used in the metapelite set, namely:
    orthopyroxene (opx) 
    garnet (g) 
    potassium feldspar, Cbar1 (ksp) 
    plagioclase, Cbar1 (pl) 
    spinel, magnetite (sp,mt) 
    ilmenite, hematite (ilm, ilmm, hem, hemm)
    epidote (ep)
    biotite (bi) 
    muscovite (mu)
    chlorite (chl).

N.B. the liquid x-eos in the metabasite set is for tonalitic liquid
(L). It is not the same as the x-eos used in the metapelite set (liq), 
which is for haplogranitic liquids (+ minor added components).


---------------
3. Which x-eos to use when

For certain phases, multiple x-eos appear in these axfiles.

Clinopyroxene: 
Augite (aug) is for calcic cpx at supersolidus temperatures. It 
    includes Al-Si ordering on the tetrahedral site, but neglects
    order-disorder on the M sites. 
Diopside (dio), omphacite (o), jadeite (jd) are for subsolidus cpx 
    in which M-site order-disorder may be significant. These three 
    may be used for calculations involving coexisting sodic-calcic 
    pyroxenes, as they take account of M site order-disorder. 
    However they do not include tetrahedral Al.
N.B. The augite x-eos should NEVER be used in the same calculation as 
any of the other three.


Feldspars:

Most users should use pl4tr and/or k4tr. These are the same x-eos, but 
pl4tr is expressed in terms of xCa and xK, whereas k4tr is expressed in 
terms of xCa and xNa. For co-existing plagioclase and alkali feldspars,
it’s therefore convenient to use pl4tr for plagioclase and k4tr for 
alkali feldspar; however they are the same x-eos, and therefore are 
correctly able to describe solvus relations in the ternary feldspar system.

Pl4tr and k4tr replace the older set of feldspar x-eos, plc, pli and ksp.
These three have been left in the axfile for backwards compatibility.
An overview of the changes can be found at 
https://hpxeosandthermocalc.org/2022/01/23/a-new-x-eos-for-ternary-feldspars/

Note that you can rename the x-eos within the scriptfile for your 
convenience using the samecoding script, e.g.
  samecoding pl4tr pl
renames pl4tr as pl. You will then need to make sure that you have a set
of xyzguess scripts for “pl” in the scriptfile (copy the variables for
pl4tr, but rename as pl).

To model the peristerite gap, use pl4tr and abc, where abc is low albite
with minor solid solution towards anorthite.


Ilmenite, hematite:
X-eos are provided in the systems FTO (ilm, hem) and FMTO (ilmm, hemm).
The older, more restricted version in FTO is currently recommended 
(23/11/15), as the FMTO model may take excessive magnesium.


---------------
4. Calculating solvi

Solvi are miscibility gaps between phases with identical symmetry and the 
capacity to form a continuous solid solution at high temperature. 
Consequently they should be modelled using a single x-eos for both phases, 
with appropriately different starting guesses for the compositions of each 
phase.  

The metabasite axfiles and samecoding script make it 
possible to generate multiple phases with different compositions 
from several of the x-eos. These are:
 
Clinoamphibole: hornblende (hb), actinolite (act), 
    glaucophane (gl)

Sodic-calcic clinopyroxene: diopside (dio), omphacite (o), jadeite (jd)

Spinel--magnetite: sp, mt

Ilmenite--hematite: ilm, hem, or ilmm, hemm.

N.B. When calculating solvi, check that Thermocalc really has calculated
different compositions for both phases! If it can't find two different
solutions for the composition variables, it will just return a meaningless
result in which the two phases have essentially the same composition.

N.B.B. When using any of these phases, it's wise to check that the 
calculated compositions are in the range that you expect... 



---------------
5. Idiosyncrasies of order parameters: clinoamphibole, ilmenite, omphacite

In addition to compositional variables, many of the x-eos involve order 
parameters. These are designated with variable starting with 
Q, or followed by the script 'isQ'. The Q parameters express the 
partitioning of cations across different sites, and usually can't be 
compared with observations. 

Q parameters do not generally require attention from the user. However they 
are associated with two classic problems: 
(a) Finding valid starting guesses, especially in clinoamphibole
(b) Multiple compositions calculated with different Q (ilmenite-hematite, 
    sodic-calcic cpx, possibly others).

(a) The starting guesses for order parameters must lie within legal ranges,
such that, when the starting guesses for the compositional+order parameters
are substituted into the expressions for the site fractions in an x-eos, all
of the site fractions have values between 0 and 1. 

Usually this is not a big inconvenience, because the legal ranges of Q
values are large and it is easy to find an appropriate value (commonly,
making Q smaller will help). However, in the clinoamphibole x-eos, the two
order parameters Q1 and Q2 have to be chosen from a very narrow range that
depends on the composition. Therefore, if possible it is easiest to start 
with the starting guesses for clinoamphibole provided with in these files, 
and then only amend them using the starting guesses provided in the Thermocalc 
log file via the printxyz script.

(b) For certain x-eos, Thermocalc sometimes finds different values of
compositional and order parameters depending on the Q starting guess that
was used. This has been observed commonly for the ilmenite-hematite x-eos,
and occasionally for the Q parameter (not Qaf, Qfm) in the sodic-calcic
pyroxene x-eos. The correct value of Q for a pseudosection is the more 
stable one. In the above models, this is always the higher value of Q, and 
therefore starting guesses for Q should be kept as high as is legal. 
However, the relative stabilities of the two solutions can be verified by 
checking the calculated values of the assemblage Gibbs energy, G, which is
now a standard part of Thermocalc's on-screen output. 

N.B. If Thermocalc finds that a Q value is illegal, it will try several 
Q values at random in the hope of finding a valid one. This process may 
go unnoticed by the user, but it occasionally causes problems if in fact 
there are two possible valid Q solutions, one leading to a lower Gibbs 
energy for the assemblage than the other, as in (b) above. Therefore
it is wise to keep a look out for Thermocalc's flagging message
"illegal Q starting guess for [phase]: random value used", and change the
Q guess manually to a legal value that gives the more stable result. 


---------------
6. Citing the x-eos and ensuring reproducibility

In the interests of reproducibility, please record the following in 
publications:
- the version of the Holland & Powell internally-consistent dataset
    (e.g. Holland & Powell, 2011, dataset version 6.2), and preferably, 
    for safety's sake, the date of generation of the dataset file tc-dsXX.
    The date is found on the last line of the file.
- the version of Thermocalc, e.g. Thermocalc 3.50,
- the citations for the various x-eos used, and preferably the date given
  in the 0_version_notes.txt file in this bundle.

Citation for the x-eos are found in the -it file. The citation for the 
Holland and Powell dataset version 6 is:

% Holland, TJB, Powell, R (2011) An improved and extended internally consistent
% thermodynamic dataset for phases of petrological interest, involving a new
% equation of state for solids. Journal of Metamorphic Geology, 29, 333-383.