Annotated TDB file. The ‘TDB’ file (Thermodynamic Data Base file) contains all of the Gibbs energy parameters required to perform a calculation, whether it be the calculation of a phase diagram (mapping), calculation of equilibrium with a single stepped variable (e.g. amount of phase with changing temperature for a fixed composition) or a point calculation (fixed temperature, composition and pressure calculation). In principle, the TDB file can contain information for any number of components and systems. For example, the SGTE Solution database is a TDB file with data for all pure elements, and in addition, assessed data for more than 800 binary and ternary systems. The TDB file used in the 2020 MSIT Winter School contains information for just one binary system – the Cu-Mg system; although not all of the information, as this file is used in the optimisation (i.e. some of the parameters required for the calculation are the result of the optimisation process and are therefore not in the file). Together with the POP file, certain parameters in the TDB are adjusted in order to arrive at the best thermodynamic dataset to describe the system. Before looking at the file used in the Winter School, it’s worth revisiting how Gibbs energy expressions are constructed. Unary Phases By this we mean a phase with no composition range. This applies to pure elements or stoichiometric phases. The Gibbs energy is then a function of temperature and pressure (see GModel.pdf in the MSI ‘Collaboration Tool’). ܩሺܶ, ሻ = ܩch + ܩph + ܩpr ..where ܩch is the chemical (or lattice) contribution, ܩph is the contribution from physical phenomena, such as magnetism, and the final term is the pressure dependent term. For the Cu-Mg system, the final two terms can be ignored as there are no magnetic effects and no pressure dependence. The temperature dependence of the Gibbs energy is this given as ܩሺܶሻ = ܣ+ ܶܤ+ ݈݊ܶܥሺܶሻ + ܶܦଶ + ܶܧଷ + ܨ/ܶ ..where A – F are adjustable parameters. This expression comes from an expansion of specific heat after Maier & Kelley described by the empirical expression ܥሺܶሻ = ܽ + ܾܶ + ܿܶ ଶ + ݀ܶ ିଶ Please note, the values of the coefficients are not the same in the two expressions. 1 Solutions - Random substitutional solutions. The term solutions are applied generally to the liquid phase, terminal solid solutions and some simple intermetallic phases. The Gibbs energy expressions associated with these phases have a composition dependence also. The Gibbs energy is given as: ܩሺܶ, , ݔሻ = ܩref + ܩconf + ܩph + ܩpr + ܩE ..where ܩref is the reference Gibbs energy (lattice stabilities of the components – the difference between the Gibbs energy of each component having the structure of the phase in question and that of the reference state for each component), ܩconf is the Gibbs energy contribution resulting from the configurational entropy (ideal) of mixing and ܩE is the excess Gibbs energy resulting from non-ideal interactions between the component species in the phase. For a phase ߠ, and assuming there are no physical nor pressure dependence for the Gibbs energy of the phase, this can be written as ܩఏ = ݔ ሺܩo − ܪSER ሻ + ܴܶ ݔ ln ݔ + ܩE ..where the first summation refers to the reference Gibbs energy, the second is the configurational contribution with R being the universal gas constant. The excess Gibbs energy (GE) contribution is generally described using the Redlich-Kister expression ݔ = ܩA ݔB జܮA,B ሺݔA − ݔB ሻజ E జୀ The L parameters (which are adjustable) also have a temperature dependence that is the same as that of the unary functions. It should be stated that the temperature dependence of excess terms should only go beyond the first T term if there is experimental evidence of temperature dependence in the enthalpy of mixing of the phase. Complex Phases – The Compound Energy (Sublattice) Formalism. The Compound Energy Model, (or Compound Energy Formalism) is used generally for intermetallic phases where a high degree of atomic ordering is present. It is important that the crystallography of the phase is known so that the model can be applied correctly. The premise of the model is that the crystal lattice of the phase can be considered as a collection of interpenetrating sublattices. Details of the model are given in Hari’s notes (GModel.pdf). For the Cu-Mg system, this model is used to describe the C15 Laves phase, Cu2Mg. Two sublattices are used: (Cu,Mg)2(Mg,Cu) indicating a stoichiometry of 2:1, that is two sites on the first sublattice to one on the second. Both components can mix on either sublattice. For the Compound Energy Formalism (CEF), the reference Gibbs energy is given by that of the ‘end members’ or ‘virtual compounds’ formed when each sublattice comprises a single species. For the Cu2Mg phase, these end members are: Cu2Cu 2 Cu2Mg Mg2Mg Mg2Cu Considering the general case of a phase comprising two sublattices with the formula (A,B)1(C,D)1 the reference Gibbs energy is given by o o o o ܩref = ݕA ݕC ܩAC + ݕB ݕC ܩBC + ݕA ݕD ܩAD + ݕB ݕD ܩBD where yi represents the site fraction of component i on the sublattice, and is defined by ݕ௦ = ݊௦ ܰ௦ where ݊௦ is the number of atoms of component i on sublattice s and ܰ ௦ is the total number of sites on sublattice s. The configurational contribution to the Gibbs energy comes from the ideal mixing of the components on each of the sublattices. It is thus given by ܩconf = ܴܶ ܰ ௦ ݕ௦ ln ݕ௦ ௦ The excess Gibbs energy comes from consideration of the mixing on the individual sublattices. Again, considering 2 sublattices with general occupancy, (A,B)1(C,D)1, జ ܩE = ݕAଵ ݕBଵ ݕCଶ జܮA,B:C ൫ݕAଵ − ݕBଵ ൯ జ జ + ݕAଵ ݕBଵ ݕDଶ జܮA,B:D ൫ݕAଵ − ݕBଵ ൯ జ జ + ݕAଵ ݕCଶ ݕDଶ జܮA:C,D ൫ݕCଶ − ݕDଶ ൯ జ జ + ݕBଵ ݕCଶ ݕDଶ జܮB:C,D ൫ݕCଶ − ݕDଶ ൯ జ 3 The TDB file The TDB file itself is a text file in free format, but it does contain certain flags and keywords that are necessary for the file to be read correctly. Pandat has very good error trapping and will also give warnings if there are problems with the data; for example, discontinuities across temperature ranges. Thermo-Calc still works on a maximum line length of 80 characters (as it was originally written in Fortran...may still be in Fortran) whereas Pandat is written in C++ and has no such constraints. The file that is described here is ‘CuMg_OPT_Anno.tdb’, which is a tidiedup version of the file used at the Winter School. The first thing to notice is that some lines are preceded by $. This line is not read by the software and therefore can be used for comments or, as in our case, so that a line of dashes can be added to separate the different phases making it easier to read. The Elements The first block of data gives information about the elements, or strictly speaking the constituents, in the TDB. ELEMENT ELEMENT ELEMENT ELEMENT /VA CU MG ELECTRON_GAS VACUUM FCC_A1 HCP_A3 0.0000E+00 0.0000E+00 6.3546E+01 2.4305E+01 0.0000E+00 0.0000E+00 5.0041E+03 4.9980E+03 0.0000E+00! 0.0000E+00! 3.3150E+01! 3.2671E+01! This generally starts with information about the electron followed by the vacancy, and then the chemical elements, in our case, Cu and Mg. We then have the standard reference state for each element; FCC_A1 for Cu and HCP_A3 for Mg. The A1 and A3 are the Strukturbericht designations for the FCC and HCP phases, a convention adopted by SGTE, and gives precise information about the crystal structure of the phase. The three numbers given for each constituent refer to the atomic mass, H298-H0 and S298, respectively. The second block of data gives basic thermodynamic information about the component elements. FUNCTION GHSERCU 298.15 -7770.458+130.485235*T-24.112392*T*LN(T) -.00265684*T**2+1.29223E-07*T**3+52478*T**(-1); 1357.77 Y -13542.026+183.803828*T-31.38*T*LN(T)+3.64167E+29*T**(-9); 3200 N ! FUNCTION GHSERMG 298.15 -8367.34+143.675547*T-26.1849782*T*LN(T) +4.858E-04*T**2-1.393669E-06*T**3+78950*T**(-1); 923 Y -14130.185+204.716215*T-34.3088*T*LN(T)+1.038192E+28*T**(-9); 3000 N ! FUNCTION GHCPCU 298.15 +GHSERCU+600+0.2*T; 3200 N ! FUNCTION GFCCMG 298.15 +GHSERMG+2600-0.9*T; 3000 N ! FUNCTION GLIQCU 298.15 +GHSERCU+12964.735-9.511904*T-5.8489E-21*T**7; 1357.77 Y -46.545+173.881484*T-31.38*T*LN(T); 3200 N ! FUNCTION GLIQMG 298.15 +GHSERMG+8202.243-8.83693*T-8.0176E-20*T**7; 923 Y -5439.869+195.324057*T-34.3088*T*LN(T); 3000 N ! The data are in the form of FUNCTIONS that can be used anywhere throughout the TDB. The first function in the list is labelled GHSERCU and represents the G-HSER function for Cu. From this, all the basic thermodynamic functions for pure Cu can be calculated. 298.15 is the lower temperature bound of validity for the function that follows. This ends with ‘;’ and the upper temperature bound, in this case 1357.77K. The ‘Y’ indicates that there is a second part to the function, that is valid over the range from 1357.77 – 3200K. The ‘N’ indicates that there are no more temperature ranges for this function, and the FUNCTION is terminated with ‘!’ A similar 4 function follows for pure Mg, again, with 2 temperature ranges. (Thermo-Calc users can add a label between the ‘N’ and ‘!’ in any FUNCTION or PARAMETER, which can be used as a reference. The labels and references can be listed at the end of the TDB file following an appropriate command. However, this facility is not available in Pandat at present and so is beyond the scope of this document). Four more functions follow the GHSER functions; two for the elements in metastable structures and two for the elements in the liquid state. Note that they are functions comprising GHSER for the component elements. GHCPCU represents the lattice stability of Cu with the HCP structure. As the function comprises GHSERCU, the numerical part of this function represents the ΔG between the FCC and HCP structures. The functions for the components in the liquid state also have two temperature ranges in the same way as the GHSER functions. Actually, the upper temperature of the first temperature range (or lower of the second) is the melting temperature. So, for both the GHSER and liquid functions, we have descriptions relevant to temperatures where the structures are unstable; below the melting point for the liquid and above the melting point for the solid. This is important, because on forming both solid and liquid solutions the transformation temperature will change with composition. Phase Data -The liquid The third data block in this TDB file gives the parameters for the liquid phase. $ L0 parameter for LIQUID phase (min start; max) OPTIMIZATION LIQ_AA -50000 -34000; 0 N ! OPTIMIZATION LIQ_AAT 0 4; 10 N ! $ L1 parameter for LIQUID phase OPTIMIZATION LIQ_BB -20000 -5000; 0 N ! OPTIMIZATION LIQ_BBT 0 3; +5 N ! $ L2 parameter for LIQUID phase OPTIMIZATION LIQ_CC -10000 -3000; 0 N ! OPTIMIZATION LIQ_CCT 0 7; +10 N ! PHASE LIQUID % 1 1.0 ! CONSTITUENT LIQUID :CU,MG : ! PARAMETER G(LIQUID,CU;0) 298.15 +GLIQCU; 3200 N ! PARAMETER G(LIQUID,MG;0) 298.15 +GLIQMG; 3000 N ! PARAMETER L(LIQUID,CU,MG;0) 298.15 LIQ_AA+LIQ_AAT*T; 3000 N ! PARAMETER L(LIQUID,CU,MG;1) 298.15 LIQ_BB+LIQ_BBT*T; 3000 N ! PARAMETER L(LIQUID,CU,MG;2) 298.15 LIQ_CC+LIQ_CCT*T; 3000 N ! As we want to optimise some of these parameters, the block starts by listing the optimising information. OPTIMIZATION is the keyword, which is followed by the optimising variable name. This is followed by three numbers: a lower bound for the parameter, a start value (and ‘;’) and an upper bound. The OPTIMIZATION is terminated by ‘N’ and ‘!’ in the usual way. Having an upper and lower bound gives some control over the progress of the optimisation. (This is not available in Thermo-Calc). The next important keyword is PHASE, followed by the phase name and a ‘%’ sign (required in Thermo-Calc). Other flags can be added here, such as to indicate magnetism or ordering, but as these features are not appropriate to the Cu-Mg system they will not be discussed further here. The numbers following the ‘%’ give the number of sublattices and the relevant stoichiometry for each, in the case of the liquid, a single sublattice with unity stoichiometry. A ‘!’ terminates the line. For the HCP_A3 phase, for example, there are two sublattices with stoichiometry of 1 and 0.5. The second sublattice contains the interstitial sites. The next line tells the program what the constituents of each sublattice are. The keyword is CONSTITUENT followed by the phase name. The occupancy of each sublattice is given between the colons, which in the case of the liquid is Cu and Mg. The comma indicates that the constituents 5 are allowed to mix on the sublattice. In the case of the HCP_A3 phase, it can be seen that the first sublattice has Cu and Mg mixing, and the second sublattice contains just vacancies. The MG component of the first sublattice in the HCP_A3 phase is followed by a ‘%’. This indicates to the program that Mg is the major constituent of the sublattice. This phase is the terminal solid solution on the Mg-side of the phase diagram. The remaining lines in the data block list the parameters of the phase and each begins with the keyword PARAMETER. Looking at the first line of parameters, the ‘G’ which tells the program the type of data here and is the flag for a unary parameter. This is followed, all in brackets, by the phase name and then constituent, which here is Cu. This is followed by a semi-colon and ‘0’, which has no significance here. Then we have the lower temperature bound for the parameter, the value of the parameter itself, (which here is a function) and then the upper temperature bound of the parameter. As before, ‘N’ indicates no further temperature ranges for the parameter, and ‘!’ signifies the end of the information for this parameter. The parameter given here is the unary data for pure Cu liquid, with the analogous parameter for Mg liquid given in the next line. The next three lines describe the excess Gibbs energy of mixing for the liquid. Now we have ‘L’ instead of G indicating the type of parameter (…mixing. It’s worth mentioning that both ThermoCalc and Pandat will accept a ‘G’ for mixing parameters too!). The constituents are both CU and MG, separated by a comma indicting that they mix, and the parameters themselves are the optimising variables previously indicated. The ‘;0’, ‘;1’ and the ‘;2’ given on each line indicate ܮ, ଵ ܮand ଶ ܮparameters in the Redlich-Kister formalism. Phase Data – Solid Solutions The data blocks for the solid solutions phases are very similar to that of the liquid. Below is the data block for HCP_A3 PHASE HCP_A3 % 2 1 0.5 ! CONSTITUENT HCP_A3 :CU,MG% : VA : ! PARAMETER G(HCP_A3,CU:VA;0) 298.15 +GHCPCU; 3200 N ! PARAMETER G(HCP_A3,MG:VA;0) 298.15 +GHSERMG; 3000 N ! PARAMETER L(HCP_A3,CU,MG:VA;0) 298.15 HCP_AA+HCP_AAT*T; 3000 N ! PARAMETER L(HCP_A3,CU,MG:VA;1) 298.15 HCP_BB+HCP_BBT*T; 3000 N ! The differences here are due to the phase having two sublattices; one for substitution of metallic species and the second for interstitial species, occupied solely by vacancies in this phase. The unary parameters now show the constituents on each sublattice, for example, the unary for Cu has CU:VA, i.e. Cu on the metal sublattice and VA on the interstitial sublattice. Coming to the L parameters, we have CU,MG:VA, which indicates that the parameter applies to mixing of Cu and Mg on the metal sublattice with all sites on the interstitial sublattice occupied by vacancies. Phase Data – Stoichiometric Phases The next data block in the TDB file describes the Gibbs energy of the CuMg2 intermetallic compound. OPTIMIZATION CUMG2_H -30000 -27000; 0 N ! OPTIMIZATION CUMG2_S -25 -20; 0 N ! PHASE CUMG2 % 2 1 2 ! CONSTITUENT CUMG2 :CU : MG : ! PARAMETER G(CUMG2,CU:MG;0) 298.15 +GHSERCU+2*GHSERMG +CUMG2_H+CUMG2_S*T+2.4491*T*LN(T); 3000 N ! 6 The phase has 2 sublattices but only a single species on each. This is typical of a line compound; there is no constituent mixing. The parameter itself is made of the two GHSER functions for the pure components (note the factor of 2, which comes from the stoichiometry given in the PHASE statement) followed by an expression that includes optimising variables given above; essentially the Gibbs energy of formation of the phase from (i.e. relative to) the pure components. The T*ln(T) term comes from the treatment of the experimental Cp data for the phase that was available in the literature, which was discussed at Ringberg. Phase Data – Complex Intermetallic Phases The final data block refers to the description of the Gibbs energy of the C15 compound; the Cu2Mg Laves phase, which is treated with a 2 sublattice model. The first expression in the data block is a function that was created from experimental thermodynamic data present in the literature for the Cu2Mg composition (as discussed at Ringberg). FUNCTION GC15 1 -19778.06667-0.05284616917*T*T-7.13752931E-07*T**4; 80 Y -22047.02039+119.0110591*T-22.88029900*T*LN(T)-0.003191777648*T*T +33760.95465*T**(-1); 1500 N ! Note that this function is valid to (almost) 0K. The declaration of the optimising variables is followed by the PARAMETER lines. There are in two parts. PHASE LAVES_C15 % 2 2 1 ! CONSTITUENT LAVES_C15 :CU%,MG : CU,MG% : ! PARAMETER G(LAVES_C15,CU:CU;0) 298.15 3*GHSERCU+46102; 2000 N ! PARAMETER G(LAVES_C15,MG:MG;0) 298.15 3*GHSERMG+21870; 2000 N ! PARAMETER G(LAVES_C15,MG:CU;0) 298.15 +GHSERCU+2*GHSERMG +107920; 2000 N ! PARAMETER G(LAVES_C15,CU:MG;0) 1 +3*GC15+3*C15_H+3*C15_S*T; 2000 N ! The ‘G’ parameters are the unary expressions, also referred to as ‘virtual compounds’ or ‘endmembers’. Note there is one constituent declared on each of the two sublattices. As in case of the CuMg2 compound, the (CU)2(MG) PARAMETER uses a function (declared above) and optimising variables for ΔH and -ΔS in order to allow fitting to the experimental phase diagram and thermodynamic data. Note also that the pure component unary PARAMETERS comprise 3 times the GHSER function (3 atoms per mole of compound) and a positive number (representing a lattice stability) to destabilise the phase against the pure components. This is important, otherwise, for example, pure Cu would have the same Gibbs energy in both the fcc form and C15, and hence, the same stability. The remaining lines represent the contributions to the Gibbs energy, i.e. the excess Gibbs energy, resulting from mixing the constituents on each sublattice, PARAMETER PARAMETER PARAMETER PARAMETER L(LAVES_C15,CU,MG:CU;0) L(LAVES_C15,CU,MG:MG;0) L(LAVES_C15,CU:CU,MG;0) L(LAVES_C15,MG:CU,MG;0) 298.15 298.15 298.15 298.15 C15_AA; C15_AA; C15_BB; C15_BB; 2000 2000 2000 2000 N N N N ! ! ! ! The first two parameters give the excess Gibbs energy resulting from mixing on the first sublattice, and the second two parameters for mixing on the second sublattice. 7 Conclusions This has been a tour of the TDB file used for the Cu-Mg optimisation conducted at the 4th MSIT Winter School. A TDB file can include other information, such as Gibbs energy contributions from magnetism, pressure dependence, other models, such as associated solutions and order/disorder, but these are outside the current discussion. As the file is free format, the order in which the information is given is not always important, although the first block relating to the constituents should be at the top of the file. For instance, some prefer to list all phases and constituents in a separate block that follows the element FUNCTIONS, followed by other elemental unary PARAMETERS, and then binary and ternary parameters. This can make things a little confusing when sharing TDB files, as each user tends to have their own particular style. Andy Watson, April 2020 8