 
***********************************************************************
README for Example 40 (40A/B/C/E). 40D is deprecated as of 2022a: 
%%%%%% 
       A SERIES OF EXAMPLES FOR THE POURBAIX MODULE CALCULATIONS   
       *********************************************************

This series of standard examples (TCEX40 and TCEX40a/b/c/e),
  are designed to demonstrate the POURBAIX module calculations and 
  plotting. 
  
The POURBAIX Module in the Console Mode of Thermo-Calc has four  
  main options for the types of calculations and plotting. There is
  a series of prompts to help you move logically through
  the simulation. It also has powerful functionality such as 
  comprehensive models, high-quality data of connected databases,
  automatic procedures for calculations of complex heterogeneous
  equilibria straightforward routines for plotting and refinements, 
  direct and multiple provisions of many different diagrams, 
  and detailed help accessed through Console Mode and other resources. 

It is highly recommended that you first read the Pourbaix Diagrams
 Educational Material in the Thermo-Calc Documentation Set. The PDF is 
 available with your installation (Help --> Open Manuals Folder) or you 
 can search for information using the online help (Press F1 or go to
 Help--> Online Help). The document describes the module and its 
 applications in detail. 

We also recommend that you review the following about these examples.
This information is also available in the online help and PDF.

Note that example 40D is deprecated as of version 2022a.

=======================================================================
A list of the examples (40A, 40B, 40C, & 40E) for the POURBAIX module:
-----------------------------------------------------------------------
 TCEX40A:
 ^^^^^^^
   * Demonstration of Option 1 - Start a completely new calculation, 
     where you calculate using one database, plot a Pourbaix diagram, 
     and access the Console Mode help features 
     (although it is recommended you press F1 for the main help). 

   * Using the Single-Database Option, i.e., retrieving data from 
       the PAQ2 [TCS Public Aqueous Solution (SIT) Database, v2.4; 
       using the SIT aqueous solution model] or PAQS2 [TCS Public 
       Aqueous Solution Database, v2.4; using the Complete Revised 
       HKF aqueous solution model]; both of which contain an AQUEOUS 
       solution phase and REF_ELECTRODE phase (as a reference for 
       electron in aqueous electrolyte systems), as well as some 
       data for various solid phases (solution or stoichiometric) 
       and gaseous mixture phase. The PAQ2 and PAQS2 are specially 
       designed for calculations of the so-called Pourbaix diagrams 
       (i.e., Eh-pH plots) and other types of diagrams in aqueous-
       bearing multicomponent heterogeneous interaction systems, 
       via the Single-Database Option in the POURBAIX module or 
       through the normal TDB-GES-PLOY-POST routine.

   * A POLY3 file called POURBAIX.POLY3 is automatically saved.
       By reading this POURBAIX.POLY3 file (or renamed as another 
       name), one can further run the following Main Options: 
         Main Option 2 for plotting many other property diagrams
                         of the calculated interaction system;
         Main Option 3 for making another POURBAIX calculation 
                         of the same chemical system but under 
                         a different P-T-X condition;
         Main Option 4 for making a POLY3 STEPPING calculation  
                         of the same chemical system but varied 
                         with only one independent variable;
       The Main Options 2, 3 and 4 are illustrated in the TCEX40B and 
          TCEX40C examples.

   * For the purposes of recalling this file in other Main Options 
       (as in the TCEX40B & TCEX40C), the POURBAIX.POLY3 
       has to be renamed or copied as another file name (in this 
       particular example, as TCEX40A.POLY3, and TCEX40B.POLY3, & 
       TCEX40C.POLY3). Note that the renaming or 
       copying has to be done outside Thermo-Calc, otherwise the POLY3 file 
       structure is destroyed.

   * The Main Option 1 also provides the opportunity to plot many 
       property diagrams along phase boundaries, after the default 
       Pourbaix diagram is generated and refined (not necessarily 
       going through the Main Option 2). 
 
--------------------------------------------------------------------
 TCEX40B:
 ^^^^^^^
   * Demonstration of the Main Option 2 Graphical Processing 
         (by plotting more diagrams); 
     Various options for refining a plotted diagram 
         (including direct interactions with the POST Module); 
     Graphical processing of related property diagrams.

   * Reading a previously saved POURBAIX.POLY3 file (or renamed as 
       another name, for instance, the TCEX40B.POLY3), and then 
       plotting some property diagrams for the previously 
       calculated system. 

   * The loaded POLY3 file will not be modified by this Main Option.  
       It is thus not necessary to save the file in another name; 
       however, it is still recommended that the user copy the 
       TCEX40A.POLY3 (or TCEX40E.POLY3) as TCEX40B.POLY3 before 
       the Main Option 2 is executed in this particular example. 

--------------------------------------------------------------------
 TCEX40C:
 ^^^^^^^
   * Demonstration of the Main Option 3 Calculation
         (by modifying T-P-X conditions); 
     Graphical processing of a Pourbaix diagram.

   * Reading a previously saved POURBAIX.POLY3 file (or renamed as 
       another name, for instance, the TCEX40C.POLY3), and then 
       making another POURBAIX-type calculation and graphical 
       processing of a new Pourbaix diagram for the same chemical 
       system but under a different P-T-X condition. 

   * The loaded POLY3 file will be rewritten according to the T-P-X  
       settings in the new POURBAIX-type calculation. It is thus  
       recommended to save the file in a new name outside of Thermo-Calc 
       before this Main Option is proceeded (in this particular 
       example, the TCEX40A.POLY3 is copied to TCEX40C.POLY3).

   * The Main Option 3 also provides the opportunity to plot many 
       property diagrams along phase boundaries, after the default 
       Pourbaix diagram is generated and refined (not necessarily 
       going through the Main Option 2). 

--------------------------------------------------------------------
 TCEX40E:
 ^^^^^^^ 
   * Demonstration of the Main Option 1 Calculation 
         with the Multiple-Database Option;
     Graphical processing of a Pourbaix diagram.

    !! For a more complex application than Example 40A.
    !! You need licenses for three Thermo-Calc databases, i.e., 
       A: TCAQ (TCS Aqueous Solution Database; SIT model) or 
          AQS  (TGG Aqueous Solution Database; HKF model); 
       B: SSUB (SGTE Pure Substances Database) or 
       C: SSOL (SGTE Alloy Solutions Database) or 
          TCFE (TCS Steels/Fe-Alloys Database) or similar. 

   * This example uses multiple databases (TCAQ+SSUB+SSOL).
       TCAQ database contains only an AQUEOUS solution phase 
       (using the SIT model) and REF_ELECTRODE phase (as a 
       reference state for electron in aqueous electrolyte 
       systems).
       SSUB database is appended for the GASeous mixture phase 
       and some pure solid phases (so-called secondary phases 
       formed during aqueous-involving interaction processes).
       SSOL database is appended for various solid solution phases. 

   * A POLY3 file called POURBAIX.POLY3 is automatically saved.
       By reading this POURBAIX.POLY3 file (or renamed as another 
       name), one can further run the following Main Options: 
         Main Option 2 for plotting many other property diagrams
                         of the calculated interaction system;
         Main Option 3 for making another POURBAIX calculation 
                         of the same chemical system but under 
                         a different P-T-X condition;
         Main Option 4 for making a POLY3 STEPPING calculation  
                         of the same chemical system but varied 
                         with only one independent variable;
       The Main Options 2, 3 and 4 are illustrated in the TCEX40B 
          and TCEX40C examples.

   * For the purposes of recalling this file in other Main Options 
       (as in the TCEX40B and TCEX40C), the POURBAIX.POLY3 
       has to be renamed or copied as another file name (in this 
       particular example, as TCEX40A.POLY3, and TCEX40B.POLY3, 
       TCEX40C.POLY3). Note that the renaming or 
       copying has to be done outside Thermo-Calc and after the 
       TCEX40E calculation and plotting is complete. This is so 
       that the required POLY3 file structure is not lost.

   * The Main Option 1 also provides the opportunity to plot many 
       property diagrams along phase boundaries, after the default 
       Pourbaix diagram is generated and refined (not necessarily 
       going through the Main Option 2).

  * The POURBAIX module inside the Thermo-Calc software also accepts the 
       AQS2 aqueous solution database (using the complete Revised 
       HKF model) in the Multiple Database Option, in addition to 
       the TCAQ2 aqueous solution database (using the SIT model). 

=======================================================================


==================================================================
IMPORTANT NOTES FOR ACTIONS AFTER TCEX40A OR TCEX40E IS EXECUTED: 
******************************************************************
In order to be able to subsequently run the TCEX40B (Main Option 2) or 
   TCEX40C (Main Option 3), which open the previously-saved POURBAIX-type
   calculation POLY3 file, the user should make copies of the 
   resulting POURBAIX.POLY3 as TCEX40A.POLY3, TCEX40B.POLY3, TCEX40C.POLY3. 
However, this has to be properly done outsides of the Thermo-Calc software 
   after the TCEX40A is executed. The reason is that, if saving 
   the POLY3 workspace of the POURBAIX calculation results in the 
   POLY3-module monitor (through the command sequence "GO POLY3" 
   and "SAVE TCEX40A.POLY3 Y"), all the initial equilibrium points 
   and the mapping/stepping calculation results will be lost, and 
   parts of the POLY3 file structure (e.g., some definitions of 
   the previously defined POURBAIX-type calculation system) will 
   be destroyed. 
In principle, before executing any Main Option (for calculations 
   and graphical processing), it is highly recommended that the 
   user saves/renames/copies the previously-generated POLY3 file 
   as another POLY3 file. Only in this way, it can avoid destroying 
   the previous-saved POURBAIX-type calculation results.
   


