<<

DOI 10.1515/zkri-2013-1711  Z. Kristallogr. 2014; 229(5): 405–419

Ross J. Angel*, Javier Gonzalez-Platas and Matteo Alvaro EosFit7c and a Fortran module (library) for calculations

Abstract: The relationship between linear theo- and expansion. Equations of state therefore provide not ry of and their equations of state (EoS) is reviewed, only fundamental thermodynamic data that is required, along with the commonly-used types of isothermal EoS, for example, for the calculation of equilibrium dia- thermal expansion models, and P-V-T EoS. A new con- grams (e.g. Berman, 1988; Gottschalk, 1997; Holland & sole program, EosFit7c, is presented. It performs EoS cal- Powell, 1998; Stixrude & Lithgow-Bertelloni, 2005; Hol- culations and fitting for both and linear isother- land & Powell, 2011) but also give insights in to the de- mal data, isobaric data and P-T data. Linear data is tails of interatomic interactions within the state, as handled by cubing the quantities and treating them as it is these that resist the externally-applied compressive in all EoS formulations. Least-squares fitting of stresses (e.g. Brown, Klages & Skowron, 2003; Zhao, EoS to data incorporates the option to weight the fit with Ross & Angel, 2004; Fabbiani & Pulham, 2006) and con- the measurement uncertainties in P, V and T simulta- trol the dynamics that to thermal expansion (e.g. neously. The EosFit7c program is built with a new library Willis & Pryor, 1975). of subroutines for EoS calculations and manipulation, The majority of equation of state studies measure the written in Fortran. The library has been incorporated as a volume or unit-cell parameter variations with module, cfml_eos, in the publicly-available CrysFML li- (and/or ), with the aim of deriving elastic brary. The module handles Murnaghan, Tait, Birch-Mur- parameters that are derivatives of the data. For example, naghan, Vinet, and Natural Strain EoS. For P-V-T calcula- the bulk modulus that defines the instantaneous volume tions any of these isothermal EoS can be combined with variation with pressure is K ¼Vð@P=@VÞ. The bulk a variety of published thermal expansion models, includ- moduli of most inorganic solids range from ~40 to ing a model of . The entire library has 400 GPa. Therefore the volume changes induced by com- been revalidated against other software and against an pression over the relatively-easily accessible experimen- ab-initio re-derivation of the EoS, which identified a tal pressure range (0–10 GPa) are only larger than the ex- number of small errors in published formulae for some perimental uncertainties by 1 or 2 orders of magnitude. EoS. The need to obtain parameters that are derivatives of the original data, in combination with the small data range, Keywords: equations of state, thermal expansion, EosFit clearly makes the reliable determination of the para- meters difficult to achieve. Strong correlations between  parameters, which include the pressure derivatives of K, *Corresponding Author: Ross J. Angel, Dipartimento di Geoscienze, exacerbate the problems. These issues were previously Università di Padova, Via G. Gradenigo 6, Padova, 35131, Italy, e-mail: [email protected] addressed by the development of the EosFit program Matteo Alvaro: Dipartimento di Geoscienze, Università di Padova, (Angel, 2000a) which provided the capability of fitting Via G. Gradenigo 6, Padova, 35131, Italy P-V (and unit-cell parameter data) with various EoS, with Javier Gonzalez-Platas: Departamento de Física Fundamental II. the correct algebra and with options to fully weight the Servicio de Difracción de Rayos X, Universidad de La Laguna, data with the measurement uncertainties. The Eosfit pro- La Laguna, Tenerife 38206, Spain gram includes utilities to do further EoS calculations be- yond just fitting EoS parameters to P-V data. The ready availability of a variety of spread sheets Introduction and algebraic software makes it relatively easy, in princi- ple, to fit any EoS formulation to data. However, the An equation of state (EoS) describes how the volume or complex nature of some equation of state functions has of a material varies with changes in pressure and led to their algebraic forms being mis-stated in the litera- temperature. It also defines how some of the elastic prop- ture. The additional possibility of errors in coding the erties of the material change in response to compression complex equations, and the requirement to implement

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 406  R. J. Angel et al., EosFit7c and equations of state specific (non-standard) weighting methods to overcome presentation of the compliance tensor of the material correlation problems, makes imperative the provision of (Nye, 1957). a validated set of publicly-available self-consistent algo- Hydrostatic pressure is a special state in which rithms for EoS calculations. We have now translated the the normal stresses are all equal (σ1 ¼ σ2 ¼ σ3 ¼ P) and original code of EosFit to Fortran-95, revalidated it, and there are no shear stresses (σ4 ¼ σ5 ¼ σ6 ¼ 0). Thus, at have built it in to a module that is part of the larger Crys- any pressure P, the strains caused by an infinitesimal in- tallographic Fortran Modules Library CrysFML (Rodri- crease in pressure δP can be calculated through linear guez-Carvajal & Gonzalez-Platas, 2003). This will ensure elasticity theory by setting σ1 ¼ σ2 ¼ σ3 ¼δP. (Note the long-term survival and availability to programmers of that while pressure is considered to be a positive quan- a validated set of easy-to-use procedures for EoS calcula- tity, compressive stresses are by convention considered tions. to be negative; Nye, 1957). Therefore each of the resulting In this paper we first briefly review the relationship strain elements is given by: between linear elasticity theory of solids and their equa- ε ¼ð σ þ σ þ σ Þ¼ð þ þ Þ δ : tions of state, and then present the types of isothermal i si1 1 si2 2 si3 3 si1 si2 si3 P EoS, thermal expansion models, and thus P-V-T EoS that are implemented within the new EoS module of CrysFML. The sum of the three normal strains is, in the infinitesi- The handling of linear data (e.g. cell parameters) in a mal limit, equal to the fractional change in the volume manner consistent with both volume EoS and linear elas- @V=V, thus: ticity theory is discussed, prior to a description of the @ = ¼ðε þε þε Þ¼½ þ þ þ ð þ þ Þ δ : implementation of these approaches in the CrysFML V V 1 2 3 s11 s22 s33 2 s12 s13 s23 P module. A new program, EosFit7c, that performs EoS cal- culations and fits P-V, V-T and P-V-T data (and linear Re-arrangement of this last equation shows that the bulk equivalents), is presented as an example of the new fea- modulus for hydrostatic compression at any pressure is tures that are available in the module. defined by six of the elements of the ma- trix at that same pressure:

1 Isothermal equations of state K ¼VδP=δV ¼½s11 þ s22 þ s33 þ 2 ðs12 þ s13 þ s23Þ :

Basis in linear elasticity theory This bulk modulus for hydrostatic compression of a so- lid, whether a powder or single , is therefore equal The variation of the volume of a solid with hydrostatic to the Reuss bound on the bulk modulus of a polycrystal pressure at fixed temperature is termed its ‘isothermal made of the same material where it represents the vol- equation of state’. It is characterised by the bulk modu- ume response when every constituent grain is subject to ¼ ð@ =@ Þ lus of the material, K V P V T , which is a func- the same stress. tion of both temperature and pressure. For infinitesimal While linear elasticity thus defines the bulk modulus changes in pressure which give rise to infinitesimal of a material under hydrostatic compression at any pres- changes in volume, the bulk modulus can also be de- sure, it cannot define an equation of state which de- fined in terms of the elastic tensor of the material by ap- scribes the large (finite) changes in volume due to large plying linear elasticity theory, or ‘Hooke’s law’. In linear (finite) changes in pressure. In this sense an equation of elasticity it is assumed that the strains εi of a solid are state is an extension of linear elasticity; although nor- linearly related to the magnitude of the applied stress mally defined in terms of the volume variation with pres- field σj by the matrix equation εi ¼ sijσj. The suffixes run sure, it can also be seen as a definition of the variation from 1 to 6, with i,j ¼ 1, 2, 3 referring to normal stresses of bulk modulus with pressure. Because there is no abso- or strains along orthogonal axes, and i,j ¼ 4, 5, 6 refer- lute thermodynamic basis for specifying how the bulk ring to shear stresses or strains (e.g. Nye, 1957; Angel, modulus K varies with pressure, all EoS that have been Jackson, Reichmann & Speziale, 2009). The elastic prop- developed and are in widespread use are based upon a erties of the material are represented by the values of the number of assumptions (e.g. Anderson, 1995; Duffy & elements of the compliance matrix sij which is symmetric Wang, 1998; Holzapfel, 2001). The validity of such as- and can contain up to 21 independent elements for tricli- sumptions can only be judged in terms of whether the nic , less for crystals and materials with higher derived EoS reproduces experimental data for volume or symmetries. The compliance matrix is a convenient re- elasticity. For materials that do not exhibit phase transi-

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  407

tions, isothermal equations of state are usually parame- or as: "# 0 terized in terms of the values of the bulk modulus and its K0T K0T V0T 0 00 ¼ : pressure derivatives, K ¼ @K=@P and K ¼ @2K=@P2, PVT 0 1 K 0T V evaluated at a reference pressure, normally taken as zero pressure. If the material undergoes a structural phase This illustrates the attraction of the Murnaghan EoS: it is transition, additional parameters are required (e.g. Trös- ‘invertible’ (Freund & Ingalls, 1989), which means that it ter, Schranz & Miletich, 2002; Schranz, Tröster, Koppen- can be written as either a simple function of V,orasa steiner & Miletich, 2007). In order to allow for the de- simple function of P. This makes it very attractive for use scription of the variation of the volume with temperature in thermodynamic databases and calculations in which and pressure, we also define a reference temperature for both functions and their integrals are frequently re- the EoS, Tref . We then denote the values of the para- quired. However, the Murnaghan EoS only reproduces meters describing an equation of state at the reference P-V data and the correct values of the room pressure temperature and pressure with two subscripts “0”, thus: bulk modulus for small compressions up to about 10%

(i.e. V/V0 ~ 0.9). It fails at greater compression because it ¼ ð@ =@ Þ 0 ¼ð@ =@ Þ 00 ¼ K00 V00 P V P¼0;T¼Tref , K 00 K P P¼0;T¼Tref , has K PT 0, in contrast to experimental data which in- dicate that most solids exhibit a small negative value for and 00 = K 0T of the order of 1 K0T (e.g. Jackson & Niesler, 00 ¼ð@2 =@ 2Þ : 1982). The obvious simple extension of the Murnaghan K 00 K P P¼0;T¼Tref EoS to include an additional term in the expression for 0 00 2 Using this notation to the value of the room-pres- the bulk modulus, KPT ¼ K0T þ K 0T P þ K 0T P =2 results sure bulk modulus at some temperature T being denoted in an extremely complex and impractical function for vol- ¼ ð@ =@ Þ K0T V0T P V P¼0;T , and its isothermal pressure ume as a function of pressure (Freund & Ingalls, 1989). 0 00 derivatives K 0T and K 0T . The subscript ‘T’ is therefore not to be read as indicating isothermal as opposed to adiabatic moduli, although all of the moduli discussed Tait here are isothermal. Note that the values of adiabatic bulk moduli are typically a few % larger than isothermal Freund & Ingalls (1989) showed that the ‘modified Tait moduli, by a factor ð1 þ αV γTÞ in which αV is the thermal equation’ of Huang & Chow (1974) is a generalised form expansion coefficient, γ the Anderson-Grüneisen para- of the Murnaghan EoS which remains easily invertible: meter, and T the temperature. ! = There are many reviews of equations of state avail- 1 ðV =V Þþa 1 1 c P ¼ PT 0T 1 able in the literature (e.g. Anderson, 1995; Duffy & Wang, VT b a 1998; Holzapfel, 2001). In the following sections we re- and strict ourselves to briefly introducing the EoS that are c coded in to the CrysFML EoS module and are available to VPT ¼ V0T ð1 að1 ð1 þ bPÞ ÞÞ : a user in the programs built upon it, including our new The three parameters a, b, c are defined in terms of the console program, EosFit7c. The EoS have been chosen bulk modulus and its derivatives at room pressure: for the library because of their widespread use and/or suitability for fitting data in the absence of phase þ 0 P-V ¼ 1 K 0T ¼ 1 a 0 00 K0T transitions. 1 þ K 0T þ K0T K 0T abc K0 K00 c þ 1 b ¼ 0T 0T and the K0 ¼ 1 K 1 þ K0 0T ac Murnaghan 0T 0T inverse relationships: The Murnaghan EoS (Murnaghan, 1937) can be derived 1 þ K0 þ K K00 b from the assumption that the bulk modulus varies line- ¼ 0T 0T 0T 00 ¼ ð1 Þð þ 1Þ : c 0 2 0 00 K 0T a c 0 ðK 0T Þ þ K 0T K0T K 0T a arly with pressure, KPT ¼ K0T þ K 0T P. This results in a K0 relationship between P and V of: K00 ¼ a ¼ ; b ¼ 0T ; c ¼ 1 If 0T 0, then 1 0 , and the K0T K 0T 0 0 1=K 0T K 0T P equation is reduced to the Murnaghan form (Freund & VPT ¼ V0T 1 þ 00 K0T Ingalls, 1989). While precise values of K 0T are difficult

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 408  R. J. Angel et al., EosFit7c and equations of state to measure, it is clear that for most solids they are not This allows the Birch-Murnaghan EoS to be expressed as zero. Holland & Powell (2011) therefore introduced a a simple polynomial: K0 ‘ ’ K00 ¼ 0T truncation of the Tait equation by setting 0T . 3 K0T 0 F ¼ K0T 1 þ ðK 0T 4Þ fE In the EoS module of CrysFML this estimate of K00 is 2 0T named the ‘3rd-order’ form, with the 4th-order form in- 3 35 þ 00 þðÞð0 0 Þþ 2 : 00 nd K0T K 0T K 0T 4 K 0T 3 fE cluding a refineable K 0T . There is no rationale for a 2 - 2 9 order formulation, but for completeness we can define a nd nd 0 00 4 If this EoS is truncated at 2 -order in the , then 2 -order form as having K 0T ¼ 4, and thus K 0T ¼ . K0T the coefficient of fE must be identical to zero, which re- 0 Thus all orders of the Tait equation as implemented in quires that K 0T has the fixed value of 4 (higher-order 00 rd the EoS module of CrysFML have K 0T 6¼ 0 and therefore terms are ignored). The 3 -order truncation, in which the 2 fit P-V data of solids substantially better than the Murna- coefficient of fE is set to zero yields a three-parameter 0 ghan EoS. EoS (with V0T , K0T and K 0T ) with an implied value of 00 Because the Tait EoS is invertible, the expressions for K 0T given by (Anderson, 1995): the bulk modulus and its pressure derivatives as a func- 1 35 tion of pressure can be obtained directly (since the para- K00 ¼ ð3 K0 Þð4 K0 Þþ : 0T K 0T 0T 9 meters a, b, and c are constants) by differentiation with 0T respect to pressure of the expression for the volume: The expressions for the bulk modulus and its first deriva- tive for the 3rd-order Birch-Murnaghan EoS are therefore VPT ðcþ1Þ (Angel, 2000b): KPT ¼ K0T ð1 þ bPÞ ; V0T : 5= 0 27 0 or K ¼ K ð1 þ 2f Þ 2 1 þð3K 5Þ f þ ðK 4Þ f 2 PT 0T E 0T E 2 0T E c ðcþ1Þ KPT ¼ K0T ð1 að1 ð1 þ bPÞ ÞÞ ð1 þ bPÞ : K 5= 0 0T 2 K PT ¼ ð1 þ 2fEÞ KPT Further differentiation with respect to pressure leads to: 143 81 0 0 0 0 0 2 ¼ð þ Þ½ð þ Þcð Þþ K 0T þ 16 K 0T fE þ ðK 0T 4Þ f : K PT K 0T 1 1 bP 1 a a 1 3 2 E 00 Setting a ¼ 1 (and thus K 0T ¼ 0) in these equations 0 0 0 leads to KPT ¼ K0T þ K 0T P and K PT ¼ K 0T as required These are equivalent to the expressions given by Birch for the Murnaghan EoS. (1986) in his appendix 1, and by Anderson (1995) in his equations (6.52) to (6.55), except for a typographical error of K0 for K00 in his equation (6.53). The expressions given Birch-Murnaghan by Stacey et al. (1981) are correct except that for K0, 2 which is truncated at fE rather than after the fE which is This “finite strain EoS” is derived (Birch, 1947) from the required for the expression to be exact. Expressions for assumption that the strain energy of a solid undergoing the 2nd-order Birch-Murnaghan EoS can be obtained by 0 compression can be expressed as a Taylor series in the setting K 0T ¼ 4 in all of the above. 2= 3 finite Eulerian strain, fE ¼½ðV0T =VPT Þ 1=2. Expan- We find that fits of the Birch-Murnaghan and Tait sion to 4th-order in the strain yields an EoS: EoS to P-V data normally yield parameters that are indis- tinguishable within the uncertainties, but with the Birch- 5=2 3 0 P ¼ 3K0T fEð1 þ 2fEÞ 1 þ ðK 0T 4Þ fE Murnaghan EoS typically having marginally better formal 2 measures of statistical fit. The 4th-order fits of the two 3 35 equations are normally statistically and numerically in- þ K K00 þðK0 4ÞðK0 3Þþ f 2 : 2 0T 0T 0T 0T 9 E distinguishable.

The normalised pressure for the Birch-Murnaghan EoS is defined as (Stacey, Brennan & Irvine, 1981): Natural strain

¼ P : Poirier & Tarantola (1998) developed an EoS based upon F 5= 3f ð1 þ 2f Þ 2 E E the “natural” or “Hencky” measure of linear strain fN

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  409 which, for hydrostatic compression, may be written as Vinet ¼ 1= ð = Þ fN 3ln V0 V . Note that this definition has been in- verted with respect to that used in Angel (2000a) in order The finite-strain EoS do not accurately represent the vol- to obtain positive values of fN on compression. This ume variation of most solids under very high compres- th yields a pressure-volume relationship expanded to 4 -or- sion ðVPT =V0T < 0:6Þ, so Vinet, Ferrante, Rose & Smith der in strain of: (1986) and Vinet, Ferrante, Smith & Rose (1987) derived an EoS from a generalised inter-atomic potential. Follow- V0T 3 0 ing Schlosser & Ferrante (1988), the expression for pres- P ¼ 3K0T fN 1 þ ðK 0T 2Þ fN VPT 2 sure in the Vinet EoS is: 3 00 0 0 2 2 þ K0T K 0T þ 1 þðK 0T 2ÞþðK 0T 2Þ f 2 N ¼ 3fV ðη Þ P K0T 2 exp fV ð1 fV Þ which can also be written as in terms of a normalized with P ¼ 1= pressure F as: 3 V0T VPT 3 0 3 fN fV ¼ 1 and η ¼ ðK 0T 1Þ : VPT V0T 2 V ¼ ¼ ¼ 0T ½ þ þ 2 This definition of fV means that fV 0atP 0, and that P 3K0T fN 1 afN bfN VPT fV increases as a positive quantity with increasing pres- sure and compression. It therefore follows the conven- 3 with a ¼ ðK0 2Þ and tions in the definition of magnitude and sign of Eulerian 2 0T hifinite strain. This is a change from the implementation in 3 00 0 0 2 b ¼ 1 þ K0T K 0T þðK 0T 2ÞþðK 0T 2Þ : previous versions of EosFit (Angel, 2000a). The presence 2 0 of K 0T as a refineable parameter also leads, by compar- Truncation of this “Natural strain” EoS at 2nd-order in the ison with other finite strain EoS, to naming this a ‘3rd-or- strain is obtained by setting a ¼ b ¼ 0 and it implies a val- der’ EoS. 0 nd ue of K 0T ¼ 2, different from that of the 2 -order Birch- In order to obtain a form of the EoS with which to Murnaghan EoS. For truncation at 3rd-order in the strain, construct plots of ‘normalised pressure’ against the strain 00 a 6¼ 0; b ¼ 0, and the implied value of K 0T is given by: fV , a normalised pressure! has previously been defined as 2 Pð1 fV Þ hiF ¼ ln (Vinet et al., 1986; Vinet et al., 00 1 0 0 2 V 3 K 0T ¼ 1 þðK 0T 2ÞþðK 0T 2Þ : fV K0T 1987; Schlosser & Ferrante, 1988). Then

3 0 00 FV ¼ lnðK0T Þþ ðK 0T 1Þ fV , which should be linear in This value for K 0T is normally substantially larger than 2 that implied by the truncation of the 3rd-order Birch-Mur- 3 f with slope of ðK0 1Þ. But the intercept at f ¼ 0is naghan EoS, and this often results in a significantly V 2 0T V poorer fit of P-V data. The bulk modulus and its deriva- lnðK0T Þ. Therefore in the EoS module of CrysFML we im- tives for all orders of this EoS are: ð Þ2 ¼ P 1 fV ¼ ðη Þ plement FV , for which FV K0T exp fV . 3fV V0T 1 0 2 3 KPT ¼ 3K0T þðK 0T 1Þ fN þða þ bÞ f þ bf The y-axis intercept of a plot of F against f is thus K , V 3 N N V V 0T PT nd and it will give a horizontal line for a 2 -order EoS with 0 rd 0 0 K0T V0T 0 K 0T ¼ 1. A 3 -order EoS with K 0T > 1 will have a curved K PT ¼ ½K 0T þð4a þ 2b þ 3Þ fN KPT VPT line, with increasing gradient with increasing fV . For rea- 0 sonable values of K 0T the curvature is very slight. The þ 3ða þ 2bÞ f 2 þ 3bf 3 N N @FV slope at any point is ¼ K0T η exp ðηfV Þ, so the initial @fV 00 K0T V0T 1 3K0T 0 K ¼ ð4a þ 2b þ 3Þþ2ða þ 2bÞ f slope is ðK 0T 1Þ, a form entirely analogous to f-F PT 2 N 2 KPT VPT 3 plots of the Birch-Murnaghan EoS. 2 0 0 2 There is no theoretical basis for truncation of the Vi- þ 3bf K 0T ½ðK 0T 1Þþ2ða þ bÞ fN þ 3bf : N N net EoS to lower order, although it yields an implied val-

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 410  R. J. Angel et al., EosFit7c and equations of state

0 00 ue for K 0T of 1. The implied value of K 0T for the Vinet ln ðV0T =V00Þ¼α0ðTTref Þ,orV0T ¼ V00 exp ½α0ðTTref Þ. EoS is given by Jeanloz (1988) as: Truncation to first order in the expansion of the "# logarithmic terms results in the expression 1 K0 2 K0 19 K00 ¼ 0T þ 0T : V ¼ V ð1 þ α ðT T ÞÞ. Strictly, this truncation leads 0T K 2 2 36 0T 00 0 ref 0T to a slightly varying thermal expansion coefficient be- 00 Expansions of the Vinet EoS to include a refineable K 0T cause re-differentiation of the truncated equation leads to have been proposed but are not required to fit most ex- @V0T V00 ¼ V00α0, which means that α ¼ α0. Berman perimental data of simple solids in the absence of phase @T V0T transitions. (1988) proposed a simple extension to accommodate non- linear thermal expansion:

1 Thermal expansion V ¼ V ð1 þ α ðT T Þþ α ðT T Þ2Þ : 0T 00 0 ref 2 1 ref The volume thermal expansion of a material is defined 1 @V V as αðTÞ¼V1 ð@V=@TÞ . Integration of this expression Differentiation yields 0T ¼ 00 ½α þ α ðT T Þ. P V @T V 0 1 ref yields the volume variation with temperature at constant 0T 0T Given the small changes in volume with temperature, pressure: this is approximately α ½α0 þ α1ðT Tref Þ. The para- ÐT meter α0 is the thermal expansion coefficient at Tref . V0T ¼ V00 exp αðTÞ dT : Tref However, this equation is not valid for low because it predicts a finite value for αðTÞ at Where Tref is a reference temperature at which the vol- except for the special case of α1 ¼ α0=Tref . ume is V00. The only thermodynamic constraints on the form of αð Þ αð Þ¼@α=@ ¼ the function for T are that T T 0 at abso- Fei equation lute zero. Consequently many different forms have been proposed in the literature, and several have become Earlier versions of EosFit (Angel, 2000a) implemented a widely-used, for example in thermodynamic databases linear variation of thermal expansion as α ¼ α þ α T (e.g. Berman, 1988; Gottschalk, 1997; Holland & Powell, 0 1 but without the truncation of the exponential term im- 1998; Holland & Powell, 2011). Some simple formulations plied by the Berman equation. Fei (1995) proposed an ex- that describe thermal expansion at high temperatures pansion of this expression to α ¼ α þ α T þ α T2 (with very well do not include the low-T saturation, but are 0 1 2 T in ). This leads to the high-temperature volume widely used and are perfectly adequate for thermody- at zero pressure given as: namic databases. On the other hand, some equations ex- plicitly handle the saturation in thermal expansion as ¼ α ð Þþ 1 α ð 2 2 Þ α 1 1 : the temperature drops towards absolute zero, but these V0T V00 exp 0 T Tref 1 T Tref 2 2 T Tref often result in unphysical values of thermal expansion at high temperatures in excess of 1000 K, where experi- With this formulation, the actual values of α0, α1 and α2 ments indicate that αðTÞ increases approximately linearly that describe a V-T curve are those at 0 K, and not those with temperature. Following the reviews of various ther- at Tref , so their values are independent of Tref . It also has mal expansion expressions based on analysis and fitting 1 @V the advantage that the derivative 0T is exactly of data (Tribaudino, Angel, Camara, Nestola, Pasqual & V0T @T 2 Margiolaki, 2010; Tribaudino, Bruno, Nestola, Pasqual & α ¼ α0 þ α1T þ α2T at all temperatures. The disadvan- Angel, 2011; Kroll, Kirfel, Heinemann & Barbier, 2012), tage is that the full expression predicts non-physical be- we have implemented the following thermal expansion haviour at low temperatures because the term in T2 equations in the EoS module of CrysFML. causes the value of α to diverge towards infinity as T ap-

proaches 0 K. If α2 ¼ 0 the simplified form α ¼ α0 þ α1T remains mathematically valid at all temperatures Berman equation although it does not yield α ¼ 0atT ¼ 0K.

At the lowest level of approximation α(T) can be consid- ered a constant, in which case integration yields

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  411

Modified Holland-Powell (1998) equation in which p0 and p1 are fitting parameters and θsat is termed the “saturation temperature”. In fact the thermal Pawley, Redfern & Holland (1996) proposed a model that expansion coefficient only becomes zero below ensures that the thermal expansion becomes approxi- T θsat=10. The equation should only be used to de- mately constant at high temperatures: scribe volume variation at low temperatures, because it pffiffiffiffi pffiffiffiffiffiffiffiffi leads to an expression (Kroll et al., 2012) for the thermal V0T ¼ V00ð1 þ α0ðT Tref Þ2α1ð T Tref ÞÞ : expansion coefficient of:

Pawley et al. (1996) used 298 K as a fixed reference tem- "# 3p θ2 coth2 ðθ =TÞ1 perature, but there is no need to do so. They also pro- αð Þ¼ 1 sat sat : T 1= 2 V 3 T posed a simplification with α1 ¼ 10α0 in which case the 0T equation becomes: At moderate temperatures, above about 3θsat(θsat is typi- pffiffiffiffi pffiffiffiffiffiffiffiffi cally 200–500 K), the thermal expansion becomes almost V0T ¼ V00 1 þ α0ðT Tref Þ2ð10α0ð T Tref ÞÞ : independent of temperature, which is not observed for most materials. The value of p is thus approximately 3 This is sufficient to model low-resolution datasets, but 1 times the high-temperature value of α.AtT ¼ 0 K the maintains the saturation in thermal expansion at high coth function has the value of unity, so the volume at temperatures. In order to accommodate this simplifica- T ¼ 0is½p þ p θ 3. Therefore, in order for the para- tion in a simple manner which also allows the use of the 0 1 sat meter V to have the value of the volume at the tem- more general equation, we modified the Pawley et al. 00 perature T ¼ 0 K, we re-write the equation as: (1996) equation to: ref 1= pffiffiffiffi pffiffiffiffiffiffiffiffi ¼½ 3 þ θ ½ ðθ = Þ 3 : V0T V00 p1 sat coth sat T 1 V0T ¼ V00ð1 þ α0ðT Tref Þ2ð10α0 þ α1Þð T Tref ÞÞ : The Salje equation could also be re-written in terms of a Note that the entire term ð10α þ α Þ of this equation is 0 1 reference temperature, but since it is only applicable to equal to the α coefficient used by Pawley et al. (1996). 1 low-temperature thermal expansion, this is not imple- Thus, when α is fixed at zero the whole term ð10α þ α Þ 1 0 1 mented in the EoS module of CrysFML, which therefore becomes equal to 10α and the simplified equation pro- 0 sets T ¼ 0. posed by Pawley et al. (1996) and used in Holland & Po- ref well (1998) is obtained. In the EoS module of CrysFML, 1 @V the correct value of α ¼ PT is always calculated, so Kroll form of Holland & Powell (2011) VPT @T the returned values from the program will differ from From the preceding discussion, it is clear that simple ex- those obtained by inserting the parameters in to the ap- pressions in temperature for the thermal expansion coef- proximate equations for thermal expansion given by the ficient do not simultaneously meet the thermodynamic previous authors. This equation cannot be used at low requirement αðTÞ¼@α=@T ¼ 0atT ¼ 0 and match the 10α þ α 2 ¼ 0 1 experimental observation that αðTÞ becomes linear with temperatures because below T α the ther- 0 temperature at high temperatures. The solution is to use mal expansion becomes negative and the volume is pre- an equation for thermal expansion that explicitly relates dicted to increase with decreasing temperature. If α ¼ 0 1 the volume to lattice energy of the material. Kroll et al. this limiting temperature is 100 K. Note also that, even (2012) show that the Kumar (2003, and references there- 1 @V when α ¼ 0, α ¼ 0T at T is not equal to α . in) version of this approach is superior to that of Suzuki 1 V @T ref 0 0T (1975) and Wallace (1972). The disadvantage of the Ku- mar thermal expansion is that it is referenced to absolute Salje equation zero. Holland & Powell (2011) developed a similar func- tion that is expressed in terms of parameters at a refer- The saturation of thermal expansion at low temperature ence temperature. Although this formulation is not quite can be addressed using an equation of the form sug- as robust in extrapolation as the Kumar expression when gested by Salje, Wruck and Thomas (1991): the underlying data are sparse, when the data are suffi- cient it produces fits and parameters that are indistin- 3 V0T ¼½p0 þ p1θsat coth ðθsat=TÞ guishable from those of the Kumar equation (Kroll et al.,

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 412  R. J. Angel et al., EosFit7c and equations of state

2012). Tribaudino et al. (2011) and Kroll et al. (2012) give sion coefficients at reasonably modest for a different but equivalent expressions, of which the latter large number of materials. Hellfrich & Connolly (2009) is perhaps clearer: used the definition of the Anderson-Gruneisen parameter δ "#, to propose an alternative description of the variation 0 ð 0 þ Þ B of K with temperature: ¼ 0 þð þ 0 Þ K 00 K 00 2 : 0T V0T V00 K 00 1 K 00 1 0 A ðK 00 þ 1Þ "# ÐT K ¼ K exp δ αðTÞ dT : The two expressions for A and B are: 0T 00 Tref

"# !δ θE 1 1 ÐT ¼ α ; A 0 Tref This can be re-arranged as: K0T ¼ K00 exp αðTÞ dT ξ exp ðθE=TÞ1 exp ðθE=T Þ1 0 ref T δ ref V 0 0 ¼ 00 B ¼1=K 00ðK 00 þ 2Þ : and thus K0T K00 . V0T Note that δ is approximately equal to K0 , so as a first In the expression for A, the factor 00 approximation P-V-T data can be handled without any ðθ = Þ2 exp ðθ = Þ additional parameters. An alternative approach that ξ ¼ E Tref E Tref : 0 ð ðθ = Þ Þ2 yields indistinguishable P-V-T relationships and also exp E Tref 1 avoids negative values of thermal expansion, is the con-

The Einstein temperature, θE, in the coth functions pro- cept of thermal pressure. vides the saturation in α at low temperatures, below

T θE=10. The value of α0 is the thermal expansion coef- ficient at Tref . The value of θE can be approximated from Thermal pressure the molar standard state (e.g. Holland & Powell, 2011), but tests indicate that its precise value is not criti- The idea of thermal pressure (e.g. Anderson, 1995) is that cal for the correct description of the volume variation the total pressure at a given V and T can be expressed as with temperature and, consequently, it normally cannot the sum of two terms: be reliably determined by refinement to data.

PðV; TÞ¼PðV; Tref ÞþPthðTÞ :

P-V-T equations of state The function PðV; Tref Þ is the isothermal equation of state for the material at the reference temperature, but using Equations to describe the variation of volume with both the ‘observed’ volume from P and T. The thermal-pres- pressure and temperature can be developed by combin- sure function PthðTÞ is the pressure that would be cre- ing any thermal expansion model with any isothermal ated by increasing the temperature from Tref to T at con- equation of state, and a model of the variation of bulk stant volume at room pressure. The thermal pressure at modulus with temperature at room pressure, @K0T =@T. Tref is thus zero, so at Tref the thermal-pressure EoS re- The simplest approach of assuming a linear variation duces to the isothermal EoS. The thermal pressure at of K0 with temperature, so @K0T =@T is constant, has been other temperatures clearly depends on the bulk modulus. justified at high temperatures by direct measurements of The inverse problem of determining V at a given P and T the bulk moduli of many materials by elasticity measure- consists of calculating the PthðTÞ, and then solving the ments (e.g. as summarised in Anderson, 1995). In combi- isothermal EoS at Tref to find V for an ‘effective pressure’ nation with an expression for thermal expansion that al- equal to PðV; Tref Þ¼PðV; TÞPthðTÞ. 0 lows @α=@T 6¼ 0, and an isothermal EoS with K 00 6¼ 0, The Holland & Powell (2011) expression for the ther- this approach includes all second derivatives of the vol- mal pressure is incorporated in to the EoS module of ume with respect to the intensive variables P and T, and CrysFML. It employs an Einstein function: is thus algebraically internally consistent. This is because θ 1 1 @ =@ @2 =@ @ ¼ α E K0T T provides the cross-derivative V T P; thus if Pth 0K00 ξ ðθ = Þ ðθ = Þ 0 exp E T 1 exp E Tref 1 @K0T =@T ¼ 0 then α does not change with pressure. ξ However, as Hellfrich & Connolly (2009) pointed out, with 0 being the same as in the thermal expansion this formulation with a constant @K0T =@T often leads to equation of Kroll et al. (2012). This thermal-pressure the prediction of non-physical negative thermal expan- model has the properties that the product αK becomes

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  413 constant at high temperatures while it decreases to zero cell parameters or other distances in the same material is at low temperatures. This means that both the bulk mod- to use the same equations as used for the volume varia- ulus K0T and the thermal expansion become constant at tion (Angel, 2000a). For linear quantities a, the quantity low temperatures, and both have an approximately line- is cubed and then treated as a volume in the same equa- ar variation with temperature above θE. The exact expres- tions described above for the volume variation with P sions for thermal expansion and bulk modulus as a func- and T. It is clear that for cubic or isotropic materials a tion of temperature depend on the choice of isothermal description of the volume variation, V ¼ a3, will lead to α ¼ α α ¼ α β ¼ β equation of state, but at Tref and zero pressure 0 values of V 3 a and V 3 a. The same is true for all (Holland & Powell, 2011). other symmetries, except that the values of cubed lengths are not the true volume. The EoS module of CrysFML handles these inter-conversions of parameter Linear EoS values internally and always returns the thermal expan- @ α ¼ 1 xi sion in the linear case as i @ . For linear com- The variation of the linear dimensions of a material with xi T P temperature and pressure can be expressed in terms of pression we can define a linear modulus as @ the linear thermal expansion and compressibility ma- ¼ P ¼ 1 ¼ð þ þ Þ1 Mi xi @ β si1 si2 si3 . Thus the rela- trices: xi T i tionship between the linear moduli and bulk moduli is 1 @x 1 @x α ¼ i and β ¼ i : 1 1 1 1 i x @T i x @P K ¼ þ þ . For isotropic and cubic materi- i P i T M M M 1 2 3 M Both of these can be converted to tensor forms (Nye, als this reduces to K ¼ a and thus β ¼ 3β , as re- 3 V a 1957; Knight, 2010) with the same factors for the shear quired. The linear moduli and their pressure derivatives terms (i ¼ 4, 5, 6) as used for the conversion of strain defined in this way (which correspond to the elastic com- between matrix elements and tensor components. The pliances) have numerical values three times those of the use of a negative sign in the definition of the compressi- corresponding volume bulk modulus. Again, the EoS bility is purely a convention to obtain positive values for module of CrysFML handles the inter-conversions inter- the first three (i ¼ 1, 2, 3) matrix elements. We have al- nally and always returns the correct values of the moduli ready shown that the linear strains due to a small incre- M, and its derivatives for the linear case. Note that this is ment in pressure are given by linear elasticity theory as: a change from earlier versions of EosFit (Angel, 2000a) which returned volume-like values for the linear moduli. ε ¼ðs σ þ s σ þ s σ Þ¼ðs þ s þ s Þ δP : i i1 1 i2 2 i3 3 i1 i2 i3 The consequence of using these conventions is that the corresponding values of finite strain and normalised Given the definition of the infinitesimal normal strains as pressure are those for volume, not for linear quantities. ε ¼ @x =x , it follows that the linear are i i i Therefore f-F plots of linear data yield values of inter- also given by the sum of elements of the compliance ma- cepts and slopes of lines that correspond to the values of trix: β ¼ε =δP ¼ðs þ s þ s Þ. As for the volume var- i i i1 i2 i3 volume bulk moduli and their derivatives, not those of iation with pressure and temperature, there is however the linear moduli. When an f-F plot is used to display no absolute thermodynamic basis for specifying the var- linear data, the moduli derived from its intercept and iation in individual distances or cell parameters of a crys- slope must therefore be multiplied by 3 to obtain the lin- tal with P and T because this involves finite strains. The ear moduli and its pressure derivatives. only constraint that we can apply is that the sum of the normal strains must be equal to the volume strain in the infinitesimal limit. As a consequence: Implementation in CrysFML @ α þ α þ α ¼ 1 V ¼ α CrysFML is a set of Fortran modules that can be ‘used’ 1 2 3 @ V and V T P (in the Fortran sense) by external programs for perform- @ ing crystallographic and related calculations (Rodriguez- β þ β þ β ¼ 1 V ¼ 1 : 1 2 3 V @P K Carvajal & Gonzalez-Platas, 2003). Each module contains T subroutines, functions and data structures (as user-de- The only way to ensure such consistency between de- fined types) for certain kinds of crystallographic opera- scriptions of volume variation and variation in individual tions, for example symmetry generation or structure-fac-

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 414  R. J. Angel et al., EosFit7c and equations of state tor calculations. All of the modules are written in a sub- EoS parameters (see Example) and the data. For P-V-T set of Fortran-95 that ensures that the library can be EoS we use the convention that normalized pressures F compiled and linked with a wide range of commercial and finite strains f are defined isothermally in terms of and non-commercial compilers. We have written and va- VPT =V0T . Programming using the module is also made lidated a new EoS module for CrysFML called cfml_eos easier by the provision of a number of ‘utility’ routines, that allows the external programmer to easily write pro- for example to set the implied values for an EoS, and to grams that can read, manipulate and fit EoS data, and output the parameters (Table 1). The subroutine perform related calculations for all of the EoS that we deriv_partial_p provides partial derivatives of EoS have described above. In order to use the library, the parameters with respect to pressure, which can then be CrysFML code should be downloaded and compiled to a used in external least-squares routines to fit EoS. For the library, which must then be linked to the external pro- reasons of numerical stability (see Angel, 2000a), the de- gram. Access to the procedures and data types defined in rivatives of pressure with respect to the parameters V00, 0 00 the EoS module is obtained through the inclusion of just K00, K 00, K 00 and @K00=@T are all coded analytically. a single Fortran statement: Numerical derivatives suffice for the parameters describ- ing thermal expansion. USE CFML_EOS The use of sensible default values for the parameters of an EoS, which can be set by a call to init_eos, to- The entire CrysFML has to be compiled and installed be- gether with extensive exception trapping, make program cause the EoS module also makes use of other modules crashes within the module exceedingly rare. If an error within CrysFML to manipulate unit-cell data and text in- state occurs, for example because physically or mathe- formation in files. matically-invalid results are calculated within the Manipulation of EoS and their parameters is greatly cfml_eos module, the err_eos flag is set true and an simplified for the programmer by the definition in the explanation is written to the err_eos_message charac- EoS module of a data type called eos_type. This data ter variable (Table 2), both of which can be interrogated structure holds all of the parameters required to define a by the external program (see Example). At the same time, P-V-T equation of state, including the type of isothermal the cfml_eos module always returns ‘reasonable’ finite model, the type of thermal expansion model, whether it values of variables when an error condition is met, and is a linear or volume EoS, and the names, values and de- should never return undefined or infinite quantities scriptions of the parameters. Once a variable of this type (such as nan). has been declared in the external program, it can be in- The handling of data is also simplified by use of two itialized by the subroutine init_eos in the module, defined data types (Table 2). Eos_data_type can hold after which the values of any of the components can be all of the unit-cell parameters and volume, the pressure set by the external program (see Example). If a linear and temperature, and all of their uncertainties for a sin- EoS is specified, then all of the values in the eos_type gle measurement. The eos_data_list_type is essen- variable are the linear quantities; the length, linear mod- tially an array of the data points, allowing the use of ob- uli and linear thermal expansion coefficients at the refer- ject-oriented style programming structures to manipulate ence conditions. The eos_type variable can then be the data. Utility routines are provided to dynamically al- used in calls to functions in the cfml_eos module that locate and deallocate memory to these structures, if that return individual values of P, V or T at the values of the is required. Full details of all available data structures other two variables. The properties at any P, V or T of the and subroutines are provided in the CrysFML help file EoS, the bulk modulus and its derivatives or the thermal provided as part of the distribution. expansion coefficient, at any given volume and tempera- ture are obtained by calls to individual functions (Ta- ble 1). The subroutine eos_cal returns all of these val- Data file format ues at any P and T as an array. If the EoS parameters have been obtained through fitting to data, the subrou- Programmers can define their own data file formats, and tine eos_cal_esd provides estimates of the uncertain- write their own routines to populate the eos_data_- ties of the properties at pressure and temperature by the type and eos_data_list_type variables in order to manipulation of the variance-covariance matrix from the use the data manipulation and fitting routines within the parameter refinement. Subroutines are also provided to cfml_eos module. But we have implemented a flexible, calculate the finite strain and normalized stress from the keyword-directed file format, and we provide the rou-

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  415 tines in the cfml_eos module to read the data from validated by the first author and many users indepen- files. The over-riding design considerations were to allow dently against a variety of calculations in external pro- all of the data associated with an experiment (perhaps grams including spread-sheets, algebraic manipulation just P and V, but possibly all of the unit-cell parameters) software, and data analysis software. This led to a num- to be stored and read from a single file with the maxi- ber of corrections and modifications to the code in the mum flexibility and minimum input for the user. So there first years following its initial release. For the last decade are only four keywords to provide information, as in this the code has not been changed and produces results in example: good agreement with other programs and calculations. For the cfml_eos module, the entire algebra of all of TITLE KALSILITE HIGH P DATA GATTA ET AL (2011) AM MIN 96:1363 the EoS was first derived again ab-initio, and the code # confirmed against these new derivations. The results # Note that no volume data is given from individual sub-programs were checked against # those from EosFit v5.2 where possible. For new features, SYSTEM hexagonal including the Tait EoS and the new thermal expansion TSCALE C models, validation of individual routines was performed FORMAT 1 T P SIGP A SIGA C SIGC against spread-sheet calculations. The difference in cod- 25,0.000,0.004,5.16026,0.00021,8.71661,0.00021 ing methods and structures between Fortran and spread- 25,0.328,0.004,5.14963,0.00020,8.70565,0.00019 sheets makes the exact duplication of errors between the

25,0.565,0.004,5.14195,0.00012,8.69821,0.00013 two methods unlikely. Comparisons of the values of KPT , 0 00 K PT and K PT calculated with the analytical expressions TITLE allows a title to be put on the file. If the crystal in the code with the derivatives calculated numerically system is specified with the keyword SYSTEM, then from values of V at closely-spaced values of P confirm only the symmetry-independent unit-cell parameters that the code is internally consistent. The least-squares have to be given. If the file is read with the cfml_eos routines incorporated in to the EosFit7c program were module subroutine read_eos_datafile, that will set then validated by comparing fitting results against those the remaining unit-cell parameters to correspond to the from version 5.2 for a wide variety of datasets. All of conventional setting of the crystal system. Cell para- these tests can be repeated by users and programmers. meters are not required; data consisting of only vo- lumes can also be read, and in this case the SYSTEM keyword does not have to be used. The data itself can Implementation in EosFit7c appear on one or two lines for each data ‘point’. The order of the individual data items is specified by the A new console program, named EosFit7c, has been writ- entries after the FORMAT keyword. Uncertainties in ten to perform EoS calculations and fitting with the values can either be given by separate columns of val- cfml_eos module within CrysFML. This program pro- ues, or in the standard format with parentheses, e.g. vides the same utilities as the previous EosFit v5.2 pro- 5.16026(21). The TSCALE keyword allows temperature gram (Angel, 2000a), including the calculation of proper- data to be input as degrees C or F, with a default when ties of an EoS, and EoS parameters can be determined no keyword is present of K. Data in °C and °F are im- with the program by fitting to P-V or P-linear data by the mediately converted on reading to K, and the method of least-squares. Some changes have been made cfml_eos module works entirely in K. in the organisation of the command-line interface to re- duce the number of available commands and thus make learning the program easier. There is now a single ‘input’ Software validation command with which the user can load parameters for both the compressional and thermal models. A single It has recently been noted that much published science command returns all of the properties of the EoS at any relies on unvalidated software or algorithms (e.g. Barnes, T and P, in place of the individual commands to return 2010; Alden & Read, 2013; Hayden, 2013). Given that we individual parameter values in the previous version. The have also identified errors in EoS in the published litera- calculation of P from V and T is provided by a separate ture (as noted above), we record here the processes of command. Output of all parameters for ranges of pres- validation of the cfml_eos module within CrysFML. sures and/or temperatures to text files allows any para- The EosFit v5.2 program (Angel, 2000a) was previously meter of the EoS to be plotted with external programs.

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 416  R. J. Angel et al., EosFit7c and equations of state

Example program use cfml_eos implicit none type (eos_type) :: eos !declare eos variable real,dimension(4) :: vals !> set eos and parameters call init_eos(eos) !initialise eos variable eos%imodel¼2 !Birch-Murnaghan eos%iorder¼3 ! 3rd order eos%params(1)¼112.98 !vo eos%params(2)¼37.12 !ko eos%params(3)¼5.99 ! kprime call set_kp_kpp_cond(eos) ! set other default values call write_info_eos(eos) ! report the values t¼0.0 ! temperature not used do i¼1,10 call init_err_eos ! initialises error system p¼real(i) call eos_cal(p,t,eos,vals) ! calculate all values call ffcal_eos(p,t,eos,fp,fs) ! calculate finite stress/strain

if(err_eos)then ! print warning and error messages write(6,’(f10.4,’’: ’’,a)’)p,trim(err_eos_mess) else ! print eos values write(6,’(7f10.4)’)p,vals(1:4),fs,fp endif enddo end

When uncertainties in parameters are available (e.g. from sufficient cell parameter data is provided, the lattice re- a least-squares fit to data), all calculated output values peat in any direction [UVW] or any plane spacing d(hkl) are accompanied by estimated uncertainties calculated can be selected and fit with a linear EoS. This allows the from transformation of the variance-covariance matrix. principal axes of strain in monoclinic and triclinic crys- We emphasise that these features allow the EosFit7c pro- tals to be fit directly with an EoS. For fitting, individual gram to be used for EoS calculations, and it is not just data can now be omitted from the least-squares fitting, limited to fitting EoS to data. which obviates the previous need to edit and re-read The development of the cfml_eos module has al- data files. The data can be converted to normalised pres- lowed a number of new features to be added to the Eos- sure and finite strain for output to external plotting pro- Fit7c program. The Tait isothermal equation of state has grams. Sets of EoS parameters can be saved and subse- been added, along with all of the thermal expansion and quently read back into the program from a specific ‘eos’ thermal pressure models described above. The program file format, which also stores the variance-covariance reads both the new format data files, and the data files matrix if it is available. This allows uncertainties to be in the format for EosFit v5.2. If there is more than one set given for calculated pressure and volumes, without the of fit-able data (e.g. if the file contains cell parameters as need to refit the original data. The other important well as unit-cell volumes) then the user can select each change from EosFit v5.2 is that, as described above in in turn for fitting. The remainder of the program works more detail, the definition of thermal expansion coeffi- only with one selected dataset at a time. In addition, if cients and moduli for linear EoS have been changed to

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  417

Tab. 1: Public subroutines and functions in the cfml_eos module.

Data structure manipulation Purpose subroutine allocate_eos_data_list(n, e) Allocates memory to a data list subroutine allocate_eos_list(n, e) Allocates memory to a eos list subroutine deallocate_eos_data_list(e) De-allocates memory for a data list subroutine deallocate_eos_list(e) De-allocates memory for a eos list subroutine init_eos_thermal(eospar) Initialises the thermal part of an eos subroutine init_eos_type(eospar,clin,ithermal) Initialises an eos subroutine init_eos_data_type(eospar) Initialises an eos data type subroutine init_err_eos() Initialises/resets the error system

Data manipulation subroutine read_eos_datafile(fname,dat) Reads in data from a datafile subroutine ffcal_dat(v,v0,p,eospar,f,s) Calculates finite stress and strain from the data subroutine ffcal_dat_esd(v,sigv,v0,sigv0,p,sigp, Calculates finite stress and strain and their esd’s eospar,f,sigf,s,sigs) from the data and its esd’s

Eos initialisation subroutine set_eos_names(eospar) Sets the names of variables subroutine set_eos_use(eospar) Sets flags to show which variables are used in the chosen types of eos and thermal expansion models subroutine set_kp_kpp_cond(eospar) Sets implied values of eos parameters

Eos properties Returned values subroutine deriv_partial_p(v,t,eospar,td) Partial derivatives of P with respect to eos parameters 0 00 subroutine eos_cal(p,t,eospar,parvals) VPT , KPT , K PT , K PT , @KPT =@T, αPT at the input P and T 0 00 subroutine eos_cal_esd(p,t,eospar,esd) Esd’s of the values of VPT , KPT , K PT , K PT , @KPT =@T, αPT at the input P and T function get_volume(p,t,eospar) VPT at input P, T function k_cal(v,t,eospar) KPT at input P, T 0 function kp_cal(v,t,eospar) K PT at input P, T 00 function kpp_cal(v,t,eospar) K PT at input P, T function dkdt_cal(p, t, eospar) @KPT =@T at input P, T function alpha_cal(p,t,eospar) αPT at input P, T subroutine ffcal_eos(p,t,eospar,f,s) F, f at the input P, T subroutine write_info_eos(eospar, iout) All eos parameters to unit iout function get_pressure(v,t,eospar) P at input V, T function get_pressure_esd(v,t,eospar) Esd(P) at input V,T from esd’s in eos parameters function get_volume_s(f,t,eospar) V at input finite strain and T function pthermal(t,eospar) Thermal pressure at T function pressure_f(f,s,eospar) Pressure from input f, F function strain(vv0,eospar) Finite strain from input VPT =V0T

Tab. 2: Data structures and public variables in the cfml_eos module. make them consistent with the definitions and conven- tions of linear elasticity theory. Parameters n_eospar Max number of eos parameters ncol_data_max Max number of data items per line in a datafile EoS fitting err_eos .true. when error in the module err_eos_mess error message or information The EosFit7c program implements all of the recommen- dations with respect to fitting EoS parameters to P-V (or Data structure types eos_type All parameters for one eos P-linear) data of Angel (2000a), in exactly the same way eos_list_type A list of eos_type as did EosFit v5.2. We note the key points here. Because eos_data_type All the data for one data point the relative experimental uncertainties in P are usually (P,T,V, cell parameters and esd’s) significantly greater than those in V, all fits are per- eos_data_list_type A list of eos_data_type to contain a formed by least-squares minimization of the difference in whole dataset observed and calculated pressures, and not volumes. The

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM 418  R. J. Angel et al., EosFit7c and equations of state choice of weighting scheme is left to the user, but if Acknowledgements: This software development was sup- weights are derived from volume and/or temperature un- ported by ERC starting grant 307322 to Fabrizio Nestola certainties, then the “effective variance method” (Orear, of the University of Padova, and by the Ministerio Espa- 1982) is used to calculate the overall weight, w, applied ñol de Ciencia e Innovación, Project MAT2010-21270-C04- to a data point as: 02, and MALTA Consolider CSD2007-0045 to Javier Gon- zalez-Platas. We thank all previous users of EosFit for 1 K 2 their continued feedback on the program that has led to ¼ σ2 þ σ2 þ σ2 ðαKÞ2 : w P V V T many improvements in the software and helped in its va- lidation. We especially acknowledge Tiziana Boffa-Bal- Because the weight of an individual data point clearly laran and Fabrizio Nestola for valuable discussions on depends on the parameter values of the EoS, the various aspects of EoS and the development of the mod- weights are updated in every least-squares cycle. Once ule and the program. the least-squares process has converged, a full set of statistical fit criteria plus the variance/covariance matrix and the correlation coefficients between parameters are References provided to the user to allow critical evaluation of the K. Alden, M. Read, Nature 2013, 502, 448. results. O. L. Anderson, Equations of State of Solids for Geophysics and Cera- mic Science, Oxford University Press, Oxford, UK 1995. R. J. Angel, Equations of state. In: High-pressure and high-tempera- Availability ture crystal chemistry (Eds. R. M. Hazen, R. T. Downs), Reviews in Mineralogy and Geochemistry, Vol. 41, pp. 35–60. Mineralo- gical Society of America and Geochemical Society, (Washing- The CrysFML subroutine library, which includes the EoS ton, DC) 2000a. module described in this paper, is described at http:// R. J. Angel, High-pressure structural phase transitions. In: Transfor- www.ill.eu/other_sites/fullprof/php/programs.html, and mation Processes in Minerals (Eds. S. A. T. Redfern, can be downloaded from https://forge.epn-campus.eu/ M. A. Carpenter), Reviews in Mineralogy & Geochemistry, Vol. 39, pp. 85–104. Mineralogical Society of America and Geo- projects/crysfml. The EosFit7c console program to per- chemical Society, (Washington, DC) 2000b. form EoS calculations and fit EoS parameters to data is R. J. Angel, J. M. Jackson, H. J. Reichmann, S. Speziale, European available for Windows and Linux operating systems at Journal of Mineralogy 2009, 21, 525. www.rossangel.net, together with example datasets and N. Barnes, Nature 2010, 467, 753. complete documentation. R. G. Berman, Journal of Petrology 1988, 29, 445. F. Birch, Physical Review 1947, 71, 809. F. Birch, Journal of Geophysical Research 1986, 91, 4949. I. Brown, P. Klages, A. Skowron, Acta Crystallographica B 2003, 59, Conclusions and future prospects 439. T. S. Duffy, Y. B. Wang, Pressure-volume-temperature equations of The development of the cfml_eos module within state. In: Ultrahigh-Pressure Mineralogy: Physics and Chemistry CrysFML provides a validated set of subroutines that per- of the Earth’s Deep Interior (Ed. R. Hemley), Reviews in Miner- alogy, Vol. 37, pp. 425–458. Mineralogical Society of America, form all conceivable EoS calculations, allowing the pro- (Washington, DC) 1998. grammer to focus on writing software to solve scientific F. Fabbiani, C. Pulham, Chemical Society Reviews 2006, 35, 932. problems without having to worry about the technical- Y. Fei, Thermal expansion. In: Mineral Physics & Crystallography: A ities of complex EoS formulations. The inclusion of the Handbook of Physical Constants (Ed. T. Ahrens), Vol. 2, pp. 29– module within a library of much wider use should en- 44. American Geophysical Union, (Washington, DC) 1995. 1989 sure its longer-term survival and availability. The J. Freund, R. Ingalls, Journal of Physics & Chemistry of Solids , 50, 263. cfml_eos module is structured so that it could be ea- G. D. Gatta, R. J. Angel, N. Rotiroti, J. Zhao, M. Alvaro, M. A. Carpen- sily extended to include further types of isothermal EoS ter, American Mineralogist 2011, 96, 1363. or thermal expansion models. The authors have also de- M. Gottschalk, European Journal of Mineralogy 1997, 9, 175. veloped a GUI version of EosFit7 (Gonzalez-Platas et al., E. C. Hayden, Nature 2013, 501, 472. in prep.) that incorporates full facilities for plotting EoS G. Hellfrich, J. A. D. Connolly, American Mineralogist 2009, 94, 1616. as well as the features in EosFit7c, and will continue to T. J. B. Holland, R. Powell, Journal of Metamorphic Geology 1998, cfml_eos develop other EoS utilities based on the mod- 16, 309. ule in CrysFML, and to maintain and upgrade the mod- T. J. B. Holland, R. Powell, Journal of Metamorphic Geology 2011, 29, ule itself. 333.

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM R. J. Angel et al., EosFit7c and equations of state  419

W. B. Holzapfel, Zeitschrift für Kristallographie 2001, 216, 473. F. D. Stacey, B. J. Brennan, R. D. Irvine, Geophysical Surveys 1981, 4, Y. K. Huang, C. Y. Chow, Journal of Physics D: Applied Physics 1974, 189. 7, 2021. L. Stixrude, C. Lithgow-Bertelloni, Geophysical Journal International I. Jackson, H. Niesler, The elasticity of periclase to 3 GPa and some 2005, 162, 610. geophysical implications. In: High-Pressure Research in Geo- I. Suzuki, Journal of Physics of the Earth 1975, 23, 145. physics (Eds. S. Akimoto, M. H. Manghnani), pp. 93–113. Center M. Tribaudino, R. J. Angel, F. Camara, F. Nestola, D. Pasqual, I. Mar- for Academic Publications, (Tokyo) 1982. giolaki, Contributions to Mineralogy and Petrology 2010, 160, R. Jeanloz, Physical Review B 1988, 38, 805. 899. K. Knight, Physics and Chemistry of Minerals 2010, 37, 529. M. Tribaudino, M. Bruno, F. Nestola, D. Pasqual, R. J. Angel, Amer- H. Kroll, A. Kirfel, R. Heinemann, B. Barbier, European Journal of ican Mineralogist 2011, 96, 992. Mineralogy 2012, 24, 935. A. Tröster, W. Schranz, R. Miletich, Physical Review Letters 2002, M. Kumar, Physics and Chemistry of Minerals 2003, 30, 556. 88, 055503. F. Murnaghan, American Journal of Mathematics 1937, 49, 235. P. Vinet, J. Ferrante, J. Rose, J. Smith, Journal of Geophysical Re- J. F. Nye, Physical properties of crystals, Oxford University Press, Ox- search 1987, 92, 9319. ford 1957. P. Vinet, J. Ferrante, J. Smith, J. Rose, Journal of Physics C: Con- J. Orear, American Journal of Physics 1982, 50, 912. densed Matter 1986, 19, L467. A. R. Pawley, S. A. T. Redfern, T. J. B. Holland, American Mineralo- D. C. Wallace, of crystals, John Wiley and Sons, gist 1996, 81, 335. New York 1972. J.-P. Poirier, A. Tarantola, Physics of Earth and Planetary Interiors B. Willis, A. Pryor, Thermal vibrations in crystals, Cambridge Univer- 1998, 109,1. sity Press, Cambridge 1975. J. Rodriguez-Carvajal, J. Gonzalez-Platas, IUCr Computing Commis- J. Zhao, N. L. Ross, R. J. Angel, Acta Crystallographica B 2004, 60, sion Newsletter 2003, 1, 50. 263. E. K. H. Salje, B. Wruck, H. Thomas, Zeitschrift für Physik B – Con- densed Matter 1991, 82, 399. Received November 21, 2013; accepted January 19, 2014 H. Schlosser, J. Ferrante, Physical Review B 1988, 37, 4351. Published online February 24, 2014 W. Schranz, A. Tröster, J. Koppensteiner, R. Miletich, Journal of Phy- sics Condensed Matter 2007, 19, 275202.

Brought to you by | Universita degli Studi di Padova Authenticated | [email protected] author's copy Download Date | 5/9/14 9:37 AM