TC_Comb version 1.1

 The new TC_Comb version 1.1 has been released. The most important improvement of the program is an extended support for calculations involving fluid components (H2O and CO2) and cordierite (you have to specify activities of water and carbon dioxide to calculate its thermodynamic properties). A number of changes is associated with this support.

  1.  The pleiad of macros dealing with fluid parameters has been added to the library of keyboard macros (file Kbd.lib). Make sure to choose the correct macro if you wish to use activities or mole fractions of H2O and|or CO2. Selection of incorrect macro leads to cycling of THERMOCALC on the wrong answers and forced program termination with the Timeout error message or improper work (which can be usually detected by the "palisade" of red lines on the PT diagram with reactions). To find out exactly what is happening, repeat the failed calculation by double clicking on its entry in the table of results and analyse the listing of the THERMOCALC session.
     One of keyboard macros is named "Cordierite (aH2O & aCO2)" and is designed for systems with cordierite, but without H2O and CO2 in the list of components (THERMOCALC requests water and carbon dioxide activities in this case without asking about other fluid parameters). If you want to use cordierite and mole fractions of H2O and CO2 (i.e. a simplified model of just binary fluid), you have to include water or carbon dioxide to the list of system components and select the appropriate macro. However, this technique may not work if the system has no reactions with fluid components.
    NB! The program does not verify the validity of the selected keyboard macros!

  2.  The Expert mode option has been removed since selection of keyboard macros has become an important step in the workflow. However, the program still uses "Default" as a default macro for standard calculations without fluid components and cordierite.

  3. Fluidpresent and setfluid commands in the THERMOCALC script file (tc-pt.txt) are not supported now. Corresponding fluid parameters should be set via keyboard macros (i.e. interactive input) instead, because these script commands work improperly in some cases. TC_Comb will convert lines with fluidpresent and setfluid commands detected in TC_Comb’s script files into comments.

  4.  Columns for mole fractions and activities of water and carbon dioxide have been added to the table with results of calculations. The program takes these values from the THERMOCALC output only. If fluid parameters are set for mole fractions but selected keyboard macro is designed for activities, values will appear in columns for activities. It means that fluid parameters specified in the window Settings (tab Parameters) are now partly formal: only the numbers themselves are important while the Mole fractions checkbox is used for validation of values only.

  5.  Calculation of H2O and CO2 activities or mole fractions is available for tasks that require input of these data, i.e. if the system contains fluid components or cordierite and if corresponding keyboard macro is selected. You can run this procedure for combinations of analyses already processed with some default fluid parameters specified manually in the Settings window (tab Parameters). Select one or more combinations in the Results table (using standard Ctrl-A or [Shift|Ctrl]-[mouse|arrow keys] methods) and press the Recalculate button with the Calc fluid option checked. This checkbox is disabled (grayed) if the selected combination has no data yet in H2O and CO2 columns of the table.
     There are three options for calulations that can be specified on the Parameters tab of the Settings window:

    • Fixed: aH2O – calculation of αCO2 at fixed (manually set) αH2O;
    • Fixed: aCO2 – calculation of αH2O at fixed (manually set) αCO2;
    • Fixed: none – simultaneous calculation of αH2O and αCO2.

     If only one fluid component is present in the system, the program selects required option by itself.
     Calculations are based on well known procedure used in the THERMOCALC thermobarometry: the program searches activities or mole fractions that correspond to a minimum fit value (that is maximum value in the set of deviations of enthalpies and activities, normalized by their uncertainties, for all the system components at which all the reaction lines intersect at a single avPT point).
     It should be noted that this technique differs from the one that is used in TWQ thermobarometry where the thermobarometric task is to be solved for "dry" subsystem first (without reactions involving fluid components), and then the activity (or mole fraction) of H2O or CO2 can be estimated by the plotting of all reactions on the [T|P]-[α|x][H2O|CO2] diagram at a fixed value of [P|T] found for "dry" subsystem.
     TC_Comb launches a "long" THERMOCALC avPT session for calculation of fluid parameters which is required to get a series of results for different values of activities or mole fractions (more than 100 at simultaneous calculation of αH2O and αCO2). Then the program performs analysis of the fit values’ behavior and estimates those fluid parameters that produce minimum value. I decided to use cubic Bezier curve in the minimization procedure as approximant (because of its simple algebraic form and ability to reproduce a wide range of simple curve shapes with appropriate precision). While Bezier curve may have problems at the ends of the α|x range in some cases, it fits values around the minimum well enough.
     Select the option Write Fits.tvl in the Settings window, tab Parameters to record and view a diagram demonstrating behavior of the fit2 value at different activities or mole fractions. This diagram may help to evaluate the relevance of obtained α|x values since fit2 may vary too little over a wide α|x range:

    aH2O fits

    fit2-αH2O diagrams that TC_Comb shows at simultaneous calculation of H2O and CO2 activities are more complicated for analysis because they comprise a set of curves plotted for different αCO2 values:

    aH2O-aCO2 fits for RP13 (zoomed)

     Minimum fit value may be (nearly) constant over some range of αH2O and αCO2 ratios. For example, this is a feature of systems containing cordierite but without H2O and CO2 taken as components, because the number of free variables should increase by 1 in this case due to dependence of ΔGP,T of cordierite on αH2O (or αCO2) and αH2O/αCO2 ratio. TC_Comb detects this behavior and shows the message and the diagram demonstrating dependence of αCO2 on αH2O:

    aH2O-aCO2 minimum fit

     CO2 activity in such cordierite systems runs through the entire range of values from 0 to 1 on some limited αH2O interval. Usually, αCO2-αH2O dependencies are shown as jagged lines due to low precision of THERMOCALC output values and flatness of the fit2 function near its minimum).
     It’s better to calculate fluid parameters in PT window large enough to avoid exiting of reaction lines outside its borders: reduced number of linearly independent reactions (IR) leads to non-uniform data and affects the results dramatically. Therefore, TC_Comb rejects avPT runs with IR numbers less than maximum detected through the whole set.

  6.  If the option Fluid from the table is checked, the program takes calculated [α|x][H2O|CO2] values for repeated runs from the table (if they exist) instead of values specified manually in the Settings window.

  7.  The program shows [α|x][H2O|CO2] values on diagrams.

  8.  The new TC and AX tab has been added to the Settings window. Now you can switch THERMOCALC, AX or database versions and change file naming conventions without exiting TC_Comb.
     "Long" THERMOCALC sessions used for fluid calculations may take a lot of time and cause forced program termination after expiring the time limit reserved for the execution. You can enlarge this time limit via setting of the Timeout parameter measured in tenths of a second. I have to use Timeout=70 sec×10 on my PC.
     Furthermore, "long" THERMOCALC sessions (especially at simultaneous αH2O and αCO2 calculations) generate voluminous textual information that may exceed memory limit reserved for this procedure. This limit can also be increased by manual setting of the TCBufSize variable in the file TC_Comb.ini. I have set TCBufSize=700000 bytes now: it is slightly more than maximum value that I have met myself.

  9.  Check the Use AX sd(a) option in the Settings window to take uncertainties of activities from the AX output (which include only approximate analytical errors) rather than default uncertainties calculated by the THERMOCALC program (which also account for uncertainties related to solid solution models). Surely AX sd(a) values should exist in the table with analyses (in the last column next to activities); recalculate activities by the AX program with the Use AX sd(a) checked to add these values.

  10.  You can edit the last column with AX activities in the table of analyses using the pop-up menu opening by clicking the table with the right mouse button. If you want to remove redundant components for some analyses, it’s better to place the minus symbol "-" together in front of their abbreviations: this will save the data in the table on the off-chance.

  11.  Press the Plot points button placed on the window with results to create a scatter diagram with all the selected combinations as PT points. The option Colorized fits placed in the Settings window on the Error ellipses–Points–Fill tab is recommended for coloring of points according to their fit values (from minimum to maximum in the current selection). Point colors change gradually through the range yellow – red – magenta – blue – black:

    All points plotted

     Open the Editor window in TriQuick to check correspondence of individual points to combinations of analyses. For example, minimum fit values on this diagram correspond to the core of the garnet porphyroblast and central areas of orthopyroxene, biotite and plagioclase grains in the rock matrix at some distance from the porphyroblast. Larger fit values has been obtained mostly for rims of closely spaced grains. Diagrams with reaction curves demonstrate that some lines (e.g. Grt-Bt and Grt-Opx thermometers) are displaced to very low and/or too high temperatures, indicating either fractionation effect at final stages of the growth of individual mineral grains, or later re-distribution of Fe-Mg components through the grain contacts, both leading to fragmentation of larger nearly equilibrated (in terms of used thermodynamic description) rock domains on smaller subdomains.
     Selection of some range of combinations near minimum fit values may be helpful if the total number of combinations and maximum fit value are very large, because avPT results having more or less satisfactory fit values may be widely scattered over large PT field.
    NB! It should be stressed that the use of the permutational approach without taking into account the fit values and the analysis of their distribution in the cloud of avPT results (as well as without checking of the location of individual analyses on BSE images, i.e. without texture control) greatly reduces the reliability of thermobarometric studies and leads to misinterpretations.

  12.  The small separate window for quick selection of individual combinations by IDs of mineral analyses is attached to the window for results. Data in fields of this window change while you navigating in the main table, so you needn’t expand the Analyses column and study intently its contents.

  13.  The button for viewing BSE images and checking of the positions of individual mineral analyses Image View has been added to the main TC_Comb window as a good alternative to a separate image viewer.

  14.  Lists for selection of components (for their exclusion and for filtering of reactions) can now be sorted alphabetically as well as by the phases (in the order of their appearance in the file with mineral analyses).

  15.  Linearly independent and suspect reactions in the list of reactions for inspection (the button Inspect reaction on the window with the table of results) are now shown in bold and with the corresponding color. This list can be saved to a text file by pressing the Save button.

  16.  Format of the file with reactions (*.rct) has been optimized: blank entries (combinations with no reactions calculated) are not recorded now, so that TC_Comb loads rct-files much faster (which is especially noticeable for tasks with large amounts of combinations). Although this format is fully compatible with the old one, it’s better to repeat saving of the results after loading of old files.

  17.  Selecting of multiple combinations in the table with results has been optimized: [Shift|Ctrl]+[mouse|keyboard] shortcuts operate much faster now, especially with large amounts of selected combinations.

  18.  Procedure for detection of suspect reaction lines has been improved: red lines should appear less frequently now.
     However, the program can not find really problematic lines in some rare cases. For example, the pink (=inspected) curve of the reaction 2alm+2phl+6an+3q=2gr+2ann+3crd on the diagram shown below has a very strange shape but is not marked as a suspect line (because it has passed the "Bezier-test"), while it has the "suspect" status on diagrams plotted for other combinations:

    Suspect reaction not detected

     According to the analysis of diagrams plotted for other combinations and of the THERMOCALC text output, the leftmost point (4.2 kbar, 200°C) refers to the second, redundant subset of roots of the equation ΔGr(P,T)=0 (sometimes skipped by THERMOCALC) and this is the only point of this subset. Moreover, THERMOCALC could not calculate the LP part of this curve. The actual shape of this curve should be as shown on the diagram plotted for another combination of analyses:

    Correct but suspect reaction

     This reaction curve is marked by red color ("suspect") here because THERMOCALC didn’t find one root on the LP border of the PT window.
     A typical example of redundant roots is shown on the last diagram (plotted for the well known sample RP13) with two red ("suspect") curves which THERMOCALC calculated for the reaction 4py+12an+12H2O+18cc=10gr+3ames+18CO2:

    RP13 suspect reaction

  19.  TC_Comb should now work correctly with THERMOCALC versions prior to 3.33 (at least some of them) due to the simplest analysis of the formatting of tables with PT data on reaction lines.

 Extended support of calculations with fluid components has revealed some problems, which are still not resolved. The most significant one is the problem with calculation of uncertainty bands for systems with H2O, CO2 and cordierite: TC_Comb specifies the minimum required subsystem for each processed reaction but only one keyboard macro is used for all reactions (the one that was originally selected by the user), so that some reactions couldn’t be properly processed. Perhaps, this problem will be solved in the future after implementation of automatic selection of suitable keyboard macros depending on the system contents and on the program settings relating to fluid parameters.


Hi Dmitry,

First of all thanks for your work and support.
I´m having problems with TC_Comb when calculating activities with AX.
After running AX the activities column does not automatically appear in TC table. This might be easy to figure out but when I try to make changes after this the program just crashes.
Do you have any ideas why this is happening?

DimaDD's picture

Hi Jackeline,
Sorry for late responce!
I have encountered similar behavior (...the activities column does not automatically appear in TC table) only when working with two copies of AX installed in different directories. If another AX copy has just been chosen, AX offers the previous directory with old (incorrect) input file Comb.txt. As I understand, Windows remembers the last directory in the standard AX window for loading of files. So, AX creates output files in the same old directory and TC can not find them. Therefore, it's necessary to check/change path to Comb.txt in AX after selection of another copy of the program.

Hi Dmitry,

Thanks for your response. The problem is solved. I used to have two copies of AX indeed.

Hi Dmitry,
I seem to be having a fairly simple problem, but I can't seem to figure it out. I have downloaded thermocalc 3.33 and have set the TC prefs file for TC_Comb to tc-prefs.txt. However, when I try to save the imported table as a TAB file an error message pops up saying "Error: scriptfile not set in tc-prefs.txt!." I haven't changed the scriptfile that was set with the download, what should the scriptfile be set to for TC_Comb to work?

DimaDD's picture

TC file with the program preferences (tc-prefs.txt) should contain the line with a reference to the existing scriptfile, for example

calcmode 2
scriptfile PT  % this line points to tc-PT.txt
dataset 55   % if you wish to use dataset tc-ds55.txt
setpagewidth 200
dontwrap yes
strictsyntax no
autooverwrite yes

The prefix "tc-" (required by current versions of THERMOCALC) is specified in TC_Comb.ini. Corresponding scriptfile (tc-PT.txt in this case) should be like this:

calctype 3
setPwindow 1.0 10.0
setTwindow 400 1500
setPinterval 1.0
setTinterval 100
allphases yes
doallr yes
setlinear 1
axfile ax
dataok yes
usedefsda yes

TC_Comb then will change some parameters in these files.

The easiest (if not the best) way is to delete/rename file with prefs, TC_Comb will create default files in this case: tc-prefs.txt (containing reference to tc-PT.txt) and tc-PT.txt as well.

Hello Dmitry!
First of all, thank you very much for your softwares! They surely make thermobarometry something easier :)

I'm having troubles trying to use TC_Comb... when everything is set up and I click on "Thermocalc" button, the program simply stops responding. This happened to me before with PTQuick, but somehow it stopped and I don't remember if I did something to fix this issue... I'm using Windows 10, maybe it's a problem with the OS?

Thank you in advance!

DimaDD's picture

Dear Pedro,
Yes, it's quite possible that TC_Comb is incompatible with Windows 10, as it launchs THERMOCALC by a non-standard way (in so-called "debug mode"): this mode allows to catch, process and bypass errors like "division by zero", "floating point overflow", etc. which may be very annoying in THERMOCALC due to permanent system messages like "Unknown software exception (00X) occured at location 00Y, click OK to terminate the program" or something like this. It was possible to use TC_Comb+THERMOCALC tandem in previous OS versions (Win7, Win8) with THERMOCALC running in compatibility mode, but I don't know yet what to do in the case of Win10 (not tested by myself) because I don't have this OS on my computers (and almost all my colleagues avoids it). I cannot exlude also that my TC launching procedure has some mistakes which were not critical in old Windows versions but became serious now.
I'm planning to test programs under Win10 (and will try to find solutions) in closest future, I'll report about results as soon as possible.

I've tested using the program un-checking the "Batch mode" box and it's working, but all the changes must be done manually in the program window. I'll try using it again with another PC (without Windows 10) later today

DimaDD's picture

Yes, I use that non-standard method only with the "Batch mode" checked. I'll add the option to TC_Comb.ini for launching THERMOCALC by the standard method in the batch mode, with those frequent system error messages which appear e.g. if only 2 linearly independent reactions occur in specified PT window.

P.S. Ooops, there are some other tricky techniques implemented in batch mode but not used for the standard operations with TC (input/output redirections). I'm interesting also is TC working at double-clicking items in the table with results? I've used the third type of this procedure there (intermediate between "batch" and "standard" modes).

Hello again Dmitry!

Is it possible to plot multiple analysis from TC Comb on TriQuick with their error ellipses?

DimaDD's picture

Dear Pedro,

Yes, it's possible, there are many ways to do this:

The simplest way is to use the "Append mode" checkbox in the TriQuick "Settings" window, tab "Overlays", then just click on required lines in the table with results. Or save required diagrams in TriQuick as named TVL-files (instead default "Temp.tvl") while working with TC_Comb (TriQuick: Settings - Overlays - Save TVL-files) and then load them (... - Load TVL-files) with the "Append mode" checked. Then save compiled diagram as a separate TVL file or use buttons at the bottom of diagram window for copying picture to the clipboard or saving to a file (e.g. as wmf/emf vector graphics) for editing in advanced editors of vector graphics.

You can even compile diagrams manually: TVL files have a simple text format, so that you can open them in any simple text editor (like Notepad) and delete/copy/paste any objects (which are separated by empty lines). Objects with error ellipses looks like:

#FF0000 1 0 #FFFC88 7
44 1.2 0.390 2 95
800 7.5

and objects with avPT points:

0 6 #000000 0 0 #FFFF00 0
800 7.5

where "Ellipse" and "Marker" are the object types, "7E" - descriptions of objects (=ID of result for TC_Comb).

Moreover, TriQuick has the "Editor" window where you can also perform many operations, incl. deleting/copying/pasting/moving objects in the tree of objects (as well as changing their appearance). So you can load multiple TVL files to TriQuick with "Append mode" unchecked (they will appear as separate frames in this case) and copy/paste objects between frames (=TVL files). Make selected frames/objects (un)visible by the "Show" checkbox in the "Editor" window.

Unfortunately, TriQuick is based on the old Windows graphics engine where transparency is not supported :-(, therefore usually I use advanced vector editors (like CorelDraw) to make nice diagrams with semi-transparent error ellipses.